@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; }

/* Donut */
.donut-ring {
  width: 160px; height: 160px; border-radius: 50%;
  background: conic-gradient(
    #22c55e var(--a, 0deg),
    #3b82f6 var(--a, 0deg) var(--ab, 0deg),
    #f59e0b var(--ab, 0deg) var(--abc, 0deg),
    #ef4444 var(--abc, 0deg) 360deg
  );
  display: flex; align-items: center; justify-content: center;
  transition: background 0.6s ease;
}
.donut-hole {
  width: 96px; height: 96px; background: white; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}

/* Horizontal bars */
.css-bar-track { height: 28px; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.css-bar-fill {
  height: 100%; border-radius: 8px;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px; min-width: 36px;
}

/* ISA2 progress */
.isa2-track { height: 22px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.isa2-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 1s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px; min-width: 40px;
}

/* Compare vertical bars */
.cmp-bar-wrap { display:flex; flex-direction:column; align-items:center; flex:1; }
.cmp-bar-track {
  width: 48px; background: #f1f5f9; border-radius: 8px 8px 0 0;
  display: flex; align-items: flex-end; height: 120px;
}
.cmp-bar-fill { width:100%; border-radius: 8px 8px 0 0; transition: height 0.9s cubic-bezier(.4,0,.2,1); }

/* Upload */
.upload-zone:hover { border-color:#3b82f6; background:#eff6ff; }
.upload-zone.has-file { border-color:#22c55e; background:#f0fdf4; }

/* Main tabs */
.tab-btn { transition: all .2s; cursor: pointer; }
.tab-btn.active { background:#1e293b; color:white; }

/* Sheet selector pills */
.sheet-pill { transition: all .2s; cursor: pointer; user-select: none; }
.sheet-pill.active {
  background: linear-gradient(135deg,#3b82f6,#2563eb);
  color: white; border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.sheet-pill.summary-pill.active {
  background: linear-gradient(135deg,#1e293b,#334155);
  border-color: #1e293b;
  box-shadow: 0 2px 8px rgba(30,41,59,0.3);
}
.sheet-pill:not(.active):hover { background:#eff6ff; border-color:#93c5fd; }

/* Tags */
.tag-a { background:#dcfce7; color:#15803d; }
.tag-b { background:#dbeafe; color:#1d4ed8; }
.tag-c { background:#fef3c7; color:#b45309; }
.tag-d { background:#fee2e2; color:#b91c1c; }

@media print {
  .no-print { display:none !important; }
  body {
    background:white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Arabic / RTL */
body.rtl { direction: rtl; }
body.rtl .text-left { text-align: right; }
body.rtl table th, body.rtl table td { text-align: right; }
body.rtl table th.text-center, body.rtl table td.text-center { text-align: center; }
body.rtl .font-mono { font-family: 'Amiri', 'Inter', serif; }
body.rtl * { font-family: 'Amiri', 'Inter', serif; }
body.rtl .donut-hole, body.rtl .tag-a, body.rtl .tag-b, body.rtl .tag-c, body.rtl .tag-d {
  font-family: 'Amiri', serif;
}