:root {
    --ep-primary: #1e2749;
    --ep-secondary: #2a3560;
    --ep-accent: #4f7df3;
    --ep-complement: #e8edf5;
    --ep-success: #10b981;
    --ep-warning: #f59e0b;
    --ep-danger: #ef4444;
    --ep-text: #1a1a2e;
    --ep-text-secondary: #6b7280;
    --ep-bg: #f8fafc;
    --ep-white: #ffffff;
    --ep-border: #e5e7eb;
    --ep-shadow-sm: 0 1px 3px rgba(30, 39, 73, 0.06);
    --ep-shadow-md: 0 4px 12px rgba(30, 39, 73, 0.08);
    --ep-shadow-lg: 0 8px 24px rgba(30, 39, 73, 0.12);
    --ep-shadow-xl: 0 16px 40px rgba(30, 39, 73, 0.16);
    --ep-shadow-2xl: 0 24px 64px rgba(30, 39, 73, 0.20);
    --ep-radius-sm: 8px;
    --ep-radius-md: 12px;
    --ep-radius-lg: 16px;
    --ep-radius-xl: 20px;
    --ep-radius-2xl: 24px;
    --ep-transition: 200ms ease;
    --ep-transition-md: 300ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--ep-bg);
    color: var(--ep-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.header {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    box-shadow: 0 2px 16px rgba(30, 39, 73, 0.24);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-top-row {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 64px;
    gap: 0.75rem;
}

.header .light-logo {
    filter: brightness(0) invert(1);
    opacity: 0.95;
    display: block;
}

.header .nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.header .nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.80);
    font-size: 13.5px;
    font-weight: 500;
    padding: 6px 12px;
    /*border-radius: var(--ep-radius-sm);*/
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--ep-transition), color var(--ep-transition);
    letter-spacing: 0.3px;
}

.header .nav-btn.active {
    color: #ffffff;
}
.header .nav-btn:hover {
    background: rgba(255,255,255,0.12);
}

/* filter bar */
.filter-bar {
    background: var(--ep-white);
    border-bottom: 1px solid var(--ep-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: stretch;
    min-height: 44px;
    box-shadow: var(--ep-shadow-sm);
    /*overflow-x: auto;*/
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-bar .submenu {
    display: none;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.filter-bar .submenu.active {
    display: flex;
}

.filter-bar .submenu li {
    position: relative;
}

.filter-bar .submenu li a,
.filter-bar .submenu li > a.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--ep-text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--ep-transition), color var(--ep-transition);
    cursor: pointer;
}

.filter-bar .submenu li a:hover,
.filter-bar .submenu li > a.dropdown-toggle:hover {
    background: var(--ep-complement);
    color: var(--ep-primary);
}

.filter-bar .submenu li a.current-page {
    background: var(--ep-complement);
    color: var(--ep-primary);
    font-weight: 600;
}

.submenu a.active-menu {
    background: var(--ep-complement);
}

.filter-bar .submenu .dropdown-menu {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    box-shadow: var(--ep-shadow-lg);
    padding: 6px;
    min-width: 180px;
}

.filter-bar .submenu .dropdown-menu li a {
    border-radius: var(--ep-radius-sm);
    padding: 8px 12px;
}

/* mobile nav toggle */
.mobile-nav-toggle {
    background: rgba(255,255,255,0.10);
    border: none;
    color: #fff;
    border-radius: var(--ep-radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    transition: background var(--ep-transition);
}

.mobile-nav-toggle:hover {
    background: rgba(255,255,255,0.18);
}

/* user & lang buttons in header */
.user-button .btn-gray-custom {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--ep-transition), border-color var(--ep-transition);
}

.user-button .btn-gray-custom:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

.user-button .btn-danger-custom,
.btn-danger-custom {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--ep-transition), border-color var(--ep-transition);
}

.user-button .btn-danger-custom:hover,
.btn-danger-custom:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fca5a5;
}

/* language dropdown in header */
.change-lang .btn-primary {
    background: rgba(255,255,255,0.10) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #fff !important;
    font-size: 13px;
}

.change-lang .btn-primary:hover,
.change-lang .btn-primary:focus,
.change-lang .btn-primary:active {
    background: rgba(255,255,255,0.18) !important;
    border-color: rgba(255,255,255,0.25) !important;
    box-shadow: none !important;
}

