/* ============================================
   港陆科技 · 企业管理后台 — 商务尊享版
   ============================================ */
:root {
    --navy-950: #060D18;
    --navy-900: #0C1628;
    --navy-800: #132238;
    --navy-700: #1A2F4A;
    --navy-600: #243B5C;
    --gold-500: #C9A962;
    --gold-400: #D4BC7D;
    --gold-300: #E8D5A8;
    --gold-glow: rgba(201, 169, 98, 0.25);
    --surface-page: #EEF1F5;
    --surface-card: #FFFFFF;
    --surface-muted: #F7F8FA;
    --border: #E2E6EC;
    --border-light: #EEF0F4;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --sidebar-width: 272px;
    --topbar-height: 72px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-elevated: 0 8px 32px rgba(15, 23, 42, 0.1);
    --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--surface-page);
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.icon-lg { width: 24px; height: 24px; }

/* ========== 登录页 ========== */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--navy-900);
}

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 100%);
}

.login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.login-brand::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    pointer-events: none;
}

.login-brand-inner { position: relative; z-index: 1; max-width: 420px; }

.login-brand .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
    border: 1px solid rgba(201, 169, 98, 0.35);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-400);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.login-brand h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.3;
}

.login-brand .brand-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.8;
    margin-bottom: 40px;
}

.login-brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.login-brand-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold-500);
    border-radius: 50%;
    flex-shrink: 0;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--surface-card);
    min-width: 320px;
    flex: 1 1 50%;
    position: relative;
    z-index: 2;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-header { margin-bottom: 36px; }

.login-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.login-form .form-group { margin-bottom: 22px; }

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.login-form .login-input,
.login-form input[type="text"],
.login-form input[type="password"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    opacity: 1;
    visibility: visible;
    -webkit-appearance: none;
    appearance: none;
    transition: var(--transition);
}

.login-form input:focus,
.login-form .login-input:focus {
    outline: none;
    border-color: var(--navy-700);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(19, 34, 56, 0.08);
}

.login-form .form-group.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-form .checkbox-row label {
    margin: 0;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 15px;
    margin-top: 8px;
    background: var(--navy-900);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-500);
}

.btn-login:hover {
    background: var(--navy-800);
    transform: translateY(-1px);
    box-shadow: var(--shadow-elevated);
}

.login-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 24px;
}

.login-bg, .login-orb, .login-grid, .login-badge { display: none; }

/* ========== 布局框架 ========== */
.admin-page { display: flex; min-height: 100vh; }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(6, 13, 24, 0.6);
    z-index: 99;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--navy-900);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--navy-900), var(--gold-500), var(--navy-900));
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--navy-800);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-400);
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-header .logo-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    display: block;
}

.sidebar-header .logo-en {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-collapse-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--gold-400);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section { margin-bottom: 8px; }

.nav-section-title {
    padding: 12px 14px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-item.active {
    background: rgba(201, 169, 98, 0.12);
    color: var(--gold-300);
    box-shadow: inset 3px 0 0 var(--gold-500);
}

.nav-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: currentColor;
}

