﻿:root {
    --eqs-primary: #2457d6;
    --eqs-primary-dark: #173b98;
    --eqs-accent: #16a8e3;
    --eqs-sidebar: #101b36;
    --eqs-sidebar-soft: #182746;
    --eqs-bg: #f5f7fb;
    --eqs-surface: #ffffff;
    --eqs-border: #e8edf5;
    --eqs-text: #172033;
    --eqs-muted: #6f7b91;
    --eqs-success: #168a63;
    --eqs-warning: #c58110;
    --eqs-danger: #c44444;
    --eqs-radius: 16px;
    --eqs-shadow: 0 10px 32px rgba(24, 43, 79, .08);
}

html,
body {
    background: var(--eqs-bg);
    color: var(--eqs-text);
    font-family: "Segoe UI", sans-serif !important;
}

body.vertical-layout.vertical-menu {
    background: var(--eqs-bg);
}

body.vertical-layout.vertical-menu.menu-expanded .content,
body.vertical-layout.vertical-menu.menu-expanded .footer {
    margin-right: 260px;
    margin-left: 0;
}

body.vertical-layout.vertical-menu.menu-collapsed .content,
body.vertical-layout.vertical-menu.menu-collapsed .footer {
    margin-right: 60px;
    margin-left: 0;
}

/* Header */
.header-navbar {
    min-height: 72px;
    border: 0 !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 1px 0 var(--eqs-border), 0 8px 30px rgba(23, 32, 51, .04) !important;
    backdrop-filter: blur(12px);
}

.header-navbar .navbar-header {
    width: 260px;
    background: var(--eqs-sidebar);
}

.header-navbar .navbar-header .navbar-brand {
    height: 72px;
    padding: 11px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-navbar .navbar-header .brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    margin: 0 !important;
}

.header-navbar .navbar-header .brand-text {
    color: #fff !important;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: .2px;
}

.header-navbar .navbar-header .brand-subtitle {
    display: block;
    margin-top: 3px;
    color: #90a7d2;
    font-size: .68rem;
    font-weight: 400;
}

.header-navbar .navbar-container {
    height: 72px;
    padding: 0 24px;
}

.header-navbar .navbar-container .navbar-collapse {
    height: 72px;
}

.header-navbar .nav-link,
.header-navbar .dropdown-user-link {
    color: var(--eqs-text) !important;
}

.header-navbar .nav-menu-main {
    width: 42px;
    height: 42px;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--eqs-border);
    border-radius: 12px;
    background: #fff;
}

.header-navbar .navbar-page-context {
    padding-top: 15px;
    margin-right: 12px;
}

.header-navbar .navbar-page-context small {
    color: var(--eqs-muted);
    display: block;
    font-size: .72rem;
}

.header-navbar .navbar-page-context strong {
    display: block;
    color: var(--eqs-text);
    font-size: .95rem;
}

.header-navbar .dropdown-user-link {
    min-height: 72px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 10px !important;
}

.header-navbar .dropdown-user-link .avatar img {
    width: 38px;
    height: 38px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dfe8f9;
}

.header-navbar .user-meta {
    text-align: right;
    line-height: 1.2;
}

.header-navbar .user-meta small {
    color: var(--eqs-muted);
    display: block;
    font-size: .7rem;
    margin-bottom: 3px;
}

.header-navbar .user-meta strong {
    color: var(--eqs-text);
    font-size: .86rem;
}

.header-navbar .dropdown-menu {
    border: 1px solid var(--eqs-border);
    border-radius: 14px;
    box-shadow: var(--eqs-shadow);
    padding: 8px;
}

.header-navbar .dropdown-item {
    border-radius: 9px;
    padding: 9px 12px;
}

/* Sidebar */
.main-menu.menu-light {
    width: 260px;
    top: 72px;
    background: var(--eqs-sidebar) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.main-menu.menu-light .main-menu-content {
    padding: 18px 12px 28px;
}

.main-menu.menu-light .navigation {
    background: transparent;
}

.main-menu.menu-light .navigation .navigation-header {
    color: #7087b3;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .8px;
    padding: 14px 12px 7px;
}

.main-menu.menu-light .navigation > li > a,
.main-menu.menu-light .navigation > li ul li > a {
    color: #c8d4e9;
    border-radius: 11px;
    margin: 3px 0;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.main-menu.menu-light .navigation > li > a {
    padding: 12px 13px;
    font-weight: 600;
}

.main-menu.menu-light .navigation > li > a i {
    color: #93a9cf;
    margin-left: 9px;
    font-size: 1.15rem;
}

.main-menu.menu-light .navigation > li.open > a,
.main-menu.menu-light .navigation > li.active > a,
.main-menu.menu-light .navigation > li > a:hover,
.main-menu.menu-light .navigation > li ul .active > a,
.main-menu.menu-light .navigation > li ul li > a:hover {
    color: #fff !important;
    background: var(--eqs-sidebar-soft) !important;
}

.main-menu.menu-light .navigation > li.active > a,
.main-menu.menu-light .navigation > li ul .active > a {
    box-shadow: inset -3px 0 0 var(--eqs-accent);
}

.main-menu.menu-light .navigation > li ul li > a {
    font-size: .86rem;
    padding: 10px 42px 10px 12px;
}

.main-menu.menu-light .navigation .menu-content {
    background: transparent !important;
}

.main-menu .menu-badge {
    float: left;
    background: rgba(22, 168, 227, .15);
    color: #6ed5ff;
    font-size: .64rem;
    border-radius: 20px;
    padding: 3px 7px;
    margin-top: 1px;
}

/* Main content */
.app-content.content {
    padding-top: 72px;
}

.content-wrapper {
    background: var(--eqs-bg) !important;
    padding: 26px 28px 36px !important;
}

.content-header {
    margin: 0 0 18px;
}

.content-header .container-fluid {
    padding: 0;
}

.content-header h1 {
    color: var(--eqs-text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.2px;
}

.content-header .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 7px 0 0;
    font-size: .78rem;
}

.content-header .breadcrumb a {
    color: var(--eqs-primary);
}

.content-header .breadcrumb-item.active {
    color: var(--eqs-muted);
}

.card {
    border: 1px solid var(--eqs-border) !important;
    border-radius: var(--eqs-radius) !important;
    box-shadow: var(--eqs-shadow) !important;
    overflow: visible;
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--eqs-border) !important;
    border-radius: var(--eqs-radius) var(--eqs-radius) 0 0 !important;
    padding: 18px 20px;
}

.card-body {
    padding: 20px;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    box-shadow: none !important;
}

.btn-primary,
.btn-info {
    border-color: var(--eqs-primary) !important;
    background: var(--eqs-primary) !important;
}

.btn-primary:hover,
.btn-info:hover {
    border-color: var(--eqs-primary-dark) !important;
    background: var(--eqs-primary-dark) !important;
}

.btn-secondary {
    background: #eef2f8;
    border-color: #e1e7f0;
    color: #44516a;
}

.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid #dfe5ef !important;
    border-radius: 10px !important;
}

