/* ==========================================================================
   Hasanamba Entry Counter Portal - Complete Professional Design System
   Brand Palette: Deep Charcoal, Luxury Royal Gold, Warm Ivory, Slate Accents
   ========================================================================== */

:root {
    /* Brand Palette */
    --charcoal-900: #121316;
    --charcoal-800: #1c1e22;
    --charcoal-700: #25282e;
    --charcoal-600: #33373e;

    --gold-600: #876527;
    --gold-500: #b58d3d;
    --gold-400: #cfab59;
    --gold-300: #e3c983;
    --gold-100: #fbf6ec;
    --gold-50:  #fdfbf7;

    /* Neutrals & Surfaces */
    --bg-page: #f4f6f9;
    --surface-card: #ffffff;
    --surface-subtle: #f8fafc;
    --border-light: #e2e8f0;
    --border-warm: #eae4d8;
    
    /* Typography */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #f8fafc;

    /* Status Colors */
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #065f46;
    --success-accent: #10b981;

    --excel-green: #107c41;
    --excel-green-hover: #0c6133;

    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --warning-text: #92400e;

    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;
    --danger-accent: #ef4444;

    --shift-day-bg: #fef3c7;
    --shift-day-border: #fcd34d;
    --shift-day-text: #92400e;

    --shift-night-bg: #e0e7ff;
    --shift-night-border: #c7d2fe;
    --shift-night-text: #3730a3;

    /* Metrics & Elevation */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

/* ---------- Global Reset & Foundation ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body.app,
body.login-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.app form#form1 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

a {
    color: var(--gold-600);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--gold-500);
    text-decoration: underline;
}

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */
.topbar {
    background: linear-gradient(180deg, var(--charcoal-900) 0%, var(--charcoal-800) 100%);
    border-bottom: 2.5px solid var(--gold-500);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Brand Section */
.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}
.brand:hover, .brand:focus {
    color: #ffffff;
    text-decoration: none;
}

.brand-logo-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    box-shadow: 0 2px 8px rgba(181, 141, 61, 0.35);
    flex-shrink: 0;
}
.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #ffffff;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-text .title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffffff;
    line-height: 1.15;
}
.brand-text .subtitle {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--gold-300);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseLive 2s infinite;
}
@keyframes pulseLive {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Topbar Clock */
.topbar-clock {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    color: #e2e8f0;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}
.clock-time {
    font-weight: 700;
    color: #ffffff;
}
.clock-date {
    color: #94a3b8;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 8px;
}

/* Navigation Links */
.nav-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav input.nav-btn,
.nav a.nav-btn,
.nav button.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.nav input.nav-btn:hover,
.nav a.nav-btn:hover,
.nav button.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}
.nav input.nav-btn.active,
.nav a.nav-btn.active,
.nav button.nav-btn.active {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: #ffffff;
    border-color: var(--gold-400);
    box-shadow: 0 2px 8px rgba(181, 141, 61, 0.4);
}

.nav-admin-link {
    border: 1px dashed rgba(207, 171, 89, 0.45) !important;
    color: var(--gold-300) !important;
}

/* User & Logout */
.nav-user-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}
.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gold-300);
}

.nav input.nav-logout,
.nav button.nav-logout {
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    padding: 6px 14px;
    font-size: 12.5px;
}
.nav input.nav-logout:hover,
.nav button.nav-logout:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: 0.2s ease;
}

/* ==========================================================================
   PAGE LAYOUT & CONTAINER
   ========================================================================== */
.app-main {
    flex: 1;
    padding: 28px 0 44px;
}

.page-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Page Header */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.page-title-box h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    line-height: 1.2;
}
.page-title-box p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Page Toolbar / Actions */
.page-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Toolbar Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 13px;
}
.search-input {
    padding: 9px 14px 9px 34px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #ffffff;
    font-size: 13.5px;
    color: var(--text-primary);
    min-width: 220px;
    transition: all 0.18s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(181, 141, 61, 0.18);
}

/* Auto-refresh select */
.select-refresh {
    padding: 9px 12px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #ffffff;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    font-weight: 600;
}
.select-refresh:focus {
    border-color: var(--gold-500);
}

/* Button System */
.btn-zebra,
input.btn-export,
.btn-export-z,
.btn-action-z,
.btn-primary-z {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: 0;
    transition: all 0.18s ease;
}