.change-lang .dropdown-menu {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    box-shadow: var(--ep-shadow-lg);
    padding: 6px;
    min-width: 140px;
}

.change-lang .dropdown-item {
    border-radius: var(--ep-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    transition: background var(--ep-transition);
}

.change-lang .dropdown-item:hover {
    background: var(--ep-complement);
    color: var(--ep-primary);
}

.full-screen {
    color: rgba(255,255,255,0.70);
    transition: color var(--ep-transition);
}

.full-screen:hover {
    color: #fff;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
main {
    padding-top: 1rem;
}

.page-container {
    padding: 0;
}

.breadcrumb-box {
    background: var(--ep-white) !important;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md) !important;
    box-shadow: var(--ep-shadow-sm);
}

.breadcrumb-item a {
    color: var(--ep-text-secondary) !important;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--ep-text-secondary) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--ep-border);
}
.card,
.custom-card {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-lg) !important;
    box-shadow: var(--ep-shadow-md);
    background: var(--ep-white);
    transition: transform var(--ep-transition-md), box-shadow var(--ep-transition-md);
}

.card:hover {
    box-shadow: var(--ep-shadow-lg);
}

.card-header {
    background: var(--ep-white);
    border-bottom: 1px solid var(--ep-border) !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--ep-primary);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--ep-white) !important;
    border-top: 1px solid var(--ep-border) !important;
    padding: 1rem 1.25rem;
}