.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #9bb6f5 !important;
    box-shadow: 0 0 0 3px rgba(36, 87, 214, .10) !important;
}

/* DataTables */
.table {
    color: #33405a;
}

.table thead th {
    border-top: 0;
    border-bottom: 1px solid #dde4ef !important;
    background: #f8faff;
    color: #536078;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.table td,
.table th {
    padding: .9rem .75rem;
    vertical-align: middle;
    border-color: #edf1f6 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #fbfcff;
}

.table-bordered,
.table-bordered td,
.table-bordered th {
    border-left: 0 !important;
    border-right: 0 !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dfe5ef;
    border-radius: 9px;
    padding: 6px 10px;
    background: #fff;
}

.dataTables_wrapper .dt-buttons .btn {
    background: #fff !important;
    border: 1px solid var(--eqs-border) !important;
    color: #4c5870 !important;
    margin-left: 5px;
}

.page-item.active .page-link {
    background: var(--eqs-primary);
    border-color: var(--eqs-primary);
}

.page-link {
    color: var(--eqs-primary);
    border-color: var(--eqs-border);
}

/* Dashboard */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    background: linear-gradient(120deg, #173b98 0%, #2457d6 52%, #16a8e3 130%) !important;
    color: #fff;
    min-height: 178px;
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
}

.dashboard-hero::before {
    width: 260px;
    height: 260px;
    left: -70px;
    top: -110px;
}

.dashboard-hero::after {
    width: 180px;
    height: 180px;
    left: 70px;
    bottom: -125px;
}

.dashboard-hero .card-body {
    position: relative;
    z-index: 1;
    padding: 28px 30px;
}

.dashboard-hero .eyebrow {
    color: #cfe7ff;
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 7px;
}

.dashboard-hero h2 {
    color: #fff;
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-hero p {
    color: #dceaff;
    max-width: 640px;
    margin: 0;
    line-height: 1.8;
}

.dashboard-hero .hero-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .18));
}

.metric-card {
    min-height: 142px;
}

.metric-card .card-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-card .metric-label {
    color: var(--eqs-muted);
    font-size: .78rem;
    margin-bottom: 8px;
}

.metric-card .metric-value {
    color: var(--eqs-text);
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 10px;
}

.metric-card .metric-link {
    color: var(--eqs-primary);
    font-size: .75rem;
    font-weight: 600;
}

.metric-card .metric-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eef4ff;
    color: var(--eqs-primary);
    font-size: 1.35rem;
}

.quick-actions .quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--eqs-border);
    border-radius: 13px;
    color: var(--eqs-text);
    background: var(--eqs-surface) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.quick-actions .quick-action:hover {
    color: var(--eqs-primary);
    transform: translateY(-2px);
    border-color: #cbd9f7;
    box-shadow: 0 10px 24px rgba(36, 87, 214, .08);
}

.quick-actions .quick-action i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #f1f5ff;
    color: var(--eqs-primary);
    font-size: 1.2rem;
}

.quick-actions .quick-action strong {
    display: block;
    font-size: .86rem;
}

.quick-actions .quick-action small {
    display: block;
    color: var(--eqs-muted);
    margin-top: 3px;
    font-size: .7rem;
}

.system-note {
    border: 1px dashed #cdd8eb;
    border-radius: 13px;
    background: #f9fbff;
    color: #5b6880;
    padding: 14px 16px;
    font-size: .8rem;
    line-height: 1.8;
}

.system-note i {
    color: var(--eqs-primary);
    margin-left: 6px;
}

/* Modal */
.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(16, 27, 54, .18);
}

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

/* Footer */
.footer.footer-light {
    border-top: 1px solid var(--eqs-border) !important;
    box-shadow: none !important;
    background: var(--eqs-surface) !important;
    color: var(--eqs-muted) !important;
    padding: 14px 24px;
}

/* Login */
.kurimi-login-page {
    min-height: 100vh;
    margin: 0 !important;
    background: #f4f7fc;
}

.kurimi-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 440px) 1fr;
}

.kurimi-login-panel {
    background: #fff;
    padding: 46px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 15px 0 50px rgba(23, 32, 51, .05);
    z-index: 2;
}

.kurimi-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 44px;
}

.kurimi-login-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.kurimi-login-brand strong {
    display: block;
    color: var(--eqs-text);
    font-size: 1rem;
}

.kurimi-login-brand small {
    display: block;
    color: var(--eqs-muted);
    margin-top: 3px;
}

