/* ==========================================================================
   [APP] MODERN BRANCH TRACKER — LIGHT THEME
   [DESC] Optimized, Cleaned, and Engineered CSS for maximum maintainability.
   [ARCH] Built with standard Design Tokens (CSS Variables) and Flexbox/Grid.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONTS & RESET (Global Box Model & Typography)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'YekanBakh';
    src: url('./fonts/YekanBakh-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    /* FIX: Removed invalid 'font-family: inherit;' from here */
}

*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; /* Ensures padding/border don't affect element width */
}

html {
    scroll-behavior: smooth; /* Enhances UX for anchors */
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS (CSS Variables)
   [DESC] Centralized configuration for Colors, Spacing, and Z-Indexes.
   -------------------------------------------------------------------------- */
:root {
    /* Base Backgrounds */
    --bg:           #f8fafc; /* Main application background */
    --bg-2:         #ffffff; /* Surface/Card background */
    --bg-h:         #f1f5f9; /* Hover state background */
    
    /* Borders */
    --brd:          #e2e8f0; /* Default border color */
    --brd-dark:     #cbd5e1; /* Active/Hover border color */
    
    /* Typography Colors */
    --txt:          #1e293b; /* Primary text (Headings) */
    --txt-2:        #475569; /* Secondary text (Body) */
    --txt-3:        #94a3b8; /* Tertiary text (Muted/Placeholders) */
    
    /* Semantic Colors (Brand & Status) */
    --accent:       #3b82f6; /* Primary brand color (Blue) */
    --accent-h:     #2563eb; /* Primary hover */
    --accent-light: #dbeafe; /* Primary subtle background */
    
    --ok:           #10b981; /* Success state (Green) */
    --ok-light:     #d1fae5;
    
    --warn:         #f59e0b; /* Warning state (Orange) */
    --warn-light:   #fef3c7;
    
    --err:          #ef4444; /* Danger/Error state (Red) */
    --err-light:    #fee2e2;
    
    /* Dimensions & Geometry */
    --side-w:       220px;   /* Sidebar width */
    --rad:          12px;    /* Large border radius (Cards) */
    --rad-sm:       8px;     /* Small border radius (Buttons/Inputs) */
    
    /* Elevations & Shadows */
    --shadow:       0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 4px 12px rgba(0,0,0,.1);

    /* Z-Index Architecture (Centralized to prevent layering issues) */
    --z-topbar:     50;
    --z-sidebar:    100;
    --z-map-lock:   999;
    --z-modal:      1000;
    --z-toast:      9999;
}

/* --------------------------------------------------------------------------
   3. GLOBAL STYLES (Body Initialization)
   -------------------------------------------------------------------------- */
body {
    font-family: 'YekanBakh', sans-serif;
    background: var(--bg);
    color: var(--txt);
    direction: rtl; /* Right-to-Left for Persian/Arabic */
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   4. LAYOUT: SIDEBAR NAVIGATION
   [DESC] Fixed position on the right side.
   -------------------------------------------------------------------------- */
.sidebar {
    position: fixed;
    inset: 0 0 0 auto; /* Top: 0, Right: 0, Bottom: 0, Left: Auto */
    width: var(--side-w);
    background: var(--bg-2);
    border-left: 1px solid var(--brd);
    box-shadow: -2px 0 8px rgba(0,0,0,.04);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--brd);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 15px; font-weight: 700; color: var(--txt); }

.sidebar-nav {
    flex: 1; /* Takes remaining vertical space */
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--rad-sm);
    color: var(--txt-2);
    text-decoration: none;
    font-size: 13.5px;
    transition: all .15s ease-in-out;
}

.nav-item:hover { background: var(--bg-h); color: var(--txt); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--brd);
    font-size: 12px;
    color: var(--txt-3);
}

/* --------------------------------------------------------------------------
   5. LAYOUT: MAIN CONTENT & TOPBAR
   [DESC] Fluid area alongside the sidebar. Topbar is sticky.
   -------------------------------------------------------------------------- */
.main-content {
    margin-right: var(--side-w); /* Accommodates sidebar width */
    padding: 0 24px 24px;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--brd);
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: var(--bg); /* Matches body to avoid visual glitches */
    z-index: var(--z-topbar);
}

.top-bar h1 { font-size: 20px; font-weight: 700; color: var(--txt); }
.top-bar-actions { display: flex; align-items: center; gap: 12px; }

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-2);
    border: 1px solid var(--brd);
    border-radius: var(--rad-sm);
    padding: 7px 12px;
    box-shadow: var(--shadow);
}

