/*! WiFiFlow App Styles — Dashboard Layout
 *  Replaces atlantis.min.css + improved-styling.css
 *  Works with Bootstrap 5.3 and design-tokens.css
 */

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

body {
    font-family: var(--wf-font-family);
    font-size: var(--wf-font-size-base);
    line-height: var(--wf-line-height);
    color: var(--wf-text);
    background-color: var(--wf-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--wf-heading-weight);
    color: var(--wf-text);
    line-height: 1.3;
}

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

/* ── Wrapper Layout ── */
.wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── Header / Navbar ── */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--wf-header-height);
    z-index: 1030;
    display: flex;
    align-items: stretch;
    background: var(--wf-primary);
    box-shadow: var(--wf-shadow-md);
}

.logo-header {
    width: var(--wf-sidebar-width);
    display: flex;
    align-items: center;
    padding: 0 var(--wf-space-lg);
    background: var(--wf-primary);
    flex-shrink: 0;
    transition: width var(--wf-transition-slow);
}

.logo-header .logo {
    display: flex;
    align-items: center;
    gap: var(--wf-space-sm);
    color: #fff;
    font-weight: 700;
    font-size: var(--wf-font-size-xl);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.logo-header .logo img.navbar-brand {
    max-height: 36px;
    width: auto;
}

.navbar-header {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 var(--wf-space-lg);
}

.navbar-header .topbar-nav {
    display: flex;
    align-items: center;
    gap: var(--wf-space-sm);
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}

.navbar-header .topbar-nav .nav-link {
    color: rgba(255,255,255,0.8);
    padding: var(--wf-space-sm) var(--wf-space-md);
    border-radius: var(--wf-radius-md);
    transition: all var(--wf-transition);
    position: relative;
    display: flex;
    align-items: center;
}

.navbar-header .topbar-nav .nav-link:hover,
.navbar-header .topbar-nav .nav-link:focus {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.navbar-header .topbar-nav .notification {
    position: absolute;
    top: 2px;
    right: 4px;
    background: var(--wf-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search */
.nav-search .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: var(--wf-radius-full);
    padding: 0.4rem 1rem;
    font-size: var(--wf-font-size-sm);
    width: 220px;
    transition: all var(--wf-transition);
}
.nav-search .form-control::placeholder { color: rgba(255,255,255,0.5); }
.nav-search .form-control:focus {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    box-shadow: none;
    width: 280px;
}
.nav-search .btn-search {
    color: rgba(255,255,255,0.7);
    background: transparent;
    border: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

/* Notification dropdown */
.notif-box {
    width: 340px;
    max-height: 420px;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-xl);
    padding: 0;
    overflow: hidden;
}
.notif-box .dropdown-title {
    padding: var(--wf-space-md) var(--wf-space-lg);
    font-weight: 600;
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text);
    border-bottom: 1px solid var(--wf-border);
    background: var(--wf-bg);
}
.notif-scroll {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--wf-border) transparent;
}
.notif-center { padding: var(--wf-space-sm) 0; }
.notif-item {
    display: flex;
    padding: var(--wf-space-sm) var(--wf-space-lg);
    gap: var(--wf-space-md);
    align-items: flex-start;
    transition: background var(--wf-transition);
    cursor: pointer;
}
.notif-item:hover { background: var(--wf-bg); }
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--wf-font-size-sm);
}
.notif-icon.notif-success { background: var(--wf-success-bg); color: var(--wf-success); }
.notif-icon.notif-danger  { background: var(--wf-danger-bg);  color: var(--wf-danger); }
.notif-icon.notif-warning { background: var(--wf-warning-bg); color: var(--wf-warning); }
.notif-icon.notif-info    { background: var(--wf-info-bg);    color: var(--wf-info); }
.notif-content .block { font-size: var(--wf-font-size-sm); color: var(--wf-text); display: block; }
.notif-content .time  { font-size: var(--wf-font-size-xs); color: var(--wf-text-muted); }