.kurimi-login-panel h1 {
    color: var(--eqs-text);
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.kurimi-login-panel .login-intro {
    color: var(--eqs-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.kurimi-login-panel .form-group label {
    color: #47536a;
    font-weight: 600;
    font-size: .8rem;
}

.kurimi-login-panel .form-control {
    height: 48px;
    padding: 10px 42px 10px 12px;
}

.kurimi-login-panel .input-icon-wrap {
    position: relative;
}

.kurimi-login-panel .input-icon-wrap > i {
    position: absolute;
    right: 14px;
    top: 15px;
    z-index: 2;
    color: #8793a8;
}

.kurimi-login-panel .btn-login {
    height: 48px;
    margin-top: 6px;
}

.kurimi-login-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: linear-gradient(135deg, #101b36 0%, #173b98 56%, #16a8e3 150%);
}

.kurimi-login-visual::before,
.kurimi-login-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.kurimi-login-visual::before {
    width: 480px;
    height: 480px;
    left: -170px;
    top: -190px;
}

.kurimi-login-visual::after {
    width: 330px;
    height: 330px;
    right: -120px;
    bottom: -130px;
}

.kurimi-login-visual .visual-content {
    position: relative;
    z-index: 1;
    max-width: 610px;
    color: #fff;
}

.kurimi-login-visual .visual-content img {
    width: 105px;
    height: 105px;
    object-fit: contain;
    margin-bottom: 26px;
    filter: drop-shadow(0 14px 32px rgba(0, 0, 0, .22));
}

.kurimi-login-visual h2 {
    color: #fff;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 15px;
}

.kurimi-login-visual p {
    color: #d8e5fa;
    line-height: 2;
    font-size: .95rem;
}

.kurimi-login-panel .login-error {
    margin-top: 18px;
    border-radius: 11px;
    padding: 11px 13px;
    background: #fff1f1;
    color: #a83b3b;
    border: 1px solid #ffd7d7;
    font-size: .8rem;
}

@media (max-width: 991.98px) {
    .kurimi-login-shell {
        grid-template-columns: minmax(300px, 1fr);
    }

    .kurimi-login-visual {
        display: none;
    }

    .content-wrapper {
        padding: 20px 16px 30px !important;
    }
}

@media (max-width: 767.98px) {
    body.vertical-layout.vertical-menu.menu-expanded .content,
    body.vertical-layout.vertical-menu.menu-collapsed .content,
    body.vertical-layout.vertical-menu.menu-expanded .footer,
    body.vertical-layout.vertical-menu.menu-collapsed .footer {
        margin-right: 0;
    }

    .header-navbar .navbar-header {
        width: 100%;
        background: var(--eqs-sidebar);
    }

    .header-navbar .navbar-header .navbar-brand {
        padding-right: 12px;
    }

    .header-navbar .navbar-container {
        padding: 0 12px;
    }

    .main-menu.menu-light {
        width: 260px;
    }

    .dashboard-hero .hero-logo {
        display: none;
    }

    .kurimi-login-panel {
        padding: 34px 24px;
    }
}

.content-header .content-description {
    color: var(--eqs-muted);
    font-size: .8rem;
    line-height: 1.75;
    margin-top: 7px;
    max-width: 760px;
}

.entity-card {
    overflow: hidden;
}

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.page-toolbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.page-toolbar-title .page-toolbar-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3ff;
    color: var(--eqs-primary);
    font-size: 1.35rem;
}

.page-toolbar-title .card-title {
    color: var(--eqs-text);
    font-size: 1rem;
    font-weight: 700;
}

.page-toolbar-title small {
    display: block;
    color: var(--eqs-muted);
    margin-top: 5px;
    line-height: 1.6;
    font-size: .72rem;
}

.page-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.record-count {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--eqs-border);
    border-radius: 10px;
    background: #f8faff;
    color: var(--eqs-muted);
    font-size: .72rem;
}

.record-count strong {
    color: var(--eqs-text);
    font-size: .95rem;
    font-weight: 700;
}

.btn-toolbar {
    min-height: 38px;
    padding: 8px 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-light {
    background: #fff;
    border-color: var(--eqs-border);
    color: #506078;
}

.btn-light:hover,
.btn-light:focus {
    background: #f4f7fb;
    border-color: #d7dfeb;
    color: var(--eqs-primary);
}

.table-card-tools {
    min-height: 38px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.table-hint {
    color: var(--eqs-muted);
    font-size: .73rem;
    line-height: 1.7;
}

.table-hint i {
    color: var(--eqs-primary);
    font-size: 1rem;
    vertical-align: -1px;
    margin-left: 4px;
}

.table-export-actions .dt-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.table-export-actions .dt-buttons .btn {
    margin: 0 !important;
    padding: 6px 9px;
    font-size: .7rem;
}

.table-shell {
    border: 1px solid var(--eqs-border);
    border-radius: 13px;
    overflow-x: auto;
    background: #fff;
}

.table-shell .table {
    min-width: 790px;
}

.table-shell .table thead th {
    border-bottom: 1px solid var(--eqs-border) !important;
    background: #f7f9fd;
    color: #56647b;
    padding-top: 12px;
    padding-bottom: 12px;
}

.table-shell .table tbody tr {
    transition: background .15s ease;
}

.table-shell .table tbody tr:hover {
    background: #f8fbff !important;
}

.table-shell .table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.actions-column {
    width: 80px !important;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.btn-icon i {
    font-size: 1rem;
}

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

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

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

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

.entity-cell {
    min-width: 185px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.entity-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #eaf0ff;
    color: var(--eqs-primary);
    font-size: .78rem;
    font-weight: 800;
}

.entity-avatar.is-device {
    background: #ecf9fd;
    color: #1186b4;
    font-size: 1.2rem;
}

.entity-cell strong {
    display: block;
    color: #2c3850;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.35;
}

.entity-cell small {
    display: block;
    color: #98a3b5;
    font-size: .64rem;
    margin-top: 4px;
}

.meta-badge,
.company-value,
.phone-value,
.date-value {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #536078;
    white-space: nowrap;
    font-size: .75rem;
}

.meta-badge {
    padding: 5px 9px;
    border-radius: 20px;
    background: #f2f5fa;
    color: #536078;
}

.meta-badge i,
.company-value i,
.phone-value i,
.date-value i {
    color: #8491a8;
    font-size: .9rem;
}

.phone-value {
    direction: ltr;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill.is-success {
    color: #157354;
    background: #eaf8f3;
}

.status-pill.is-success .status-dot {
    background: #25a878;
}

.status-pill.is-warning {
    color: #9a6811;
    background: #fff6df;
}

.status-pill.is-warning .status-dot {
    background: #d9a12c;
}

.table-status {
    min-height: 46px;
    margin-bottom: 12px;
    padding: 11px 14px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: .75rem;
}

.table-status.is-loading {
    color: #596780;
    background: #f7f9fd;
    border: 1px dashed #dbe3ef;
}

.table-status.is-error {
    color: #a53d3d;
    background: #fff5f5;
    border: 1px solid #f5dada;
}

.eqs-spinner {
    width: 15px;
    height: 15px;
    display: inline-block;
    flex: 0 0 15px;
    border: 2px solid currentColor;
    border-left-color: transparent;
    border-radius: 50%;
    animation: eqs-spin .7s linear infinite;
}

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

.btn.is-busy {
    cursor: progress;
    opacity: .78;
}

.dataTables_wrapper .row:first-child {
    align-items: center;
    margin-top: 2px;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    margin-bottom: 8px;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    color: var(--eqs-muted);
    font-size: .72rem;
}

.dataTables_wrapper .dataTables_info {
    color: var(--eqs-muted);
    font-size: .72rem;
    padding-top: 14px;
}

#eqsModal .modal-dialog {
    max-width: 560px;
}

#eqsModal .modal-header {
    padding: 17px 20px;
    background: #fbfcff;
    border-radius: 16px 16px 0 0;
}

#eqsModal .modal-title {
    color: var(--eqs-text);
    font-size: .98rem;
    font-weight: 700;
}

#eqsModal .modal-body {
    padding: 20px;
}

#eqsModal .vertical-scroll {
    max-height: 62vh !important;
    padding-left: 4px;
}

