/* =========================================================================
   Premium Admin Redesign
   Layers on top of the existing Hyper admin theme (app-saas.min.css) and
   Bootstrap's --ct-* variable system. Loaded last so these plain selectors
   win the cascade without needing to fight vendor specificity. A handful of
   sidebar/topbar rules use !important where the vendor theme sets values
   via inline-specificity CSS custom properties.

   Design language: flat, premium, mobile-app quality. No two-stop
   gradients. One solid accent for primary actions, with dedicated hover
   and pressed colors (not blends). A calm neutral scale. Restrained
   elevation shadows; brand glow used only at ~20% alpha.
   ========================================================================= */

:root {
    /* Brand — single solid accent (the only primary button color) */
    --brand: #7704FA;
    --brand-hover: #CB0596;
    --brand-pressed: #F5366E;
    --brand-active: #F5366E;
    --brand-soft: rgba(119, 4, 250, .10);
    --brand-soft-border: rgba(119, 4, 250, .22);
    --glow: rgba(119, 4, 250, .20);

    /* Leftover two-stop widgets render as a solid */
    --theme-gradient-1: #7704FA;
    --theme-gradient-2: #7704FA;

    /* Keep Hyper / Bootstrap primary in sync with the brand */
    --theme-color: #7704FA;
    --ct-primary: #7704FA;
    --ct-primary-rgb: 119, 4, 250;

    /* Ink (text) scale */
    --ink-900: #16121f;
    --ink-800: #241d33;
    --ink-700: #473a5c;
    --ink-600: #5f5474;
    --ink-500: #776b8c;
    --ink-400: #9992a8;

    /* Surfaces */
    --surface: #ffffff;
    --surface-muted: #f7f5fb;
    --surface-sunken: #f1eef8;
    --surface-border: #e7e2f0;

    /* Semantic */
    --success: #12a56d;
    --success-soft: #e7f8f1;
    --warning: #dc8a00;
    --warning-soft: #fcf1de;
    --danger: #e0334f;
    --danger-soft: #fceaed;
    --info: #2f7de1;
    --info-soft: #e9f1fd;

    /* Scale */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --shadow-xs: 0 1px 2px rgba(22, 18, 31, .05);
    --shadow-sm: 0 1px 3px rgba(22, 18, 31, .07), 0 1px 2px rgba(22, 18, 31, .04);
    --shadow-md: 0 6px 16px rgba(22, 18, 31, .07);

    --transition-fast: .14s ease;
}

/* Dark mode — same solid brand states, softer surfaces */
[data-bs-theme="dark"] {
    --brand: #7704FA;
    --brand-hover: #CB0596;
    --brand-pressed: #F5366E;
    --brand-active: #F5366E;
    --brand-soft: rgba(119, 4, 250, .18);
    --brand-soft-border: rgba(119, 4, 250, .32);
    --glow: rgba(119, 4, 250, .28);
    --theme-gradient-1: #7704FA;
    --theme-gradient-2: #7704FA;
    --theme-color: #7704FA;
    --ct-primary: #7704FA;
    --ct-primary-rgb: 119, 4, 250;

    --ink-900: #f4f2f9;
    --ink-800: #e4dff0;
    --ink-700: #c3bad6;
    --ink-600: #a79dbd;
    --ink-500: #8d82a4;
    --ink-400: #71678a;

    --surface: #1c1728;
    --surface-muted: #221b30;
    --surface-sunken: #171222;
    --surface-border: #322948;

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .14);
    --warning: #f5b94b;
    --warning-soft: rgba(245, 185, 75, .14);
    --danger: #f76e84;
    --danger-soft: rgba(247, 110, 132, .14);
    --info: #63a7f7;
    --info-soft: rgba(99, 167, 247, .14);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .35);
}

/* Leftover Bootstrap two-stop overlays render as a solid brand fill */
.bg-gradient {
    --ct-gradient: none;
    background-image: none !important;
}

/* =========================================================================
   0. Base — typography, links, focus states, scrollbars
   ========================================================================= */

html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}
.wrapper {
    height: auto;
    min-height: 100vh;
}
.content-page,
.page-title-box {
    overflow: visible;
}
/* All views used to sit inside .page-title-box, whose title rules clip
   content and lock the page to a single-line 75px header. Neutralize. */
