:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --paper: #ffffff;
    --canvas: #f8fafc;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 20px 40px -15px rgba(37, 99, 235, 0.12), 0 1px 5px rgba(15, 23, 42, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

body {
    background-color: var(--canvas);
    color: var(--ink);
    font-family: 'Inter', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header & Topbar */
.topbar {
    height: 72px;
    background: #0f172a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(24px, calc((100% - 1200px)/2));
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand i, .brand-icon {
    color: #3b82f6;
    width: 24px;
    height: 24px;
}

.topbar nav {
    display: flex;
    gap: 20px;
}

.topbar nav a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.topbar nav a i {
    width: 18px;
    height: 18px;
}

.topbar nav a:hover {
    color: #fff;
    background: #1e293b;
}

.topbar nav a.active {
    color: #fff;
    background: #2563eb;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

footer {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-content i {
    width: 16px;
    height: 16px;
    color: var(--success);
}

/* Hero Section */
.hero {
    padding: 60px 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #fff;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    filter: blur(40px);
}

.hero h1 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    margin: 10px 0 16px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 16px;
    color: #93c5fd;
    max-width: 600px;
    margin-bottom: 24px;
}

.eyebrow {
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 800;
    margin: 0;
}

.hero .eyebrow {
    color: #bfdbfe;
}

/* Buttons */
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
}

.button:hover, button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.button:active, button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.button.small, button.small {
    font-size: 12px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}

.button.secondary, button.secondary {
    background: #f1f5f9;
    color: #334155;
    box-shadow: none;
    border: 1px solid var(--line);
}

.button.secondary:hover, button.secondary:hover {
    background: #e2e8f0;
    color: var(--ink);
    box-shadow: none;
}

.button.danger, button.danger {
    background: var(--danger);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1);
}

.button.danger:hover, button.danger:hover {
    background: var(--danger-hover);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2);
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 600;
}

.back:hover {
    color: var(--primary-hover);
}

/* Page Title & Headings */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.page-title p {
    color: var(--muted);
    font-size: 14px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Panels & Cards */
.panel, .product-card, .contract-card, .stat-card, .auth-card, .empty-state {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel {
    padding: 28px;
    margin-bottom: 24px;
}

.panel h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel h2 i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-border);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 6px);
    background: #f1f5f9;
    margin-bottom: 16px;
}

.product-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-card p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
    flex-grow: 1;
}

.product-card strong {
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 12px;
    display: block;
}

.stock {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    display: inline-block;
    margin-bottom: 16px;
}

.stock.out {
    background: var(--danger-light);
    color: var(--danger);
}

/* Auth Cards */
.auth-card {
    max-width: 480px;
    margin: 40px auto;
    padding: 36px;
}

.auth-card.wide {
    max-width: 780px;
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.auth-card p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Forms */
form {
    display: grid;
    gap: 20px;
}

label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    display: grid;
    gap: 8px;
}

input, select, textarea {
    font-family: inherit;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    color: var(--ink);
    width: 100%;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}

.check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.row {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.alert i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert.success {
    background: var(--success-light);
    color: var(--success-hover);
    border-color: var(--success-border);
}

.alert.error {
    background: var(--danger-light);
    color: var(--danger-hover);
    border-color: var(--danger-border);
}

.alert.warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: var(--warning-border);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}

.badge.pending_review, .badge.waiting_customer_signature, .badge.waiting_admin_approval, .badge.due, .badge.pending {
    background: var(--warning-light);
    color: #b45309;
}

.badge.active, .badge.paid, .badge.approved, .badge.delivered {
    background: var(--success-light);
    color: var(--success-hover);
}

.badge.overdue, .badge.rejected, .badge.cancelled, .badge.issue {
    background: var(--danger-light);
    color: var(--danger-hover);
}

.badge.awaiting_verification, .badge.shipping {
    background: var(--primary-light);
    color: var(--primary);
}

/* Table Design */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 640px;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--line);
}

td {
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

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

tr:hover td {
    background-color: #f8fafc;
}

/* Contract Cards & Progress Steps */
.contract-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.contract-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contract-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.contract-card h2 {
    font-size: 18px;
    font-weight: 700;
}

.contract-card p {
    color: var(--muted);
    font-size: 13px;
}

.contract-summary {
    position: relative;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.summary-grid div {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    background: #f8fafc;
}

.summary-grid strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    margin-top: 6px;
}

/* Progress Tracker */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 10px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--line);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    width: 80px;
}

.progress-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--line);
    border: 3px solid var(--canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    color: var(--muted);
}

.progress-step-icon i {
    width: 14px;
    height: 14px;
}

.progress-step.completed .progress-step-icon {
    background: var(--success);
    color: #fff;
}

.progress-step.completed {
    color: var(--success-hover);
}

.progress-step.active .progress-step-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.progress-step.active {
    color: var(--primary);
    font-weight: 700;
}