#eqsModal .form-group {
    margin-bottom: 16px;
}

#eqsModal .form-label,
#eqsModal label {
    color: #46536a;
    font-size: .77rem;
    font-weight: 700;
    margin-bottom: 7px;
}

#eqsModal .form-control {
    min-height: 43px;
    background: #fff;
}

#eqsModal input[type="file"].form-control {
    height: auto;
    padding: 7px 10px;
}

#eqsModal .modal-footer {
    padding: 14px 20px;
    background: #fbfcff;
    border-radius: 0 0 16px 16px;
}

.eqs-image-preview {
    min-height: 185px;
    border: 1px dashed #cfd9e8;
    border-radius: 13px;
    overflow: hidden;
    background: #f8faff;
    position: relative;
}

.eqs-image-preview-empty {
    min-height: 185px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #8491a8;
}

.eqs-image-preview-empty i {
    font-size: 2.2rem;
    color: #9cafcf;
    margin-bottom: 8px;
}

.eqs-image-preview-empty strong {
    color: #596780;
    font-size: .8rem;
    margin-bottom: 4px;
}

.eqs-image-preview-empty small {
    font-size: .68rem;
    line-height: 1.6;
}

.eqs-image-preview img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #fff;
}

.eqs-confirm-modal .modal-dialog {
    max-width: 440px;
}

.eqs-confirm-modal .modal-body {
    padding: 28px 26px 16px;
    text-align: center;
}

.eqs-confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0f0;
    color: var(--eqs-danger);
    font-size: 1.65rem;
}