.page-title-box .page-title {
    overflow: visible;
    white-space: normal;
    line-height: 1.35;
    text-overflow: unset;
}

h1, h2, h3, h4, h5, h6,
.card-title, .header-title {
    letter-spacing: -.01em;
}

a { transition: color var(--transition-fast); }

/* Consistent, visible focus ring everywhere (accessibility) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.side-nav-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--surface-border);
    border-radius: 10px;
}
[data-simplebar] .simplebar-scrollbar::before {
    background: var(--ink-400);
}

/* =========================================================================
   1. Login / Authentication (flattened — no blobs, no glow, no animation)
   ========================================================================= */

body.authentication-bg {
    background: #efeaf6;
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-blob { display: none; }

.auth-card {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 580px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(22, 18, 31, .12);
    border: 1px solid rgba(22, 18, 31, .06);
}

.auth-brand-pane {
    flex: 1 1 46%;
    position: relative;
    background: var(--ink-900);
    color: #fff;
    padding: 48px 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.auth-brand-pane::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand);
}

.auth-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.auth-lockup img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: none;
}

.auth-lockup span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
    line-height: 1;
}

/* Breathing glow halo removed — logo sits flat */
.auth-logo::before,
.leftside-menu .logo::before {
    content: none;
}

.auth-brand-copy h1 {
    margin: 0 0 12px;
    max-width: 320px;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.15;
    color: #fff;
}

.auth-brand-copy p {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .62);
    max-width: 280px;
    margin: 0;
}

.auth-highlights {
    list-style: none;
    padding: 18px 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-highlights li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
}

.auth-highlights li i {
    flex: none;
    width: 18px;
    font-size: 16px;
    color: rgba(255, 255, 255, .45);
    text-align: center;
}

.auth-form-pane {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 52px;
    background: #fff;
}

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

.auth-form-inner .auth-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
}

.auth-form-inner h4 {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.03em;
    color: var(--ink-900);
}

.auth-lead {
    margin: 8px 0 28px;
    color: var(--ink-500);
    font-size: 14.5px;
    line-height: 1.5;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.auth-quiet-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
    text-decoration: none;
}

.auth-quiet-link:hover {
    color: var(--brand);
}

.auth-footnote {
    margin: 16px 0 0;
    text-align: center;
    color: var(--ink-400);
    font-size: 12.5px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 6px;
}

.auth-input-group {
    flex-wrap: nowrap;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-input-group .input-group-text {
    background: transparent;
    border: 0;
    color: var(--ink-400);
    padding-left: 14px;
    padding-right: 4px;
}

.auth-input-group .form-control {
    border: 0;
    background: transparent;
    height: 48px;
    box-shadow: none;
    color: var(--ink-900);
}

.auth-input-group .form-control:focus {
    background: transparent;
    box-shadow: none;
}

.auth-input-group:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--glow);
}

.btn-auth-primary {
    background: var(--brand);
    border: 1px solid var(--brand);
    color: #fff;
    font-weight: 600;
    height: 48px;
    padding: 0 1rem;
    border-radius: 12px;
    letter-spacing: -.01em;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-auth-primary:hover,
.btn-auth-primary:focus {
    color: #fff;
    background: var(--brand-hover);
    border-color: var(--brand-hover);
}

.btn-auth-primary:active {
    background: var(--brand-active);
    border-color: var(--brand-active);
}

.btn-auth-primary:disabled {
    opacity: .7;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fdecef;
    color: #9b1c3c;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.auth-alert[hidden] {
    display: none !important;
}

.auth-alert i {
    font-size: 16px;
    margin-top: 1px;
    flex: none;
}

.auth-input-group.is-invalid {
    border-color: #e11d48;
    box-shadow: none;
}

.auth-field-error {
    margin: 6px 0 0;
    color: #be123c;
    font-size: 12.5px;
    font-weight: 600;
}

.auth-remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 18px;
    cursor: pointer;
}

.auth-remember input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--brand);
    flex: none;
}

.auth-remember span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-800);
}

.auth-remember small {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-400);
}

.auth-recover-dialog {
    max-width: 480px;
}

.auth-recover-dialog .modal-header {
    align-items: flex-start;
    padding: 22px 22px 0;
    border-bottom: 0;
}

