/**
 * vesta-main.css - v3.0
 * SPA Framework: fonts, layout, sidebar, header, modal, datepicker, utilities
 */

/* ============ Fonts ============ */
@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansXFaNum-Regular.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansXFaNum-Bold.woff2') format('woff2');
    font-weight: bold;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansXFaNum-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

html,
body,
div,
p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
table,
td,
th,
input,
select,
textarea,
button,
a,
:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class*="fa-"]) {
    font-family: 'IRANSansX' !important;
}

.fa,
.fas,
.far,
.fab,
.fal,
.fad,
.fa-solid,
.fa-regular,
.fa-brands,
.fa-light,
.fa-thin,
.fa-duotone,
[class^="fa-"],
[class*=" fa-"] {
    font-family: "Font Awesome 7 Pro", "Font Awesome 6 Pro", "Font Awesome 6 Free", "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
}

/* ============ Variables ============ */
:root {
    --font-family-base: 'IRANSansX';
    --ac-primary: #226699;
    --ac-primary-dark: #1a4d74;
    --ac-primary-light: #55acee;
    --ac-primary-bg: #f1f7ff;
    --ac-gray-50: #F8FAFC;
    --ac-gray-100: #F1F5F9;
    --ac-gray-200: #E2E8F0;
    --ac-gray-300: #CBD5E1;
    --ac-gray-400: #94A3B8;
    --ac-gray-500: #64748B;
    --ac-gray-600: #475569;
    --ac-gray-700: #334155;
    --ac-gray-800: #1E293B;
    --ac-success: #10B981;
    --ac-warning: #F59E0B;
    --ac-danger: #F43F5E;
    --ac-info: #0EA5E9;
    --ac-sidebar-width: 256px;
    --ac-header-height: 58px;
    --ac-radius: 8px;
    --ac-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.accounting-wrapper a,
.accounting-wrapper a:hover,
.accounting-wrapper a:focus {
    text-decoration: none !important;
}

header.site-header,
footer.site-footer,
.elementor-location-header,
.elementor-location-footer,
.entry-title,
.page-title,
.post-title {
    display: none !important;
}

html,
body,
.site,
.content-area,
.site-main,
.entry-content,
.post-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
    transform: none !important;
}

/* ============ SPA Layout ============ */
.accounting-wrapper {
    display: flex;
    position: fixed;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: var(--ac-gray-100);
    font-family: var(--font-family-base) !important;
    direction: rtl;
    z-index: 999999 !important;
    overflow: auto;
    margin: 0 !important;
    padding: 0 !important;
}

body.admin-bar .accounting-wrapper {
    top: 32px !important;
    min-height: calc(100% - 32px) !important;
}

@media (max-width: 782px) {
    body.admin-bar .accounting-wrapper {
        top: 46px !important;
        min-height: calc(100% - 46px) !important;
    }
}

/* ============ Main Content ============ */
.accounting-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.content-body {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    flex: 1;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.content-body.loading-fade {
    opacity: 0.5;
    pointer-events: none;
}

/* ═══════════════════════════════════
   SIDEBAR - Professional Light Theme
   ═══════════════════════════════════ */
.accounting-sidebar {
    width: var(--ac-sidebar-width);
    background: #fff;
    border-left: 1px solid #e9edf5;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Logo */
.vs-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f1f3f8;
    flex-shrink: 0;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.vs-logo-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2c5aa0, #4a7fd4);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(44, 90, 160, 0.25);
}

.vs-logo-badge img {
    width: 19px;
    height: auto;
    filter: brightness(0) invert(1);
}

.vs-logo-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.vs-logo-sub {
    font-size: 0.58rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 1px;
}

.vs-mobile-close {
    display: none;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: auto;
    transition: all 0.2s;
}

.vs-mobile-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Nav Scroll */
.vs-nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 10px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.vs-nav-scroll::-webkit-scrollbar {
    width: 3px;
}

.vs-nav-scroll::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

/* Section Labels */
.vs-section-label {
    padding: 18px 10px 6px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Menu Items */
.vs-menu-item {
    margin-bottom: 1px;
}

.vs-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.18s ease;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.vs-menu-link:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #f1f5f9;
}

.vs-menu-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.78rem;
    flex-shrink: 0;
    transition: all 0.18s;
}

