/* ============================================================
   Pharmacy Trainee System — Main Stylesheet (RTL / Arabic)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --navy:   #0f4c75;
  --blue:   #1b6ca8;
  --teal:   #0d9488;
  --teal2:  #14b8a6;
  --light:  #f0f6ff;
  --white:  #ffffff;
  --gray50: #f8fafc;
  --gray100:#f1f5f9;
  --gray200:#e2e8f0;
  --gray500:#64748b;
  --gray700:#334155;
  --red:    #ef4444;
  --green:  #10b981;
  --yellow: #f59e0b;
  --shadow: 0 4px 24px rgba(15,76,117,.12);
  --shadow-lg: 0 12px 48px rgba(15,76,117,.18);
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* English (LTR): flip the RTL defaults so tables, inputs and text align L→R */
html[dir=ltr] body { direction: ltr; text-align: left; }
html[dir=ltr] .form-control,
html[dir=ltr] input,
html[dir=ltr] select,
html[dir=ltr] textarea { direction: ltr; }

body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
  background: var(--light);
  color: var(--gray700);
  font-size: 15px;
  min-height: 100vh;
}

/* ── Utilities ── */
.text-navy  { color: var(--navy); }
.text-teal  { color: var(--teal); }
.text-muted { color: var(--gray500); }
.fw-bold    { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  box-shadow: 0 4px 16px rgba(13,148,136,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,148,136,.45); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
}
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--gray200);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-body { padding: 28px; }