.auth-recover-dialog .modal-title {
    margin: 4px 0 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.auth-recover-dialog .modal-body {
    padding: 8px 22px 8px;
    max-height: min(62vh, 520px);
}

.auth-recover-dialog .modal-footer {
    padding: 8px 22px 22px;
    border-top: 0;
}

.auth-recover-lead,
.auth-recover-step p {
    margin: 0 0 14px;
    color: var(--ink-500);
    font-size: 13.5px;
    line-height: 1.5;
}

.auth-recover-step {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--surface-border);
}

.auth-recover-step h5 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
}

.auth-match {
    margin: 6px 0 0;
    color: var(--success);
    font-size: 12.5px;
    font-weight: 600;
}

.auth-match[hidden] { display: none !important; }

.auth-recover-success {
    padding: 36px 28px 32px;
    text-align: center;
}

.auth-channel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.auth-channel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: 84px;
    padding: 14px 16px;
    border: 1px solid #e4dced;
    border-radius: 14px;
    background: #fff;
    color: #16121f;
    text-align: left;
    cursor: pointer;
}
.auth-channel i { font-size: 18px; color: #7704FA; }
.auth-channel span { font-weight: 600; }
.auth-channel small { color: #6d6578; font-size: 12px; }
.auth-channel.is-selected {
    border-color: #7704FA;
    box-shadow: 0 0 0 3px rgba(119, 4, 250, .12);
}
.auth-channel:disabled { opacity: .45; cursor: not-allowed; }
.auth-recover-dialog .modal-footer { flex-wrap: wrap; gap: 8px; }
.auth-recover-dialog .modal-footer .auth-quiet-link { margin-right: auto; padding-left: 0; }
#otpRequestForm[hidden],
#otpVerifyForm[hidden],
#forgotPasswordForm[hidden],
.auth-recover-success[hidden],
#forgotPasswordForm[hidden] { display: none !important; }

.auth-recover-success i {
    font-size: 42px;
    color: var(--success);
}

.auth-recover-success h4 {
    margin: 10px 0 6px;
    font-size: 22px;
    font-weight: 600;
}

.auth-recover-success p {
    margin: 0 0 18px;
    color: var(--ink-500);
}

@media (max-width: 991.98px) {
    .auth-shell { padding: 16px; align-items: flex-start; }
    .auth-card { flex-direction: column; max-width: 440px; min-height: auto; margin: 12px auto; }
    .auth-brand-pane { padding: 28px 24px 22px; gap: 20px; }
    .auth-brand-copy h1 { font-size: 26px; }
    .auth-highlights { display: none; }
    .auth-form-pane { padding: 28px 24px 32px; }
}

/* =========================================================================
   2. Topbar — solid surface, no blur
   ========================================================================= */

.navbar-custom {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--surface-border);
    box-shadow: none;
}

html[data-topbar-color="dark"] .navbar-custom {
    background: var(--ink-900) !important;
    border-bottom-color: rgba(255, 255, 255, .08);
}

.navbar-custom .topbar-menu .nav-link {
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.navbar-custom .topbar-menu .nav-link:hover {
    background: var(--surface-muted);
    color: var(--brand);
}

.logo-topbar .logo-light img,
.logo-topbar .logo-dark img {
    height: 26px;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 16px;
    flex: none;
}

.nav-user {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
}

.nav-user h5 {
    font-weight: 600;
    color: var(--ink-800);
    font-size: 14px;
}

/* =========================================================================
   3. Sidebar — flat dark, solid active state, scrollable to active item
   ========================================================================= */

.leftside-menu {
    background: var(--ink-900) !important;
    border-right: none !important;
    padding-bottom: 0 !important;
    overflow: hidden;
}

.leftside-menu .logo {
    z-index: 2;
    background: var(--ink-900);
}

.leftside-menu #leftside-menu-container {
    height: calc(100vh - var(--ct-topbar-height)) !important;
}

.leftside-menu .side-nav {
    padding: 4px 0 28px;
}

.leftside-menu .side-nav-group {
    list-style: none;
}

.leftside-menu .side-nav-group-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leftside-menu .side-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 10px 12px 4px;
    padding: 8px 8px !important;
    color: rgba(255, 255, 255, .42) !important;
    letter-spacing: .08em;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    pointer-events: auto !important;
    text-align: left;
    font-family: inherit;
}

.leftside-menu .side-nav-title:hover {
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .78) !important;
}