.search-box input {
    background: none;
    border: none;
    color: var(--txt);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    width: 180px;
}

.search-box input::placeholder { color: var(--txt-3); }
.search-box svg { color: var(--txt-3); }

/* --------------------------------------------------------------------------
   6. UI COMPONENTS: BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--rad-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease-in-out;
    box-shadow: var(--shadow);
}

/* Semantic Variants */
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--bg-2); color: var(--txt); border: 1px solid var(--brd); }
.btn-secondary:hover { background: var(--bg-h); border-color: var(--brd-dark); }

.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Icon-only Button (e.g., Edit/Delete Actions) */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    color: var(--txt-3);
    transition: all .15s ease-in-out;
}

.btn-icon:hover { color: var(--txt-2); background: var(--bg-h); }
.btn-icon.edit:hover { color: var(--accent); background: var(--accent-light); }
.btn-icon.delete:hover { color: var(--err); background: var(--err-light); }

/* Modal Close Button */
.btn-close {
    background: none;
    border: none;
    color: var(--txt-3);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all .15s ease-in-out;
}
.btn-close:hover { background: var(--bg-h); color: var(--txt); }

/* --------------------------------------------------------------------------
   7. UI COMPONENTS: DASHBOARD CARDS (KPIs)
   [DESC] Auto-filling grid layout for analytical data.
   -------------------------------------------------------------------------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: var(--bg-2);
    border: 1px solid var(--brd);
    border-radius: var(--rad);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow .15s;
}

.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-label { font-size: 12px; color: var(--txt-3); font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--txt); }
.kpi-sub { font-size: 11px; color: var(--txt-2); }

/* Generic Card Container */
.card {
    background: var(--bg-2);
    border: 1px solid var(--brd);
    border-radius: var(--rad);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-header { 
    padding: 14px 18px; 
    border-bottom: 1px solid var(--brd); 
    background: var(--bg-h);
}
.card-header h3 { font-size: 14px; font-weight: 600; color: var(--txt); }

/* --------------------------------------------------------------------------
   8. UI COMPONENTS: KANBAN PIPELINE (Trello-like Board)
   [DESC] Horizontal scrolling flex container.
   -------------------------------------------------------------------------- */
.pipeline-bar-container {
    display: flex;
    height: 40px;
    border-radius: var(--rad-sm);
    overflow: hidden;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.pipeline-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    transition: flex .3s ease;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 6px;
}

.pipeline-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: calc(100vh - 120px);
}

.pipeline-column {
    min-width: 220px;
    max-width: 260px;
    flex-shrink: 0; /* Prevents column from squishing */
    background: var(--bg-2);
    border: 1px solid var(--brd);
    border-radius: var(--rad);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.pipeline-column-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--brd);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-h);
    border-radius: var(--rad) var(--rad) 0 0;
}

.pipeline-column-header .col-count {
    background: var(--bg-2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--txt-2);
    border: 1px solid var(--brd);
}

.pipeline-column-body {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    background: var(--bg-h);
    border-radius: 0 0 var(--rad) var(--rad);
}

.pipeline-card {
    background: var(--bg-2);
    border: 1px solid var(--brd);
    border-radius: var(--rad-sm);
    padding: 12px;
    cursor: pointer;
    transition: all .15s;
    box-shadow: var(--shadow);
}

.pipeline-card:hover { 
    border-color: var(--accent); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md);
}

.pipeline-card .pc-name { font-size: 13px; font-weight: 600; color: var(--txt); margin-bottom: 4px; }
.pipeline-card .pc-code { font-size: 11px; color: var(--txt-3); }
.pipeline-card .pc-city { font-size: 11px; color: var(--txt-2); margin-top: 4px; }
.pipeline-card .pc-days { font-size: 10px; color: var(--warn); margin-top: 6px; font-weight: 500; }

/* --------------------------------------------------------------------------
   9. UI COMPONENTS: DATA TABLES & BADGES
   -------------------------------------------------------------------------- */
.status-filter-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }

.status-filter-tab {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--brd);
    background: var(--bg-2);
    color: var(--txt-2);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}

