/* ============================================
   Justlina Super Admin — Dashboard Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-bg: #1a1a2e;
    --sidebar-hover: #16213e;
    --sidebar-active: #0f3460;
    --sidebar-text: #a0aec0;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 260px;

    --content-bg: #f0f2f5;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --card-radius: 12px;

    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #10b981;
    --accent-light: #34d399;
    --danger: #ef4444;
    --danger-light: #fca5a5;
    --warning: #f59e0b;
    --warning-light: #fcd34d;
    --info: #3b82f6;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;

    --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--content-bg);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- App Layout --- */
.app {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
    overflow-y: auto;
}

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

.sidebar__logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar__logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.sidebar__logo-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: auto;
    background: rgba(99, 102, 241, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.sidebar__nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar__link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
}

.sidebar__link--active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.sidebar__link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar__link--active svg,
.sidebar__link:hover svg {
    opacity: 1;
}

.sidebar__separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 12px 0;
}

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

.sidebar__link--danger {
    color: var(--danger-light);
}

.sidebar__link--danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Sidebar mobile toggle */
.sidebar__toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 42px;
    height: 42px;
    background: var(--sidebar-bg);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar__toggle svg {
    width: 22px;
    height: 22px;
}

.sidebar__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

/* --- Login Page --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--sidebar-bg);
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
}

.login-card__logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card__logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    font-size: 26px;
    color: #fff;
    margin-bottom: 16px;
}

.login-card__logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-card__logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.login-card__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: none;
}

.login-card__error--visible {
    display: block;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

/* --- Stat Card --- */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 22px 24px;
    border-left: 4px solid var(--primary);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.stat-card--accent {
    border-left-color: var(--accent);
}

.stat-card--warning {
    border-left-color: var(--warning);
}

.stat-card--danger {
    border-left-color: var(--danger);
}

.stat-card--info {
    border-left-color: var(--info);
}

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

.stat-card__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-card--accent .stat-card__icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.stat-card--warning .stat-card__icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card--danger .stat-card__icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card__icon svg {
    width: 20px;
    height: 20px;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card__sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Card (generic) --- */
.card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card__body {
    padding: 24px;
}

.card__body--flush {
    padding: 0;
}

/* --- Search Bar --- */
.search-bar {
    position: relative;
    max-width: 360px;
    width: 100%;
}

.search-bar__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-bar__icon svg {
    width: 18px;
    height: 18px;
}

.search-bar__input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--card-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-bar__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-bar__input::placeholder {
    color: var(--text-muted);
}

/* --- Toolbar --- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar__filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--card-bg);
    cursor: pointer;
    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='%2364748b' 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;
    transition: border-color var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- Data Table --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.data-table tbody tr:hover {
    background: #f1f5f9;
    cursor: pointer;
}

.data-table__key {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.data-table__key-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.data-table__key-copy:hover {
    background: var(--border-color);
    color: var(--primary);
}

.data-table__key-copy svg {
    width: 14px;
    height: 14px;
}

.data-table__actions {
    display: flex;
    gap: 6px;
}

.data-table__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.data-table__action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.data-table__action--danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.data-table__action svg {
    width: 16px;
    height: 16px;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge--active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge--active::before {
    background: #10b981;
}

.badge--expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge--expired::before {
    background: #ef4444;
}

.badge--suspended {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge--suspended::before {
    background: #f59e0b;
}

.badge--info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge--info::before {
    background: #3b82f6;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1.4;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn--primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn--accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn--accent:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
}

.btn--danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn--danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn--outline:hover:not(:disabled) {
    background: #f8fafc;
    border-color: var(--text-muted);
}

.btn--sm {
    padding: 6px 12px;
    font-size: 0.82rem;
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 6px 10px;
}

.btn--ghost:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--text-primary);
}

/* --- Form Group --- */
.form-group {
    margin-bottom: 18px;
}

.form-group__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group__hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: #fff;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* --- Modal --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal--open {
    opacity: 1;
    pointer-events: all;
}

.modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
    z-index: 1;
}

.modal--open .modal__content {
    transform: translateY(0);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.modal__close svg {
    width: 20px;
    height: 20px;
}

.modal__body {
    padding: 24px;
}

.modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* --- Activity List --- */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

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

.activity-item__icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.activity-item__icon--create {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.activity-item__icon--update {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.activity-item__icon--delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.activity-item__icon--auth {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.activity-item__icon svg {
    width: 16px;
    height: 16px;
}

.activity-item__body {
    flex: 1;
    min-width: 0;
}

.activity-item__text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-item__text strong {
    font-weight: 600;
}

.activity-item__time {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Empty State --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.empty-state__icon svg {
    width: 28px;
    height: 28px;
}

.empty-state__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state__text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 340px;
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    transform: translateX(120%);
    transition: transform var(--transition-normal);
    min-width: 280px;
    max-width: 420px;
    border-left: 4px solid var(--accent);
}

.toast--visible {
    transform: translateX(0);
}

.toast--success {
    border-left-color: var(--accent);
}

.toast--error {
    border-left-color: var(--danger);
}

.toast--warning {
    border-left-color: var(--warning);
}

.toast__icon {
    flex-shrink: 0;
    display: flex;
}

.toast__icon svg {
    width: 18px;
    height: 18px;
}

.toast--success .toast__icon {
    color: var(--accent);
}

.toast--error .toast__icon {
    color: var(--danger);
}

.toast--warning .toast__icon {
    color: var(--warning);
}

.toast__text {
    flex: 1;
}

/* --- Detail View --- */
.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-header__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.detail-header__back:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.detail-header__back svg {
    width: 18px;
    height: 18px;
}

.detail-header__title {
    font-size: 1.4rem;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-field {
    margin-bottom: 16px;
}

.detail-field__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.detail-field__value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.detail-field__value--mono {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.detail-field__value--mono:hover {
    background: #e2e8f0;
}

/* --- Loading Spinner --- */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.loading__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar--open {
        transform: translateX(0);
    }

    .sidebar__toggle {
        display: flex;
    }

    .sidebar__overlay--visible {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
        padding-top: 70px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: none;
    }

    .toolbar__filters {
        overflow-x: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.82rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .modal__content {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .login-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: unset;
        max-width: none;
    }
}
