/* ============================================================
   CourtBook — Design System
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* 色板 */
    --color-bg-base: #0a0e1a;
    --color-bg-surface: #111827;
    --color-bg-elevated: #1a2236;
    --color-bg-input: #1e293b;
    --color-bg-hover: #243044;

    --color-border: #2a3a52;
    --color-border-focus: #3b82f6;

    --color-text-primary: #f0f4f8;
    --color-text-secondary: #8899aa;
    --color-text-muted: #5a6a7a;

    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
    --color-accent-glow: rgba(59, 130, 246, 0.25);

    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* 字号（流式缩放） */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --text-lg: clamp(1.05rem, 1rem + 0.25vw, 1.125rem);
    --text-xl: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.4rem, 1.2rem + 1vw, 2rem);
    --text-3xl: clamp(1.8rem, 1.5rem + 1.5vw, 2.5rem);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px var(--color-accent-glow);

    /* 动效 */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;

    /* 布局 */
    --nav-height: 64px;
    --sidebar-width: 240px;
    --content-max: 960px;
}


/* --- Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--color-bg-base);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
input, select, textarea { font: inherit; }


/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* 主内容区 — 移动端留出底部导航空间 */
.main {
    padding-bottom: calc(var(--nav-height) + var(--space-lg) + env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
    min-height: 100dvh;
}

/* 桌面端侧边栏 */
@media (min-width: 1024px) {
    .main {
        margin-left: var(--sidebar-width);
        padding-bottom: var(--space-xl);
    }
}


/* --- 底部导航（移动端） / 侧边栏（桌面端） --- */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(17, 24, 39, 0.85);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

@media (min-width: 1024px) {
    .nav {
        top: 0;
        bottom: auto;
        right: auto;
        width: var(--sidebar-width);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--space-xl) 0;
        border-top: none;
        border-right: 1px solid var(--color-border);
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
    transition: color var(--duration-fast);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    color: var(--color-accent);
}

.nav-item svg {
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .nav-item {
        flex-direction: row;
        gap: var(--space-sm);
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-sm);
        border-radius: var(--radius-md);
        margin: 2px var(--space-sm);
        width: auto;
    }
    .nav-item:hover,
    .nav-item.active {
        background: var(--color-bg-hover);
    }
}

/* 导航 logo（桌面端侧边栏顶部） */
.nav-logo {
    display: none;
}

@media (min-width: 1024px) {
    .nav-logo {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        padding: 0 var(--space-lg);
        margin-bottom: var(--space-xl);
        font-size: var(--text-lg);
        font-weight: 700;
        letter-spacing: -0.02em;
        color: var(--color-text-primary);
    }

    .nav-logo-icon {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
        border-radius: var(--radius-md);
        color: white;
    }
}


/* --- Card --- */
.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (min-width: 640px) {
    .card-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}


/* --- Grid --- */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 639px) {
    .grid-r-responsive { grid-template-columns: 1fr; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .grid-r-responsive { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-r-responsive { grid-template-columns: repeat(3, 1fr); }
}


/* --- Page Header --- */
.page-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl) 0 var(--space-lg);
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.header-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}


/* --- Status Bar --- */
.status-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

@media (min-width: 640px) {
    .status-bar {
        grid-template-columns: repeat(3, 1fr);
    }
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.status-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    color: var(--color-accent);
    flex-shrink: 0;
}

.status-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.status-value {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-top: 2px;
}


/* --- Input --- */
.input-group {
    margin-bottom: var(--space-lg);
}

.input-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 16px;
    transition: border-color var(--duration-fast),
                box-shadow var(--duration-fast);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238899aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.input-wrapper select option {
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    padding: 8px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.input-wrapper input.has-icon {
    padding-left: 42px;
}

.input-wrapper input::placeholder {
    color: var(--color-text-muted);
}

.input-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* 密码切换按钮 */
.input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--duration-fast);
}

.input-toggle:hover {
    color: var(--color-text-primary);
}


/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.btn-danger {
    background: transparent;
    color: var(--color-danger);
    border: 1px solid rgba(239,68,68,0.3);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239,68,68,0.1);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: var(--text-sm); }