.eqs-confirm-modal h4 {
    color: var(--eqs-text);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.eqs-confirm-modal p {
    color: var(--eqs-muted);
    font-size: .78rem;
    line-height: 1.8;
    margin: 0;
}

.eqs-confirm-modal .modal-footer {
    justify-content: center;
    padding: 12px 20px 20px;
    border-top: 0;
}

@media (max-width: 767.98px) {
    .content-header .breadcrumb {
        float: none !important;
        padding-top: 10px;
    }

    .page-toolbar,
    .table-card-tools {
        align-items: stretch;
    }

    .page-toolbar-title,
    .page-toolbar-actions,
    .table-hint,
    .table-export-actions {
        width: 100%;
    }

    .page-toolbar-actions {
        justify-content: flex-start;
    }

    .page-toolbar-actions .btn-toolbar {
        flex: 1 1 auto;
        justify-content: center;
    }

    .record-count {
        flex: 0 0 auto;
    }

    .table-export-actions .dt-buttons {
        justify-content: flex-start;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: right !important;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: calc(100% - 52px);
        margin-right: 6px;
    }
}

body,
button,
input,
optgroup,
select,
textarea,
.table,
.dataTables_wrapper,
.modal,
.dropdown-menu {
    font-family: "Segoe UI", sans-serif !important;
}

body {
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

small,
.small {
    font-size: .82rem;
    line-height: 1.55;
}

.header-navbar .navbar-header .brand-text {
    font-size: 1.05rem;
    font-weight: 700;
}

.header-navbar .navbar-header .brand-subtitle {
    font-size: .78rem;
    font-weight: 500;
}

.header-navbar .navbar-page-context small,
.header-navbar .user-meta small {
    font-size: .8rem;
}

.header-navbar .navbar-page-context strong {
    font-size: 1rem;
    font-weight: 700;
}

.header-navbar .user-meta strong {
    font-size: .95rem;
    font-weight: 700;
}

.header-navbar .dropdown-item {
    font-size: .92rem;
    line-height: 1.55;
}

.main-menu.menu-light .navigation .navigation-header {
    font-size: .78rem;
    font-weight: 700;
}

.main-menu.menu-light .navigation > li > a {
    font-size: .94rem;
    line-height: 1.6;
    font-weight: 600;
}

.main-menu.menu-light .navigation > li ul li > a {
    font-size: .9rem;
    line-height: 1.6;
}

.content-header .breadcrumb {
    font-size: .88rem;
}

.btn {
    font-size: .92rem;
    line-height: 1.5;
}

.btn-sm {
    font-size: .86rem;
}

.form-control,
.custom-select,
select.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-results__option {
    font-size: .94rem !important;
    line-height: 1.55;
}

label,
.form-label,
.control-label {
    font-size: .9rem;
    line-height: 1.5;
}

.table {
    font-size: .9rem;
    line-height: 1.6;
}

.table thead th,
.table-shell .table thead th {
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.55;
}

.table td,
.table th {
    padding-top: .95rem;
    padding-bottom: .95rem;
}

.page-toolbar-title .card-title {
    font-size: 1.05rem;
}

.page-toolbar-title small,
.record-count,
.table-hint {
    font-size: .82rem;
}

.record-count strong {
    font-size: 1rem;
}

.table-export-actions .dt-buttons .btn {
    font-size: .8rem;
    font-weight: 600;
}

.entity-avatar {
    font-size: .86rem;
}

.entity-cell strong {
    font-size: .9rem;
    line-height: 1.5;
}

.entity-cell small {
    font-size: .78rem;
    line-height: 1.5;
}

.meta-badge,
.company-value,
.phone-value,
.date-value {
    font-size: .84rem;
    line-height: 1.55;
}

.status-pill {
    font-size: .78rem;
    line-height: 1.45;
}

.table-status {
    font-size: .84rem;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info {
    font-size: .82rem;
    line-height: 1.55;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .pagination .page-link {
    font-size: .86rem;
}

#eqsModal .modal-title {
    font-size: 1.05rem;
}

#eqsModal .form-label,
#eqsModal label {
    font-size: .88rem;
    line-height: 1.5;
}

#eqsModal .form-control {
    font-size: .94rem;
}

.eqs-image-preview-empty strong {
    font-size: .88rem;
}

.eqs-image-preview-empty small {
    font-size: .78rem;
}

.eqs-confirm-modal h4 {
    font-size: 1.05rem;
}

.eqs-confirm-modal p {
    font-size: .88rem;
}

.kurimi-login-brand strong {
    font-size: 1.08rem;
}

.kurimi-login-brand small {
    font-size: .85rem;
}

.kurimi-login-panel .login-intro {
    font-size: .96rem;
}

.kurimi-login-panel .form-group label {
    font-size: .9rem;
}

.kurimi-login-panel .form-control {
    font-size: .96rem;
}

.kurimi-login-panel .btn-login {
    font-size: .96rem;
    font-weight: 700;
}

.kurimi-login-panel .login-error {
    font-size: .88rem;
}

.kurimi-login-visual p {
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    body {
        font-size: 14.5px;
    }

    .main-menu.menu-light .navigation > li > a {
        font-size: .92rem;
    }

    .table {
        font-size: .88rem;
    }
}

/* Typography */
html { font-size: 16px !important; }
html, body, button, input, select, textarea, .table, .dropdown-menu, .modal { font-family: "Segoe UI", sans-serif !important; }
body { font-size: 16px !important; line-height: 1.65; }
.header-navbar .brand-text { font-size: 1.08rem !important; }
.header-navbar .brand-subtitle { font-size: .82rem !important; }
.header-navbar .navbar-page-context small { font-size: .82rem !important; }
.header-navbar .navbar-page-context strong { font-size: 1.05rem !important; }
.header-navbar .user-meta small { font-size: .82rem !important; }
.header-navbar .user-meta strong { font-size: 1rem !important; }
.header-navbar .dropdown-item { font-size: .98rem !important; }
.main-menu.menu-light .navigation > li > a { font-size: 1rem !important; line-height: 1.7 !important; }
.main-menu.menu-light .navigation > li ul li > a { font-size: .96rem !important; line-height: 1.7 !important; }
.main-menu.menu-light .navigation .navigation-header { font-size: .86rem !important; }
.content-header h1 { font-size: 1.65rem !important; }
.content-header .breadcrumb { font-size: .94rem !important; }
.card-title, .page-toolbar-title .card-title { font-size: 1.12rem !important; }
.btn { font-size: .98rem !important; line-height: 1.55 !important; }
.btn-sm { font-size: .9rem !important; }
.form-control, .custom-select, select.form-control, textarea.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-results__option { font-size: 1rem !important; line-height: 1.6 !important; }
.form-control { min-height: 44px; }
label, .form-label, .control-label { font-size: .98rem !important; font-weight: 600; }
.table { font-size: .98rem !important; line-height: 1.7 !important; }
.table thead th, .table-shell .table thead th { font-size: .95rem !important; }
.table td, .table th { padding-top: 1rem !important; padding-bottom: 1rem !important; vertical-align: middle !important; }
.entity-cell strong, .admin-cell-text { font-size: .98rem !important; }
.entity-cell small { font-size: .86rem !important; }
.meta-badge, .company-value, .phone-value, .date-value { font-size: .92rem !important; }
.status-pill { font-size: .88rem !important; }
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .pagination .page-link { font-size: .92rem !important; }
.modal-title { font-size: 1.12rem !important; }

.navbar-actions { display: flex; align-items: center; }
.nav-icon-button { border: 0; background: transparent; min-width: 44px; height: 44px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; color: var(--eqs-text) !important; position: relative; }
.nav-icon-button:hover { background: rgba(36,87,214,.08); }
.nav-icon-button i { font-size: 1.35rem; }
.dropdown-notification .badge-up { top: 3px; left: 2px; right: auto; position: absolute; min-width: 18px; height: 18px; line-height: 15px; font-size: .68rem; }
.notification-menu { width: 380px !important; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; border-radius: 14px !important; }
.notification-menu .dropdown-menu-header { padding: 14px 16px; border-bottom: 1px solid var(--eqs-border); min-height: 52px; }
.notification-menu .scrollable-container { max-height: 390px; overflow-y: auto; }
.notification-item { display: flex; gap: 11px; padding: 13px 15px; border-bottom: 1px solid var(--eqs-border); background: var(--eqs-surface); }
.notification-item.is-unread { background: rgba(36,87,214,.055); }
.notification-item-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(36,87,214,.1); color: var(--eqs-primary); }
.notification-item.is-warning .notification-item-icon { background: rgba(197,129,16,.12); color: var(--eqs-warning); }
.notification-item.is-error .notification-item-icon { background: rgba(196,68,68,.12); color: var(--eqs-danger); }
.notification-item.is-success .notification-item-icon { background: rgba(22,138,99,.12); color: var(--eqs-success); }
.notification-item-content { min-width: 0; flex: 1; }
.notification-item-content strong { display: block; font-size: .95rem; color: var(--eqs-text); margin-bottom: 3px; }
.notification-item-content p { margin: 0 0 4px; font-size: .88rem; color: var(--eqs-muted); white-space: normal; line-height: 1.55; }
.notification-item-content small { font-size: .76rem; color: var(--eqs-muted); }
.notification-empty { padding: 28px 16px; text-align: center; color: var(--eqs-muted); }

.eqs-news-ticker { position: fixed; top: 72px; right: 260px; left: 0; z-index: 998; height: 36px; background: var(--eqs-surface); border-bottom: 1px solid var(--eqs-border); display: flex; align-items: center; gap: 10px; padding: 0 22px; color: var(--eqs-text); box-shadow: 0 3px 10px rgba(20,32,60,.03); }
.eqs-news-ticker i { color: var(--eqs-primary); font-size: 1.1rem; }
.eqs-news-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .91rem; }
body.has-news-ticker .app-content.content { padding-top: 108px; }
body.menu-collapsed .eqs-news-ticker { right: 60px; }

