/* GYG Email Admin — Modern Monochromatic Theme */

:root {
    --primary: #111111;
    --primary-hover: #333333;
    --success: #555555;
    --warning: #888888;
    --danger: #444444;
    --info: #666666;
    --dark: #1a1a1a;
    --text-primary: #111111;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-content: #f8f9fb;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-topnav: #0f172a;
    --bg-filter: #ffffff;
    --bg-table-header: #fafbfc;
    --border-color: #e8eaed;
    --border-light: #f1f3f5;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global */
body {
    font-family: var(--font-family) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-content) !important;
    font-size: 0.875rem;
    color: var(--text-primary);
}

::selection {
    background: rgba(17, 17, 17, 0.1);
}

/* Top Navbar */
.bg-header {
    background-color: var(--bg-topnav) !important;
}

.sb-topnav {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    height: 56px;
}

.sb-topnav .navbar-brand {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    padding-left: 1.25rem;
}

#sidebarToggle {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: color var(--transition);
}

#sidebarToggle:hover {
    color: #ffffff !important;
}

/* Sidebar */
.sb-sidenav-dark {
    background-color: var(--bg-sidebar) !important;
    border-right: none;
}

.sb-sidenav-dark .sb-sidenav-menu {
    padding-top: 0.5rem;
}

.sb-sidenav-dark .sb-sidenav-menu .sb-sidenav-menu-heading {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1.75rem 1.25rem 0.5rem;
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.55rem 1rem;
    margin: 1px 0.75rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-nav-link-icon {
    color: rgba(255, 255, 255, 0.35);
    width: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover .sb-nav-link-icon,
.sb-sidenav-dark .sb-sidenav-menu .nav-link.active .sb-nav-link-icon {
    color: #ffffff;
}

.sb-sidenav-dark .sb-sidenav-footer {
    background-color: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.25rem;
}

/* Content area */
#layoutSidenav_content {
    background-color: var(--bg-content);
}

#layoutSidenav_content main .container-fluid {
    max-width: 1400px;
}

/* Page headings */
.h3, h1.h3 {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.75rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #d4d4d8;
    content: "/";
}

/* Sticky right sidebar — Actions card stays on top */
@media (min-width: 768px) {
    .row > .col-md-3.order-md-last {
        position: sticky;
        top: 5rem;
        align-self: flex-start;
        z-index: 10;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }

    .row > .col-md-3.order-md-last::-webkit-scrollbar {
        width: 4px;
    }

    .row > .col-md-3.order-md-last::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }
}

/* Mobile sidebar: split actions (top) from extra cards (bottom) */
@media (max-width: 767.98px) {
    .sidebar-split {
        display: contents;
    }
    .sidebar-split > .sidebar-actions {
        order: -1;
        width: 100%;
    }
    .sidebar-split > .sidebar-extra {
        order: 99;
        width: 100%;
    }
}

/* Page header with breadcrumb */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header .page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.page-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--bg-content);
    padding: 1rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* Footer */
footer.bg-light {
    background-color: transparent !important;
    border-top: 1px solid var(--border-light);
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: none;
    background: var(--bg-card);
    overflow: hidden;
}

.card.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
    border-color: var(--border-light);
}

.card.shadow-sm:hover {
    box-shadow: var(--shadow-md) !important;
    transition: box-shadow 0.3s ease;
}

.card-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
}

.card-header h6 {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.25rem;
}