/* User dropdown */
.dropdown-user { 
    width: 280px; 
    border-radius: var(--wf-radius-lg); 
    border: 1px solid var(--wf-border);
    box-shadow: var(--wf-shadow-xl);
    padding: 0;
    overflow: hidden;
}
.dropdown-user .user-box {
    display: flex;
    gap: var(--wf-space-md);
    align-items: center;
    padding: var(--wf-space-lg);
    background: var(--wf-bg);
    border-bottom: 1px solid var(--wf-border);
}
.dropdown-user .avatar-lg { width: 48px; height: 48px; flex-shrink: 0; }
.dropdown-user .avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--wf-radius-md); }
.dropdown-user .u-text h4 { font-size: var(--wf-font-size-sm); font-weight: 600; margin: 0; }
.dropdown-user .u-text p { font-size: var(--wf-font-size-xs); color: var(--wf-text-muted); margin: 0; }
.dropdown-user .dropdown-item {
    padding: var(--wf-space-sm) var(--wf-space-lg);
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text-secondary);
    transition: all var(--wf-transition);
}
.dropdown-user .dropdown-item:hover {
    background: var(--wf-primary-bg);
    color: var(--wf-primary);
}
.dropdown-user .dropdown-user-scroll { max-height: 360px; overflow-y: auto; }
.profile-pic { display: flex; align-items: center; gap: var(--wf-space-sm); cursor: pointer; text-decoration: none; }
.avatar-sm { width: 36px; height: 36px; flex-shrink: 0; }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); }

/* Toggle buttons */
.navbar-toggler,
.sidenav-toggler,
.topbar-toggler {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    padding: var(--wf-space-sm);
    border-radius: var(--wf-radius-md);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--wf-transition);
    display: none;
}
.navbar-toggler:hover,
.sidenav-toggler:hover,
.topbar-toggler:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-toggle {
    display: none;
    align-items: center;
}
.btn-toggle {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    padding: var(--wf-space-sm);
    cursor: pointer;
    font-size: 1.2rem;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: var(--wf-header-height);
    left: 0;
    bottom: 0;
    width: var(--wf-sidebar-width);
    background: var(--wf-surface);
    border-right: 1px solid var(--wf-border);
    z-index: 1020;
    transition: all var(--wf-transition-slow);
    display: flex;
    flex-direction: column;
}

.sidebar-wrapper {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--wf-border) transparent;
    padding: var(--wf-space-md) 0;
}