.leftside-menu .side-nav-title::before {
    content: "";
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
    flex: none;
}

.leftside-menu .side-nav-title-label {
    flex: 1 1 auto;
    min-width: 0;
}

.leftside-menu .side-nav-title-caret {
    font-size: 16px;
    margin-left: auto;
    color: rgba(255, 255, 255, .4);
    transition: transform var(--transition-fast);
}

.leftside-menu .side-nav-title .badge {
    position: static !important;
    margin: 0 !important;
}

.leftside-menu .side-nav-group.is-collapsed > .side-nav-group-items {
    display: none;
}

.leftside-menu .side-nav-group.is-collapsed > .side-nav-title .side-nav-title-caret {
    transform: rotate(-90deg);
}

html[data-sidenav-size="condensed"] .leftside-menu .side-nav-group.is-collapsed > .side-nav-group-items {
    display: block;
}

.leftside-menu .side-nav-section {
    list-style: none;
    margin: 18px 20px 0;
    padding: 0;
    color: rgba(255, 255, 255, .28);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.leftside-menu .side-nav-subtitle {
    list-style: none;
    margin: 10px 20px 2px 28px;
    padding: 0;
    color: rgba(255, 255, 255, .38);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

html[data-sidenav-size="condensed"] .leftside-menu .side-nav-section,
html[data-sidenav-size="condensed"] .leftside-menu .side-nav-subtitle,
html[data-sidenav-size="compact"] .leftside-menu .side-nav-section,
html[data-sidenav-size="compact"] .leftside-menu .side-nav-subtitle {
    display: none;
}

.leftside-menu .side-nav-link {
    color: rgba(255, 255, 255, .68) !important;
    border-radius: var(--radius-sm);
    margin: 2px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 40px;
    white-space: normal;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.leftside-menu .side-nav-link > span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
    padding-top: 1px;
}

.leftside-menu .side-nav-link i {
    color: rgba(255, 255, 255, .55);
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex: none;
    margin-top: 1px;
}

.leftside-menu .side-nav-link .badge {
    position: static !important;
    margin: 0 0 0 auto !important;
    flex: none;
}

.leftside-menu .side-nav-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff !important;
}

.leftside-menu .side-nav-link:hover i {
    color: #fff;
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link {
    background: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px var(--glow);
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link:hover {
    background: var(--brand-hover) !important;
    border-color: var(--brand-hover);
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link:active {
    background: var(--brand-pressed) !important;
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link i {
    color: #fff !important;
}

/* Dropdown groups (e.g. Marketplace) */
.leftside-menu .side-nav-link .menu-arrow {
    margin-left: auto;
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link[data-bs-toggle="collapse"] {
    background: rgba(255, 255, 255, .08) !important;
    box-shadow: none;
}

.leftside-menu .side-nav-second-level {
    margin: 2px 12px 6px 34px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .1);
}

.leftside-menu .side-nav-second-level li a {
    display: block;
    color: rgba(255, 255, 255, .6) !important;
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 13.5px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.leftside-menu .side-nav-second-level li a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff !important;
}

.leftside-menu .side-nav-second-level li.menuitem-active > a {
    background: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px var(--glow);
}

.leftside-menu .side-nav-second-level li.menuitem-active > a:hover {
    background: var(--brand-hover) !important;
}

.leftside-menu .side-nav-second-level li.menuitem-active > a:active {
    background: var(--brand-pressed) !important;
}

.leftside-menu .button-sm-hover {
    color: rgba(255, 255, 255, .5);
}

.leftside-menu .logo img {
    filter: none;
}

/* =========================================================================
   4. Page header — reusable across every view (see include/page-header.blade.php)
   ========================================================================= */

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.page-header .page-header-titles h2,
.dash-header h2 {
    font-weight: 700;
    color: var(--ink-900);
    margin: 0;
    font-size: 22px;
}

.page-header .page-header-titles p,
.dash-header p {
    color: var(--ink-500);
    margin: 4px 0 0;
    font-size: 13.5px;
}

.page-header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-400);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 6px;
}

.page-header-breadcrumb i { font-size: 13px; }

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

.dash-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }

.dash-picker-group { display: flex; gap: 10px; }

.dash-picker-group select.picker {
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    padding: 8px 14px;
    font-weight: 500;
    color: var(--ink-700);
    background-color: var(--surface);
}

/* =========================================================================
   5. Cards
   ========================================================================= */

.card {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--surface-border);
    padding: 18px 22px;
}

.card-header .header-title,
.card-header .card-title {
    font-weight: 700;
    color: var(--ink-900);
    font-size: 15.5px;
}

.card-body { padding: 20px 22px; }

.dash-chart-card {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* =========================================================================
   6. Dashboard stat cards — flat, solid tinted icon chips (no gradients)
   ========================================================================= */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1199.98px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-soft-border);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    background: var(--brand-soft);
    color: var(--brand);
}