.status-filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.status-filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.table-wrapper {
    overflow-x: auto; /* Enables horizontal scroll for large tables */
    border: 1px solid var(--brd);
    border-radius: var(--rad);
    background: var(--bg-2);
    box-shadow: var(--shadow);
}

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
    background: var(--bg-h);
    padding: 10px 12px;
    text-align: right;
    font-weight: 600;
    font-size: 12px;
    color: var(--txt-2);
    white-space: nowrap;
    border-bottom: 1px solid var(--brd);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--brd);
    vertical-align: middle;
    color: var(--txt);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-h); }

.th-center, .td-center { text-align: center !important; }
.row-actions { display: flex; gap: 2px; }

/* Status Indicators (Badges & Dots) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; }

.days-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.days-ok { background: var(--ok-light); color: #059669; }
.days-warn { background: var(--warn-light); color: #d97706; }
.days-danger { background: var(--err-light); color: #dc2626; }

/* --------------------------------------------------------------------------
   10. MODALS & FORMS
   [DESC] Overlay system with backdrop blur.
   -------------------------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(3px); /* Modern glassmorphism effect */
    z-index: var(--z-modal);
    align-items: flex-start;
    justify-content: center;
    padding: 30px;
    overflow-y: auto;
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-2);
    border: 1px solid var(--brd);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 20px 50px rgba(0,0,0,.15);
}

.modal-sm { max-width: 420px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--brd);
    background: var(--bg-h);
    border-radius: 16px 16px 0 0;
}
.modal-header h2 { font-size: 16px; color: var(--txt); }

.modal-body { 
    padding: 16px 20px; 
    max-height: 70vh; 
    overflow-y: auto; 
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--brd);
    background: var(--bg-h);
    border-radius: 0 0 16px 16px;
}

/* Forms Sub-system */
.form-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--brd); }
.form-section:last-child { border-bottom: none; }
.form-section h4 { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }

.form-row { display: flex; gap: 12px; margin-bottom: 10px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { flex-basis: 100%; }
.form-group label { font-size: 12px; color: var(--txt-2); font-weight: 500; }

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg);
    border: 1px solid var(--brd);
    border-radius: var(--rad-sm);
    padding: 8px 12px;
    color: var(--txt);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { 
    border-color: var(--accent); 
    box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* API Fetch Status Sub-labels */
.fetch-status { font-size: 12px; margin-top: 6px; }
.fetch-status.loading { color: var(--warn); }
.fetch-status.success { color: var(--ok); }
.fetch-status.error { color: var(--err); }

/* Map Protection Overlay */
.map-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-map-lock); /* Using variable to guarantee hierarchy */
    transition: opacity 0.3s ease;
}

.map-lock-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   11. WIDGETS: ACTIVITY, ALERTS, ISSUES & TIMELINE
   -------------------------------------------------------------------------- */

/* Activity Log */
.activity-list { max-height: 300px; overflow-y: auto; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--brd); font-size: 13px; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-text { flex: 1; color: var(--txt-2); }
.activity-text strong { color: var(--txt); }
.activity-time { font-size: 11px; color: var(--txt-3); white-space: nowrap; }

/* Alerts Sub-system */
.alerts-list { padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--brd); font-size: 13px; }
.alert-item:last-child { border-bottom: none; }
.alert-item.warn { border-right: 3px solid var(--warn); background: var(--warn-light); }
.alert-item.danger { border-right: 3px solid var(--err); background: var(--err-light); }
.alert-item svg { flex-shrink: 0; }

/* Performance Bars */
.perf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.perf-card { background: var(--bg-2); border: 1px solid var(--brd); border-radius: var(--rad); padding: 20px; box-shadow: var(--shadow); }
.perf-card h4 { font-size: 14px; margin-bottom: 14px; color: var(--txt); }
.perf-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.perf-bar-label { font-size: 12px; color: var(--txt-2); width: 120px; text-align: right; flex-shrink: 0; }
.perf-bar-track { flex: 1; height: 10px; background: var(--brd); border-radius: 5px; overflow: hidden; }
.perf-bar-fill { height: 100%; border-radius: 5px; transition: width .5s; }
.perf-bar-value { font-size: 12px; color: var(--txt-3); width: 50px; flex-shrink: 0; }