/* Primary Export (Excel .xlsx) */
input.btn-export,
.btn-export-z {
    background: linear-gradient(135deg, var(--excel-green) 0%, #0a522b 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16, 124, 65, 0.35);
    border: 1px solid #0d6334;
}
input.btn-export:hover,
.btn-export-z:hover {
    background: linear-gradient(135deg, #138f4b 0%, var(--excel-green) 100%);
    box-shadow: 0 4px 12px rgba(16, 124, 65, 0.45);
    transform: translateY(-1px);
    text-decoration: none;
    color: #ffffff;
}
input.btn-export:active,
.btn-export-z:active {
    transform: translateY(1px);
}

/* Action button (Refresh, Print, etc.) */
.btn-action-z {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
}
.btn-action-z:hover {
    background: var(--surface-subtle);
    border-color: #cbd5e1;
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Gold Primary */
.btn-primary-z {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(181, 141, 61, 0.35);
    border: 1px solid var(--gold-400);
}
.btn-primary-z:hover {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
    box-shadow: 0 4px 14px rgba(181, 141, 61, 0.45);
    transform: translateY(-1px);
}

/* Ghost Button */
.btn-ghost-z {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    color: var(--text-secondary);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.btn-ghost-z:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

/* Filter Pills Group */
.filter-pills {
    display: inline-flex;
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 3px;
}
.filter-pill,
.shift-pill {
    background: transparent;
    border: 0;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.filter-pill:hover,
.shift-pill:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}
.filter-pill.active,
.shift-pill.active {
    background: var(--charcoal-800);
    color: #ffffff;
    box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   STAT KPI CARDS
   ========================================================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.stat {
    background: var(--surface-card);
    border: 1px solid var(--border-warm);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gold-500);
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.stat-label {
    display: block;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-icon {
    font-size: 18px;
    opacity: 0.85;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.stat-sub {
    display: inline-block;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* Stat Main - Hero Executive Card */
.stat-main {
    background: linear-gradient(135deg, var(--charcoal-900) 0%, var(--charcoal-800) 100%);
    border-color: var(--charcoal-700);
    border-top: 4px solid var(--gold-400);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}
.stat-main .stat-label {
    color: var(--gold-300);
}
.stat-main .stat-value {
    color: #ffffff;
}
.stat-main .stat-sub {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   CARD BOX & DATA TABLE
   ========================================================================== */
.card-box {
    background: var(--surface-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 12px;
}
.card-header-bar h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-count-badge {
    background: var(--surface-subtle);
    border: 1px solid var(--border-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.table-wrap {
    overflow-x: auto;
    width: 100%;
}

/* Modern GridView Table */
table.Admingridtable1 {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 0 !important;
    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
}

/* Table Header */
table.Admingridtable1 th {
    background: #f8fafc !important;
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    text-align: left !important;
    padding: 14px 20px !important;
    border: 0 !important;
    border-bottom: 1.5px solid var(--border-light) !important;
    white-space: nowrap !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
}

/* Table Cells */
table.Admingridtable1 td {
    background: #ffffff !important;
    text-align: left !important;
    padding: 14px 20px !important;
    border: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: var(--text-primary) !important;
    transition: background-color 0.12s ease !important;
}
table.Admingridtable1 td span {
    font-family: inherit !important;
    font-size: 13.5px !important;
}

/* Row Hover */
table.Admingridtable1 tr:hover td {
    background: #fbfbf9 !important;
}
table.Admingridtable1 tr:last-child td {
    border-bottom: 0 !important;
}

/* Number Columns */
table.Admingridtable1 .num,
table.Admingridtable1 th.num,
table.Admingridtable1 td.num {
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 700 !important;
}

/* TOTAL Rows */
table.Admingridtable1 tr.row-total td {
    background: linear-gradient(90deg, #fef9ee 0%, #fffdf9 100%) !important;
    font-weight: 800 !important;
    color: var(--gold-600) !important;
    border-top: 1.5px solid #ebd9b8 !important;
    border-bottom: 2px solid #ebd9b8 !important;
    font-size: 14px !important;
}
table.Admingridtable1 tr.row-total:hover td {
    background: #fcf4e4 !important;
}
table.Admingridtable1 tr.row-total td.num {
    color: #6d4e13 !important;
    font-size: 15px !important;
}

/* Pills & Badges */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--shift-day-bg);
    border: 1px solid var(--shift-day-border);
    color: var(--shift-day-text);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.pill.night {
    background: var(--shift-night-bg);
    border-color: var(--shift-night-border);
    color: var(--shift-night-text);
}

.badge-code {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
}

.empty-state {
    padding: 56px 20px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.6;
}

/* ==========================================================================
   FORMS & FILTER PANELS (DetailedReport, EditCount)
   ========================================================================== */
.filter-card {
    background: var(--surface-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-control-z,
.filter-card input[type="text"],
.filter-card select,
.edit-card input[type="text"],
.edit-card select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #ffffff;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.15s ease;
}
.form-control-z:focus,
.filter-card input[type="text"]:focus,
.filter-card select:focus,
.edit-card input[type="text"]:focus,
.edit-card select:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(181, 141, 61, 0.18);
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Admin Edit Card */
.edit-wrap {
    max-width: 600px;
    margin: 20px auto;
}
.edit-card {
    background: var(--surface-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 32px 36px;
    border-top: 5px solid var(--gold-500);
}
.edit-card-header {
    text-align: center;
    margin-bottom: 24px;
}
.edit-card-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}
.edit-card-header p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13.5px;
}

/* Security Callout */
.alert-callout {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 25%, rgba(181, 141, 61, 0.18) 0%, rgba(18, 19, 22, 0.95) 75%),
        linear-gradient(180deg, rgba(18, 19, 22, 0.88), rgba(28, 30, 34, 0.96)),
        url(../../ASPX_Images/banner.jpg) center / cover no-repeat;
    display: flex;
    flex-direction: column;
}

.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-radius: 22px;
    padding: 40px 36px 32px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    border-top: 5px solid var(--gold-500);
    position: relative;
}

.login-logo-ring {
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    box-shadow: 0 4px 18px rgba(181, 141, 61, 0.45);
}
.login-logo-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #ffffff;
    display: block;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 25px;
    font-weight: 800;
    color: var(--text-primary);
}
.login-card .sub {
    margin: 4px 0 26px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon .field-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}
.input-with-icon input[type="text"],
.input-with-icon input[type="password"] {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14.5px;
    background: #ffffff;
    color: var(--text-primary);
    transition: all 0.18s ease;
}
.input-with-icon input:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(181, 141, 61, 0.22);
}

.pw-box input {
    padding-right: 68px !important;
}
.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--gold-600);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.pw-toggle:hover {
    background: var(--gold-100);
}

.field-error {
    color: var(--danger-accent);
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: 600;
}

.alert-box {
    display: block;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-md);
    padding: 11px 16px;
    font-size: 13.5px;
    margin-bottom: 20px;
    font-weight: 600;
}

.login-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.login-actions input[type="submit"] {
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    padding: 13px 18px;
    transition: all 0.18s ease;
}
.login-actions .btn-primary-z {
    flex: 1;
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    border: 1px solid var(--gold-400);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(181, 141, 61, 0.45);
}
.login-actions .btn-primary-z:hover {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
    box-shadow: 0 5px 16px rgba(181, 141, 61, 0.55);
    transform: translateY(-1px);
}
.login-actions .btn-ghost-z {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    color: var(--text-secondary);
}
.login-actions .btn-ghost-z:hover {
    background: var(--surface-subtle);
    color: var(--text-primary);
}

.login-foot {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 20px;
}
.login-foot a {
    color: var(--gold-300);
    text-decoration: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
    background: var(--charcoal-900);
    color: #94a3b8;
    text-align: center;
    padding: 18px 24px;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.app-footer a {
    color: var(--gold-300);
    text-decoration: none;
    font-weight: 600;
}
.app-footer a:hover {
    color: var(--gold-400);
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 991px) {
    .topbar-clock {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-toolbar {
        width: 100%;
        justify-content: flex-start;
    }
    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-wrap {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 6px;
        padding-top: 10px;
    }
    .nav.nav-open {
        display: flex;
    }
    .nav input.nav-btn,
    .nav a.nav-btn,
    .nav button.nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
        border-radius: var(--radius-md);
    }
    .nav-user-group {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        padding: 10px 14px;
    }
    .brand-text .title {
        font-size: 17px;
    }
    .page-wrap {
        padding: 0 14px;
    }
    .page-title-box h1 {
        font-size: 22px;
    }
    .stats {
        grid-template-columns: 1fr;
    }
    .stat-value {
        font-size: 28px;
    }
    .card-box table.Admingridtable1 th,
    .card-box table.Admingridtable1 td {
        padding: 11px 12px !important;
    }
    .login-card {
        padding: 30px 22px 26px;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    body.app {
        background: #ffffff !important;
    }
    .topbar,
    .page-toolbar,
    .app-footer,
    .btn-export,
    .btn-export-z,
    .btn-action-z,
    .filter-card {
        display: none !important;
    }
    .app-main {
        padding: 0 !important;
    }
    .page-wrap {
        padding: 0 !important;
        max-width: 100% !important;
    }
    .card-box {
        border: 1px solid #000000 !important;
        box-shadow: none !important;
    }
    table.Admingridtable1 th {
        background: #e2e8f0 !important;
        color: #000000 !important;
    }
    table.Admingridtable1 td {
        color: #000000 !important;
    }
    table.Admingridtable1 tr.row-total td {
        background: #f1f5f9 !important;
        font-weight: bold !important;
    }
}