/* stats card variant */
.stat-card {
    border-radius: var(--ep-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--ep-border);
    background: var(--ep-white);
    box-shadow: var(--ep-shadow-md);
    transition: transform var(--ep-transition-md), box-shadow var(--ep-transition-md);
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--ep-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive {
    border: 1px solid var(--ep-border);
}

.table {
    margin-bottom: 0;
    border-color: var(--ep-border);
}

.table thead th {
    background: var(--ep-complement);
    color: var(--ep-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--ep-border);
    border-top: none;
    white-space: nowrap;
}

.table tbody tr {
    border-color: var(--ep-border);
    transition: background var(--ep-transition);
}

.table tbody tr:hover {
    background-color: #f0f4ff;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 15px;
    color: var(--ep-text);
    border-color: var(--ep-border);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(248, 250, 252, 0.7);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-weight: 500;
    font-size: 13px;
    border-radius: var(--ep-radius-sm);
    transition: transform var(--ep-transition), box-shadow var(--ep-transition), background var(--ep-transition);
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%) !important;
    border-color: var(--ep-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(30, 39, 73, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(30, 39, 73, 0.35) !important;
    background: linear-gradient(135deg, #252f58 0%, #313e70 100%) !important;
}

.btn-primary:focus,
.btn-primary:active {
    box-shadow: 0 0 0 3px rgba(30, 39, 73, 0.25) !important;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%) !important;
}

.btn-outline-primary {
    border: 2px solid var(--ep-primary);
    color: var(--ep-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--ep-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(30, 39, 73, 0.25) !important;
}

.btn-accent {
    background: linear-gradient(135deg, var(--ep-accent) 0%, #3a6ae8 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 125, 243, 0.30);
}

.btn-accent:hover {
    box-shadow: 0 4px 16px rgba(79, 125, 243, 0.40);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--ep-success) 0%, #059669 100%) !important;
    border-color: var(--ep-success) !important;
    color: #fff !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--ep-danger) 0%, #dc2626 100%) !important;
    border-color: var(--ep-danger) !important;
    color: #fff !important;
}

.btn-warning {
    background: linear-gradient(135deg, var(--ep-warning) 0%, #d97706 100%) !important;
    border-color: var(--ep-warning) !important;
    color: #fff !important;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: var(--ep-radius-sm);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: var(--ep-radius-md);
}

.btn-outline-secondary {
    border: 1.5px solid var(--ep-border) !important;
    color: var(--ep-text-secondary) !important;
    background: transparent !important;
}

.btn-outline-secondary:hover {
    background: var(--ep-complement) !important;
    border-color: var(--ep-primary) !important;
    color: var(--ep-primary) !important;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--ep-primary);
    margin-bottom: 6px;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
textarea {
    border: 2px solid var(--ep-border) !important;
    border-radius: var(--ep-radius-sm) !important;
    font-size: 13px;
    color: var(--ep-text);
    background: var(--ep-white);
    padding: 9px 13px;
    transition: border-color var(--ep-transition), box-shadow var(--ep-transition);
    width: 100%;
}
select,.form-select {
    border: 2px solid var(--ep-border) !important;
    border-radius: var(--ep-radius-sm) !important;
    font-size: 13px;
    color: var(--ep-text);
    padding: 9px 13px;
    transition: border-color var(--ep-transition), box-shadow var(--ep-transition);
    width: 100%;
}
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: var(--ep-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 39, 73, 0.10) !important;
    outline: none;
}

.form-control::placeholder,
input::placeholder {
    color: #b0b7c3;
}

.form-control.is-invalid,
input.is-invalid {
    border-color: var(--ep-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10) !important;
}

.form-control.is-valid,
input.is-valid {
    border-color: var(--ep-success) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.10) !important;
}

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

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(30, 39, 73, 0.15);
    border-color: var(--ep-primary);
}

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

.input-group .btn {
    border-radius: 0 var(--ep-radius-sm) var(--ep-radius-sm) 0;
}

.input-group .form-control {
    border-radius: var(--ep-radius-sm) 0 0 var(--ep-radius-sm) !important;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.3px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%) !important;
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge.bg-secondary {
    background: rgba(107, 114, 128, 0.12) !important;
    color: #6b7280 !important;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.badge.bg-info {
    background: rgba(79, 125, 243, 0.12) !important;
    color: var(--ep-accent) !important;
    border: 1px solid rgba(79, 125, 243, 0.25);
}

/* status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
}

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

.status-badge.active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

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

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-badge.inactive::before {
    background: var(--ep-danger);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-badge.pending::before {
    background: var(--ep-warning);
}

.status-badge.locked {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.status-badge.locked::before {
    background: #6b7280;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: var(--ep-radius-md);
    font-size: 13px;
    font-weight: 500;
    border: none;
    padding: 14px 16px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-inline-start: 4px solid var(--ep-success) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border-inline-start: 4px solid var(--ep-danger) !important;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
    border-inline-start: 4px solid var(--ep-warning) !important;
}

.alert-info {
    background: rgba(79, 125, 243, 0.08);
    color: #1e40af;
    border-inline-start: 4px solid var(--ep-accent) !important;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
    backdrop-filter: blur(8px);
    background-color: rgba(10, 14, 35, 0.55);
}

.modal-content {
    border: none;
    border-radius: var(--ep-radius-2xl) !important;
    box-shadow: var(--ep-shadow-2xl);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.modal-header .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

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

.modal.fade .modal-dialog {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

/* Wire Elements Pro modal */
.wire-modal-content,
.slide-over-content {
    border-radius: var(--ep-radius-xl) !important;
    box-shadow: var(--ep-shadow-2xl) !important;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    gap: 4px;
}

.page-item .page-link {
    border-radius: var(--ep-radius-sm) !important;
    border: 1.5px solid var(--ep-border);
    color: var(--ep-text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    transition: background var(--ep-transition), color var(--ep-transition), border-color var(--ep-transition);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    border-color: var(--ep-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 39, 73, 0.25);
}

.page-item .page-link:hover {
    background: var(--ep-complement);
    color: var(--ep-primary);
    border-color: var(--ep-primary);
}

/* ============================================================
   DROPDOWNS
   ============================================================ */
.dropdown-menu {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    box-shadow: var(--ep-shadow-xl);
    padding: 6px;
    font-size: 13px;
}

.dropdown-item {
    border-radius: var(--ep-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    color: var(--ep-text);
    transition: background var(--ep-transition), color var(--ep-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: var(--ep-complement);
    color: var(--ep-primary);
}

.dropdown-item:active {
    background: var(--ep-primary);
    color: #fff;
}

.dropdown-divider {
    border-color: var(--ep-border);
    margin: 4px 0;
}

/* ============================================================
   TABS & PILLS
   ============================================================ */
.nav-pills .nav-link {
    border-radius: var(--ep-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-secondary);
    padding: 8px 16px;
    transition: background var(--ep-transition), color var(--ep-transition);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 39, 73, 0.25);
}

.nav-pills .nav-link:hover:not(.active) {
    background: var(--ep-complement);
    color: var(--ep-primary);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-secondary);
    padding: 10px 16px;
    transition: color var(--ep-transition), border-color var(--ep-transition);
}

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

.nav-tabs {
    border-bottom: 1px solid var(--ep-border);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.toast {
    border-radius: var(--ep-radius-md);
    border: 1px solid var(--ep-border);
    box-shadow: var(--ep-shadow-xl);
    min-width: 300px;
    font-size: 13px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-header {
    border-bottom: 1px solid var(--ep-border);
    font-weight: 600;
    font-size: 13px;
}

.workspace-item {
    gap: 14px;
    padding: 14px 16px;
    background: var(--ep-white);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    text-decoration: none;
    color: var(--ep-text);
    transition: transform var(--ep-transition-md), box-shadow var(--ep-transition-md), border-color var(--ep-transition-md);
    box-shadow: var(--ep-shadow-sm);
}

.workspace-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--ep-shadow-lg);
    border-color: var(--ep-accent);
    color: var(--ep-primary);
    text-decoration: none;
}

.workspace-item img {
    width: 45px;
    height: 45px;
    border-radius: var(--ep-radius-sm);
    object-fit: contain;
}

.workspace-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.workspace-info strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--ep-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-info span {
    font-size: 12px;
    color: var(--ep-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* dashboard section headings */
.section-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--ep-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ep-complement);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================================
   ACCORDION / COLLAPSE
   ============================================================ */
.accordion-chevron {
    transition: transform var(--ep-transition-md);
    color: var(--ep-text-secondary);
}

[aria-expanded="false"] .accordion-chevron {
    transform: rotate(-90deg);
}

/* ============================================================
   UTILITY
   ============================================================ */
.cursor-pointer {
    cursor: pointer;
}

.text-primary {
    color: var(--ep-primary) !important;
}

.text-accent {
    color: var(--ep-accent) !important;
}

.text-muted {
    color: var(--ep-text-secondary) !important;
}

.bg-primary-soft {
    background: var(--ep-complement);
    color: var(--ep-primary);
}

.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14px { font-size: 14px !important; }
.fs-35px { font-size: 35px !important; }
.fs-12px { font-size: 12px !important; }

.fw-600 { font-weight: 600 !important; }

.rounded-ep { border-radius: var(--ep-radius-md) !important; }

/* page header in content area */
.page-title-section {
    padding: 0.5rem 0 1.5rem;
}

.page-title-section h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ep-primary);
    margin-bottom: 4px;
}

/* ============================================================
   LOGIN / AUTH PAGES
   ============================================================ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    background: var(--ep-bg);
}

.auth-left {
    flex: 0 0 480px;
    max-width: 480px;
    background: var(--ep-white);
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    overflow-y: auto;
}

.auth-left-wide {
    flex: 0 0 600px;
    max-width: 600px;
}

.auth-right {
    flex: 1;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
}

.auth-brand img {
    height: 40px;
}

.auth-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ep-primary);
}

.auth-heading {
    font-size: 26px;
    font-weight: 700;
    color: var(--ep-primary);
    margin-bottom: 6px;
}

.auth-subheading {
    font-size: 14px;
    color: var(--ep-text-secondary);
    margin-bottom: 2rem;
}

.auth-form-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-footer {
    margin-top: 2rem;
    font-size: 12px;
    color: var(--ep-text-secondary);
    text-align: center;
}

.auth-right-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem;
    max-width: 500px;
}

.auth-right-logo {
    width: 280px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.auth-right-bg-logo {
    width: 280px;
    margin-bottom: 1.5rem;
}

.auth-right-title {
    color: rgba(255,255,255,0.90);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}

.auth-right-subtitle {
    color: rgba(255,255,255,0.60);
    font-size: 14px;
    margin-top: 12px;
}

.auth-right-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    padding: 6px 16px;
    color: rgba(255,255,255,0.80);
    font-size: 13px;
    margin-bottom: 2rem;
}

/* input with icon */
.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-group label {
    font-weight: 600;
    font-size: 13px;
    color: var(--ep-primary);
    margin-bottom: 6px;
    display: block;
}

.auth-input-group .input-icon {
    position: absolute;
    inset-inline-start: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ep-text-secondary);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

.auth-input-group .has-icon {
    position: relative;
}

.auth-input-group .has-icon input {
    padding-inline-start: 40px !important;
}

.auth-input-group .password-toggle {
    position: absolute;
    inset-inline-end: 13px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--ep-text-secondary);
    transition: color var(--ep-transition);
    display: flex;
    align-items: center;
}