.nav-item.active .nav-icon {
    background: rgba(201, 169, 98, 0.15);
    color: var(--gold-400);
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    background: var(--danger);
    color: #fff;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer .nav-item { font-size: 13px; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* ========== 顶栏 ========== */
.topbar {
    height: var(--topbar-height);
    background: var(--surface-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
}
.sidebar-toggle span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
}

.topbar-title { flex: 1; min-width: 0; }

.topbar-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.topbar-breadcrumb span { color: var(--gold-500); font-weight: 600; }

.topbar-title h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-secondary);
}
.sync-status.sync-online { background: #ECFDF5; border-color: #A7F3D0; color: var(--success); }
.sync-status.sync-local { background: #FFFBEB; border-color: #FDE68A; color: var(--warning); }
.sync-status.sync-error { background: #FEF2F2; border-color: #FECACA; color: var(--danger); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 40px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--navy-900);
    color: var(--gold-400);
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 169, 98, 0.3);
}

.user-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.btn-preview, .btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-preview {
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-preview:hover {
    border-color: var(--navy-700);
    background: var(--surface-muted);
}

.btn-save {
    background: var(--navy-900);
    color: #fff;
    box-shadow: var(--shadow-card);
}
.btn-save::after {
    content: none;
}
.btn-save:hover {
    background: var(--navy-800);
    box-shadow: var(--shadow-elevated);
}
.btn-save.loading { opacity: 0.7; pointer-events: none; }

/* ========== 内容区 ========== */
.content-wrapper {
    flex: 1;
    padding: 28px 32px 40px;
    background: var(--surface-page);
}

.page-panel { display: none; animation: fadeUp 0.35s ease; }
.page-panel.active { display: block; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 工作台 ========== */
.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 32px 36px;
    margin-bottom: 28px;
    background: var(--navy-900);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 98, 0.15);
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    right: -10%;
    top: -50%;
    width: 50%;
    height: 200%;
    background: radial-gradient(ellipse, var(--gold-glow) 0%, transparent 65%);
    pointer-events: none;
}

.welcome-text { position: relative; z-index: 1; }
.welcome-text h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.welcome-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
}

.welcome-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.btn-welcome {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
}
.btn-welcome:hover { background: rgba(255, 255, 255, 0.08); }

.btn-welcome.primary {
    background: var(--gold-500);
    border-color: var(--gold-500);
    color: var(--navy-900);
}
.btn-welcome.primary:hover {
    background: var(--gold-400);
    transform: translateY(-1px);
}

.section-head {
    margin-bottom: 20px;
}
.section-head h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.section-head p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}
.panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.panel-header h3::before { display: none; }
.panel-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.panel-header-compact { margin-bottom: 16px; }

.panel-header .btn-add {
    padding: 10px 20px;
    background: var(--navy-900);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
}
.panel-header .btn-add:hover {
    background: var(--navy-800);
    transform: translateY(-1px);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.dashboard-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-card);
}
.dashboard-card::before { display: none; }
.dashboard-card:hover {
    border-color: rgba(201, 169, 98, 0.4);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-3px);
}

.dashboard-card .card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--surface-muted) !important;
    color: var(--navy-700);
    font-size: 0;
}
.dashboard-card .card-icon svg { color: var(--navy-700); }