.stat-card.stat-users .stat-icon { background: var(--brand-soft); color: var(--brand); }
.stat-card.stat-posts .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-card.stat-reports .stat-icon { background: var(--warning-soft); color: var(--warning); }
.stat-card.stat-withdrawals .stat-icon { background: var(--info-soft); color: var(--info); }

.stat-card .stat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin: 0;
}

.stat-card .stat-link {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--brand);
    font-size: 12px;
    margin-left: auto;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.stat-card .stat-link:hover { background: var(--brand); color: #fff; }

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

.stat-card .stat-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.stat-card .stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--surface-muted);
    color: var(--ink-700);
    border: 1px solid var(--surface-border);
}

.stat-card .stat-chip b { color: var(--ink-900); font-weight: 700; }

/* =========================================================================
   7. Tables — including DataTables chrome
   ========================================================================= */

.table {
    --ct-table-color: var(--ink-800);
    font-size: 13.5px;
}

.table thead th,
.table thead.table-light th {
    background: var(--surface-muted) !important;
    color: var(--ink-600);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--surface-border);
    padding: 12px 16px;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom-color: var(--surface-border);
    color: var(--ink-800);
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--surface-muted);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter label {
    color: var(--ink-500);
    font-size: 12.5px;
}

.dataTables_wrapper .pagination .page-link {
    border-radius: var(--radius-xs);
    margin: 0 2px;
    color: var(--ink-700);
    border-color: var(--surface-border);
}

.dataTables_wrapper .pagination .page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

table.dataTable td.dataTables_empty,
table.dataTable th.dataTables_empty {
    padding: 48px 16px;
    color: var(--ink-400);
    font-size: 13.5px;
    font-weight: 500;
}

/* =========================================================================
   8. Empty state component (use in Blade for custom empty/error states)
   ========================================================================= */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
    color: var(--ink-500);
}

.empty-state .empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: var(--ink-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
}

.empty-state h5 {
    color: var(--ink-800);
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 4px;
}

.empty-state p {
    font-size: 13px;
    max-width: 320px;
    margin: 0 0 16px;
}

/* =========================================================================
   9. Buttons
   ========================================================================= */

.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: none !important;
}

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

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

.btn-primary:active,
.btn-primary.active,
.btn-primary:focus:active {
    background: var(--brand-pressed) !important;
    border-color: var(--brand-pressed) !important;
    color: #fff !important;
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 .2rem var(--glow) !important;
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

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

.btn-outline-primary:active {
    background: var(--brand-pressed) !important;
    border-color: var(--brand-pressed) !important;
    color: #fff !important;
}

.btn-soft-primary {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: transparent;
}

.btn-soft-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-soft-primary:active { background: var(--brand-pressed); color: #fff; }

/* =========================================================================
   10. Badges / status pills
   ========================================================================= */

.badge { font-weight: 600; letter-spacing: .01em; border-radius: var(--radius-xs); }

.badge-soft-success, .badge.bg-success-subtle { background: var(--success-soft); color: var(--success); }
.badge-soft-warning, .badge.bg-warning-subtle { background: var(--warning-soft); color: var(--warning); }
.badge-soft-danger, .badge.bg-danger-subtle { background: var(--danger-soft); color: var(--danger); }
.badge-soft-info, .badge.bg-info-subtle { background: var(--info-soft); color: var(--info); }
.badge-soft-primary { background: var(--brand-soft); color: var(--brand); }

/* =========================================================================
   11. Forms
   ========================================================================= */

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--surface-border);
    font-size: 13.5px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem var(--glow);
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

/* =========================================================================
   12. Nav pills / tabs (Settings page, Users tabs, etc.) — flat active state
   ========================================================================= */

#v-pills-tab .main-nav-link,
.nav-pills .nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-700);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    margin-bottom: 2px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