.auth-input-group .password-toggle:hover {
    color: var(--ep-primary);
}

.btn-auth-primary {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--ep-radius-sm);
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(30, 39, 73, 0.30);
    transition: transform var(--ep-transition), box-shadow var(--ep-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(30, 39, 73, 0.40);
    color: #fff;
}

.btn-auth-secondary {
    width: 100%;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--ep-radius-sm);
    background: transparent;
    border: 1px solid var(--ep-border);
    color: var(--ep-text-secondary);
    cursor: pointer;
    transition: all var(--ep-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-auth-secondary:hover {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
    background: var(--ep-complement);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--ep-text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ep-border);
}

.auth-tab {
    display: flex;
    background: var(--ep-complement);
    border-radius: var(--ep-radius-sm);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab-item {
    flex: 1;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    color: var(--ep-text-secondary);
    border: none;
    background: transparent;
    transition: all var(--ep-transition);
}

.auth-tab-item.active {
    background: var(--ep-white);
    color: var(--ep-primary);
    font-weight: 600;
    box-shadow: var(--ep-shadow-sm);
}

/* password eye */
.password-eye {
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ep-text-secondary);
    transition: color var(--ep-transition);
    z-index: 1;
}

.password-eye:hover {
    color: var(--ep-primary);
}

/* captcha */
.captcha-btn {
    border-start-start-radius: 0 !important;
    border-end-start-radius: 0 !important;
    border-start-end-radius: var(--ep-radius-sm) !important;
    border-end-end-radius: var(--ep-radius-sm) !important;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%) !important;
    border: none !important;
    padding: 0 12px;
}

