/* ==========================================================================
   ASHICO Admin — Design System v3 (19/04/2026)
   Brand colors, modern flat design, soft shadows.
   ========================================================================== */

:root {
    --ashico-blue:        #034ea2;
    --ashico-blue-dark:   #023a7a;
    --ashico-blue-light:  #0066cc;
    --ashico-blue-50:     #eef4fc;
    --ashico-red:         #ec2028;
    --ashico-gold:        #d4af37;

    --bg-app:         #f4f6fb;
    --bg-card:        #ffffff;
    --bg-hover:       #f8fafc;
    --border:         #e5e9f2;
    --border-light:   #f1f5f9;

    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --info:           #06b6d4;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 6px rgba(3, 78, 162, 0.06);
    --shadow-md: 0 4px 16px rgba(3, 78, 162, 0.08);
    --shadow-lg: 0 12px 32px rgba(3, 78, 162, 0.12);

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --t-fast:   0.15s ease;
    --t-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow:   0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }

html {
    font-size: 14px;
    min-height: 100%;
    background: var(--bg-app);
    font-family: 'Exo 2', 'Plus Jakarta Sans', 'Roboto', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    color: var(--text-primary);
    background: var(--bg-app);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.55;
}

a { color: var(--ashico-blue); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--ashico-blue-light); }