/* --- Radio Card Group --- */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    background: var(--color-bg-input);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-align: center;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-card:has(input:checked) {
    border-color: var(--color-accent);
    background: rgba(59, 130, 246, 0.06);
    box-shadow: var(--shadow-glow);
}

.radio-card:hover {
    border-color: var(--color-accent);
}

.radio-card .radio-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
    transition: color var(--duration-fast);
}

.radio-card:has(input:checked) .radio-icon {
    color: var(--color-accent);
}

.radio-label {
    font-weight: 600;
    font-size: var(--text-base);
}

.radio-desc {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}


/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}


/* --- Stat Card --- */
.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: 700;
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}


/* --- Search Box --- */
.search-box {
    position: relative;
    width: 100%;
    max-width: 280px;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.search-box input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}


/* --- Table --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

th {
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

tr:hover td {
    background: var(--color-bg-hover);
}

/* 移动端表格 → 卡片 */
@media (max-width: 639px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
    }

    tr {
        margin-bottom: var(--space-md);
        background: var(--color-bg-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        padding: var(--space-md);
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid rgba(42, 58, 82, 0.5);
    }

    td:last-child {
        border-bottom: none;
    }

    td::before {
        content: attr(data-label);
        font-size: var(--text-xs);
        color: var(--color-text-muted);
        font-weight: 500;
        flex-shrink: 0;
        margin-right: var(--space-md);
    }
}


/* --- Action Buttons (table row) --- */
.action-group {
    display: flex;
    gap: var(--space-xs);
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.action-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
    border-color: var(--color-accent);
}


/* --- Toast --- */
.toast-container {
    position: fixed;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;

    /* 移动端顶部居中 */
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 1024px) {
    .toast-container {
        top: var(--space-lg);
        right: var(--space-lg);
        left: auto;
        transform: none;
    }
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 20px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastIn var(--duration-normal) var(--ease-spring);
    max-width: min(90vw, 400px);
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error   { border-left: 3px solid var(--color-danger); }
.toast.info    { border-left: 3px solid var(--color-accent); }

.toast svg {
    flex-shrink: 0;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal);
    padding: var(--space-md);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--duration-normal) var(--ease-spring);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}


/* --- Loading Spinner --- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* --- Checkbox --- */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: var(--text-sm);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    cursor: pointer;
}


/* ============================================================
   Pages
   ============================================================ */

/* --- Login Page --- */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.06) 0%, transparent 50%),
        var(--color-bg-base);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: var(--space-2xl) var(--space-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
    border-radius: var(--radius-xl);
    color: white;
    margin-bottom: var(--space-lg);
}

.auth-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* --- Date Tags --- */
.date-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.date-tag {
    padding: 8px 16px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.date-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-text-primary);
}

.date-tag.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    box-shadow: var(--shadow-glow);
}

.date-hint {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --- Time Slot Cards --- */
.time-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

@media (min-width: 640px) {
    .time-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

.time-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    background: var(--color-bg-input);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.time-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.time-card:hover {
    border-color: var(--color-accent);
}

.time-card:has(input:checked),
.time-card.active {
    border-color: var(--color-accent);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: var(--shadow-glow);
}

.time-card-icon {
    width: 24px;
    height: 24px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.time-card:has(input:checked) .time-card-icon,
.time-card.active .time-card-icon {
    color: var(--color-accent);
}

.time-card-time {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
}

.time-card-price {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-accent);
}

/* 管理后台弹窗输入框也用深色主题 */
.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="date"],
.modal-content select {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.modal-content input:focus,
.modal-content select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.modal-content input::placeholder {
    color: var(--color-text-muted);
}

.modal-content select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238899aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.modal-content select option {
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

/* 状态栏可点击项 */
.status-item.clickable {
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin: calc(var(--space-sm) * -1);
    transition: background var(--duration-fast);
}

.status-item.clickable:hover {
    background: var(--color-bg-hover);
}

/* --- Result Modal Icon --- */
.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    animation: resultPop 0.4s var(--ease-spring);
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.12);
}

.result-icon.error {
    background: rgba(239, 68, 68, 0.12);
}

@keyframes resultPop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
