/* =====================================================
   BUSINESS OPERATIONS HUB  |  style.css  |  v1.0
   ===================================================== */

/* ── VARIABLES ──────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --topbar-h: 60px;
  --sidebar-bg: #0d1b2a;
  --sidebar-hover: #1a2e47;
  --sidebar-active: #1e3a5f;
  --sidebar-text: #94a3b8;
  --sidebar-active-text: #ffffff;
  --accent: #4361ee;
  --accent-hover: #3651d4;
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #ef476f;
  --info: #4cc9f0;
  --bg: #f0f2f5;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.2s ease;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text); min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; }
.btn { border-radius: var(--radius-sm) !important; font-weight: 500; }
.btn-xs { --bs-btn-padding-y: 0.16rem; --bs-btn-padding-x: 0.38rem; --bs-btn-font-size: 0.72rem; }

/* ── LAYOUT ─────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.main-wrapper { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; transition: margin-left var(--transition); }
.page-content { padding: 24px; flex: 1; }

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
  background: var(--sidebar-bg); display: flex; flex-direction: column;
  z-index: 1000; overflow-y: auto; overflow-x: hidden;
  transition: transform var(--transition);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.brand-icon {
  width: 38px; height: 38px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0;
}
.brand-text { color: #fff; line-height: 1.2; }
.brand-text strong { font-size: 15px; display: block; }
.brand-text small { font-size: 11px; color: var(--sidebar-text); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-info strong { font-size: 13px; color: #fff; display: block; }
.user-info small  { font-size: 11px; color: var(--sidebar-text); }
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav .nav-item { margin: 1px 8px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  color: var(--sidebar-text); border-radius: 7px; font-size: 13.5px;
  transition: all var(--transition); position: relative;
}
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--sidebar-active); color: var(--sidebar-active-text); }
.sidebar-nav .nav-link.active i { color: var(--accent); }
.sidebar-nav .nav-link i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center;
}
.sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.07); }
.btn-sidebar-logout {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--sidebar-text); padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; transition: all var(--transition); text-align: left;
}
.btn-sidebar-logout:hover { background: rgba(239,71,111,0.15); color: var(--danger); border-color: var(--danger); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }

/* ── TOPBAR ──────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 16px; position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.btn-menu-toggle { display: none; background: none; border: none; font-size: 18px; color: var(--text); cursor: pointer; padding: 4px 8px; }
.page-title { font-size: 17px; font-weight: 600; margin: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title i { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }

/* ── SEARCH ─────────────────────────────────────────── */
.search-wrapper { position: relative; max-width: 380px; width: 100%; }
.search-input { padding-left: 36px !important; border-radius: 20px !important; font-size: 13.5px; border-color: var(--border); }
.search-input:focus { box-shadow: 0 0 0 3px rgba(67,97,238,0.15); border-color: var(--accent); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  max-height: 380px; overflow-y: auto; z-index: 200;
}
.search-result-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  color: var(--text); font-size: 13px; border-bottom: 1px solid var(--border); transition: background var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); }
.result-label { font-weight: 500; }
.search-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ── TOPBAR ACTIONS ──────────────────────────────────── */
.topbar-actions { position: relative; }
.btn-icon {
  position: relative; background: none; border: none; width: 38px; height: 38px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted); cursor: pointer; transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg); color: var(--accent); }
.notif-dot {
  position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: 10px; padding: 1px 4px; min-width: 16px; text-align: center;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 340px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); z-index: 200; max-height: 420px; overflow-y: auto;
}
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text); transition: background var(--transition);
}
.notif-item:hover { background: var(--bg); }
.notif-item i { font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.notif-danger  i { color: var(--danger); }
.notif-warning i { color: #d97706; }
.notif-info    i { color: var(--accent); }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); }

/* ── CARDS ───────────────────────────────────────────── */
.card { border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow) !important; }
.card-header { background: var(--surface) !important; border-bottom: 1px solid var(--border) !important; font-weight: 600; }
.card-body { min-width: 0; }