/* Issues Tracker */
.issues-header { margin-bottom: 16px; }
.issues-list { display: flex; flex-direction: column; gap: 8px; }
.issue-item { background: var(--bg-2); border: 1px solid var(--brd); border-radius: 10px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.issue-priority { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.issue-priority.low { background: var(--ok); }
.issue-priority.medium { background: var(--warn); }
.issue-priority.high { background: #f97316; }
.issue-priority.critical { background: var(--err); }
.issue-info { flex: 1; }
.issue-title { font-size: 13px; font-weight: 600; color: var(--txt); }
.issue-meta { font-size: 11px; color: var(--txt-3); margin-top: 3px; }
.issue-status-badge { padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.issue-status-badge.open { background: var(--err-light); color: var(--err); }
.issue-status-badge.resolved { background: var(--ok-light); color: var(--ok); }

/* Vertical Timeline (using pseudo-elements for line drawing) */
.timeline { position: relative; padding-right: 20px; }
.timeline::before { content: ''; position: absolute; right: 6px; top: 0; bottom: 0; width: 2px; background: var(--brd); }
.timeline-item { position: relative; padding: 8px 0 16px 0; padding-right: 24px; }
.timeline-item::before { content: ''; position: absolute; right: -17px; top: 12px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg-2); }
.timeline-item .tl-time { font-size: 11px; color: var(--txt-3); }
.timeline-item .tl-text { font-size: 13px; color: var(--txt-2); margin-top: 2px; }
.timeline-item .tl-note { font-size: 11px; color: var(--txt-3); font-style: italic; margin-top: 2px; }

/* --------------------------------------------------------------------------
   12. NOTIFICATIONS (TOASTS) & EXPORT CARD
   -------------------------------------------------------------------------- */
.toast-container { 
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    z-index: var(--z-toast); 
    display: flex; 
    flex-direction: column-reverse; 
    gap: 8px; 
}

.toast { 
    padding: 10px 18px; 
    border-radius: 10px; 
    font-size: 13px; 
    font-family: inherit; 
    color: #fff; 
    box-shadow: var(--shadow-md); 
    direction: rtl; 
}
.toast.success { background: var(--ok); }
.toast.error { background: var(--err); }
.toast.info { background: var(--accent); }
.toast.warning { background: var(--warn); color: #000; }

/* Export Data Preview */
.export-card { background: var(--bg-2); border: 1px solid var(--brd); border-radius: var(--rad); padding: 24px; max-width: 600px; box-shadow: var(--shadow); }
.export-card h3 { margin-bottom: 8px; color: var(--txt); }
.export-card code { background: var(--bg-h); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent); }
.csv-preview { 
    background: var(--bg); 
    border: 1px solid var(--brd); 
    border-radius: var(--rad-sm); 
    padding: 14px; 
    font-family: monospace; 
    font-size: 11px; 
    direction: ltr; 
    text-align: left; 
    overflow: auto; 
    white-space: pre; 
    color: var(--txt-2); 
    max-height: 200px; 
}

/* --------------------------------------------------------------------------
   13. UTILITIES, STATES & ANIMATIONS
   -------------------------------------------------------------------------- */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 60px 20px; color: var(--txt-3); }

/* App SPA Section Toggling */
.view-section { display: none; }
.view-section.active { display: block; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brd-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--txt-3); }

/* Keyframe Animations */
@keyframes ping {
    75%, 100% { transform: scale(2.5); opacity: 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* --------------------------------------------------------------------------
   14. RESPONSIVE DESIGN (MOBILE ADAPTATION)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .logo-text, .sidebar .nav-item span, .sidebar-footer { display: none; }
    .nav-item { justify-content: center; padding: 10px; }
    
    .main-content { margin-right: 60px; padding: 0 12px 12px; }
    
    .top-bar { flex-wrap: wrap; gap: 10px; }
    .search-box { width: 100%; justify-content: space-between;}
    .search-box input { width: 100%; }
    
    .form-row { flex-direction: column; }
    
    .pipeline-board { flex-direction: column; }
    .pipeline-column { max-width: 100%; min-width: 100%; }
    
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Override Leaflet.js default typography to match the brand */
.leaflet-container * {
    font-family: 'YekanBakh', sans-serif !important;
}


/* تمام عرض کردن در گرید */
.form-group.full-width {
    grid-column: 1 / -1;
}

/* رنگ پس‌زمینه قرمز با شفافیت 20% */
.bg-red-tint {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #991b1b !important;
    font-weight: bold;
}
.bg-red-tint:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* تنظیم جایگاه کلمه تومان */
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-suffix input {
    width: 100%;
    padding-left: 50px; /* باز کردن فضا برای کلمه تومان */
}
.suffix-text {
    position: absolute;
    left: 12px;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}