/* Sidebar user info */
.sidebar .user {
    display: flex;
    align-items: center;
    gap: var(--wf-space-md);
    padding: var(--wf-space-md) var(--wf-space-lg);
    margin-bottom: var(--wf-space-sm);
    border-bottom: 1px solid var(--wf-border-light);
}
.sidebar .user .avatar-sm { width: 40px; height: 40px; flex-shrink: 0; }
.sidebar .user .avatar-sm img,
.sidebar .user .avatar-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 50%; 
    border: 2px solid var(--wf-primary-bg);
}
.sidebar .user .info {
    flex: 1;
    min-width: 0;
}
.sidebar .user .user-name {
    font-weight: 600;
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar .user .user-level {
    font-size: var(--wf-font-size-xs);
    color: var(--wf-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar navigation */
.sidebar .nav-primary {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .nav-item > a {
    display: flex;
    align-items: center;
    gap: var(--wf-space-md);
    padding: 0.6rem var(--wf-space-lg);
    color: var(--wf-text-secondary);
    font-size: var(--wf-font-size-sm);
    font-weight: 500;
    border-radius: 0;
    transition: all var(--wf-transition);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar .nav-item > a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--wf-text-muted);
    flex-shrink: 0;
    transition: color var(--wf-transition);
}

.sidebar .nav-item > a p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.sidebar .nav-item > a:hover {
    background: var(--wf-primary-bg);
    color: var(--wf-primary);
    border-left-color: var(--wf-primary-light);
}
.sidebar .nav-item > a:hover i {
    color: var(--wf-primary);
}

.sidebar .nav-item.active > a {
    background: var(--wf-primary-bg);
    color: var(--wf-primary);
    font-weight: 600;
    border-left-color: var(--wf-primary);
}
.sidebar .nav-item.active > a i {
    color: var(--wf-primary);
}

/* Submenu toggle caret */
.sidebar .submenu-toggle .caret {
    display: inline-block;
    margin-left: auto;
    font-size: 0;
}
.sidebar .submenu-toggle .caret::after {
    content: '\f078'; /* fa-chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: var(--wf-text-muted);
    transition: transform var(--wf-transition);
    display: inline-block;
}
.sidebar .submenu-toggle[aria-expanded="true"] .caret::after {
    transform: rotate(180deg);
}
.sidebar .has-submenu > a {
    border-left-color: transparent;
}

/* Collapsible submenu */
.sidebar .nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--wf-bg);
}
.sidebar .nav-submenu .nav-item > a {
    padding-left: calc(var(--wf-space-lg) + 20px + var(--wf-space-md));
    font-size: var(--wf-font-size-sm);
    border-left: 3px solid transparent;
}
.sidebar .nav-submenu .nav-item > a i {
    font-size: 0.8rem;
    width: 16px;
}
.sidebar .nav-submenu .nav-item.active > a {
    background: var(--wf-primary-bg);
    color: var(--wf-primary);
    font-weight: 600;
    border-left-color: var(--wf-primary);
}

/* Sidebar section labels */
.sidebar .nav-section {
    padding: var(--wf-space-lg) var(--wf-space-lg) var(--wf-space-xs);
    list-style: none;
}
.sidebar .nav-section h4,
.sidebar .nav-section .text-section {
    font-size: var(--wf-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--wf-text-muted);
    margin: 0;
}

/* Sidebar footer (minimize toggle) */
.sidebar-footer {
    border-top: 1px solid var(--wf-border-light);
    padding: var(--wf-space-sm) var(--wf-space-lg);
    display: none;  /* hidden on mobile, visible on desktop */
}
@media (min-width: 992px) {
    .sidebar-footer { display: block; }
}
.sidebar-footer .toggle-sidebar {
    background: none;
    border: none;
    color: var(--wf-text-muted);
    cursor: pointer;
    padding: var(--wf-space-xs) var(--wf-space-sm);
    border-radius: var(--wf-radius-sm);
    font-size: 1rem;
    transition: all var(--wf-transition);
    width: 100%;
    text-align: left;
}
.sidebar-footer .toggle-sidebar:hover {
    background: var(--wf-primary-bg);
    color: var(--wf-primary);
}

/* ── Main Panel ── */
.main-panel {
    flex: 1;
    margin-left: var(--wf-sidebar-width);
    margin-top: var(--wf-header-height);
    min-height: calc(100vh - var(--wf-header-height));
    display: flex;
    flex-direction: column;
    transition: margin-left var(--wf-transition-slow);
    background: var(--wf-bg);
}

.main-panel > .container,
.main-panel > .container-fluid,
.main-panel > .content {
    flex: 1;
    padding: var(--wf-space-xl);
}

/* ── Page Header / Title ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--wf-space-md);
    margin-bottom: var(--wf-space-xl);
}

.page-header .page-title {
    font-size: var(--wf-font-size-2xl);
    font-weight: 700;
    color: var(--wf-text);
    margin: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text-muted);
    list-style: none;
    padding: 0;
    margin: var(--wf-space-xs) 0 0;
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs a { color: var(--wf-primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .separator { margin: 0 var(--wf-space-sm); font-size: 0.75rem; color: var(--wf-text-muted); }
.breadcrumbs .nav-home a { color: var(--wf-text-muted); }
.breadcrumbs .nav-home a:hover { color: var(--wf-primary); }

/* ── Cards ── */
.card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-sm);
    margin-bottom: var(--wf-space-lg);
    transition: box-shadow var(--wf-transition);
}
.card:hover {
    box-shadow: var(--wf-shadow-md);
}
.card-header {
    padding: var(--wf-space-lg);
    border-bottom: 1px solid var(--wf-border-light);
    background: transparent;
}
.card-header .card-title {
    font-size: var(--wf-font-size-lg);
    font-weight: 600;
    color: var(--wf-text);
    margin: 0;
}
.card-body {
    padding: var(--wf-space-lg);
}
.card-footer {
    padding: var(--wf-space-md) var(--wf-space-lg);
    border-top: 1px solid var(--wf-border-light);
    background: var(--wf-bg);
    border-radius: 0 0 var(--wf-radius-lg) var(--wf-radius-lg);
}