#v-pills-tab .main-nav-link:hover,
.nav-pills .nav-link:hover {
    background-color: var(--brand-soft);
    color: var(--brand);
}

#v-pills-tab .main-nav-link.active,
.nav-pills .nav-link.active {
    background: var(--brand) !important;
    color: #ffffff !important;
    box-shadow: none;
}

#v-pills-tab .main-nav-link.active:hover,
.nav-pills .nav-link.active:hover {
    background: var(--brand-hover) !important;
}

#v-pills-tab .main-nav-link.active:active,
.nav-pills .nav-link.active:active {
    background: var(--brand-pressed) !important;
}

#v-pills-tab .main-nav-link.active i,
.nav-pills .nav-link.active i {
    color: #ffffff !important;
}

/* =========================================================================
   13. Modals
   ========================================================================= */

.modal-content {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.modal-header, .modal-footer {
    border-color: var(--surface-border);
}

/* =========================================================================
   14. Logo — flat, no glow
   ========================================================================= */

.auth-logo, .leftside-menu .logo { position: relative; }
.auth-logo img, .leftside-menu .logo img { filter: none; }

/* =========================================================================
   15. Tap targets / responsive (mobile-app quality on small screens)
   ========================================================================= */

@media (max-width: 767.98px) {
    .btn { min-height: 40px; }
    .side-nav-link { min-height: 44px; }
    .page-header { align-items: flex-start; }
}

/* =========================================================================
   16. Notifications — professional list + topbar pending sheet
   ========================================================================= */

.notif-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    border: 1px solid var(--brand-soft-border);
    color: var(--ink-700);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notif-callout i {
    color: var(--brand);
    font-size: 18px;
    margin-top: 1px;
    flex: none;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 4px 0;
}

.notif-item-thumb {
    width: 72px;
    height: 54px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--surface-muted);
    border: 1px solid var(--surface-border);
    flex: none;
}

.notif-item-thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    background: var(--brand-soft);
    border-color: var(--brand-soft-border);
    font-size: 22px;
}

.notif-item-body h5 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink-900);
    margin: 0 0 4px;
    line-height: 1.3;
}

.notif-item-body p {
    margin: 0;
    font-size: 13px;
    color: var(--ink-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-date {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-500);
    white-space: nowrap;
}

.notif-actions .action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--ink-600);
}

.notif-actions .action-btn:hover {
    border-color: var(--brand-soft-border);
    color: var(--brand);
    background: var(--brand-soft);
}

.notif-actions .action-btn.delete:hover {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: transparent;
}

.admin-pending .nav-link {
    position: relative;
}

.admin-pending .admin-pending-count {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
    background: var(--brand-pressed);
    border: 2px solid var(--surface);
}

.admin-pending .dropdown-menu {
    width: 360px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.admin-pending .dropdown-item:hover {
    background: var(--brand-soft);
}

.thread-reply {
    padding-left: calc(var(--thread-depth, 0) * 18px);
    border-left: 2px solid var(--brand-soft-border);
}

.thread-reply-meta,
.thread-parent {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-500);
}

#commentsTable tr.comment-thread-active {
    background: var(--brand-soft);
}

/* Settings desk */
.settings-desk {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.settings-nav {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
}
.settings-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 12px;
    height: 40px;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: #faf8fc;
}
.settings-search i { color: var(--ink-400); }
.settings-search input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink-900);
    font-size: 13.5px;
    outline: none;
}
.settings-nav-label {
    margin: 14px 10px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-400);
}
.settings-nav .main-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-decoration: none;
}
.settings-nav .main-nav-link i {
    width: 18px;
    text-align: center;
    color: var(--ink-500);
    font-size: 16px;
}
.settings-nav .is-filtered-out { display: none !important; }
.settings-search-empty {
    margin: 12px 10px;
    color: var(--ink-500);
    font-size: 13px;
}
.settings-panes .card {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: none;
}
.settings-panes .card-header {
    background: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.settings-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--surface-border);
    border-radius: 14px;
}
.settings-switch .form-check-input {
    width: 2.4em;
    height: 1.3em;
    margin: 0;
    flex: none;
}
@media (max-width: 991.98px) {
    .settings-desk { grid-template-columns: 1fr; }
    .settings-nav { position: static; max-height: none; }
}

