/* 民宿房态管理系统 2.0 */
:root {
    --primary: #0E9F6E;
    --primary-dark: #0B7A55;
    --primary-soft: #E7F7EF;
    --ink: #13241E;
    --muted: #71807A;
    --line: #E4EBE7;
    --bg: #F3F6F4;
    --card: #FFFFFF;
    --warn: #D97706;
    --warn-soft: #FFF4E5;
    --danger: #DC2626;
    --danger-soft: #FDECEC;
    --info: #2563EB;
    --info-soft: #E8F1FE;
    --purple: #7C3AED;
    --purple-soft: #F3E8FF;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(16, 42, 34, .06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
code { background: #F1F4F2; padding: 2px 6px; border-radius: 5px; font-size: 12px; }

.icon { flex: 0 0 auto; }

/* ---------- 应用框架 ---------- */
.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 232px;
    padding: 20px 14px 16px;
    background: linear-gradient(180deg, #0C3B2E 0%, #08261D 100%);
    color: #CFE3DA;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 8px 22px;
}

.brand-mark {
    width: 40px; height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, #2AD99B, #0E9F6E);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 700;
    box-shadow: 0 6px 14px rgba(14, 159, 110, .35);
}

.brand-text { line-height: 1.25; }
.brand-text strong { display: block; color: #fff; font-size: 15px; letter-spacing: .5px; }
.brand-text span { font-size: 11px; color: #8FB3A5; letter-spacing: 1.5px; }

.nav-section {
    padding: 14px 12px 6px;
    font-size: 11px;
    color: #6F9385;
    letter-spacing: 1px;
}

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #A9C4B9;
    font-size: 13.5px;
    transition: background .15s, color .15s;
}

.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(34, 197, 139, .18); color: #fff; box-shadow: inset 0 0 0 1px rgba(42, 217, 155, .22); }
.nav-link.active .icon { color: #4FE0AC; }
.nav-link .nav-badge {
    margin-left: auto;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #EF4444;
    color: #fff;
    font-size: 11px;
    display: inline-flex; align-items: center; justify-content: center;
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.09);
}

.side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
}

.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38D9A9, #0E9F6E);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex: 0 0 auto;
}

.side-user-meta { flex: 1; min-width: 0; }
.side-user-meta strong { display: block; color: #fff; font-size: 13px; font-weight: 500; }
.side-user-meta span { font-size: 11px; color: #86A99B; }

.side-logout {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    color: #8FB3A5;
}
.side-logout:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { margin-left: 232px; min-height: 100vh; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 64px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(243, 246, 244, .86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(228, 235, 231, .9);
}

.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-sub { font-size: 12px; color: var(--muted); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-date { font-size: 12px; color: var(--muted); }

.mobile-menu-btn {
    display: none;
    width: 38px; height: 38px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    color: var(--ink);
    align-items: center; justify-content: center;
    cursor: pointer;
}

.content { width: 100%; max-width: none; padding: 22px 26px 52px; }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 24, 18, .45);
    z-index: 45;
}

.mobile-nav { display: none; }

/* ---------- 页头 ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: -.3px; }
.page-head .sub { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head .muted { font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: #FAFCFB; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }

/* ---------- 指标卡 ---------- */
.metric {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    min-width: 0;
}
.metric-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    flex: 0 0 auto;
}
.metric-icon.blue { background: var(--info-soft); color: var(--info); }
.metric-icon.orange { background: var(--warn-soft); color: var(--warn); }
.metric-icon.purple { background: var(--purple-soft); color: var(--purple); }
.metric-icon.red { background: var(--danger-soft); color: var(--danger); }
.metric-meta { min-width: 0; }
.metric-label { font-size: 12.5px; color: var(--muted); }
.metric-value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; line-height: 1.25; margin-top: 2px; white-space: nowrap; }
.metric-value small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.metric-foot { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-soft:hover { background: #D8F2E6; }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: #C8D6D0; background: #FAFCFB; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #FBDADA; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; height: auto; color: var(--primary-dark); font-size: 12.5px; cursor: pointer; }
.btn-link.danger { color: var(--danger); }

.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* ---------- 表单 ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: span 3; }
.field > span { font-size: 12.5px; color: #46564F; font-weight: 500; }
.field small { color: var(--muted); font-size: 11.5px; }

input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="tel"], input[type="email"], input[type="month"], select, textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid #DCE5E0;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 159, 110, .12);
}
textarea { resize: vertical; min-height: 74px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); }
.check-line { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #46564F; cursor: pointer; }
.check-line input { margin-top: 2px; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.form-hint { font-size: 11.5px; color: var(--muted); }

/* ---------- 状态/标签 ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.7;
    white-space: nowrap;
}
.chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.success { background: var(--primary-soft); color: var(--primary-dark); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.muted { background: #F1F4F2; color: #6B7280; }
.chip.purple { background: var(--purple-soft); color: var(--purple); }
.chip.no-dot::before { display: none; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 8px;
    border-radius: 6px;
    background: #F3F6F4;
    color: #4B5B54;
    font-size: 11.5px;
}

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left;
    padding: 10px 14px;
    background: #F8FAF9;
    color: #6B7A74;
    font-weight: 500;
    font-size: 11.5px;
    letter-spacing: .3px;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid #EEF3F0;
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FBFDFC; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.table .muted { color: var(--muted); }
.table .strong { font-weight: 600; }
.table.compact td { padding: 9px 12px; }
.table.compact th { padding: 8px 12px; }

/* ---------- 空状态 ---------- */
.empty {
    padding: 38px 20px;
    text-align: center;
    color: var(--muted);
}
.empty .empty-icon {
    width: 48px; height: 48px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: #F3F6F4;
    display: flex; align-items: center; justify-content: center;
    color: #9BADA5;
}
.empty strong { display: block; color: #46564F; font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.empty span { font-size: 12px; }

/* ---------- 通知 ---------- */
.notice {
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.notice.success { background: var(--primary-soft); color: var(--primary-dark); border-color: #CBEDDD; }
.notice.warn { background: var(--warn-soft); color: #92400E; border-color: #FDE3BE; }
.notice.danger { background: var(--danger-soft); color: #991B1B; border-color: #F8CFCF; }
.notice.info { background: var(--info-soft); color: #1E40AF; border-color: #CFE0FD; }

/* ---------- 工具栏 ---------- */
.toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }
.toolbar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box input { padding-left: 32px; min-width: 210px; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #98A7A1; }

.segmented {
    display: inline-flex;
    background: #EAF0EC;
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}
.segmented a, .segmented button {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    color: #5E6E67;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.segmented a.active, .segmented button.active {
    background: #fff;
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(16,42,34,.08);
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
    padding: 7px 13px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: #4B5B54;
    font-size: 12.5px;
}
.tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }

/* ---------- 房态日历 ---------- */
.cal-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.cal-toolbar .month {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.3px;
    min-width: 132px;
    text-align: center;
}
.cal-legend { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.cal-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    max-height: calc(100vh - 258px);
}
.cal-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    min-width: 100%;
}
.cal-table th, .cal-table td {
    border-right: 1px solid #EEF3F0;
    border-bottom: 1px solid #EEF3F0;
    padding: 0;
}
.cal-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #F8FAF9;
    padding: 8px 4px;
    text-align: center;
    font-weight: 500;
    color: #6B7A74;
    min-width: 54px;
}
.cal-table thead th .d { display: block; font-size: 14px; color: var(--ink); font-weight: 600; margin-top: 1px; }
.cal-table thead th.is-today .d { color: var(--primary); }
.cal-table thead th.is-weekend .d { color: var(--warn); }
.cal-table th.room-col, .cal-table td.room-col {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #fff;
    min-width: 148px;
    max-width: 148px;
    padding: 9px 12px;
    text-align: left;
    vertical-align: middle;
}
.cal-table thead th.room-col { z-index: 6; background: #F8FAF9; }
.cal-table td.room-col .rname { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.cal-table td.room-col .rsub { color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-day { min-width: 54px; height: 56px; vertical-align: top; }
.cal-day.is-today { background: #F2FBF6; }
.cal-day.is-past { background: #FAFBFA; }
.cal-cell {
    display: block;
    min-height: 55px;
    padding: 3px;
    color: inherit;
    position: relative;
    transition: background .12s;
}
.cal-cell:hover { background: #F4FAF6; text-decoration: none; }
.cal-cell .add {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B9C9C1;
    opacity: 0;
    transition: opacity .12s;
}
.cal-cell:hover .add { opacity: 1; }
.cal-order {
    display: block;
    border-radius: 5px;
    padding: 3px 4px;
    font-size: 10.5px;
    line-height: 1.35;
    height: 100%;
    overflow: hidden;
    border: 1px solid transparent;
}
.cal-order b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-order small { display: block; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-order.pending { background: #FFF6E8; color: #9A5B00; border-color: #FBE2BB; }
.cal-order.confirmed { background: #EDF3FF; color: #1D4ED8; border-color: #D6E3FF; }
.cal-order.checked_in { background: #E7F7EF; color: #067A52; border-color: #C5EDDD; }
.cal-order.checked_out { background: #F1F4F2; color: #5F6F68; border-color: #E2E9E5; }
.cal-closed {
    display: flex; align-items: center; justify-content: center;
    height: 100%; min-height: 49px;
    color: #9BADA5; background: repeating-linear-gradient(45deg, #F8FAF9, #F8FAF9 5px, #F1F5F2 5px, #F1F5F2 10px);
    border-radius: 5px; font-size: 10.5px;
}
.cal-maint { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 49px; border-radius: 5px; background: #FDECEC; color: #B42318; font-size: 10.5px; }
.cal-tip { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* ---------- 房态速览 ---------- */
.room-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.room-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 12px;
    color: #46564F;
}
.room-pill b { font-weight: 600; }
.room-pill.success { border-color: #CFEDE0; background: #F7FDFA; }
.room-pill.info { border-color: #D6E3FF; background: #F7FAFF; }
.room-pill.warn { border-color: #FBE2BB; background: #FFFBF4; }
.room-pill.danger { border-color: #F8CFCF; background: #FFF8F8; }
.room-pill.muted { background: #F7F9F8; color: #7A8983; }

/* ---------- 列表/待办 ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #EEF3F0;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #FBFDFC; }
.list-main { min-width: 0; flex: 1; }
.list-main strong { display: block; font-size: 13px; font-weight: 500; }
.list-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.list-side { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.list-side strong { display: block; color: var(--ink); font-size: 13px; }

.date-badge {
    width: 44px; height: 44px;
    border-radius: 11px;
    background: #F3F6F4;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    flex: 0 0 auto;
    color: #46564F;
    line-height: 1.1;
}
.date-badge b { font-size: 15px; }
.date-badge span { font-size: 10px; color: var(--muted); }

/* ---------- 进度条 ---------- */
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 62px 1fr 54px; gap: 10px; align-items: center; font-size: 11.5px; color: var(--muted); }
.bar-track { height: 8px; border-radius: 999px; background: #EEF3F0; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2AD99B, #0E9F6E); }
.bar-fill.blue { background: linear-gradient(90deg, #60A5FA, #2563EB); }
.bar-fill.orange { background: linear-gradient(90deg, #FBBF24, #D97706); }
.bar-row .val { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 快速操作 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 12.5px;
    transition: border-color .15s, background .15s;
}
.quick-item:hover { border-color: #BFE5D5; background: #F7FDFA; color: var(--ink); text-decoration: none; }
.quick-item .qi-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}
.quick-item .qi-icon.blue { background: var(--info-soft); color: var(--info); }
.quick-item .qi-icon.orange { background: var(--warn-soft); color: var(--warn); }
.quick-item .qi-icon.purple { background: var(--purple-soft); color: var(--purple); }

/* ---------- 任务 ---------- */
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.task-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    background: #fff;
}
.task-card .tc-head { display: flex; align-items: center; gap: 8px; }
.task-card .tc-room { font-weight: 600; font-size: 14px; }
.task-card .tc-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.task-card .tc-actions { margin-top: 10px; display: flex; gap: 6px; }
.task-card.done { background: #FAFBFA; }

/* ---------- 登录 ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    background: radial-gradient(1200px 600px at 10% 0%, #DDF3E8 0%, #F3F6F4 45%, #F3F6F4 100%);
}
.login-hero {
    flex: 1.1;
    padding: 64px 8vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(150deg, #0C3B2E 0%, #0E5B43 55%, #0E9F6E 120%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-hero::after {
    content: "";
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(42,217,155,.28), transparent 65%);
    right: -120px; bottom: -120px;
}
.login-hero .brand-mark { width: 52px; height: 52px; font-size: 24px; border-radius: 16px; margin-bottom: 26px; }
.login-hero h1 { font-size: 34px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.5px; }
.login-hero p { color: #B9D8CB; font-size: 14px; max-width: 420px; margin: 0 0 32px; }
.login-features { display: flex; flex-direction: column; gap: 12px; }
.login-feature { display: flex; align-items: center; gap: 10px; color: #D7E9E1; font-size: 13px; }
.login-feature span { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.login-panel { width: 480px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(16,42,34,.12);
    padding: 32px 28px;
}
.login-card h2 { margin: 0 0 4px; font-size: 21px; }
.login-card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { margin-top: 6px; }
.login-foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: #9BADA5; }

/* ---------- 安装 ---------- */
.install-page {
    min-height: 100vh;
    background: radial-gradient(1100px 520px at 0% 0%, #DDF3E8 0%, #F3F6F4 50%);
    padding: 34px 20px;
}
.install-shell {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 380px 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 26px 70px rgba(16,42,34,.10);
    overflow: hidden;
}
.install-brand {
    background: linear-gradient(160deg, #0C3B2E, #0E5B43 60%, #0E9F6E 140%);
    color: #fff;
    padding: 40px 34px;
}
.install-brand .brand-mark { margin-bottom: 20px; }
.install-brand h1 { font-size: 23px; margin: 0 0 8px; line-height: 1.3; }
.install-brand h1 span { font-size: 13px; color: #8FE7C6; font-weight: 500; }
.install-brand p { color: #B9D8CB; font-size: 12.5px; margin: 0 0 26px; }
.install-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.install-points li { position: relative; padding-left: 20px; font-size: 12.5px; color: #D7E9E1; }
.install-points li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 3px; background: #2AD99B; }
.install-panel { padding: 34px 38px 38px; max-height: 88vh; overflow-y: auto; }
.install-head h2 { margin: 0 0 4px; font-size: 21px; }
.install-head p { margin: 0 0 18px; color: var(--muted); font-size: 12.5px; }
.env-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.env-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; font-size: 12.5px; border-bottom: 1px solid #EEF3F0; }
.env-item:last-child { border-bottom: 0; }
.env-item .env-dot { width: 7px; height: 7px; border-radius: 50%; background: #B9C9C1; }
.env-item.ok .env-dot { background: var(--primary); }
.env-item.bad .env-dot { background: var(--danger); }
.env-item b { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.env-item.ok b { color: var(--primary-dark); }
.env-item.bad b { color: var(--danger); }
.install-form h3 { font-size: 13.5px; margin: 20px 0 10px; padding-top: 16px; border-top: 1px dashed var(--line); }
.install-form h3:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.install-form .btn-block { margin-top: 20px; }
.install-tip { font-size: 11px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.install-success { text-align: center; padding: 30px 0 10px; }
.success-ring {
    width: 66px; height: 66px; border-radius: 50%;
    margin: 0 auto 16px;
    background: var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.install-success h2 { margin: 0 0 6px; font-size: 22px; }
.install-success p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.install-success .notice { text-align: left; margin-bottom: 18px; }

/* ---------- 详情 ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.detail-item { padding: 9px 0; border-bottom: 1px dashed #EDF2EF; }
.detail-item.span-2 { grid-column: span 2; }

/* ---------- 价格日历 ---------- */
.price-cal {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}
.price-day {
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 8px 9px;
    background: #fff;
    min-width: 0;
}
.price-day.is-weekend { background: #FFFCF6; border-color: #F3E7D3; }
.price-day.is-today { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 159, 110, .09); }
.price-day .pd-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: var(--muted);
    margin-bottom: 5px;
}
.price-day .pd-d { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.price-day input[type="number"] {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 12px;
    border-radius: 7px;
}
.price-day .pd-closed {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 10.5px;
    color: var(--muted);
    cursor: pointer;
}
.price-day .pd-closed input { width: 13px; height: 13px; }
.price-day .pd-orders {
    margin-top: 4px;
    font-size: 10px;
    color: #9BADA5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-item span { display: block; font-size: 11.5px; color: var(--muted); }
.detail-item strong { font-size: 13.5px; font-weight: 500; }
.detail-amount { font-size: 30px; font-weight: 700; letter-spacing: -.6px; }

.mono { font-variant-numeric: tabular-nums; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2-1 { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .login-hero { display: none; }
    .login-panel { width: 100%; }
    .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .install-shell { grid-template-columns: 1fr; }
    .install-brand { padding: 28px 30px; }
    .install-panel { max-height: none; }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
        width: 250px;
        box-shadow: 20px 0 50px rgba(6,24,18,.2);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open .nav-overlay { display: block; }
    .main { margin-left: 0; }
    .topbar { height: 58px; padding: 0 14px; }
    .topbar-title { font-size: 14px; }
    .topbar-date { display: none; }
    .mobile-menu-btn { display: inline-flex; }
    .content { padding: 16px 14px 88px; }
    .page-head { margin-bottom: 14px; }
    .page-head h1 { font-size: 19px; }
    .grid { gap: 10px; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .metric { padding: 13px 14px; gap: 10px; }
    .metric-icon { width: 36px; height: 36px; border-radius: 10px; }
    .metric-value { font-size: 21px; }
    .mobile-nav {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 40;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--line);
        padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    }
    .mobile-nav a, .mobile-nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 5px 0;
        border: 0;
        background: none;
        color: #8A9A93;
        font-size: 10.5px;
        cursor: pointer;
    }
    .mobile-nav a.active { color: var(--primary-dark); }
    .mobile-nav .icon { width: 21px; height: 21px; }
    .install-page { padding: 14px; }
    .install-panel { padding: 24px 22px 28px; }
    .login-page { padding: 18px; background: #F3F6F4; }
    .login-panel { padding: 0; }
    .login-card { box-shadow: 0 12px 36px rgba(16,42,34,.10); }
    .cal-wrap { max-height: none; }
    .cal-table th.room-col, .cal-table td.room-col { min-width: 110px; max-width: 110px; padding: 8px; }
    .cal-day { min-width: 48px; height: 52px; }
    .cal-cell { min-height: 51px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item.span-2 { grid-column: auto; }
    .price-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .price-day { padding: 6px; }
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .task-grid { grid-template-columns: 1fr; }
    .toolbar { align-items: stretch; }
    .toolbar form { width: 100%; }
    .search-box { flex: 1; }
    .search-box input { min-width: 0; width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid.cols-3 { grid-template-columns: 1fr; }
    .field.span-2, .field.span-3 { grid-column: auto; }
    .table { font-size: 12.5px; }
    .table th, .table td { padding: 9px 11px; }
}

@media (max-width: 480px) {
    .price-cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
    .metric-value { font-size: 19px; }
    .metric-label { font-size: 11.5px; }
    .login-card { padding: 26px 20px; }
}
