/* ============================================================
   国模约拍网 - Global Stylesheet
   Design: Modern minimal, white base, purple-pink accent
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-primary: #7C3AED;
    --color-primary-hover: #6D28D9;
    --color-primary-light: #EDE9FE;
    --color-accent: #EC4899;
    --color-accent-hover: #DB2777;
    --color-accent-light: #FCE7F3;

    --color-text: #111827;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;

    --color-bg: #FFFFFF;
    --color-bg-soft: #F9FAFB;
    --color-bg-muted: #F3F4F6;

    --color-border: #E5E7EB;
    --color-border-light: #F3F4F6;

    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --color-info: #3B82F6;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-xl: 0 10px 25px rgba(0,0,0,0.08);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;

    --nav-height: 64px;
    --container-max: 1200px;
    --container-narrow: 720px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, button, textarea, select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}
button { cursor: pointer; }

/* ---------- Layout ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 24px;
}
.main-content {
    min-height: calc(100vh - var(--nav-height) - 200px);
    padding-top: var(--nav-height);
}

/* ---------- Navigation ---------- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 1000;
}
.nav-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 32px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}
.logo-icon { font-size: 24px; }
.logo-text { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
    display: flex;
    gap: 8px;
    flex: 1;
}
.nav-link {
    padding: 8px 16px;
    color: var(--color-text-secondary);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.nav-link:hover { color: var(--color-text); background: var(--color-bg-muted); }
.nav-link.active { color: var(--color-primary); background: var(--color-primary-light); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.nav-icon-link:hover { color: var(--color-text); background: var(--color-bg-muted); }
.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

/* User Menu */
.nav-user-menu { position: relative; }
.nav-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--color-border);
    transition: border-color 0.2s;
}
.nav-avatar-btn:hover { border-color: var(--color-primary); }
.nav-avatar { width: 100%; height: 100%; object-fit: cover; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    padding: 8px 0;
    z-index: 100;
}
.dropdown-menu.show { display: block; }
.dropdown-header { padding: 8px 16px; font-size: 14px; }
.dropdown-divider { height: 1px; margin: 4px 0; background: var(--color-border-light); }
.dropdown-item {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--color-text-secondary);
    transition: all 0.15s;
}
.dropdown-item:hover { background: var(--color-bg-muted); color: var(--color-text); }
.dropdown-item.text-danger { color: var(--color-danger); }

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: all 0.3s;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-primary {
    color: #fff;
    background: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; }

.btn-accent {
    color: #fff;
    background: var(--color-accent);
}
.btn-accent:hover { background: var(--color-accent-hover); color: #fff; }

.btn-outline {
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}
.btn-outline:hover { color: var(--color-text); border-color: var(--color-text-secondary); }

.btn-ghost {
    color: var(--color-text-secondary);
}
.btn-ghost:hover { background: var(--color-bg-muted); color: var(--color-text); }

.btn-danger { color: #fff; background: var(--color-danger); }
.btn-danger:hover { background: #DC2626; color: #fff; }

.btn:disabled, .btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------- Cards ---------- */
.card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-clickable:hover { transform: translateY(-2px); }

.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.card-body { padding: 16px; }
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-input::placeholder { color: var(--color-text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { margin-top: 4px; font-size: 12px; color: var(--color-text-muted); }
.form-error { margin-top: 4px; font-size: 12px; color: var(--color-danger); }

/* Inline input with button (验证码) */
.input-group {
    display: flex;
    gap: 8px;
}
.input-group .form-input { flex: 1; }

/* ---------- Tags / Chips ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
    background: var(--color-bg-muted);
    color: var(--color-text-secondary);
}
.tag-primary { background: var(--color-primary-light); color: var(--color-primary); }
.tag-accent { background: var(--color-accent-light); color: var(--color-accent); }
.tag-success { background: #D1FAE5; color: #059669; }
.tag-warning { background: #FEF3C7; color: #D97706; }
.tag-danger { background: #FEE2E2; color: #DC2626; }

/* ---------- User Card (mini) ---------- */
.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.user-mini-name { font-size: 14px; font-weight: 500; }
.user-mini-role { font-size: 12px; color: var(--color-text-muted); }

/* ---------- Status Badge ---------- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-active::before { background: var(--color-success); }
.status-pending::before { background: var(--color-warning); }
.status-closed::before { background: var(--color-text-muted); }
.status-rejected::before { background: var(--color-danger); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 32px 0;
}
.page-btn, .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.15s;
}
.page-btn:hover, .page-num:hover { background: var(--color-bg-muted); color: var(--color-text); }
.page-num.active {
    background: var(--color-primary);
    color: #fff;
}
.page-dots { padding: 0 4px; color: var(--color-text-muted); }

/* ---------- Toast Notification ---------- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    min-width: 280px;
    max-width: 420px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--color-primary);
    font-size: 14px;
    animation: slideInRight 0.3s ease;
}
.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-warning { border-left-color: var(--color-warning); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------- Empty State ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--color-text-muted); margin-bottom: 24px; }

/* ---------- Section ---------- */
.section { padding: 48px 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-title { font-size: 22px; font-weight: 700; }
.section-more { font-size: 14px; color: var(--color-text-muted); }
.section-more:hover { color: var(--color-primary); }

/* ---------- Hero (Homepage) ---------- */
.hero {
    position: relative;
    padding: 80px 0 64px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-light) 100%);
}
.hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- Stat counters ---------- */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 32px 0;
}
.stat-item { text-align: center; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-bg-soft);
    border-top: 1px solid var(--color-border-light);
    padding: 48px 0 24px;
    margin-top: 64px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.footer-desc { font-size: 14px; color: var(--color-text-secondary); line-height: 1.7; }
.footer-link {
    display: block;
    font-size: 14px;
    color: var(--color-text-secondary);
    padding: 4px 0;
}
.footer-link:hover { color: var(--color-primary); }
.footer-text { font-size: 14px; color: var(--color-text-secondary); }
.footer-bottom {
    border-top: 1px solid var(--color-border-light);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }

/* ---------- Filters Bar ---------- */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.filter-chip {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.filter-chip:hover, .filter-chip.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* ---------- Confirm Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.modal-text { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