code {
    background: var(--ashico-blue-50);
    color: var(--ashico-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

/* ==========================================================================
   Admin Header (top bar)
   ========================================================================== */
.admin-header {
    height: 72px;
    background: linear-gradient(135deg, #034ea2 0%, #023a7a 100%);
    color: #fff;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(3, 78, 162, 0.18);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-logo-header img {
    height: 46px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.admin-title-header span {
    font-size: 1.45rem !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    min-height: calc(100vh - 72px);
    background: linear-gradient(180deg, #034ea2 0%, #022e60 100%);
    padding: 20px 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
}

/* Section header (L1) */
.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-title-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    margin: 2px 12px;
    cursor: pointer;
    user-select: none;
    transition: all var(--t-normal);
    border-radius: 10px;
}

.sidebar-title-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-title-main {
    background: transparent !important;
}

.sidebar-title-main span {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: rgba(255,255,255,0.7) !important;
    text-transform: uppercase;
    line-height: 1;
}

.sidebar-title-main span i {
    font-size: 14px !important;
    width: 18px;
    margin-right: 10px;
    color: rgba(255,255,255,0.85) !important;
}

.toggle-icon {
    font-size: 11px !important;
    color: rgba(255,255,255,0.4) !important;
    transition: transform var(--t-normal);
}

/* Dividers (between section header and items) */
[class^="sidebar-divider-"] {
    margin: 2px 18px 6px !important;
    height: 1px;
}

.sidebar-divider-blue   { background: linear-gradient(90deg, #5c9ded 0%, transparent 100%); }
.sidebar-divider-green  { background: linear-gradient(90deg, #7cb342 0%, transparent 100%); }
.sidebar-divider-orange { background: linear-gradient(90deg, #ff9800 0%, transparent 100%); }
.sidebar-divider-teal   { background: linear-gradient(90deg, #26a69a 0%, transparent 100%); }
.sidebar-divider-purple { background: linear-gradient(90deg, #9575cd 0%, transparent 100%); }
.sidebar-divider-yellow { background: linear-gradient(90deg, #f0c674 0%, transparent 100%); }

[class^="sidebar-divider-"] .divider-line-top,
[class^="sidebar-divider-"] .divider-line-bottom {
    display: none;
}

/* Section content */
.sidebar-section-content {
    padding: 2px 6px 10px;
}

/* Menu items (L2) */
.sidebar .menu-item {
    display: flex !important;
    align-items: center !important;
    padding: 10px 14px !important;
    margin: 2px 6px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    color: rgba(255,255,255,0.82) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all var(--t-normal) !important;
    position: relative;
    line-height: 1.3 !important;
    border-left: 3px solid transparent;
}

.sidebar .menu-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    padding-left: 16px !important;
}

.sidebar .menu-item.active {
    background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%) !important;
    color: var(--ashico-blue) !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
    border-left: 3px solid var(--ashico-gold);
}

.sidebar .menu-item.active .menu-icon {
    color: var(--ashico-blue) !important;
}

.sidebar .menu-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    width: 22px !important;
    min-width: 22px !important;
    margin-right: 12px !important;
    color: rgba(255,255,255,0.7) !important;
    transition: color var(--t-normal);
}

.sidebar .menu-item:hover .menu-icon { color: #fff !important; }

.sidebar .menu-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px !important;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ==========================================================================
   Main content
   ========================================================================== */
.admin-content-full {
    width: calc(100vw - 260px) !important;
    min-height: calc(100vh - 72px);
    background: var(--bg-app);
    padding: 28px 32px !important;
}

.admin-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.admin-card,
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px 28px;
    margin-bottom: 20px;
    transition: box-shadow var(--t-normal), transform var(--t-normal);
}

.admin-card:hover { box-shadow: var(--shadow-md); }

.admin-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}

.admin-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

/* Stat card — for dashboard */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--ashico-blue) 0%, var(--ashico-blue-light) 100%);
}

.stat-card.stat-red::before    { background: linear-gradient(180deg, var(--ashico-red) 0%, #ff6b6b 100%); }
.stat-card.stat-gold::before   { background: linear-gradient(180deg, var(--ashico-gold) 0%, #f4cb5c 100%); }
.stat-card.stat-green::before  { background: linear-gradient(180deg, #10b981 0%, #34d399 100%); }
.stat-card.stat-purple::before { background: linear-gradient(180deg, #8b5cf6 0%, #a78bfa 100%); }
.stat-card.stat-teal::before   { background: linear-gradient(180deg, #14b8a6 0%, #2dd4bf 100%); }

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--ashico-blue-50);
    color: var(--ashico-blue);
    margin-bottom: 14px;
}

.stat-card.stat-red .stat-card-icon    { background: #fef2f2; color: var(--ashico-red); }
.stat-card.stat-gold .stat-card-icon   { background: #fefbe8; color: var(--ashico-gold); }
.stat-card.stat-green .stat-card-icon  { background: #ecfdf5; color: var(--success); }
.stat-card.stat-purple .stat-card-icon { background: #f5f3ff; color: #8b5cf6; }
.stat-card.stat-teal .stat-card-icon   { background: #f0fdfa; color: #14b8a6; }

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 4px 0 2px;
    letter-spacing: -0.5px;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.stat-card-trend.up   { background: #ecfdf5; color: var(--success); }
.stat-card-trend.down { background: #fef2f2; color: var(--danger); }
.stat-card-trend.flat { background: var(--bg-hover); color: var(--text-secondary); }

/* Quick action card */
.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--t-normal);
}

.quick-action:hover {
    border-color: var(--ashico-blue);
    background: var(--ashico-blue-50);
    color: var(--ashico-blue);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.quick-action-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 18px;
    background: var(--ashico-blue-50);
    color: var(--ashico-blue);
    flex-shrink: 0;
}

.quick-action:hover .quick-action-icon {
    background: var(--ashico-blue);
    color: #fff;
}

.quick-action-content { flex: 1; }
.quick-action-title { font-weight: 600; font-size: 0.95rem; }
.quick-action-desc  { font-size: 0.8rem; color: var(--text-secondary); }

/* ==========================================================================
   Tables
   ========================================================================== */
.admin-table,
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0;
}

.admin-table thead,
.table thead {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.admin-table thead th,
.table thead th {
    padding: 14px 16px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
    white-space: nowrap;
}

.admin-table tbody td,
.table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border-light) !important;
    border-top: none !important;
    vertical-align: middle !important;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.admin-table tbody tr:hover td,
.table tbody tr:hover td {
    background: var(--bg-hover);
}

.admin-table tbody tr:last-child td,
.table tbody tr:last-child td { border-bottom: none !important; }

.admin-table tbody tr.table-primary td,
.table tbody tr.table-primary td {
    background: var(--ashico-blue-50) !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 9px 18px;
    font-size: 0.9rem;
    transition: all var(--t-normal);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; gap: 4px; }

.btn-primary {
    background: linear-gradient(135deg, var(--ashico-blue) 0%, var(--ashico-blue-light) 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(3, 78, 162, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--ashico-blue-light) 0%, var(--ashico-blue) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(3, 78, 162, 0.35);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: #fff;
    border: 1px solid var(--ashico-blue);
    color: var(--ashico-blue);
}

.btn-outline-primary:hover {
    background: var(--ashico-blue);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-outline-secondary {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    border-color: var(--text-secondary);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-outline-danger {
    background: #fff;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.btn-success {
    background: var(--success);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Icon-only button (round) */
.btn-icon {
    width: 36px; height: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-sm.btn-icon { width: 32px; height: 32px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.form-control,
.form-select {
    height: 42px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #fff;
    transition: all var(--t-normal);
    box-shadow: var(--shadow-xs);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ashico-blue);
    box-shadow: 0 0 0 3px rgba(3, 78, 162, 0.12);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { height: auto; min-height: 90px; padding: 10px 14px; }

.form-control-color {
    padding: 4px !important;
    cursor: pointer;
    height: 48px;
}

/* Check / switch */
.form-check-input {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--ashico-blue);
    border-color: var(--ashico-blue);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(3, 78, 162, 0.15);
    border-color: var(--ashico-blue);
}

.form-switch .form-check-input {
    width: 38px; height: 22px; border-radius: 22px;
}

.form-check-label { color: var(--text-primary); font-weight: 500; }

/* Validation */
.text-danger.small,
span[asp-validation-for] { font-size: 0.8rem; }

/* ==========================================================================
   Tabs (Bootstrap nav-tabs)
   ========================================================================== */
.nav-tabs {
    border-bottom: 2px solid var(--border-light);
    gap: 4px;
}

.nav-tabs .nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--t-normal);
    position: relative;
    font-size: 0.9rem;
}

.nav-tabs .nav-link:hover {
    color: var(--ashico-blue);
    background: var(--ashico-blue-50);
}

.nav-tabs .nav-link.active {
    color: var(--ashico-blue);
    background: transparent;
    border: none;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ashico-blue) 0%, var(--ashico-blue-light) 100%);
    border-radius: 3px 3px 0 0;
}

.nav-tabs .nav-link i {
    margin-right: 6px;
    font-size: 1rem;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.badge.bg-success   { background: #ecfdf5 !important; color: var(--success) !important; }
.badge.bg-danger    { background: #fef2f2 !important; color: var(--danger) !important; }
.badge.bg-primary   { background: var(--ashico-blue-50) !important; color: var(--ashico-blue) !important; }
.badge.bg-secondary { background: #f1f5f9 !important; color: var(--text-secondary) !important; }
.badge.bg-warning   { background: #fefbe8 !important; color: var(--warning) !important; }
.badge.bg-info      { background: #ecfeff !important; color: var(--info) !important; }

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fefbe8;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #ecfeff;
    color: #0e7490;
    border-left: 4px solid var(--info);
}

/* ==========================================================================
   Preview box (images)
   ========================================================================== */
.preview-box {
    background: linear-gradient(135deg, #f8fafc 0%, #eef4fc 100%);
    border: 2px dashed var(--border) !important;
    border-radius: var(--radius-md) !important;
    min-height: 140px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--t-normal);
}

.preview-box:hover { border-color: var(--ashico-blue) !important; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #fff !important;
    border-top: 1px solid var(--border-light) !important;
    color: var(--text-secondary) !important;
    padding: 14px 24px !important;
    font-size: 0.82rem;
    box-shadow: none !important;
}

.footer .text-body {
    color: var(--text-secondary) !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

.footer .text-body span { color: var(--ashico-blue) !important; font-weight: 700 !important; }

/* ==========================================================================
   Avatar / user info header
   ========================================================================== */
.admin-userinfo-header .btn-link,
.admin-userinfo-header .dropdown-toggle {
    color: #fff !important;
}

.admin-userinfo-header img {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

/* ==========================================================================
   Utility / misc
   ========================================================================== */
.page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.page-header h1,
.page-header h2,
.page-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.page-header p { color: var(--text-secondary); margin: 4px 0 0; font-size: 0.9rem; }

.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i { font-size: 3rem; opacity: 0.3; display: block; margin-bottom: 12px; }

.fw-semibold { font-weight: 600 !important; }

/* Responsive */
@media (max-width: 1199px) {
    .admin-header { padding: 0 20px; }
    .admin-content-full { padding: 20px !important; }
}

@media (max-width: 991px) {
    .admin-title-header span { font-size: 1.1rem !important; }
    .admin-logo-header img { height: 38px !important; }
}