/* ── KPI CARDS ───────────────────────────────────────── */
.kpi-card {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px; transition: all var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.kpi-icon.blue   { background: rgba(67,97,238,0.12); color: var(--accent); }
.kpi-icon.red    { background: rgba(239,71,111,0.12); color: var(--danger); }
.kpi-icon.green  { background: rgba(6,214,160,0.12);  color: var(--success); }
.kpi-icon.yellow { background: rgba(255,209,102,0.2); color: #d97706; }
.kpi-icon.purple { background: rgba(76,201,240,0.15); color: #7c3aed; }
.kpi-icon.orange { background: rgba(247,127,0,0.12);  color: #f77f00; }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1; color: var(--text); }
.kpi-label { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.kpi-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── TABLES ──────────────────────────────────────────── */
.table-responsive { border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.table { font-size: 13.5px; margin-bottom: 0; }
.table thead th { background: #f8fafc; font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); white-space: nowrap; padding: 10px 12px; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: #f8fafc; }
.table tbody td { vertical-align: middle; padding: 10px 12px; border-color: var(--border); }
.row-overdue td:first-child { border-left: 3px solid var(--danger); }
.row-due-soon td:first-child { border-left: 3px solid #d97706; }

/* ── FILTER BAR ──────────────────────────────────────── */
.filter-bar { background: var(--surface); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); margin-bottom: 20px; }
.filter-bar .form-control, .filter-bar .form-select { font-size: 13.5px; border-radius: var(--radius-sm); border-color: var(--border); }
.filter-bar .form-control:focus, .filter-bar .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,97,238,0.1); }

/* ── PAGE HEADER ─────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-size: 20px; font-weight: 700; margin: 0; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── BADGES ──────────────────────────────────────────── */
.badge { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 5px; }
.inline-status-select { min-width: 145px; border-radius: 6px; font-size: 12px; font-weight: 700; padding-top: 4px; padding-bottom: 4px; }
.inline-status-select:focus { box-shadow: 0 0 0 3px rgba(67,97,238,0.12); }
.status-select-danger { color: var(--danger); border-color: rgba(239,71,111,0.35); background-color: rgba(239,71,111,0.08); }
.status-select-info { color: #0369a1; border-color: rgba(76,201,240,0.5); background-color: rgba(76,201,240,0.12); }
.status-select-warning { color: #92400e; border-color: rgba(217,119,6,0.35); background-color: rgba(255,209,102,0.22); }
.status-select-partial { color: #3730a3; border-color: rgba(67,97,238,0.35); background-color: rgba(67,97,238,0.1); }
.status-select-success { color: #047857; border-color: rgba(6,214,160,0.45); background-color: rgba(6,214,160,0.12); }
.status-select-muted { color: var(--text-muted); border-color: var(--border); background-color: #f8fafc; }

/* ── ALERT ITEMS ─────────────────────────────────────── */
.alert-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px;
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.alert-item.danger  { background: rgba(239,71,111,0.08); border-left: 3px solid var(--danger); }
.alert-item.warning { background: rgba(255,209,102,0.15); border-left: 3px solid #d97706; }
.alert-item.info    { background: rgba(67,97,238,0.08);  border-left: 3px solid var(--accent); }
.alert-item i { margin-top: 2px; font-size: 15px; }
.alert-item.danger  i { color: var(--danger); }
.alert-item.warning i { color: #d97706; }
.alert-item.info    i { color: var(--accent); }
.alert-item .alert-title { font-size: 13px; font-weight: 600; }
.alert-item .alert-body  { font-size: 12px; color: var(--text-muted); }

/* ── KANBAN BOARD ────────────────────────────────────── */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.kanban-col { background: #f8fafc; border-radius: var(--radius); border: 1px solid var(--border); min-height: 300px; }
.kanban-col-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.kanban-col-header .col-title { font-size: 13px; font-weight: 700; }
.kanban-col-header .col-count { background: var(--border); color: var(--text-muted); font-size: 11px; font-weight: 600; border-radius: 10px; padding: 1px 7px; }
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 100px; }
.kanban-card {
  background: var(--surface); border-radius: 8px; border: 1px solid var(--border);
  padding: 12px; cursor: grab; transition: all var(--transition); font-size: 13px;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-col.drag-over { background: rgba(67,97,238,0.05); border-color: var(--accent); }
.kanban-card .card-title { font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.kanban-card .card-meta { font-size: 11px; color: var(--text-muted); }

/* ── CALENDAR ────────────────────────────────────────── */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-day-header { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 8px; text-transform: uppercase; }
.calendar-day {
  min-height: 90px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px; font-size: 12px; cursor: pointer;
  transition: all var(--transition); position: relative;
}
.calendar-day:hover { border-color: var(--accent); background: #f0f4ff; }
.calendar-day.today { border-color: var(--accent); background: rgba(67,97,238,0.05); }
.calendar-day.today .day-num { background: var(--accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.calendar-day.other-month { opacity: 0.4; }
.day-num { font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.day-event { font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-event.invoice  { background: rgba(239,71,111,0.15); color: var(--danger); }
.day-event.contract { background: rgba(67,97,238,0.15); color: var(--accent); }
.day-event.task     { background: rgba(6,214,160,0.15); color: #059669; }
.day-event.doc      { background: rgba(255,209,102,0.3); color: #d97706; }

/* ── EMPLOYEE CARD ───────────────────────────────────── */
.emp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 14px; transition: all var(--transition); cursor: pointer; }
.emp-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.emp-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; flex-shrink: 0; }
.emp-info .emp-name { font-weight: 600; font-size: 14px; }
.emp-info .emp-role { font-size: 12px; color: var(--text-muted); }

/* ── SUPPLIER CARD ───────────────────────────────────── */
.supplier-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all var(--transition); cursor: pointer; height: 100%; }
.supplier-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-2px); }
.supplier-icon { width: 48px; height: 48px; background: rgba(67,97,238,0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--accent); margin-bottom: 12px; }
.supplier-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.supplier-meta { font-size: 12px; color: var(--text-muted); }

/* ── DOCUMENT CARD ───────────────────────────────────── */
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all var(--transition); }
.doc-card:hover { box-shadow: var(--shadow-md); }
.doc-card.expiring-soon { border-left: 3px solid #d97706; }
.doc-card.expired       { border-left: 3px solid var(--danger); }
.doc-icon { font-size: 28px; margin-bottom: 10px; }
.doc-title { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.doc-meta  { font-size: 12px; color: var(--text-muted); }

/* ── STATUS TIMELINE ─────────────────────────────────── */
.timeline { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.timeline-step { display: flex; align-items: center; gap: 0; }
.timeline-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.timeline-dot.done   { background: var(--success); border-color: var(--success); color: #fff; }
.timeline-dot.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline-dot.failed { background: var(--danger); border-color: var(--danger); color: #fff; }
.timeline-line { width: 28px; height: 2px; background: var(--border); }
.timeline-line.done  { background: var(--success); }
.timeline-label { font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 4px; }

/* ── TOAST ───────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast-msg {
  background: var(--surface); border-radius: var(--radius-sm); padding: 12px 18px;
  box-shadow: var(--shadow-md); font-size: 13.5px; max-width: 320px;
  border-left: 4px solid; opacity: 0; transform: translateX(20px);
  transition: all 0.3s ease; display: flex; align-items: center;
}
.toast-msg.show { opacity: 1; transform: translateX(0); }
.toast-success { border-color: var(--success); }
.toast-danger  { border-color: var(--danger); }
.toast-warning { border-color: #d97706; }
.toast-info    { border-color: var(--accent); }

/* ── STATS ROW ───────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-pill { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; text-align: center; }
.stat-pill .stat-val { font-size: 22px; font-weight: 700; }
.stat-pill .stat-lbl { font-size: 12px; color: var(--text-muted); }

/* ── SETTINGS / AUDIT ───────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 18px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.settings-nav .nav-link { color: var(--text-muted); border-radius: 7px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.settings-nav .nav-link.active, .settings-nav .nav-link:hover { background: rgba(67,97,238,0.08); color: var(--accent); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.role-matrix { display: grid; grid-template-columns: 1.1fr repeat(4, minmax(80px, 1fr)); gap: 1px; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); font-size: 13px; }
.role-matrix div { background: var(--surface); padding: 10px; display: flex; align-items: center; min-height: 42px; }
.role-matrix .head { background: #f8fafc; font-weight: 700; color: var(--text-muted); }
.role-matrix .ok { color: var(--success); font-weight: 700; justify-content: center; }
.role-matrix .no { color: var(--text-muted); justify-content: center; }
.audit-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.audit-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.audit-row:last-child { border-bottom: none; }
.audit-row small { color: var(--text-muted); }
.ocr-box { border: 1px dashed rgba(67,97,238,0.45); background: rgba(67,97,238,0.05); border-radius: var(--radius); padding: 12px; }
.preview-frame { border: 1px solid var(--border); border-radius: var(--radius); background: #f8fafc; min-height: 120px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.company-color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.company-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.company-check { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f8fafc; font-size: 13px; cursor: pointer; }
.company-check .company-color-dot { margin-right: 0; }

/* ── LOGIN PAGE ──────────────────────────────────────── */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2e47 50%, #0d1b2a 100%);
  padding: 20px;
}
.login-card {
  background: var(--surface); border-radius: 16px; padding: 40px;
  width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon { width: 64px; height: 64px; background: var(--accent); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; margin-bottom: 12px; }
.login-logo h2 { font-size: 22px; font-weight: 700; margin: 0; }
.login-logo p  { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.demo-creds { background: #f8fafc; border-radius: 8px; padding: 12px; margin-top: 16px; }
.demo-creds small { color: var(--text-muted); }
.demo-creds code  { background: var(--border); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ── SECTION TABS ────────────────────────────────────── */
.section-tabs { border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.section-tabs .nav-link { color: var(--text-muted); font-size: 13.5px; font-weight: 500; padding: 8px 16px; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.section-tabs .nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }
.section-tabs .nav-link:hover { color: var(--accent); }

/* ── PRIORITY DOT ────────────────────────────────────── */
.priority-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.priority-dot.urgenta { background: var(--danger); }
.priority-dot.normala { background: var(--accent); }
.priority-dot.scazuta { background: var(--text-muted); }

/* ── CHART CONTAINERS ────────────────────────────────── */
.chart-container { position: relative; height: 220px; }
.chart-container-tall { position: relative; height: 280px; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 991.98px) {
  .main-wrapper { margin-left: 0 !important; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .btn-menu-toggle { display: flex; }
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .settings-nav .nav-link { flex: 0 0 auto; white-space: nowrap; }
  .page-content { padding: 16px; }
  .modal-xl, .modal-lg { --bs-modal-width: calc(100vw - 32px); }
}
@media (max-width: 575.98px) {
  :root { --topbar-h: 56px; }
  .topbar { min-height: var(--topbar-h); height: auto; padding: 8px 12px; gap: 8px; }
  .topbar-right { flex: 0 0 auto; gap: 4px; }
  .page-title { font-size: 15px; max-width: calc(100vw - 112px); }
  .btn-icon { width: 34px; height: 34px; }
  .notif-panel { position: fixed; top: calc(var(--topbar-h) + 8px); right: 10px; left: 10px; width: auto; max-height: min(420px, calc(100vh - 90px)); }
  .page-content { padding: 12px; }
  .page-header { align-items: stretch; margin-bottom: 14px; }
  .page-header h2 { width: 100%; font-size: 18px; line-height: 1.25; }
  .page-header .actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .page-header .actions .btn, .page-header .actions label.btn { width: 100%; }
  .filter-bar { padding: 12px; margin-bottom: 14px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-pill { padding: 10px 8px; }
  .stat-pill .stat-val { font-size: 18px; }
  .stat-pill .stat-lbl { font-size: 11px; }
  .card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .card-header .btn { width: 100%; }
  .table { min-width: 760px; font-size: 12.5px; }
  .table-sm { min-width: 560px; }
  .table thead th, .table tbody td { padding: 8px 10px; }
  .inline-status-select { min-width: 132px; font-size: 11.5px; }
  .modal-dialog { margin: 8px; }
  .modal-content { max-height: calc(100vh - 16px); }
  .modal-body { overflow-y: auto; }
  .modal-body .row > .col-6,
  .modal-body .row > .col-4 { flex: 0 0 100%; max-width: 100%; width: 100%; }
  .modal-footer { gap: 8px; }
  .modal-footer .btn { flex: 1 1 100%; }
  .card-body { overflow-x: auto; }
  .section-tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .role-matrix { min-width: 620px; }
  .audit-row { flex-direction: column; align-items: flex-start; }
  .calendar-day { min-height: 68px; padding: 4px; }
  .calendar-day-header { padding: 5px 2px; font-size: 9px; }
  .day-event { max-width: 100%; font-size: 9px; }
  .company-check-grid { grid-template-columns: 1fr; }
  .ocr-box .row > [class*="col-"] { margin-bottom: 4px; }
  .chart-container, .chart-container-tall { height: 220px; }
  .kanban-board { grid-template-columns: 1fr; }
  .search-wrapper { display: none; }
  .login-card { padding: 28px 20px; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 22px; }
  .kpi-icon { width: 42px; height: 42px; font-size: 18px; }
}
@media print {
  .sidebar, .topbar, .filter-bar .btn, .page-header .actions, .topbar-actions { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
}