.admin-check-row { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--eqs-border); border-radius: 10px; background: var(--eqs-surface); cursor: pointer; }
.admin-check-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.permission-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 14px; }
.profile-grid > div { border: 1px solid var(--eqs-border); border-radius: 12px; padding: 15px; background: var(--eqs-surface); }
.profile-grid small { display: block; color: var(--eqs-muted); margin-bottom: 5px; }
.profile-grid strong { color: var(--eqs-text); font-size: 1rem; }

.recent-usernames { position: absolute; z-index: 20; right: 0; left: 0; top: calc(100% + 5px); background: var(--eqs-surface); border: 1px solid var(--eqs-border); border-radius: 10px; box-shadow: var(--eqs-shadow); overflow: hidden; }
.recent-usernames button { width: 100%; border: 0; background: transparent; color: var(--eqs-text); text-align: right; padding: 10px 13px; font-family: inherit; font-size: .96rem; cursor: pointer; }
.recent-usernames button:hover { background: rgba(36,87,214,.07); }
.input-icon-wrap { position: relative; }

html[data-theme="dark"] {
    --eqs-primary: #7da2ff;
    --eqs-primary-dark: #587ee3;
    --eqs-accent: #45c4f4;
    --eqs-sidebar: #0b1120;
    --eqs-sidebar-soft: #17223a;
    --eqs-bg: #0f1728;
    --eqs-surface: #172033;
    --eqs-border: #2a364e;
    --eqs-text: #eef3ff;
    --eqs-muted: #a7b4ca;
    --eqs-success: #48c99a;
    --eqs-warning: #e4aa43;
    --eqs-danger: #ef7474;
    --eqs-shadow: 0 10px 32px rgba(0,0,0,.22);
    color-scheme: dark;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .content-wrapper,
html[data-theme="dark"] body.vertical-layout.vertical-menu { background: var(--eqs-bg) !important; color: var(--eqs-text); }
html[data-theme="dark"] .header-navbar { background: rgba(23,32,51,.97) !important; border-color: var(--eqs-border) !important; }
html[data-theme="dark"] .header-navbar .nav-menu-main,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .table-shell,
html[data-theme="dark"] .dataTables_wrapper input,
html[data-theme="dark"] .dataTables_wrapper select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-dropdown { background: var(--eqs-surface) !important; color: var(--eqs-text) !important; border-color: var(--eqs-border) !important; }
html[data-theme="dark"] .card-header { border-bottom-color: var(--eqs-border) !important; }
html[data-theme="dark"] .table { color: var(--eqs-text) !important; }
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td { border-color: var(--eqs-border) !important; }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background: rgba(255,255,255,.018) !important; }
html[data-theme="dark"] .table-hover tbody tr:hover { background: rgba(125,162,255,.07) !important; color: var(--eqs-text); }
html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .dropdown-item-text,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] label,
html[data-theme="dark"] .card-title { color: var(--eqs-text) !important; }
html[data-theme="dark"] .dropdown-item:hover { background: rgba(125,162,255,.09) !important; }
html[data-theme="dark"] .text-muted { color: var(--eqs-muted) !important; }
html[data-theme="dark"] .btn-light { background: #202b40 !important; border-color: var(--eqs-border) !important; color: var(--eqs-text) !important; }
html[data-theme="dark"] .page-link { background: var(--eqs-surface) !important; border-color: var(--eqs-border) !important; color: var(--eqs-text) !important; }
html[data-theme="dark"] .page-item.active .page-link { background: var(--eqs-primary-dark) !important; }
html[data-theme="dark"] .kurimi-login-panel,
html[data-theme="dark"] .kurimi-login-shell { background: var(--eqs-surface); color: var(--eqs-text); }

@media (max-width: 991.98px) {
    .permission-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .profile-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .eqs-news-ticker { right: 0; }
}
@media (max-width: 575.98px) {
    html { font-size: 15px !important; }
    .permission-grid, .profile-grid { grid-template-columns: 1fr; }
    .notification-menu { width: calc(100vw - 20px) !important; }
}


html { font-size: 17px !important; }
html, body, button, input, select, textarea, .table, .dropdown-menu, .modal, .dataTables_wrapper { font-family: "Segoe UI", sans-serif !important; }
body { font-size: 17px !important; line-height: 1.68 !important; font-weight: 400; }
.main-menu.menu-light .navigation > li > a { font-size: 1.02rem !important; font-weight: 600 !important; }
.main-menu.menu-light .navigation > li ul li > a { font-size: .98rem !important; font-weight: 500 !important; }
.header-navbar .navbar-page-context strong, .header-navbar .user-meta strong { font-size: 1.02rem !important; font-weight: 600 !important; }
.form-control, .custom-select, select.form-control, textarea.form-control { font-size: 1rem !important; min-height: 46px !important; }
label, .form-label, .control-label { font-size: 1rem !important; font-weight: 600 !important; }
.table { font-size: 1rem !important; }
.table thead th, .table-shell .table thead th { font-size: .97rem !important; font-weight: 650 !important; }
.btn { font-size: 1rem !important; }
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .pagination .page-link { font-size: .96rem !important; }
.notification-item-content strong { font-size: .98rem !important; }
.notification-item-content p { font-size: .92rem !important; }
.notification-item-content small { font-size: .82rem !important; }
.recent-usernames button { font-size: 1rem !important; min-height: 44px; }
@media (max-width: 575.98px) { html { font-size: 16px !important; } body { font-size: 16px !important; } }

/* EQS typography final override */
:root {
    --eqs-ui-font: "Segoe UI", sans-serif;
}

html {
    font-size: 16px !important;
}

html,
body,
h1, h2, h3, h4, h5, h6,
p, a, span, strong, small,
button, input, select, textarea, label,
.table, .card, .modal, .dropdown-menu,
.header-navbar, .main-menu, .content-wrapper,
.dataTables_wrapper, .select2-container,
.toast, .alert, .breadcrumb, .pagination {
    font-family: var(--eqs-ui-font) !important;
}

body.kurimi-admin *,
body.kurimi-login-page * {
    font-family: var(--eqs-ui-font) !important;
}

body {
    font-size: 16px !important;
    line-height: 1.6 !important;
    font-weight: 400;
}

/* Keep icon glyph fonts untouched. */
body.kurimi-admin .la, body.kurimi-admin [class^="la-"], body.kurimi-admin [class*=" la-"],
body.kurimi-login-page .la, body.kurimi-login-page [class^="la-"], body.kurimi-login-page [class*=" la-"] { font-family: LineAwesome !important; }
body.kurimi-admin .fa, body.kurimi-admin [class^="fa-"], body.kurimi-admin [class*=" fa-"],
body.kurimi-login-page .fa, body.kurimi-login-page [class^="fa-"], body.kurimi-login-page [class*=" fa-"] { font-family: FontAwesome !important; }
body.kurimi-admin [class^="ft-"], body.kurimi-admin [class*=" ft-"],
body.kurimi-login-page [class^="ft-"], body.kurimi-login-page [class*=" ft-"] { font-family: feather !important; }
body.kurimi-admin [class^="icon-"], body.kurimi-admin [class*=" icon-"],
body.kurimi-login-page [class^="icon-"], body.kurimi-login-page [class*=" icon-"] { font-family: "Simple-Line-Icons" !important; }

/* Header */
.header-navbar .brand-text { font-size: 1.02rem !important; font-weight: 600 !important; }
.header-navbar .brand-subtitle,
.header-navbar .navbar-page-context small,
.header-navbar .user-meta small { font-size: .78rem !important; }
.header-navbar .navbar-page-context strong,
.header-navbar .user-meta strong { font-size: .95rem !important; font-weight: 600 !important; }
.header-navbar .dropdown-item { font-size: .90rem !important; }

/* Sidebar: intentionally more compact for support teams. */
.main-menu.menu-light .navigation .navigation-header {
    font-size: .72rem !important;
    line-height: 1.45 !important;
    font-weight: 600 !important;
    letter-spacing: .25px !important;
}
.main-menu.menu-light .navigation > li > a {
    font-size: .90rem !important;
    line-height: 1.45 !important;
    font-weight: 500 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.main-menu.menu-light .navigation > li ul li > a {
    font-size: .84rem !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
.main-menu.menu-light .navigation > li > a i { font-size: 1.05rem !important; }
.main-menu .menu-badge { font-size: .64rem !important; }

/* Content */
.content-header h1 { font-size: 1.50rem !important; }
.content-header .breadcrumb { font-size: .86rem !important; }
.card-title,
.page-toolbar-title .card-title { font-size: 1.05rem !important; font-weight: 600 !important; }

.btn { font-size: .91rem !important; line-height: 1.45 !important; }
.btn-sm { font-size: .84rem !important; }
label, .form-label, .control-label { font-size: .92rem !important; font-weight: 600 !important; }
.form-control,
.custom-select,
select.form-control,
textarea.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-results__option {
    font-size: .92rem !important;
    line-height: 1.5 !important;
}
.form-control { min-height: 42px !important; }

.table { font-size: .91rem !important; line-height: 1.55 !important; }
.table thead th,
.table-shell .table thead th { font-size: .88rem !important; font-weight: 600 !important; }
.table td, .table th {
    padding-top: .76rem !important;
    padding-bottom: .76rem !important;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .pagination .page-link,
.table-export-actions .dt-buttons .btn { font-size: .86rem !important; }

.notification-item-content strong { font-size: .91rem !important; }
.notification-item-content p { font-size: .85rem !important; }
.notification-item-content small { font-size: .76rem !important; }
.recent-usernames button { font-size: .91rem !important; min-height: 40px; }
.eqs-news-text { font-size: .86rem !important; }

@media (max-width: 575.98px) {
    html, body { font-size: 15px !important; }
    .main-menu.menu-light .navigation > li > a { font-size: .92rem !important; }
    .main-menu.menu-light .navigation > li ul li > a { font-size: .86rem !important; }
}

/* =========================================================
   EQS layout stability + dark theme final overrides
   Keeps the Modern Admin menu behavior predictable in RTL.
   ========================================================= */

/* Header groups: use flex instead of legacy floats to prevent overlap. */
@media (min-width: 768px) {
    .header-navbar .navbar-wrapper {
        min-height: 72px;
    }

    .header-navbar .navbar-container .navbar-collapse {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-width: 0;
    }

    .header-navbar .navbar-container .navbar-collapse > .navbar-nav {
        float: none !important;
        display: flex !important;
        align-items: center !important;
        height: 72px;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .header-navbar .navbar-container .navbar-collapse > .navbar-nav.mr-auto {
        margin-right: 0 !important;
        margin-left: auto !important;
        min-width: 0;
    }

    .header-navbar .navbar-container .navbar-collapse > .navbar-actions {
        margin-right: auto !important;
        margin-left: 0 !important;
        flex: 0 0 auto;
    }

    .header-navbar .nav-menu-main {
        flex: 0 0 42px;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .header-navbar .navbar-page-context {
        min-width: 0;
        max-width: min(320px, 30vw);
        padding-top: 0 !important;
        margin: 0 12px 0 0 !important;
        line-height: 1.25;
        overflow: hidden;
    }

    .header-navbar .navbar-page-context small,
    .header-navbar .navbar-page-context strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Expanded menu: 260px brand/sidebar. */
    body.vertical-layout.vertical-menu.menu-expanded .header-navbar .navbar-header,
    body.vertical-layout.vertical-menu.menu-expanded .main-menu.menu-light {
        width: 260px !important;
    }

    /* Collapsed menu: logo/sidebar become 60px without pushing header content. */
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header,
    body.vertical-layout.vertical-menu.menu-collapsed .main-menu.menu-light {
        width: 60px !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header .navbar-brand {
        width: 60px !important;
        min-width: 60px !important;
        padding: 10px 9px !important;
        justify-content: center !important;
        gap: 0 !important;
        overflow: hidden;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header .brand-logo {
        width: 40px !important;
        height: 40px !important;
        flex: 0 0 40px;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header .navbar-brand > span,
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .brand-text,
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .brand-subtitle {
        display: none !important;
    }

    /* Explicit RTL offsets so header/content/footer use the same menu width. */
    body.vertical-layout.vertical-menu.menu-expanded .header-navbar .navbar-container {
        margin-right: 260px !important;
        margin-left: 0 !important;
        width: calc(100% - 260px) !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-container {
        margin-right: 60px !important;
        margin-left: 0 !important;
        width: calc(100% - 60px) !important;
    }

    body.vertical-layout.vertical-menu.menu-expanded .app-content.content,
    body.vertical-layout.vertical-menu.menu-expanded .footer {
        margin-right: 260px !important;
        margin-left: 0 !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .app-content.content,
    body.vertical-layout.vertical-menu.menu-collapsed .footer {
        margin-right: 60px !important;
        margin-left: 0 !important;
    }
}

/* On narrower desktop widths the page caption is optional; hiding it is safer
   than allowing it to collide with the menu toggle or action buttons. */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .header-navbar .navbar-page-context {
        display: none !important;
    }
}

/* Mobile header/menu should never reserve desktop sidebar space. */
@media (max-width: 767.98px) {
    .header-navbar .navbar-container,
    body.vertical-layout.vertical-menu.menu-expanded .header-navbar .navbar-container,
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-container {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.vertical-layout.vertical-menu.menu-expanded .app-content.content,
    body.vertical-layout.vertical-menu.menu-collapsed .app-content.content,
    body.vertical-layout.vertical-menu.menu-expanded .footer,
    body.vertical-layout.vertical-menu.menu-collapsed .footer {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Dark mode: dashboard quick access cards must follow the active theme. */
html[data-theme="dark"] .quick-actions .quick-action {
    background: var(--eqs-surface) !important;
    color: var(--eqs-text) !important;
    border-color: var(--eqs-border) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .quick-actions .quick-action:hover {
    background: #1d2940 !important;
    color: var(--eqs-primary) !important;
    border-color: #3d5278 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] .quick-actions .quick-action strong {
    color: var(--eqs-text) !important;
}

html[data-theme="dark"] .quick-actions .quick-action i,
html[data-theme="dark"] .metric-card .metric-icon {
    background: rgba(125, 162, 255, .12) !important;
    color: var(--eqs-primary) !important;
}

/* Footer follows the theme instead of remaining white in dark mode. */
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer.footer-light {
    background: var(--eqs-surface) !important;
    color: var(--eqs-muted) !important;
    border-top-color: var(--eqs-border) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .footer a,
html[data-theme="dark"] .footer span,
html[data-theme="dark"] .footer p {
    color: var(--eqs-muted) !important;
}

/* Header controls also follow dark mode consistently. */
html[data-theme="dark"] .header-navbar .nav-menu-main,
html[data-theme="dark"] .header-navbar .nav-icon-button {
    background: rgba(255, 255, 255, .035) !important;
    border-color: var(--eqs-border) !important;
    color: var(--eqs-text) !important;
}

html[data-theme="dark"] .header-navbar .nav-menu-main:hover,
html[data-theme="dark"] .header-navbar .nav-icon-button:hover {
    background: rgba(125, 162, 255, .10) !important;
}


/* =========================================================
   EQS header / sidebar alignment v2
   Authoritative rules loaded after Modern Admin legacy layout.
   ========================================================= */
@media (min-width: 768px) {
    .header-navbar,
    .header-navbar .navbar-wrapper {
        height: 72px !important;
        min-height: 72px !important;
    }

    .header-navbar .navbar-wrapper {
        width: 100% !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        direction: rtl !important;
        overflow: visible !important;
    }

    .header-navbar .navbar-header {
        position: relative !important;
        inset: auto !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 72px !important;
        min-height: 72px !important;
        flex: 0 0 260px !important;
        width: 260px !important;
        max-width: 260px !important;
        overflow: hidden !important;
    }

    .header-navbar .navbar-header > .navbar-nav {
        width: 100% !important;
        height: 72px !important;
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-navbar .navbar-container,
    .header-navbar .navbar-container.content,
    body.vertical-layout.vertical-menu.menu-expanded .header-navbar .navbar-container,
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-container {
        position: relative !important;
        inset: auto !important;
        float: none !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        height: 72px !important;
        margin: 0 !important;
        padding: 0 22px !important;
    }

    .header-navbar .navbar-container .navbar-collapse {
        width: 100% !important;
        min-width: 0 !important;
        height: 72px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-navbar .navbar-container .navbar-collapse > .navbar-nav {
        min-width: 0 !important;
        height: 72px !important;
        float: none !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-navbar .navbar-container .navbar-collapse > .navbar-nav.mr-auto {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .header-navbar .navbar-container .navbar-collapse > .navbar-actions {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    .header-navbar .navbar-page-context {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 360px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .header-navbar .navbar-page-context small,
    .header-navbar .navbar-page-context strong {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .header-navbar .nav-menu-main {
        position: relative !important;
        inset: auto !important;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header {
        flex-basis: 60px !important;
        width: 60px !important;
        max-width: 60px !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header .navbar-brand {
        width: 60px !important;
        max-width: 60px !important;
        height: 72px !important;
        padding: 10px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header .navbar-brand > span,
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .brand-text,
    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .brand-subtitle {
        display: none !important;
    }

    body.vertical-layout.vertical-menu.menu-collapsed .header-navbar .navbar-header .brand-logo {
        width: 40px !important;
        height: 40px !important;
        margin: 0 !important;
        flex: 0 0 40px !important;
    }
}

/* Use theme variables at the source. No light-only hard-coded surfaces. */
.quick-actions .quick-action,
html[data-theme="dark"] .quick-actions .quick-action {
    background-color: var(--eqs-surface) !important;
    color: var(--eqs-text) !important;
    border-color: var(--eqs-border) !important;
}

.quick-actions .quick-action i {
    background-color: rgba(36, 87, 214, .08) !important;
}

html[data-theme="dark"] .quick-actions .quick-action i {
    background-color: rgba(125, 162, 255, .12) !important;
}

.footer,
.footer.footer-light,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer.footer-light {
    background-color: var(--eqs-surface) !important;
    color: var(--eqs-muted) !important;
    border-top: 1px solid var(--eqs-border) !important;
    box-shadow: none !important;
}

.footer a,
.footer span,
.footer p {
    color: inherit !important;
}