/* OTP display */
.otp-display-input {
    letter-spacing: 8px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    font-family: monospace;
}

/* social / extra login buttons */
.github-btn,
.extra-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--ep-text-secondary);
    background: var(--ep-white);
    text-decoration: none;
    transition: all var(--ep-transition);
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.github-btn:hover,
.extra-login-btn:hover {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
    background: var(--ep-complement);
    text-decoration: none;
}

.gh-icon {
    width: 18px;
    height: 18px;
}

/* redirect warning card */
.redirect-warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.20);
    border-radius: var(--ep-radius-md);
    padding: 14px 16px;
    margin-bottom: 1.25rem;
    font-size: 13px;
    color: #991b1b;
}

/* ============================================================
   PROFILE MODAL SIDEBAR ENHANCEMENTS
   ============================================================ */
.sidebar {
    background: linear-gradient(160deg, var(--ep-primary) 0%, var(--ep-secondary) 100%) !important;
}

.profile-pic {
    background-color: rgba(255,255,255,0.12) !important;
    border-color: rgba(255,255,255,0.25) !important;
}

.profile-pic svg {
    color: rgba(255,255,255,0.80);
    stroke: rgba(255,255,255,0.80);
}

.sidebar nav.nav button {
    text-align: start !important;
    border-radius: var(--ep-radius-sm) !important;
}

.sidebar nav.nav button.active,
.sidebar nav.nav button:hover {
    background: rgba(255,255,255,0.10) !important;
    color: #fff !important;
}

/* ============================================================
   RTL OVERRIDES
   ============================================================ */
[dir="rtl"] .auth-layout {
    flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
}

[dir="rtl"] .input-group .form-control {
    border-radius: 0 var(--ep-radius-sm) var(--ep-radius-sm) 0 !important;
}

[dir="rtl"] .input-group .btn {
    border-radius: var(--ep-radius-sm) 0 0 var(--ep-radius-sm);
}

[dir="rtl"] .sidebar nav.nav {
    padding-right: 15px;
    padding-left: 0;
}

[dir="rtl"] .dropdown-menu-end {
    --bs-position: start;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) and (min-width: 768px) {
    .auth-left {
        flex: 0 0 420px;
        max-width: 420px;
    }

    .auth-left-wide {
        flex: 0 0 520px;
        max-width: 520px;
    }
}

