:root {
    --sf-primary: #0B8FEF;
    --sf-primary-2: #16C8E8;
    --sf-navy: #07142F;
    --sf-sidebar: #24364D;
    --sf-green: #04B980;
    --sf-gold: #F5C542;
    --sf-bg: #F6F9FC;
    --sf-card: #FFFFFF;
    --sf-text: #07142F;
    --sf-muted: #6B7280;
    --sf-border: #E5EAF1;
    --sf-danger: #EF4444;
    --sf-sidebar-width: 260px;
}
.sf-logo-image-wrap {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}

.sf-logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* =========================
   Base
========================= */

* {
    box-sizing: border-box;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

body {
    margin: 0;
    background: var(--sf-bg);
    color: var(--sf-text);
    font-family: Tahoma, Arial, sans-serif;
}

.sf-app {
    display: flex;
    min-height: 100vh;
}

/* =========================
   Sidebar
========================= */

.sf-sidebar {
    width: var(--sf-sidebar-width);
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--sf-sidebar) 0%, #1D2C40 100%);
    color: #fff;
    padding: 18px;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    overflow: hidden;
}

html[dir="rtl"] .sf-sidebar {
    right: 0;
    left: auto;
}

html[dir="ltr"] .sf-sidebar {
    left: 0;
    right: auto;
}

/* Brand */

.sf-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex: 0 0 auto;
}

.sf-logo-mark {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sf-primary), var(--sf-green));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.sf-sidebar-brand strong {
    display: block;
    line-height: 1.2;
}

.sf-sidebar-brand small {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
}

/* Sidebar Nav */

.sf-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;

    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;

    padding-bottom: 24px;
}

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

html[dir="ltr"] .sf-sidebar-nav {
    padding-right: 4px;
    padding-left: 0;
}

.sf-sidebar-nav a {
    color: #dbeafe;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 14px;
    transition: 0.2s ease;
    display: flex;
    gap: 10px;
    align-items: center;
    line-height: 1.4;
    flex: 0 0 auto;
}

html[dir="rtl"] .sf-sidebar-nav a {
    flex-direction: row;
    text-align: right;
}

html[dir="ltr"] .sf-sidebar-nav a {
    flex-direction: row;
    text-align: left;
}

.sf-sidebar-nav a i {
    font-size: 17px;
    min-width: 20px;
    text-align: center;
}

.sf-sidebar-nav a span {
    flex: 1;
    min-width: 0;
}

.sf-sidebar-nav a:hover,
.sf-sidebar-nav a.active {
    background: linear-gradient(90deg, var(--sf-primary), var(--sf-primary-2));
    color: #fff;
}

/* Sidebar Sections */

.sf-sidebar-section {
    margin: 10px 0 4px;
    padding: 0 12px;
    flex: 0 0 auto;
}

.sf-sidebar-section-title {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Sidebar Scrollbar */

.sf-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sf-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sf-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.sf-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.sf-sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* =========================
   Main Layout
========================= */

.sf-main {
    width: calc(100% - var(--sf-sidebar-width));
    min-height: 100vh;
}

html[dir="rtl"] .sf-main {
    margin-right: var(--sf-sidebar-width);
    margin-left: 0;
}

html[dir="ltr"] .sf-main {
    margin-left: var(--sf-sidebar-width);
    margin-right: 0;
}

.sf-topbar {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid var(--sf-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sf-content {
    padding: 24px;
}

.sf-user-name {
    color: var(--sf-muted);
    font-size: 14px;
}

/* =========================
   Buttons
========================= */

.sf-btn-primary {
    background: linear-gradient(90deg, var(--sf-primary), var(--sf-primary-2));
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
}

.sf-btn-primary:hover {
    color: #fff;
    opacity: 0.95;
}

/* =========================
   Direction Helpers
========================= */

html[dir="ltr"] .dropdown-menu {
    text-align: left;
}

html[dir="rtl"] .dropdown-menu {
    text-align: right;
}

html[dir="ltr"] .form-check {
    padding-left: 1.5em;
    padding-right: 0;
}

html[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

html[dir="ltr"] .form-check .form-check-input {
    float: left;
    margin-left: -1.5em;
    margin-right: 0;
}

html[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

/* =========================
   Responsive
========================= */

@media (max-width: 991px) {
    .sf-sidebar {
        transition: transform 0.25s ease;
    }

    html[dir="rtl"] .sf-sidebar {
        transform: translateX(100%);
    }

    html[dir="ltr"] .sf-sidebar {
        transform: translateX(-100%);
    }

    .sf-sidebar.is-open {
        transform: translateX(0) !important;
    }

    .sf-main {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sf-topbar {
        padding: 0 16px;
    }

    .sf-content {
        padding: 16px;
    }
}
/* =========================
   Company Print Header
========================= */

.sf-print-company-header {
    background: #ffffff;
    border: 1px solid var(--sf-border);
    border-top: 4px solid var(--sf-report-accent);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.sf-print-company-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sf-print-company-logo {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border: 1px solid var(--sf-border);
    border-radius: 14px;
    background: #fff;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-print-company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf-print-company-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: var(--sf-text);
}

.sf-print-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--sf-muted);
    font-size: 13px;
}

.sf-print-company-address {
    margin-top: 6px;
    color: var(--sf-muted);
    font-size: 13px;
}

.sf-print-date {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--sf-border);
    color: var(--sf-muted);
    font-size: 12px;
}

@media print {
    .sf-print-company-header {
        border: 1px solid #dddddd !important;
        border-top: 3px solid var(--sf-report-accent) !important;
        border-radius: 6px !important;
        padding: 8px 10px !important;
        margin-bottom: 8px !important;
        page-break-inside: avoid !important;
    }

    .sf-print-company-logo {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        border-radius: 6px !important;
    }

    .sf-print-company-info h3 {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }

    .sf-print-company-meta,
    .sf-print-company-address,
    .sf-print-date {
        font-size: 10px !important;
    }
}