/* Status Badges — semantic colors */
/* Neutral / pending states */
.badge-status-received   { background-color: #e0e7ff; color: #3730a3; }
.badge-status-pending    { background-color: #fef3c7; color: #92400e; }
.badge-status-created    { background-color: #dbeafe; color: #1e40af; }
.badge-status-approved   { background-color: #dbeafe; color: #1e40af; }

/* In progress — yellow */
.badge-status-processing { background-color: #fef3c7; color: #92400e; }

/* Success — green */
.badge-status-processed  { background-color: #d1fae5; color: #065f46; }
.badge-status-purchased  { background-color: #d1fae5; color: #065f46; }
.badge-status-paid       { background-color: #d1fae5; color: #065f46; }
.badge-status-done       { background-color: #d1fae5; color: #065f46; }
.badge-status-completed  { background-color: #d1fae5; color: #065f46; }
.badge-status-confirmed  { background-color: #d1fae5; color: #065f46; }

/* Failure — red */
.badge-status-failed     { background-color: #fee2e2; color: #991b1b; }
.badge-status-cancelled  { background-color: #fee2e2; color: #991b1b; }
.badge-status-rejected   { background-color: #fee2e2; color: #991b1b; }
.badge-status-expired    { background-color: #fee2e2; color: #991b1b; }

/* Refund — light blue */
.badge-status-refunded   { background-color: #e0f2fe; color: #075985; }

/* Muted */
.badge-status-dismissed  { background-color: #f1f5f9; color: #64748b; }
.badge-status-ignored    { background-color: #f1f5f9; color: #94a3b8; }
.badge-status-waiting  { background-color: #f1f5f9; color: #64748b; }
.badge-status-pending    { background-color: #f1f5f9; color: #94a3b8; }

/* Override Bootstrap badge bg-* to match semantic palette */
.badge.bg-success { background-color: #d1fae5 !important; color: #065f46 !important; }
.badge.bg-danger  { background-color: #fee2e2 !important; color: #991b1b !important; }
.badge.bg-warning { background-color: #fef3c7 !important; color: #92400e !important; }
.badge.bg-info    { background-color: #e0f2fe !important; color: #075985 !important; }
.badge.bg-secondary { background-color: #f1f5f9 !important; color: #64748b !important; }
.badge.bg-primary { background-color: #dbeafe !important; color: #1e40af !important; }

.badge-level-debug    { background-color: #f4f4f5; color: #a1a1aa; }
.badge-level-info     { background-color: #e4e4e7; color: #3f3f46; }
.badge-level-warning  { background-color: #d4d4d8; color: #27272a; }
.badge-level-error    { background-color: #3f3f46; color: #fff; }
.badge-level-critical { background-color: #111111; color: #fff; }

[class*="badge-status-"],
[class*="badge-level-"] {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.3em 0.7em;
    border-radius: 6px;
    letter-spacing: 0.03em;
    text-transform: capitalize;
}

/* Stat Cards */
.stat-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #111111;
}

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

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.stat-card .stat-icon {
    font-size: 2rem;
    color: #e4e4e7;
    transition: color var(--transition);
}

.stat-card:hover .stat-icon {
    color: #d4d4d8;
}

/* Filter bar */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-xs);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background-color: var(--bg-table-header);
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--text-primary);
    font-size: 0.825rem;
}

.table-admin th {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background-color: var(--bg-table-header);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
}

.table-admin td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.825rem;
}

.table-hover tbody tr {
    transition: background-color 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: #fafbfc !important;
}

/* Filter bar: search input takes remaining space */
.card-header form.d-flex .form-control[type="text"],
.card-header form.d-flex .form-control[placeholder] {
    flex: 1;
    min-width: 150px;
}

/* Empty state */
.table td[colspan] {
    color: var(--text-muted);
    font-style: italic;
}

/* Buttons */
.btn {
    font-weight: 500;
    font-size: 0.8rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    letter-spacing: -0.01em;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
}

/* Inline forms (postLink) inside tables */
.table form {
    display: inline-block;
    margin: 0;
}

/* Actions card buttons */
.d-grid .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
}

.d-grid form {
    display: block;
}

.d-grid form button,
.d-grid form .btn {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
}

.d-grid > a.btn,
.d-grid > button.btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
}

.btn-primary {
    background-color: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #2a2a2a !important;
    border-color: #2a2a2a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    color: #111111 !important;
    border-color: #d4d4d8 !important;
}

.btn-outline-primary:hover {
    background-color: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: #d4d4d8 !important;
}

.btn-outline-secondary:hover {
    background-color: #f4f4f5 !important;
    border-color: #d4d4d8 !important;
    color: var(--text-primary) !important;
}

.btn-success {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #15803d !important;
    border-color: #15803d !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-outline-success {
    color: #16a34a !important;
    border-color: #16a34a !important;
    background-color: transparent !important;
}

.btn-outline-success:hover {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

.btn-danger {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.btn-warning {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

.btn-warning:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-info {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}

.btn-info:hover {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.btn-outline-danger {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
    background-color: transparent !important;
}

.btn-outline-danger:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.btn-outline-warning {
    color: #f59e0b !important;
    border-color: #f59e0b !important;
    background-color: transparent !important;
}

.btn-outline-warning:hover {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

/* Actions card buttons — full width stacked */
.d-grid .btn {
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
}

/* Form controls */
.form-control, .form-select {
    border-color: var(--border-color);
    border-radius: var(--radius);
    font-size: 0.825rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.form-control::placeholder {
    color: #c4c4c4;
}

.form-control-sm, .form-select-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-check-input:checked {
    background-color: #111111;
    border-color: #111111;
}

/* Detail tables (view pages) */
.table-sm th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light) !important;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
    background: transparent;
}

.table-sm td {
    font-size: 0.825rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light) !important;
}

/* Auth Pages */
.auth-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #eaeaec;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 2rem;
}

.auth-bg-circle {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

@keyframes auth-bubble-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.03); }
    66% { transform: translate(-15px, 15px) scale(0.97); }
}

@keyframes auth-bubble-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 20px) scale(1.04); }
    66% { transform: translate(20px, -10px) scale(0.96); }
}

@keyframes auth-bubble-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -25px) scale(1.05); }
}

.auth-bg-circle-1 {
    width: 500px; height: 500px;
    background: rgba(200, 200, 200, 0.35);
    top: -120px; left: -120px;
    animation: auth-bubble-float-1 10s ease-in-out infinite;
}

.auth-bg-circle-2 {
    width: 350px; height: 350px;
    background: rgba(190, 190, 190, 0.3);
    bottom: -80px; right: -80px;
    animation: auth-bubble-float-2 12s ease-in-out infinite;
}

.auth-bg-circle-3 {
    width: 200px; height: 200px;
    background: rgba(180, 180, 180, 0.25);
    bottom: 10%; left: 8%;
    animation: auth-bubble-float-3 8s ease-in-out infinite;
}

.auth-card {
    position: relative;
    z-index: 1;
    display: flex;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.auth-card-left {
    flex: 1;
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.auth-form-container {
    width: 100%;
    max-width: 360px;
}

.auth-welcome-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #aaa;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.auth-title i {
    color: #333;
    font-size: 1.3rem;
    margin-right: 0.25rem;
}

.auth-subtitle {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.85rem;
    z-index: 1;
    pointer-events: none;
}

.auth-input-group .auth-input {
    width: 100%;
    border: 1.5px solid #e5e5e5;
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-size: 0.875rem;
    color: #111;
    background: #fafafa;
    transition: all var(--transition);
    outline: none;
    font-family: inherit;
}

.auth-input-group .auth-input:focus {
    border-color: #333;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
    background: #fff;
}

.auth-input-group .auth-input::placeholder { color: #c5c5c5; }

.auth-toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.auth-toggle-password:hover { color: #555; }

.btn-auth {
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    border: none;
    padding: 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    color: #fff;
    width: 100%;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all var(--transition);
    cursor: pointer;
    font-family: inherit;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
    color: #fff;
}

.btn-auth:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.auth-card-right {
    flex: 1;
    background: linear-gradient(135deg, #111 0%, #2a2a2a 50%, #444 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.auth-card-right::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    top: -80px; right: -80px;
    background: rgba(255, 255, 255, 0.03);
}

.auth-card-right::after {
    content: '';
    position: absolute;
    width: 250px; height: 250px;
    border-radius: 50%;
    bottom: -60px; left: -60px;
    background: rgba(255, 255, 255, 0.02);
}

.auth-card-right-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-brand-icon {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 1.75rem;
    color: #fff;
}

.auth-card-right h2 {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.auth-card-right p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    max-width: 260px;
    margin: 0 auto;
}

/* Inline flash container for login/auth pages */

@media (max-width: 767.98px) {
    .auth-body { padding: 1rem; align-items: flex-start; padding-top: 2rem; }
    .auth-card { flex-direction: column; border-radius: var(--radius-xl); }
    .auth-card-right { width: 100%; min-width: unset; padding: 2rem 1.5rem; order: -1; }
    .auth-card-right h2 { font-size: 0.9rem; }
    .auth-card-right p { display: none; }
    .auth-brand-icon { width: 52px; height: 52px; font-size: 1.25rem; margin-bottom: 1rem; }
    .auth-card-left { padding: 2rem 1.5rem; }
    .auth-bg-circle-1 { width: 300px; height: 300px; top: -80px; left: -80px; }
    .auth-bg-circle-2 { width: 200px; height: 200px; }
    .auth-bg-circle-3 { display: none; }
}

/* Timeline for logs */
.timeline-item {
    border-left: 2px solid var(--border-color);
    padding-left: 0.85rem;
    margin-left: 0.35rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-item .timeline-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Sidebar scrollbar */
.sb-sidenav-menu::-webkit-scrollbar { width: 3px; }
.sb-sidenav-menu::-webkit-scrollbar-track { background: transparent; }
.sb-sidenav-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    color: var(--text-primary);
    border-color: var(--border-color);
    font-size: 0.8rem;
    border-radius: var(--radius) !important;
    padding: 0.35rem 0.7rem;
    transition: all var(--transition);
}

.page-link:hover {
    background-color: #f4f4f5;
    border-color: #d4d4d8;
}

.page-item.active .page-link {
    background-color: #111111;
    border-color: #111111;
}

/* Dropdown menu */
.dropdown-menu {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.35rem;
}

.dropdown-item {
    border-radius: 6px;
    font-size: 0.825rem;
    padding: 0.45rem 0.75rem;
}

.dropdown-item:hover {
    background-color: #f4f4f5;
}

/* Nav tabs */
.nav-tabs {
    border-bottom: 1px solid var(--border-light);
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.65rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    border-color: transparent;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: #111111;
    background: transparent;
}

/* Code blocks */
code {
    color: #27272a;
    background-color: #f4f4f5;
    padding: 0.2em 0.45em;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 500;
}


/* Flash messages */
.flash-wrapper {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flash-wrapper-inline {
    margin-bottom: 0.75rem;
}

@keyframes flashMsgIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flashMsgOut {
    from { opacity: 1; transform: translateY(0); max-height: 120px; margin-bottom: 0; }
    to { opacity: 0; transform: translateY(-8px); max-height: 0; margin-bottom: -0.5rem; overflow: hidden; }
}

.flash-msg {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: flashMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.flash-msg.flash-msg-out {
    animation: flashMsgOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.flash-msg-accent {
    width: 4px;
    flex-shrink: 0;
}

.flash-msg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    font-size: 1rem;
}

.flash-msg-content {
    flex: 1;
    padding: 0.75rem 0;
    min-width: 0;
}

.flash-msg-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.flash-msg-text {
    font-size: 0.825rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.flash-msg-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
    flex-shrink: 0;
    padding: 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.flash-msg-close:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

/* Success */
.flash-success .flash-msg-accent { background: #10b981; }
.flash-success .flash-msg-icon { color: #10b981; }
.flash-success .flash-msg-title { color: #059669; }

/* Error */
.flash-error .flash-msg-accent { background: #ef4444; }
.flash-error .flash-msg-icon { color: #ef4444; }
.flash-error .flash-msg-title { color: #dc2626; }

/* Warning */
.flash-warning .flash-msg-accent { background: #f59e0b; }
.flash-warning .flash-msg-icon { color: #f59e0b; }
.flash-warning .flash-msg-title { color: #d97706; }

/* Info */
.flash-info .flash-msg-accent { background: #3b82f6; }
.flash-info .flash-msg-icon { color: #3b82f6; }
.flash-info .flash-msg-title { color: #2563eb; }

/* Pre blocks */
pre {
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    font-size: 0.78rem;
}

/* Modal */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value { font-size: 1.5rem; }
    .h3, h1.h3 { font-size: 1.15rem; }

    /* Page header: breadcrumb on top, title below */
    .page-header .page-title {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 0.5rem;
        overflow: hidden;
        width: 100%;
    }
    .page-header .page-title .breadcrumb {
        margin-bottom: 0;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    .page-header .page-title .breadcrumb-item {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Filter bar: stack inputs on mobile */
    .card-header form.d-flex {
        flex-direction: column;
    }
    .card-header form.d-flex .form-select,
    .card-header form.d-flex .form-control {
        max-width: 100% !important;
        width: 100%;
    }
    .card-header form.d-flex .btn {
        width: 100%;
    }

    /* Detail tables (th/td key-value pairs): stack on mobile */
    .table-sm tr {
        display: flex;
        flex-direction: column;
        padding: 0.5rem 0;
    }
    .table-sm th {
        border: none !important;
        padding: 0 0 0.15rem 0;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-muted);
        width: auto !important;
    }
    .table-sm td {
        border: none !important;
        padding: 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Stacked table: each row becomes a card */
    .table-stack thead {
        display: none;
    }
    .table-stack tbody tr {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    .table-stack tbody tr:last-child {
        border-bottom: none;
    }
    .table-stack tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.3rem 0;
        border: none !important;
        font-size: 0.8rem;
    }
    .table-stack tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-muted);
        flex-shrink: 0;
        min-width: 90px;
    }
    .table-stack tbody td:last-child {
        padding-top: 0.5rem;
        justify-content: flex-end;
    }
    .table-stack tbody td[colspan] {
        display: block;
        text-align: center;
    }
    .table-stack tbody td[colspan]::before {
        display: none;
    }
}

/* Smooth page transition feel */
#layoutSidenav_content main {
    animation: fadeInContent 0.2s ease-out;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    user-select: none;
}

code, .table td, .table th, input, textarea, pre {
    user-select: text;
}