.card-software .card-icon { background: #EEF2FF !important; }
.card-software .card-icon svg { color: #4338CA; }
.card-hardware .card-icon { background: #FFF7ED !important; }
.card-hardware .card-icon svg { color: #C2410C; }
.card-consumables .card-icon { background: #ECFDF5 !important; }
.card-consumables .card-icon svg { color: #059669; }
.card-news .card-icon { background: #F5F3FF !important; }
.card-news .card-icon svg { color: #7C3AED; }
.card-inquiry .card-icon { background: #FEF2F2 !important; }
.card-inquiry .card-icon svg { color: #DC2626; }

.card-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}
.card-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-arrow {
    position: absolute;
    right: 20px;
    top: 24px;
    opacity: 0;
    color: var(--gold-500);
    transition: var(--transition);
}
.dashboard-card:hover .card-arrow { opacity: 1; }

.dashboard-bottom {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

.quick-actions, .recent-activity {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.quick-actions h4, .recent-activity h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
    font-family: inherit;
}
.action-btn:hover {
    border-color: var(--gold-500);
    background: #fff;
    color: var(--navy-900);
}
.action-btn .action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--navy-700);
    flex-shrink: 0;
}
.action-btn span:first-child:not(.action-icon) { display: none; }

.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface-muted);
    border-radius: var(--radius);
    border-left: 3px solid var(--gold-500);
}
.activity-item .time { font-size: 12px; color: var(--text-muted); font-weight: 500; min-width: 48px; }
.activity-item .desc { flex: 1; font-size: 13px; color: var(--text-secondary); }
.no-activity { text-align: center; color: var(--text-muted); padding: 32px; font-size: 13px; }

/* ========== 表单 & 卡片 ========== */
.edit-form, .stats-editor {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.form-group { margin-bottom: 22px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-card);
    transition: var(--transition);
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(19, 34, 56, 0.06);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.color-input-group { display: flex; gap: 10px; }
.color-input-group input[type="color"] {
    width: 48px;
    height: 42px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.color-input-group input[type="text"] { flex: 1; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.btn-preview-small, .btn-save-small, .btn-reset {
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-preview-small { background: var(--surface-muted); color: var(--text-primary); border: 1px solid var(--border); }
.btn-preview-small:hover { background: var(--border-light); }
.btn-save-small { background: var(--navy-900); color: #fff; }
.btn-save-small:hover { background: var(--navy-800); }
.btn-reset { background: var(--danger); color: #fff; }

.stat-edit-item {
    background: var(--surface-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.stat-edit-header .stat-number {
    width: 28px;
    height: 28px;
    background: var(--navy-900);
    color: var(--gold-400);
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== 产品列表 ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-item {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.product-item:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-4px);
    border-color: rgba(201, 169, 98, 0.3);
}

.panel-header-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.panel-header-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary-sm {
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-900);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-secondary-sm:hover {
    border-color: var(--gold-500);
    color: var(--navy-800);
}

.image-spec-inline {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.image-upload-group .image-preview-wrap {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    background: var(--surface-muted);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-placeholder {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.image-format-hint {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
}

.image-format-hint strong {
    color: var(--navy-900);
    font-weight: 600;
}

.image-upload-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--navy-900);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-upload:hover {
    background: var(--navy-800);
}

.upload-status {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-status.is-loading {
    color: var(--warning);
}

.upload-status.is-ok {
    color: var(--success);
}

.upload-status.is-error {
    color: var(--danger);
}

.field-sub {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.product-item-image { height: 150px; overflow: hidden; background: var(--surface-muted); }
.product-item-image img { width: 100%; height: 100%; object-fit: cover; }
.product-item-content { padding: 18px; }
.product-item-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.product-item-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.product-item-tags span {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-muted);
    color: var(--text-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-light);
}
.product-item-actions { display: flex; gap: 8px; }
.product-item-actions button {
    flex: 1;
    padding: 9px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-edit { background: var(--navy-900); color: #fff; }
.btn-edit:hover { background: var(--navy-800); }
.btn-delete { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.btn-delete:hover { background: var(--danger); color: #fff; }
.btn-delete-small {
    padding: 6px 12px;
    background: #FEF2F2;
    color: var(--danger);
    font-size: 12px;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
}

/* ========== 解决方案 / 服务 ========== */
.solutions-editor, .services-editor {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.solution-edit-item, .service-edit-item {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.solution-edit-item h4, .service-edit-item h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.solution-edit-item textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-family: inherit;
}
.solution-edit-item .btn-save-item {
    width: 100%;
    padding: 11px;
    background: var(--navy-900);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
}
.service-edit-item input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
}

/* ========== 新闻 ========== */
.news-editor { display: flex; flex-direction: column; gap: 16px; }
.news-edit-item {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    gap: 20px;
    box-shadow: var(--shadow-card);
}
.news-edit-date {
    width: 72px;
    text-align: center;
    padding: 14px;
    background: var(--navy-900);
    color: var(--gold-400);
    border-radius: var(--radius);
    flex-shrink: 0;
}
.news-edit-date .day { font-size: 26px; font-weight: 700; line-height: 1; display: block; }
.news-edit-date .month { font-size: 11px; opacity: 0.8; }

/* ========== 合作伙伴 ========== */
.partners-editor {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.partner-item {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    box-shadow: var(--shadow-card);
    position: relative;
}
.partner-item .btn-delete-small { margin-top: 12px; }

/* ========== UI 定制 ========== */
.ui-customizer {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}
.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.color-item {
    background: var(--surface-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
}
.slider-item { margin-bottom: 20px; }
.slider-item label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.slider-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    -webkit-appearance: none;
}
.slider-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--navy-900);
    border: 2px solid var(--gold-500);
    border-radius: 50%;
    cursor: pointer;
}
.theme-presets { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.theme-presets h4 { margin-bottom: 16px; font-size: 14px; }
.preset-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.preset-btn {
    flex: 1;
    min-width: 100px;
    padding: 16px;
    background: var(--surface-muted);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.preset-btn:hover { border-color: var(--preset-primary, var(--navy-700)); }
.preset-btn span {
    display: block;
    height: 24px;
    background: var(--preset-primary, var(--navy-900));
    border-radius: 4px;
    margin-bottom: 8px;
}

/* ========== 咨询表格 ========== */
.inquiries-table-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.inquiries-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inquiries-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}
.inquiries-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.inquiries-table tbody tr:hover { background: #FAFBFC; }
.inquiries-table .empty-row { text-align: center; padding: 48px; color: var(--text-muted); }
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.status-badge.pending { background: #FFFBEB; color: #B45309; }
.status-badge.contacted { background: #EFF6FF; color: #1D4ED8; }
.status-badge.completed { background: #ECFDF5; color: #047857; }
.inquiry-actions select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: inherit;
    background: #fff;
}

/* ========== 弹窗 & Toast ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(6, 13, 24, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}
.modal-close:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--surface-muted);
}
.btn-cancel, .btn-confirm {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.btn-cancel { background: #fff; color: var(--text-primary); border: 1px solid var(--border); }
.btn-confirm { background: var(--navy-900); color: #fff; }

.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 16px 24px;
    background: var(--navy-900);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevated);
    z-index: 2000;
    transform: translateY(80px);
    opacity: 0;
    transition: var(--transition);
    border-left: 3px solid var(--gold-500);
    max-width: min(520px, calc(100vw - 40px));
    line-height: 1.5;
    word-break: break-word;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left-color: var(--success); }
.toast.error {
    border-left-color: var(--danger);
    background: #7f1d1d;
    padding-right: 40px;
}
.toast-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
}

.sync-error-bar {
    display: none;
    margin: 0 24px 0;
    padding: 12px 40px 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    color: #991B1B;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}
.sync-error-bar strong { margin-right: 4px; }
.sync-error-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #991B1B;
    cursor: pointer;
    padding: 4px 8px;
}
.sync-status { cursor: pointer; }

/* ========== 侧边栏收起 ========== */
body.sidebar-collapsed { --sidebar-width: 76px; }
body.sidebar-collapsed .sidebar .logo-text,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .nav-item > span:not(.nav-icon):not(.nav-badge) { display: none; }
body.sidebar-collapsed .sidebar-header { justify-content: center; padding: 20px 12px; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 12px; }
body.sidebar-collapsed .nav-badge { position: absolute; top: 4px; right: 4px; margin: 0; }

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
    .partners-editor { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
    .login-page { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-bottom { grid-template-columns: 1fr; }
    .products-grid, .solutions-editor, .services-editor { grid-template-columns: repeat(2, 1fr); }
    .color-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .topbar { padding: 0 16px; }
    .content-wrapper { padding: 16px; }
    .topbar-user, .btn-preview, .sync-status { display: none; }
    .sidebar-collapse-btn { display: none; }
    .dashboard-grid, .products-grid, .solutions-editor, .services-editor,
    .action-buttons, .form-row, .color-grid { grid-template-columns: 1fr; }
    .partners-editor { grid-template-columns: repeat(2, 1fr); }
    .news-edit-item { flex-direction: column; }
}