/* Card loading state (replaces Atlantis .is-loading) */
.card.is-loading {
    position: relative;
    pointer-events: none;
}
.card.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    border-radius: var(--wf-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stat cards */
.card-stats .card-body {
    display: flex;
    align-items: center;
    gap: var(--wf-space-lg);
}
.card-stats .icon-big {
    width: 56px;
    height: 56px;
    border-radius: var(--wf-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.card-stats .icon-big.icon-primary   { background: var(--wf-primary-bg); color: var(--wf-primary); }
.card-stats .icon-big.icon-success   { background: var(--wf-success-bg); color: var(--wf-success); }
.card-stats .icon-big.icon-warning   { background: var(--wf-warning-bg); color: var(--wf-warning); }
.card-stats .icon-big.icon-danger    { background: var(--wf-danger-bg);  color: var(--wf-danger); }
.card-stats .icon-big.icon-info      { background: var(--wf-info-bg);    color: var(--wf-info); }
.card-stats .icon-big.icon-secondary { background: #f3e8ff; color: #8b5cf6; }

.card-stats .numbers {
    flex: 1;
}
.card-stats .numbers .card-category {
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text-muted);
    font-weight: 500;
    margin-bottom: var(--wf-space-xs);
}
.card-stats .numbers .card-title {
    font-size: var(--wf-font-size-2xl);
    font-weight: 700;
    color: var(--wf-text);
    margin: 0;
    line-height: 1.2;
}

/* ── Buttons (extend Bootstrap 5) ── */
.btn {
    font-family: var(--wf-font-family);
    font-weight: 500;
    border-radius: var(--wf-radius-md);
    padding: 0.5rem 1.25rem;
    font-size: var(--wf-font-size-sm);
    transition: all var(--wf-transition);
}

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

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

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

/* ── Tables ── */
.table {
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text);
}
.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--wf-font-size-sm);
    letter-spacing: 0.5px;
    color: var(--wf-text-secondary);
    border-bottom: 2px solid var(--wf-border);
    padding: var(--wf-space-md);
    white-space: nowrap;
}
.table tbody td {
    padding: var(--wf-space-md);
    border-bottom: 1px solid var(--wf-border-light);
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background: var(--wf-bg);
}

/* ── Forms (extend Bootstrap 5) ── */
.form-control, .form-select {
    font-family: var(--wf-font-family);
    font-size: var(--wf-font-size-base);
    border-color: var(--wf-border);
    border-radius: var(--wf-radius-md);
    padding: 0.5rem 0.875rem;
    color: var(--wf-text);
    transition: all var(--wf-transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--wf-primary-light);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.form-control::placeholder {
    color: var(--wf-text-light);
}
.form-label {
    font-weight: 500;
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text);
    margin-bottom: var(--wf-space-xs);
}