/* Icon Colors */
.ic-dash {
    background: #eff6ff;
    color: #3b82f6;
}

.ic-comm {
    background: #fff7ed;
    color: #f97316;
}

.ic-treas {
    background: #fdf2f8;
    color: #ec4899;
}

.ic-inv {
    background: #f0fdf4;
    color: #22c55e;
}

.ic-pay {
    background: #faf5ff;
    color: #a855f7;
}

.ic-assets {
    background: #eef2ff;
    color: #6366f1;
}

.ic-prod {
    background: #fdf4ff;
    color: #d946ef;
}

.ic-acc {
    background: #eff6ff;
    color: #2563eb;
}

.ic-rep {
    background: #f0fdfa;
    color: #14b8a6;
}

.ic-def {
    background: #fffbeb;
    color: #f59e0b;
}

.ic-emp {
    background: #fef2f2;
    color: #ef4444;
}

.ic-usr {
    background: #f0f9ff;
    color: #0ea5e9;
}

.vs-menu-arrow {
    margin-right: auto;
    font-size: 0.55rem;
    color: #cbd5e1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
}

/* Active */
.vs-menu-item.active>.vs-menu-link {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f7ff 100%);
    color: #2c5aa0;
    border-color: #dbeafe;
    font-weight: 700;
}

.vs-menu-item.active>.vs-menu-link .vs-menu-icon {
    background: #2c5aa0;
    color: #fff;
    box-shadow: 0 2px 6px rgba(44, 90, 160, 0.25);
}

.vs-menu-item.active>.vs-menu-link .vs-menu-arrow {
    color: #2c5aa0;
}

/* Submenu */
.vs-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vs-menu-item.open>.vs-submenu {
    max-height: 500px;
}

.vs-menu-item.open>.vs-menu-link .vs-menu-arrow {
    transform: rotate(-90deg);
}

.vs-menu-item.open>.vs-menu-link {
    background: #f8fafc;
    color: #334155;
}

.vs-sub-item {
    margin: 1px 0;
}

.vs-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 12px;
    padding-right: 52px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.15s;
    position: relative;
}

.vs-sub-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: all 0.2s;
}

.vs-sub-link:hover {
    background: #f8fafc;
    color: #334155;
}

.vs-sub-link:hover::before {
    background: #94a3b8;
}

.vs-sub-item.active>.vs-sub-link {
    background: #eff6ff;
    color: #2c5aa0;
    font-weight: 700;
}

.vs-sub-item.active>.vs-sub-link::before {
    background: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.15);
}

/* Sidebar Footer */
.vs-sidebar-footer {
    border-top: 1px solid #f1f3f8;
    padding: 12px 14px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}

.vs-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.vs-user-card:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.vs-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2c5aa0, #4a7fd4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(44, 90, 160, 0.2);
}

.vs-user-info {
    flex: 1;
    min-width: 0;
}

.vs-user-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-user-role {
    font-size: 0.6rem;
    color: #94a3b8;
    margin-top: 1px;
    font-weight: 500;
}

.vs-logout-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.vs-logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ═══════════════════════════════════
   HEADER - Professional Light Theme
   ═══════════════════════════════════ */
.main-header {
    min-height: calc(var(--ac-header-height) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: #fff;
    border-bottom: 1px solid #e9edf5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: calc(22px + env(safe-area-inset-left, 0px));
    padding-right: calc(22px + env(safe-area-inset-right, 0px));
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sidebar Toggle */
#sidebar-toggle {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.95rem;
    transition: all 0.2s;
}

#sidebar-toggle:hover {
    background: #f1f5f9;
    color: #2c5aa0;
    border-color: #cbd5e1;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
}

.breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.breadcrumb a:hover {
    color: #2c5aa0;
}

.breadcrumb .crumb-sep {
    color: #d1d5db;
    font-size: 0.6rem;
}

.breadcrumb .crumb-current {
    color: #1e293b;
    font-weight: 700;
}

/* Fiscal Year */
.fiscal-year-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
}