/* ── Form Elements ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
  font-size: 14px;
}
.form-label .required { color: var(--red); margin-right: 3px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray200);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: var(--gray700);
  background: var(--white);
  transition: border .2s, box-shadow .2s;
  direction: rtl;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13,148,136,.12);
}
.form-control:disabled {
  background: var(--gray50);
  color: var(--gray500);
  cursor: default;
}
.form-control.select-main {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230d9488' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 40px;
  cursor: pointer;
  appearance: none;
}

/* ── Signature Pad ── */
.sig-wrapper {
  border: 2px dashed var(--teal);
  border-radius: var(--radius-sm);
  background: #fafffe;
  position: relative;
  min-height: 160px;
  overflow: hidden;
}
#signaturePad {
  display: block;
  width: 100%;
  height: 160px;
  cursor: crosshair;
  touch-action: none;
}
.sig-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray500);
  pointer-events: none;
  gap: 6px;
  font-size: 13px;
}
.sig-placeholder svg { opacity: .4; }
.sig-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  justify-content: flex-end;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}
.badge-navy   { background: rgba(15,76,117,.12);  color: var(--navy); }
.badge-teal   { background: rgba(13,148,136,.12); color: var(--teal); }
.badge-green  { background: rgba(16,185,129,.12); color: #059669; }
.badge-yellow { background: rgba(245,158,11,.12); color: #b45309; }
.badge-red    { background: rgba(239,68,68,.12);  color: #dc2626; }

/* ── Alert ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #d1fae5; color: #065f46; border-right: 4px solid var(--green); }
.alert-error   { background: #fee2e2; color: #991b1b; border-right: 4px solid var(--red); }
.alert-info    { background: #dbeafe; color: #1e40af; border-right: 4px solid #3b82f6; }

/* ================================================================
   TRAINEE PAGE (index.php)
   ================================================================ */
.trainee-page {
  min-height: 100vh;
  background: linear-gradient(150deg, #0f4c75 0%, #1b6ca8 40%, #0d9488 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 16px 60px;
}
.trainee-header {
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}
.trainee-header .logo-circle {
  width: 80px; height: 80px;
  background: rgba(255,255,255,.15);
  border: 3px solid rgba(255,255,255,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  backdrop-filter: blur(10px);
}
.trainee-header h1 { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.trainee-header p  { font-size: 14px; opacity: .85; }

.trainee-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  width: 100%;
  max-width: 680px;
  overflow: hidden;
}
.trainee-card-header {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  padding: 20px 28px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.trainee-card-header h2 { font-size: 18px; font-weight: 700; }
.trainee-card-header p  { font-size: 13px; opacity: .8; margin-top: 2px; }

.trainee-card-body { padding: 28px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .info-grid { grid-template-columns: 1fr; }
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--light);
  border: 1px solid var(--gray200);
  border-radius: 50px;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 20px;
}

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(150deg, #0f4c75 0%, #1b6ca8 50%, #0d9488 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.login-top {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  padding: 36px 28px 30px;
  text-align: center;
  color: #fff;
}
.login-top .logo {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.15);
  border: 3px solid rgba(255,255,255,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 32px;
}
.login-top h1 { font-size: 22px; font-weight: 900; }
.login-top p  { font-size: 13px; opacity: .8; margin-top: 4px; }
.login-body   { padding: 32px 28px; }
.login-footer {
  padding: 16px 28px;
  background: var(--gray50);
  border-top: 1px solid var(--gray200);
  text-align: center;
  font-size: 12px;
  color: var(--gray500);
}
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .form-control { padding-right: 44px; }
.input-icon-wrap .icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
}

/* ================================================================
   DASHBOARD
   ================================================================ */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, #0a2e4a 0%, #0f4c75 60%, #0d9488 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; right: 0;
  z-index: 100;
  transition: transform .3s;
}
/* Hide the sidebar scrollbar (still scrollable via wheel/touch) */
.sidebar, .sidebar-nav { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar::-webkit-scrollbar, .sidebar-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Hide the main page (white) vertical scrollbar everywhere — content still
   scrolls via wheel/touch. Tables keep their own horizontal scrollbar. */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand .icon {
  width: 46px; height: 46px;
  background: rgba(255,255,255,.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.sidebar-brand h2 { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.3; }
.sidebar-brand p  { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-user .avatar {
  width: 40px; height: 40px;
  background: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.sidebar-user .name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-user .role { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 8px;
  margin-bottom: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  margin-bottom: 2px;
  cursor: pointer;
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.nav-item.active { background: rgba(13,148,136,.4); color: #fff; }
.nav-item .icon { font-size: 18px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* Main content */
.dash-main {
  flex: 1;
  margin-right: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Allow shrinking below content width so wide tables scroll
     inside .table-scroll instead of stretching the whole page */
  min-width: 0;
}

/* Top bar */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray200);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.topbar-title { font-size: 18px; font-weight: 700; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* Hamburger for tablet */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--navy);
}

/* Desktop button: collapse the sidebar entirely */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--gray200);
  border-radius: 8px;
  cursor: pointer;
  padding: 7px;
  color: var(--navy);
  transition: all .2s;
}
.sidebar-collapse-btn:hover { background: var(--gray100); border-color: #cbd5e1; }

/* Collapsed state: sidebar slides away, content takes full width */
.dash-layout.sidebar-hidden .sidebar {
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .3s, visibility .3s;
}
.dash-layout.sidebar-hidden .dash-main { margin-right: 0; }
.dash-main { transition: margin-right .3s; }

/* Page content */
.page-content { padding: 28px; flex: 1; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border-right: 4px solid transparent;
}
.stat-card.navy   { border-color: var(--navy); }
.stat-card.teal   { border-color: var(--teal); }
.stat-card.green  { border-color: var(--green); }
.stat-card.yellow { border-color: var(--yellow); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-card.navy   .stat-icon { background: rgba(15,76,117,.1);  color: var(--navy); }
.stat-card.teal   .stat-icon { background: rgba(13,148,136,.1); color: var(--teal); }
.stat-card.green  .stat-icon { background: rgba(16,185,129,.1); color: var(--green); }
.stat-card.yellow .stat-icon { background: rgba(245,158,11,.1); color: var(--yellow); }

.stat-value { font-size: 28px; font-weight: 900; color: var(--navy); line-height: 1; }
.stat-label { font-size: 13px; color: var(--gray500); margin-top: 4px; }

/* Table */
.table-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table-toolbar {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray200);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.table-toolbar h3 { font-size: 16px; font-weight: 700; color: var(--navy); flex: 1; }
.search-input {
  padding: 9px 16px;
  border: 2px solid var(--gray200);
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  width: 220px;
  transition: border .2s;
}
.search-input:focus { outline: none; border-color: var(--teal); }
.filter-select {
  padding: 9px 14px;
  border: 2px solid var(--gray200);
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--teal); }

table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--gray50);
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--gray200);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray100);
  vertical-align: middle;
}
tbody tr:hover { background: var(--gray50); }
tbody tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray500);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  animation: slideUp .3s ease;
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--navy); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--gray500); }
.modal-body { padding: 22px; }
.sig-preview { max-width: 100%; border: 1px solid var(--gray200); border-radius: 8px; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray200); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray500);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Responsive for Tablet & Mobile ── */
@media (max-width: 1024px) {
  /* The page must never be wider than the device screen */
  html, body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }
  .dash-layout, .dash-main, .page-content { max-width: 100%; }
  .table-wrapper { max-width: 100%; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Sidebar fully removed on mobile; hamburger shows it as an overlay */
  .sidebar { display: none; }
  .sidebar.open {
    display: flex;
    box-shadow: -8px 0 30px rgba(0,0,0,.35);
    animation: sidebarSlideIn .25s ease;
  }
  .menu-toggle { display: flex; }
  .sidebar-collapse-btn { display: none !important; }
  .dash-main { margin-right: 0; }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
  }
  .sidebar-overlay.open { display: block; }

  @keyframes sidebarSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .page-content { padding: 16px; }
  .topbar {
    padding: 8px 14px;
    height: auto;
    min-height: 56px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

  /* Touch-friendly scrolling everywhere */
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; padding: 10px 14px; white-space: nowrap; }

  .stat-card { padding: 16px; gap: 12px; }
  .stat-icon { width: 44px; height: 44px; font-size: 20px; }
  .stat-value { font-size: 22px; }

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

  thead th, tbody td { padding: 10px 12px; font-size: 12.5px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .table-toolbar { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .search-input { width: 100%; }
  .filter-select { width: 100%; }
  .topbar-date { display: none; }
  .page-content { padding: 12px; }
  .btn-sm { padding: 7px 12px; font-size: 12px; }
}

/* ── Toasts ── */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  animation: toastIn .3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Print ── */
@media print {
  .sidebar, .topbar, .table-toolbar .btn, .menu-toggle, .sidebar-collapse-btn { display: none !important; }
  .dash-main { margin-right: 0; }
  .page-content { padding: 0; }
}

/* ── Success overlay ── */
.success-overlay {
  display: none;
  position: fixed; inset: 0;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
}
.success-overlay.show { display: flex; animation: fadeIn .4s ease; }
.checkmark-circle {
  width: 100px; height: 100px;
  background: rgba(255,255,255,.15);
  border: 4px solid rgba(255,255,255,.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
  margin-bottom: 20px;
  animation: popIn .5s .2s both;
}
@keyframes popIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================================================
   PETTY CASH ADDITIONS
   ================================================================ */
/* Budget progress bar */
.budget-card { padding: 20px 24px; margin-bottom: 24px; }
.budget-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.budget-head .title { font-weight: 700; color: var(--navy); font-size: 15px; }
.budget-head .nums  { font-size: 13px; color: var(--gray500); font-weight: 600; }
.budget-bar {
  height: 14px; background: var(--gray200);
  border-radius: 50px; overflow: hidden;
}
.budget-fill {
  height: 100%; border-radius: 50px;
  background: linear-gradient(90deg, var(--teal2), var(--teal));
  transition: width .6s ease;
}
.budget-fill.warn   { background: linear-gradient(90deg, #fbbf24, var(--yellow)); }
.budget-fill.danger { background: linear-gradient(90deg, #f87171, var(--red)); }
.budget-remaining { font-size: 22px; font-weight: 900; }
.budget-remaining.ok     { color: var(--teal); }
.budget-remaining.warn   { color: var(--yellow); }
.budget-remaining.danger { color: var(--red); }

/* Amount cell */
.amount-cell { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* Table totals row */
tfoot td {
  padding: 13px 16px; font-size: 13px; font-weight: 700;
  background: var(--gray50); color: var(--navy);
  border-top: 2px solid var(--gray200);
}

/* Print helpers */
.no-print { }
.print-only { display: none; }
@media print {
  .no-print { display: none !important; }
  .print-only { display: block; }
  .stats-grid { display: none; }
  body { background: #fff; }
  .table-wrapper, .card { box-shadow: none; border: 1px solid var(--gray200); }
}