/* Admin Dashboard Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-card span {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.stat-card strong {
    font-size: 32px;
    font-weight: 800;
    color: var(--ink);
    margin: 8px 0;
    line-height: 1;
}

.stat-card small {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.stat-card.danger-card {
    border-left: 4px solid var(--danger);
}

.stat-card.danger-card strong {
    color: var(--danger-hover);
}

/* Sidebar & Navigation Layouts */
.admin-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 30px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--paper);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    height: max-content;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.admin-nav a i {
    width: 18px;
    height: 18px;
}

.admin-nav a:hover {
    background: #f1f5f9;
    color: var(--ink);
}

.admin-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.contract-admin-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
}

/* Sidebar Info Card */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-panel dl div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.side-panel dl div:last-child {
    border-bottom: none;
}

.side-panel dt {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.side-panel dd {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

/* Bank Box & Payments */
.payment-total {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 1px solid var(--primary-border);
    text-align: center;
}

.payment-total strong {
    font-size: 28px;
    font-weight: 800;
    display: block;
    margin-top: 6px;
}

.bank-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    margin: 20px 0;
    font-size: 14px;
}

.bank-box strong {
    font-size: 16px;
    color: var(--ink);
}

/* Canvas Signature Pad */
canvas {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    width: 100%;
    height: 180px;
    touch-action: none;
    cursor: crosshair;
}

/* Notification history and lists */
.notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item .message {
    font-size: 14px;
}

.notification-item .time {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.notification-item .status-tag {
    flex-shrink: 0;
}

/* Review Cards & Slip approval */
.review-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: #fff;
}

.review-card:last-of-type {
    margin-bottom: 0;
}

.review-card strong {
    font-size: 16px;
    color: var(--ink);
}

.review-actions {
    display: flex;
    gap: 10px;
}

/* Filters & Forms layout */
.filter-form, .inline-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-form input, .filter-form select, .inline-form input {
    width: auto;
    min-width: 180px;
}

.tiny-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tiny-form input {
    width: 90px;
    padding: 8px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.tiny-form button {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

/* Admin workspace refresh */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 36px;
    margin: 0 0 20px;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    color: #fff;
    background: radial-gradient(circle at 88% 10%, rgba(45, 212, 191, .28), transparent 26%), linear-gradient(120deg, #111c35 0%, #172c59 55%, #1e3a8a 100%);
    box-shadow: 0 22px 40px -28px rgba(15, 23, 42, .78);
}

.admin-page-header::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    right: 23%;
    bottom: -170px;
    border: 32px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
}

.admin-page-header > * { position: relative; z-index: 1; }
.admin-page-header .eyebrow { color: #93c5fd; margin-bottom: 8px; }
.admin-page-header .eyebrow i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.admin-page-header h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 8px; }
.admin-page-header p:not(.eyebrow) { color: #cbd5e1; max-width: 620px; margin: 0; }
.admin-header-actions { display: flex; flex-wrap: wrap; gap: 10px; min-width: max-content; }
.admin-header-actions .button { box-shadow: none; }
.admin-header-actions .button.secondary { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.admin-header-actions .button.secondary:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.admin-focus-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    box-shadow: 0 8px 24px -20px rgba(30, 64, 175, .48);
}

.admin-focus-icon, .admin-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
}

.admin-focus-icon { width: 42px; height: 42px; background: #eff6ff; color: #2563eb; }
.admin-focus-icon i { width: 21px; height: 21px; }
.admin-focus-card span { color: #64748b; display: block; font-size: 12px; font-weight: 700; }
.admin-focus-card strong { color: #172554; display: block; font-size: 16px; line-height: 1.35; }
.admin-focus-card p { color: #64748b; font-size: 13px; margin: 2px 0 0; }
.admin-focus-link { margin-left: auto; color: #2563eb; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.admin-focus-link i { width: 15px; height: 15px; vertical-align: -3px; }

.admin-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.admin-stat-grid .stat-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 18px;
    min-height: 132px;
    color: inherit;
    text-decoration: none;
    border: 1px solid #e7edf6;
    box-shadow: 0 9px 22px -20px rgba(15, 23, 42, .65);
}

.admin-stat-grid .stat-card:hover { border-color: currentColor; transform: translateY(-3px); }
.admin-stat-grid .stat-card > div { min-width: 0; }
.admin-stat-grid .stat-card > div > span { color: #64748b; display: block; font-size: 12px; font-weight: 700; line-height: 1.25; }
.admin-stat-grid .stat-card strong { color: #0f172a; font-size: 29px; margin: 7px 0 3px; }
.admin-stat-grid .stat-card small { color: #94a3b8; display: block; font-size: 11px; line-height: 1.35; }
.stat-card-icon { width: 34px; height: 34px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 10px; }
.stat-card-icon i { width: 18px; height: 18px; }
.stat-card-arrow { width: 16px; height: 16px; opacity: .55; margin-top: 3px; }
.tone-blue { color: #2563eb; }.tone-blue .stat-card-icon { color: #2563eb; background: #eff6ff; }
.tone-violet { color: #7c3aed; }.tone-violet .stat-card-icon { color: #7c3aed; background: #f5f3ff; }
.tone-teal { color: #0f766e; }.tone-teal .stat-card-icon { color: #0f766e; background: #f0fdfa; }
.tone-rose { color: #e11d48; }.tone-rose .stat-card-icon { color: #e11d48; background: #fff1f2; }.tone-rose strong { color: #be123c !important; }
.tone-amber { color: #b45309; }.tone-amber .stat-card-icon { color: #b45309; background: #fffbeb; }

.admin-work-queue {
    margin: 28px 0;
    padding: 26px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px -25px rgba(15, 23, 42, .8);
}

.admin-work-queue .section-heading, .admin-recent-panel .section-heading { margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 2px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.queue-count { padding: 5px 10px; border-radius: 99px; background: #eff6ff; color: #2563eb; font-size: 12px; font-weight: 800; }
.admin-alert-list { display: grid; gap: 10px; }
.admin-alert-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 14px 15px;
    color: #1e293b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.admin-alert-item:hover { border-color: #bfdbfe; box-shadow: 0 9px 18px -17px rgba(30, 64, 175, .58); transform: translateX(2px); }
.admin-alert-item .admin-alert-icon { width: 36px; height: 36px; background: #eff6ff; color: #2563eb; }
.admin-alert-item.warning .admin-alert-icon { background: #fffbeb; color: #b45309; }
.admin-alert-item.success .admin-alert-icon { background: #ecfdf5; color: #047857; }
.admin-alert-item.danger .admin-alert-icon { background: #fff1f2; color: #e11d48; }
.admin-alert-icon i { width: 18px; height: 18px; }
.admin-alert-message { font-size: 13px; line-height: 1.45; }
.admin-alert-action { display: inline-flex; align-items: center; gap: 5px; color: #2563eb; font-size: 12px; font-weight: 800; white-space: nowrap; }
.admin-alert-action i { width: 14px; height: 14px; }
.admin-empty-queue { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px dashed #bbf7d0; border-radius: 12px; background: #f0fdf4; }
.admin-empty-queue > i { color: #16a34a; width: 30px; height: 30px; }.admin-empty-queue strong { color: #166534; }.admin-empty-queue p { color: #4b7a5d; font-size: 13px; margin: 2px 0 0; }
.admin-recent-panel { padding-top: 24px; }
.table-empty { color: #64748b; padding: 30px 20px; text-align: center; }

.admin-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 26px;
    padding: 10px 12px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: linear-gradient(150deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, .65);
}

.admin-nav-brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 0 8px 0 2px; color: #1e3a8a; font-size: 13px; font-weight: 800; white-space: nowrap; }
.admin-nav-brand-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }.admin-nav-brand-icon i { width: 16px; height: 16px; }
.admin-nav-links { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.admin-nav a { min-height: 38px; padding: 9px 11px; gap: 7px; color: #52627a; font-size: 13px; white-space: nowrap; }
.admin-nav a i { width: 16px; height: 16px; }.admin-nav a:hover { background: #eef4ff; color: #1d4ed8; }.admin-nav a.active { background: linear-gradient(90deg, #e8f0ff, #f3f7ff); color: #1d4ed8; box-shadow: inset 0 -2px #2563eb; }
.admin-nav-user { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-left: auto; border-radius: 10px; background: #172554; color: #fff; font-size: 13px; font-weight: 800; }

/* Responsive Styles */
@media (max-width: 1024px) {
    .admin-layout, .contract-admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-nav {
        flex-direction: row;
        padding: 12px;
    }

    .admin-nav-links { overflow-x: auto; }
    .admin-nav a { padding: 8px 11px; }

    .admin-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
    
    .hero {
        padding: 36px 24px;
    }
    
    .two-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .admin-page-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 27px 24px;
    }

    .admin-header-actions {
        min-width: 0;
        width: 100%;
    }

    .admin-header-actions .button {
        flex: 1;
    }

    .admin-nav-brand { font-size: 12px; }
    .admin-nav-brand-icon { width: 28px; height: 28px; }
    .admin-nav-user { display: none; }

    .admin-focus-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .admin-focus-link {
        margin-left: 58px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .review-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .review-actions {
        width: 100%;
        margin-top: 12px;
    }
    
    .review-actions form {
        flex-grow: 1;
    }
    
    .review-actions button {
        width: 100%;
    }

    .admin-alert-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-alert-action {
        grid-column: 2;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 0 16px;
        height: 64px;
    }
    
    .topbar nav a span {
        display: none;
    }
    
    .topbar nav a {
        padding: 8px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-work-queue {
        padding: 20px 16px;
    }

    .admin-focus-link {
        width: 100%;
        margin-left: 0;
    }
    
    .progress-steps {
        overflow-x: auto;
        padding-bottom: 10px;
    }
}