.fiscal-year-selector:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.fiscal-year-selector i {
    color: #94a3b8;
    font-size: 0.78rem;
}

#header-fiscal-year,
.header-select {
    border: none !important;
    background: transparent !important;
    font-family: 'IRANSansX' !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
    padding: 0 !important;
}

/* User Dropdown */
.user-profile-dropdown {
    position: relative;
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
}

.user-profile:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.user-avatar-hd {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2c5aa0, #4a7fd4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.dropdown-icon {
    font-size: 0.55rem;
    color: #94a3b8;
    transition: transform 0.2s;
}

.user-profile-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 170px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 700;
    padding: 5px;
}

.user-profile-dropdown.open .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: #fef2f2;
}

/* ═══════════════════════════════════
   MODAL
   ═══════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex !important;
    visibility: visible !important;
}

#quick-add-contact-modal {
    z-index: 2000000 !important;
}

#vesta-quick-product-modal .modal-overlay {
    z-index: 1000001 !important;
}

.modal-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    width: min(500px, 92vw);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000001;
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--ac-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ac-gray-50);
}

.modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ac-gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--ac-gray-400);
    line-height: 1;
    padding: 0;
}

/* Specific styling for Employer Items modal to match page cards */
.eitm-modal-overlay {
    padding: 20px;
}

.eitm-modal-overlay.active,
.eitm-modal-overlay.show {
    display: flex;
}

.eitm-modal-box {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    width: min(520px, 96vw);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ac-gray-200);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.06);
    z-index: 1000001;
}

.modal-close:hover {
    color: var(--ac-gray-700);
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--ac-gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--ac-gray-50);
}

/* Form Row & Roles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.roles-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.role-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.role-label:hover {
    background: #e2e8f0;
}

/* ═══════════════════════════════════
   JALALI DATE PICKER
   ═══════════════════════════════════ */
.jalali-picker-container {
    position: absolute;
    z-index: 2000000;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    direction: rtl;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ac-gray-200);
    animation: pickerSlide 0.2s ease-out;
}

@keyframes pickerSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.jalali-picker-controls {
    background: var(--ac-primary);
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.jalali-nav-btn {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.jalali-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.jalali-current-date {
    font-weight: 700;
    font-size: 0.9rem;
}

.jalali-picker-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 8px;
    background: #fff;
}

.jalali-weekday {
    text-align: center;
    font-size: 0.7rem;
    color: var(--ac-gray-500);
    padding: 3px 1px;
    font-weight: 600;
}

.jalali-day-btn {
    border: none;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--ac-gray-700);
    transition: all 0.2s;
    min-height: 26px;
    padding: 0;
    font-weight: 600;
}

.jalali-day-btn:hover {
    background: var(--ac-gray-100);
}

.jalali-day-btn.selected {
    background: var(--ac-primary) !important;
    color: #fff !important;
}

.jalali-day-btn.today {
    color: var(--ac-primary);
    background: var(--ac-primary-bg);
}

.jalali-empty-day {
    aspect-ratio: 1;
    min-height: 26px;
}

.jalali-picker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--ac-gray-100);
    background: var(--ac-gray-50);
}

.jalali-btn-cancel,
.jalali-btn-confirm {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.jalali-btn-cancel {
    background: #fff;
    color: var(--ac-primary);
    border: 1px solid var(--ac-primary);
}

.jalali-btn-cancel:hover {
    background: var(--ac-primary-bg);
}

.jalali-btn-confirm {
    background: var(--ac-primary);
    color: #fff;
}

.jalali-btn-confirm:hover {
    background: var(--ac-primary-dark);
}

.jalali-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000004;
    background: transparent;
}

/* ═══════════════════════════════════
   PREMIUM FORM COMPONENTS
   ═══════════════════════════════════ */
.vesta-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--ac-gray-200);
    transition: all 0.2s;
    height: 46px;
    overflow: visible;
}

.vesta-input-group:focus-within {
    border-color: var(--ac-primary);
    box-shadow: 0 0 0 3px var(--ac-primary-bg);
}

.vesta-input-group .form-control-premium {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    height: 44px;
    flex: 1;
}