/* ── Alerts ── */
.alert {
    border-radius: var(--wf-radius-md);
    border: none;
    font-size: var(--wf-font-size-sm);
    padding: var(--wf-space-md) var(--wf-space-lg);
}
.alert-success { background: var(--wf-success-bg); color: #065f46; border-left: 4px solid var(--wf-success); }
.alert-danger  { background: var(--wf-danger-bg);  color: #991b1b; border-left: 4px solid var(--wf-danger); }
.alert-warning { background: var(--wf-warning-bg); color: #92400e; border-left: 4px solid var(--wf-warning); }
.alert-info    { background: var(--wf-info-bg);    color: #1e40af; border-left: 4px solid var(--wf-info); }

/* ── Badges ── */
.badge {
    font-weight: 600;
    font-size: var(--wf-font-size-xs);
    padding: 0.3em 0.65em;
    border-radius: var(--wf-radius-full);
}

/* ── Modals ── */
.modal-content {
    border: none;
    border-radius: var(--wf-radius-xl);
    box-shadow: var(--wf-shadow-xl);
}
.modal-header {
    border-bottom: 1px solid var(--wf-border-light);
    padding: var(--wf-space-lg);
}
.modal-body { padding: var(--wf-space-lg); }
.modal-footer {
    border-top: 1px solid var(--wf-border-light);
    padding: var(--wf-space-md) var(--wf-space-lg);
}

/* ── Footer ── */
.footer {
    padding: var(--wf-space-md) var(--wf-space-xl);
    border-top: 1px solid var(--wf-border);
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text-muted);
    background: var(--wf-surface);
    margin-top: auto;
}
.footer .copyright {
    text-align: right;
}
.footer a { color: var(--wf-text-muted); }
.footer a:hover { color: var(--wf-primary); }

/* ── DataTables overrides ── */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-size: var(--wf-font-size-sm);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-md);
    padding: 0.35rem 0.75rem;
}
.dataTables_wrapper .dataTables_info {
    font-size: var(--wf-font-size-sm);
    color: var(--wf-text-muted);
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--wf-radius-md);
    font-size: var(--wf-font-size-sm);
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .logo-header {
        width: auto;
        padding: 0 var(--wf-space-md);
    }

    .sidenav-toggler,
    .nav-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    html.nav_open .sidebar {
        transform: translateX(0);
        box-shadow: var(--wf-shadow-xl);
    }

    .main-panel {
        margin-left: 0;
    }

    /* Overlay behind sidebar on mobile */
    html.nav_open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1015;
    }
}

@media (max-width: 575.98px) {
    .main-panel > .container,
    .main-panel > .container-fluid,
    .main-panel > .content {
        padding: var(--wf-space-md);
    }

    .page-header .page-title {
        font-size: var(--wf-font-size-xl);
    }

    .card-body { padding: var(--wf-space-md); }
}

/* ── Sidebar minimize (desktop) ── */
.wrapper.sidebar_minimize .sidebar {
    width: var(--wf-sidebar-mini-width);
}
.wrapper.sidebar_minimize .logo-header {
    width: var(--wf-sidebar-mini-width);
}
.wrapper.sidebar_minimize .main-panel {
    margin-left: var(--wf-sidebar-mini-width);
}
.wrapper.sidebar_minimize .sidebar .user .info,
.wrapper.sidebar_minimize .sidebar .nav-item > a p,
.wrapper.sidebar_minimize .sidebar .nav-section,
.wrapper.sidebar_minimize .sidebar .submenu-toggle .caret,
.wrapper.sidebar_minimize .sidebar .nav-submenu,
.wrapper.sidebar_minimize .sidebar-footer .toggle-sidebar i::before { content: '\f055'; } /* switch icon */
.wrapper.sidebar_minimize .sidebar .user .info,
.wrapper.sidebar_minimize .sidebar .nav-item > a p,
.wrapper.sidebar_minimize .sidebar .nav-section,
.wrapper.sidebar_minimize .sidebar .submenu-toggle .caret,
.wrapper.sidebar_minimize .sidebar .collapse.show {
    display: none !important;
}
.wrapper.sidebar_minimize .sidebar .nav-item > a {
    justify-content: center;
    padding: 0.75rem;
}
.wrapper.sidebar_minimize .sidebar .nav-item > a i {
    width: auto;
    font-size: 1.2rem;
}
.wrapper.sidebar_minimize .sidebar-footer .toggle-sidebar {
    text-align: center;
}

