/* ============================================
   SSW Admin — 管理后台样式
   ============================================ */

/* === Design Tokens (与主站一致) === */
:root {
    --deep-navy: #0a1628;
    --navy-mid: #111d35;
    --navy-light: #1a2d4a;
    --tech-blue: #00b4d8;
    --accent-blue: #0077b6;
    --ice-blue: #90e0ef;
    --pale-blue: #caf0f8;
    --gold: #d4a574;
    --gold-light: #e8c9a0;
    --gold-dark: #b8874a;
    --warm-white: #faf8f5;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --gradient-blue: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    --gradient-gold: linear-gradient(135deg, #d4a574 0%, #b8874a 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --shadow-glow-blue: 0 0 30px rgba(0,180,216,0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-width: 260px;
    --header-height: 60px;
}

/* === Reset === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }

/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #060e1a 0%, #0a1628 40%, #0d1f3c 70%, #091425 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(0,180,216,0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(212,165,116,0.04) 0%, transparent 50%);
    animation: loginBgFloat 20s ease-in-out infinite;
}
@keyframes loginBgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}
.login-card {
    background: rgba(15, 25, 50, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,180,216,0.2);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 400px;
    max-width: 90vw;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 60px rgba(0,180,216,0.08);
}
.login-card .login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-card .login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}
.login-card .login-logo p {
    color: var(--gray-400);
    font-size: 13px;
    margin-top: 6px;
}
.login-card .login-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-blue);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0,180,216,0.3);
}
.login-form .form-group {
    margin-bottom: 20px;
}
.login-form label {
    display: block;
    color: var(--gray-300);
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}
.login-form input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 14px;
    transition: var(--transition);
}
.login-form input:focus {
    border-color: var(--tech-blue);
    background: rgba(0,180,216,0.06);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.1);
}
.login-form input::placeholder { color: var(--gray-500); }
.login-btn {
    width: 100%;
    padding: 13px;
    background: var(--gradient-blue);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-top: 8px;
    letter-spacing: 1px;
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,180,216,0.35);
}
.login-error {
    color: #ff6b6b;
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    display: none;
}

/* === Admin Layout === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--deep-navy);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sidebar-header .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-header .sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.sidebar-header .sidebar-logo span {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}
.sidebar-header .sidebar-subtitle {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 4px;
    padding-left: 46px;
}
.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}
.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    user-select: none;
}
.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--gray-200);
}
.sidebar-nav .nav-item.active {
    background: rgba(0,180,216,0.12);
    color: var(--tech-blue);
}
.sidebar-nav .nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-nav .nav-item .nav-badge {
    margin-left: auto;
    background: #ff6b6b;
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 90;
    transition: left 0.3s ease;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-left .hamburger {
    display: none;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.header-left .hamburger:hover { background: var(--gray-100); }
.header-left .page-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-right .admin-name {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}
.header-right .logout-btn {
    padding: 7px 16px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}
.header-right .logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* === Main Content === */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
}

/* === Page Sections === */
.page-section { display: none; }
.page-section.active { display: block; }

/* === Dashboard Cards === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.stat-card.blue::before { background: var(--gradient-blue); }
.stat-card.green::before { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-card.orange::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.gold::before { background: var(--gradient-gold); }
.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}
.stat-card.blue .stat-icon { background: rgba(0,180,216,0.1); }
.stat-card.green .stat-icon { background: rgba(34,197,94,0.1); }
.stat-card.orange .stat-icon { background: rgba(245,158,11,0.1); }
.stat-card.gold .stat-icon { background: rgba(212,165,116,0.1); }
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
}

/* === Tables === */
.data-table-wrapper {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}
.data-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.data-table-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}
.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.data-table tr:nth-child(even) { background: rgba(248,250,252,0.5); }
.data-table tr:hover { background: rgba(0,180,216,0.03); }
.data-table .product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-400);
    overflow: hidden;
    flex-shrink: 0;
}
.data-table .product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.data-table .product-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.data-table .product-name-cell .name {
    font-weight: 500;
    color: var(--gray-800);
}
.data-table .product-name-cell .model {
    font-size: 12px;
    color: var(--gray-400);
}

/* === Status Badges === */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); }
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-replied { background: #dbeafe; color: #2563eb; }
.badge-closed { background: var(--gray-100); color: var(--gray-500); }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--gradient-blue);
    color: var(--white);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(0,180,216,0.3); transform: translateY(-1px); }