/* Mobile — ≤ 767px */
@media (max-width: 767px) {

    /* ── Auth pages ── */
    .auth-layout {
        flex-direction: column;
        min-height: 100vh;
    }

    .auth-left,
    .auth-left-wide {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        padding: 1.5rem 1.25rem;
    }

    .auth-right {
        display: none;
    }

    .auth-form-card {
        justify-content: flex-start;
    }

    .auth-heading {
        font-size: 22px;
    }

    /* ── Header ── */
    .header-top-row {
        height: auto;
        padding: 0.5rem 0.75rem;
    }

    /* single nav: hidden on mobile, wraps to full row below top-row when .active */
    .header .nav {
        display: none;
        order: 10;
        flex: 0 0 100%;
        flex-direction: column;
        padding: 0.25rem 0 0.5rem;
        gap: 2px;
        overflow: visible;
    }

    .header .nav.active {
        display: flex;
    }

    .header .nav .nav-btn {
        width: 100%;
        padding: 10px 12px;
        border-radius: var(--ep-radius-sm);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        justify-content: flex-start;
    }

    /* ── Filter bar ── */
    .filter-bar {
        padding: 0 0.75rem;
        min-height: 38px;
    }

    .filter-bar .submenu li a,
    .filter-bar .submenu li > a.dropdown-toggle {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* ── Content ── */
    main .container {
        padding-inline: 0.75rem;
    }

    .card-body   { padding: 1rem; }
    .card-header { padding: 0.875rem 1rem; }

    .table thead th { font-size: 11px; padding: 10px 12px; }
    .table tbody td { font-size: 12px; padding: 10px 12px; }

    .breadcrumb-box { padding: 0.5rem 0.875rem !important; }
}

/* Small mobile — ≤ 480px */
@media (max-width: 480px) {
    .auth-left,
    .auth-left-wide {
        padding: 1.25rem 1rem;
    }

    .auth-heading { font-size: 20px; }

    .btn-auth-primary,
    .btn-auth-secondary {
        padding: 11px 16px;
        font-size: 14px;
    }

    .auth-tab-item {
        font-size: 12px;
        padding: 7px 10px;
    }
}

/* ============================================================
   POWERGRID / DATA TABLES
   ============================================================ */

/* ============================================================
   SWEETALERT2 OVERRIDES
   ============================================================ */
.swal2-popup {
    border-radius: var(--ep-radius-xl) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%) !important;
    border-radius: var(--ep-radius-sm) !important;
    box-shadow: 0 2px 8px rgba(30, 39, 73, 0.30) !important;
}

.swal2-cancel {
    border-radius: var(--ep-radius-sm) !important;
}

/* ============================================================
   CHOICES.JS OVERRIDES
   ============================================================ */
.choices__inner {
    border: 2px solid var(--ep-border) !important;
    border-radius: var(--ep-radius-sm) !important;
    background: var(--ep-white) !important;
    min-height: 40px;
    font-size: 13px;
}

.choices__inner:focus-within,
.choices.is-focused .choices__inner {
    border-color: var(--ep-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 39, 73, 0.10) !important;
}

.choices__list--dropdown {
    border: 1px solid var(--ep-border) !important;
    border-radius: var(--ep-radius-md) !important;
    box-shadow: var(--ep-shadow-xl) !important;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: var(--ep-complement) !important;
    color: var(--ep-primary) !important;
}

.content {
    display: block;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--ep-bg);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================
   DIRECTION HELPERS
   ============================================================ */
.dir-ltr { direction: ltr; }
.dir-rtl { direction: rtl; }

/* ============================================================
   LINK OVERRIDES
   ============================================================ */
a {
    color: var(--ep-accent);
    text-decoration: none;
    transition: color var(--ep-transition);
}

a:hover {
    color: var(--ep-primary);
}

/* ============================================================
   MISC COMPONENT STYLES
   ============================================================ */
.vr {
    background-color: var(--ep-border);
    opacity: 1;
}

.list-group-item {
    border-color: var(--ep-border);
    font-size: 13px;
}

.list-group-item.active {
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    border-color: var(--ep-primary);
}

hr {
    border-color: var(--ep-border);
    opacity: 1;
}

code {
    color: var(--ep-accent);
    background: rgba(79, 125, 243, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.filter-bar .submenu { display: none; }
.filter-bar .submenu.active { display: flex; }

.ts-control>input {
    border: 0 !important;
}
.ts-control>input:focus {
    border: 0 !important;
    box-shadow: none !important;
}