.select-opener-btn {
    width: 44px;
    height: 100%;
    background: var(--ac-gray-50);
    border: none;
    border-right: 1px solid var(--ac-gray-200);
    color: var(--ac-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 0 0 12px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.select-opener-btn:hover {
    background: var(--ac-gray-100);
    color: var(--ac-primary-dark);
}

.form-control-premium {
    width: 100%;
    height: 46px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--ac-gray-200);
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ac-gray-800);
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control-premium:focus {
    outline: none;
    border-color: var(--ac-primary);
    box-shadow: 0 0 0 3px var(--ac-primary-bg);
}

.form-control-premium::placeholder {
    color: var(--ac-gray-400);
    font-weight: 500;
}

.custom-select-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--ac-gray-200);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    display: none;
}

.result-item {
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ac-gray-700);
    transition: all 0.15s;
}

.result-item:hover,
.result-item.highlighted {
    background: var(--ac-primary-bg);
    color: var(--ac-primary);
}

/* ═══════════════════════════════════
   UTILITIES
   ═══════════════════════════════════ */
.shadow-premium {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
}

.animate-fade-in {
    animation: vestaFadeIn 0.4s ease;
}

@keyframes vestaFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 24px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.p-0 {
    padding: 0 !important;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: #dc2626;
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 992px) {
    #sidebar-toggle {
        display: flex;
    }

    .accounting-sidebar {
        position: fixed;
        right: 0;
        top: 0;
        width: var(--ac-sidebar-width);
        height: 100%;
        z-index: 1000;
        transform: translateX(100%);
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
        background: #fff;
    }

    body.admin-bar .accounting-sidebar {
        top: 32px;
        height: calc(100% - 32px);
    }

    .accounting-sidebar.mobile-open {
        transform: translateX(0);
    }

    .vs-mobile-close {
        display: flex;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .accounting-main-content {
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* Modal fix for mobile */
    .modal-overlay {
        padding: 10px;
    }

    .modal-container {
        width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer button {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 0 12px;
        height: 52px;
    }

    .breadcrumb a,
    .breadcrumb .crumb-sep {
        display: none;
    }

    .breadcrumb .crumb-current {
        font-size: 0.88rem;
    }

    .user-name {
        display: none;
    }

    .fiscal-year-selector {
        padding: 5px 10px;
    }

    #header-fiscal-year {
        font-size: 0.75rem !important;
    }

    .content-body {
        padding: 8px;
    }
}

/* ═══════════════════════════════════
   PRINT
   ═══════════════════════════════════ */
@media print {

    .accounting-sidebar,
    .sidebar-overlay,
    .main-header {
        display: none !important;
    }

    .accounting-main-content {
        margin: 0 !important;
        width: 100% !important;
    }

    .content-body {
        padding: 0 !important;
    }

    .accounting-wrapper {
        position: static !important;
    }
}

/* ═══ SweetAlert2 Fix ═══ */
body>.swal2-container {
    z-index: 99999999 !important;
}

.swal2-container {
    z-index: 99999999 !important;
}

.accounting-wrapper~.swal2-container,
body>.swal2-container {
    z-index: 99999999 !important;
}

/* Force SweetAlert to render on body, not inside fixed wrapper */
.accounting-wrapper .swal2-container {
    position: fixed !important;
    z-index: 99999999 !important;
}

/* ═══════════════════════════════════
   SweetAlert2 - Fix z-index conflict
   with position:fixed wrapper
   ═══════════════════════════════════ */
.swal2-container {
    z-index: 99999999 !important;
}

.swal2-backdrop-show {
    z-index: 99999998 !important;
}

body.swal2-shown .accounting-wrapper {
    z-index: auto !important;
}

body.swal2-shown .accounting-sidebar {
    z-index: 1 !important;
}

body.swal2-shown .sidebar-overlay {
    z-index: 0 !important;
}

/* Restore sidebar z-index when mobile menu is open (no swal active) */
.accounting-sidebar.mobile-open {
    z-index: 9999999 !important;
}

.sidebar-overlay.visible {
    z-index: 9999998 !important;
}

/* ============ Select2 Fixes ============ */
.select2-container {
    z-index: 99999999 !important;
}

.select2-container--default .select2-selection--single {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-dropdown {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999999 !important;
}