/* Public email-link page (verify email / reset password) */
.auth-action-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #efeaf6;
}
.auth-action-card {
    width: 100%;
    max-width: 440px;
    padding: 32px 28px 28px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(22, 18, 31, .12);
}
.auth-action-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-weight: 700;
    font-size: 18px;
    color: var(--ink-900);
}
.auth-action-lockup img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.auth-action-card h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.03em;
    color: var(--ink-900);
}
.auth-action-mark {
    display: block;
    margin-bottom: 10px;
    font-size: 40px;
    color: var(--success, #12b76a);
}
.auth-action-mark.is-warn { color: #9b1c3c; }
.auth-action-app {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    margin-bottom: 14px;
    border: 1px solid var(--brand);
    border-radius: 12px;
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}
.auth-action-app:hover { color: var(--brand-hover); }
.auth-action-or {
    margin: 0 0 16px;
    text-align: center;
    color: var(--ink-400);
    font-size: 13px;
}
.auth-pass {
    position: relative;
    display: block;
}
.auth-pass input {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 76px 0 14px;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: #fff;
    color: #16121f;
    font-size: 16px;
    line-height: 52px;
    box-sizing: border-box;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.auth-pass input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--glow);
}
.auth-pass.is-invalid input { border-color: #e11d48; }
.auth-pass-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #f4f0fa;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}
.auth-input-group.is-invalid { border-color: #e11d48; }
.auth-field-error[hidden],
.auth-action-card [hidden] { display: none !important; }

/* Mail templates */
.mail-desk {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.mail-nav,
.mail-editor,
.mail-preview {
    background: #fff;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
}
.mail-nav {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    padding: 12px;
}
.mail-nav-label {
    margin: 14px 8px 6px;
    color: var(--ink-400);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.mail-nav-label:first-child { margin-top: 4px; }
.mail-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #16121f;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}
.mail-nav-item:hover { background: #f6f3fb; }
.mail-nav-item.is-active { background: var(--brand-soft); color: var(--brand); }
.mail-edited {
    flex: none;
    color: var(--brand);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}
.mail-edited[hidden],
.mail-form-error[hidden] { display: none !important; }
.mail-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 20px;
    align-items: start;
}
.mail-editor,
.mail-preview { padding: 20px; }
.mail-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.mail-editor-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
}
.mail-editor-head p,
.mail-hint,
.mail-test-note {
    margin: 0;
    color: var(--ink-400);
    font-size: 13px;
    line-height: 1.45;
}
.mail-hint { margin-bottom: 16px; }
.mail-field {
    display: block;
    margin-bottom: 14px;
}
.mail-field span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}
.mail-field input,
.mail-field textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    background: #fff;
    color: #16121f;
    font-size: 14px;
    line-height: 1.45;
}
.mail-field textarea { resize: vertical; }
.mail-field input:focus,
.mail-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--glow);
}
.mail-tokens {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 4px 0 16px;
}
.mail-tokens > span {
    color: var(--ink-400);
    font-size: 12px;
    font-weight: 700;
}
.mail-token {
    border: 0;
    border-radius: 999px;
    background: #f4f0fa;
    color: var(--brand);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}
.mail-form-error {
    margin: 0 0 12px;
    color: #e11d48;
    font-size: 13px;
}
.mail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mail-test-note { margin-top: 12px; }
.mail-preview-frame {
    width: 100%;
    height: 640px;
    border: 0;
    border-radius: 12px;
    background: #f4f2f8;
}
@media (max-width: 1200px) {
    .mail-stage { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
    .mail-desk { grid-template-columns: 1fr; }
    .mail-nav { position: static; max-height: none; }
}

.news-guard,
.news-list {
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
}
.news-list h3,
.news-guard h3 { margin: 0 0 4px; font-size: 18px; }
.news-meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}
.news-meter-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}
.mail-meter {
    height: 8px;
    border-radius: 99px;
    background: #efeaf6;
    overflow: hidden;
}
.mail-meter span {
    display: block;
    height: 100%;
    background: var(--brand);
}
.mail-meter.is-hot span { background: #e11d48; }
.news-meters small { display: block; margin-top: 6px; color: var(--ink-400); }
.news-guard-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 8px;
}
.news-pause {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
@media (max-width: 991px) {
    .news-meters,
    .news-guard-form { grid-template-columns: 1fr 1fr; }
}