/* Expand on hover when minimized */
.wrapper.sidebar_minimize .sidebar:hover {
    width: var(--wf-sidebar-width);
}
.wrapper.sidebar_minimize .sidebar:hover .user .info,
.wrapper.sidebar_minimize .sidebar:hover .nav-item > a p,
.wrapper.sidebar_minimize .sidebar:hover .nav-section,
.wrapper.sidebar_minimize .sidebar:hover .submenu-toggle .caret {
    display: block !important;
}
.wrapper.sidebar_minimize .sidebar:hover .nav-item > a {
    justify-content: flex-start;
    padding: 0.6rem var(--wf-space-lg);
}
.wrapper.sidebar_minimize .sidebar:hover .nav-item > a i {
    width: 20px;
    font-size: 1rem;
}
.wrapper.sidebar_minimize .sidebar:hover .sidebar-footer .toggle-sidebar {
    text-align: left;
}

/* ── Scrollbar utility ── */
.scrollbar-outer,
.scrollbar-inner,
.scrollbar {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--wf-border) transparent;
}
.scrollbar-outer::-webkit-scrollbar,
.scrollbar-inner::-webkit-scrollbar,
.scrollbar::-webkit-scrollbar {
    width: 6px;
}
.scrollbar-outer::-webkit-scrollbar-thumb,
.scrollbar-inner::-webkit-scrollbar-thumb,
.scrollbar::-webkit-scrollbar-thumb {
    background: var(--wf-border);
    border-radius: 3px;
}

/* ── Toast notifications (replaces bootstrap-notify) ── */
.toast-container {
    position: fixed;
    top: calc(var(--wf-header-height) + var(--wf-space-md));
    right: var(--wf-space-lg);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: var(--wf-space-sm);
}

/* ── Pagination ── */
.pagination .page-link {
    color: var(--wf-primary);
    border-color: var(--wf-border);
    font-size: var(--wf-font-size-sm);
    border-radius: var(--wf-radius-md);
    margin: 0 2px;
}
.pagination .page-item.active .page-link {
    background: var(--wf-primary);
    border-color: var(--wf-primary);
}

/* ── Dropdown menus ── */
.dropdown-menu {
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-lg);
    font-size: var(--wf-font-size-sm);
    padding: var(--wf-space-sm) 0;
}
.dropdown-item {
    padding: 0.4rem var(--wf-space-lg);
    color: var(--wf-text-secondary);
    transition: all var(--wf-transition);
}
.dropdown-item:hover {
    background: var(--wf-primary-bg);
    color: var(--wf-primary);
}
.dropdown-divider {
    border-color: var(--wf-border-light);
    margin: var(--wf-space-sm) 0;
}

/* ── SweetAlert override to match design tokens ── */
.swal-overlay { background: rgba(0,0,0,0.4); }
.swal-modal { border-radius: var(--wf-radius-xl); font-family: var(--wf-font-family); }
.swal-title { font-weight: 700; color: var(--wf-text); }
.swal-text { color: var(--wf-text-secondary); font-size: var(--wf-font-size-sm); }
.swal-button {
    border-radius: var(--wf-radius-md);
    font-family: var(--wf-font-family);
    font-weight: 500;
}
.swal-button--confirm { background: var(--wf-primary); }
.swal-button--confirm:hover { background: var(--wf-primary-hover); }
.swal-button--cancel { background: var(--wf-bg); color: var(--wf-text); border: 1px solid var(--wf-border); }

/* ── Utility classes ── */
.text-primary   { color: var(--wf-primary) !important; }
.text-accent    { color: var(--wf-accent) !important; }
.text-success   { color: var(--wf-success) !important; }
.text-warning   { color: var(--wf-warning) !important; }
.text-danger    { color: var(--wf-danger) !important; }
.text-muted     { color: var(--wf-text-muted) !important; }
.bg-primary-50  { background: var(--wf-primary-bg) !important; }
.bg-success-50  { background: var(--wf-success-bg) !important; }
.bg-warning-50  { background: var(--wf-warning-bg) !important; }
.bg-danger-50   { background: var(--wf-danger-bg) !important; }