.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: #22c55e; color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 14px;
    transition: var(--transition);
}
.btn-icon:hover { background: var(--gray-200); }
.btn-icon.edit:hover { background: rgba(0,180,216,0.1); color: var(--tech-blue); }
.btn-icon.delete:hover { background: #fee2e2; color: #dc2626; }
.btn-icon.toggle:hover { background: #dcfce7; color: #16a34a; }

/* === Search & Filter === */
.search-input {
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 220px;
    transition: var(--transition);
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 12px center no-repeat;
}
.search-input:focus {
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.08);
}
.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-700);
    background: var(--white);
    appearance: none;
    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='%2394a3b8' 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 10px center;
    cursor: pointer;
}
.filter-select:focus {
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.08);
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 600px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}
.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: none;
    font-size: 20px;
    color: var(--gray-400);
    transition: var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-600); }
.modal-body {
    padding: 24px;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === Form Controls === */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-800);
    transition: var(--transition);
    background: var(--white);
}
.form-control:focus {
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.08);
}
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* === Price Adjustment === */
.price-category-section {
    margin-bottom: 28px;
}
.price-category-header {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    border: 1px solid var(--gray-200);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.price-category-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}
.global-percent-input {
    display: flex;
    align-items: center;
    gap: 8px;
}
.global-percent-input label {
    font-size: 13px;
    color: var(--gray-600);
    white-space: nowrap;
}
.global-percent-input input {
    width: 90px;
    padding: 7px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}
.global-percent-input input:focus {
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.08);
}
.price-item-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    border: 1px solid var(--gray-200);
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    transition: var(--transition);
}
.price-item-card:hover { border-color: rgba(0,180,216,0.3); }
.price-item-info .name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}
.price-item-info .model {
    font-size: 12px;
    color: var(--gray-400);
}
.price-item-info .base-price {
    font-size: 13px;
    color: var(--gray-500);
}
.price-item-percent input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}
.price-item-final {
    font-size: 15px;
    font-weight: 600;
    color: var(--tech-blue);
    min-width: 100px;
    text-align: right;
}

/* === Inquiry Detail === */
.inquiry-detail {
    display: none;
    background: var(--gray-50);
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}
.inquiry-detail.show { display: block; }
.inquiry-detail h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-700);
}
.inquiry-products {
    margin-bottom: 16px;
}
.inquiry-products table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.inquiry-products th {
    text-align: left;
    padding: 8px 12px;
    background: var(--gray-200);
    font-weight: 600;
    color: var(--gray-600);
}
.inquiry-products td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-200);
}
.reply-area {
    margin-top: 12px;
}
.reply-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-height: 60px;
    resize: vertical;
}
.reply-area .reply-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* === Settings === */
.settings-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 24px;
    margin-bottom: 20px;
}
.settings-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-800);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}
.pagination button {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.pagination button:hover { border-color: var(--tech-blue); color: var(--tech-blue); }
.pagination button.active {
    background: var(--tech-blue);
    color: var(--white);
    border-color: var(--tech-blue);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Sidebar overlay (mobile) === */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
}
.sidebar-overlay.show { display: block; }

/* === Toast === */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: white;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}
.toast.success { background: #22c55e; }
.toast.error { background: #ef4444; }
.toast.info { background: var(--tech-blue); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .price-item-card { grid-template-columns: 1fr; gap: 8px; }
    .price-item-final { text-align: left; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .header {
        left: 0;
    }
    .header-left .hamburger {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 22px; }
    .data-table-header { flex-direction: column; align-items: flex-start; }
    .table-actions { width: 100%; }
    .search-input { width: 100%; }

    /* Table responsive: hide less important columns */
    .data-table-responsive th.hide-mobile,
    .data-table-responsive td.hide-mobile {
        display: none;
    }
    .form-row { grid-template-columns: 1fr; }
    .modal { margin: 10px; }
    .price-category-header { flex-direction: column; align-items: flex-start; }
    .login-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .header-right .admin-name { display: none; }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.empty-state p {
    font-size: 14px;
}

/* === Switch Toggle === */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-300);
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
}
.switch .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--tech-blue); }
.switch input:checked + .slider::before { transform: translateX(20px); }
