﻿:root {
    --ink: #1f2937;
    --muted: #667085;
    --line: #d8dee8;
    --paper: #ffffff;
    --soft: #f4f7fb;
    --nav: #253044;
    --nav-active: #32415c;
    --blue: #2563eb;
    --green: #16815f;
    --amber: #b7791f;
    --red: #c2413b;
    --gray: #6b7280;
    --shadow: 0 8px 24px rgba(28, 39, 62, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--soft);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 14px; color: #fff; background: var(--nav); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 18px; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #eaf2ff; color: var(--blue); font-weight: 700; }
.brand strong { display: block; font-size: 16px; line-height: 1.25; }
.brand span { display: block; margin-top: 2px; color: rgba(255,255,255,.68); font-size: 12px; }
.nav-group { margin-top: 18px; }
.nav-title { margin: 0 10px 8px; color: rgba(255,255,255,.54); font-size: 12px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.88); font-size: 14px; }
.nav-link i { width: 18px; text-align: center; color: rgba(255,255,255,.76); }
.nav-link:hover, .nav-link.active { background: var(--nav-active); color: #fff; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: #e23d3d; color: #fff; font-size: 12px; text-align: center; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; padding: 12px 24px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.top-title h1 { margin: 0; font-size: 20px; font-weight: 700; }
.top-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip, .logout { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.user-chip { gap: 8px; padding: 0 12px; font-size: 14px; }
.logout { width: 38px; color: var(--muted); }
.content { width: min(1180px, 100%); margin: 0 auto; padding: 24px; }
.content.narrow { width: min(920px, 100%); }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-body { padding: 18px; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.field { display: grid; gap: 7px; min-width: 170px; }
.field label, .form-label { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.form-control { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-family: inherit; font-size: 14px; }
.form-control.readonly, .readonly-box { background: #f8fafc; }
textarea.form-control { min-height: 112px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-group.full { grid-column: 1 / -1; }
.time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.time-row select { width: 88px; }
.btn, .aspnet-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-family: inherit; font-size: 14px; cursor: pointer; }
.btn-success { border-color: var(--green); background: var(--green); }
.btn-danger { border-color: var(--red); background: var(--red); }
.btn-secondary { border-color: var(--gray); background: var(--gray); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gridview { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 14px; }
.gridview th, .gridview td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.gridview th { background: #f7f9fc; color: #475467; font-weight: 700; }
.gridview tr:hover { background: #f8fbff; }
.status-pending { color: var(--amber); font-weight: 700; }
.status-approved { color: var(--green); font-weight: 700; }
.status-rejected { color: var(--red); font-weight: 700; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail-item { display: grid; gap: 7px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-value { min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; font-size: 14px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.shade { display: none; }
@media (max-width: 820px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: min(286px, 84vw); transform: translateX(-100%); transition: transform .2s ease; }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open .shade { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15,23,42,.42); }
    .menu-button { display: inline-grid; place-items: center; flex: 0 0 auto; }
    .topbar { padding: 10px 14px; }
    .top-title h1 { font-size: 18px; }
    .top-title p { display: none; }
    .user-chip span { display: none; }
    .content { padding: 16px; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .field, .form-control, .btn, .aspnet-button { width: 100%; }
    .form-grid, .detail-list { grid-template-columns: 1fr; }
}
