/* ==========================================================================
   A2Z Fleet Operations - Rider Feedback & Issue Resolution Center
   Aesthetic: Clean, Modern, High-End Light Theme (Crisp Slate & A2Z Orange)
   ========================================================================== */

:root {
  /* Crisp Light Theme Palette */
  --bg-base: #f8fafc;          /* Slate 50 */
  --bg-surface: #ffffff;       /* Pure White */
  --bg-surface-elevated: #f1f5f9; /* Slate 100 */
  --bg-surface-hover: #e2e8f0;    /* Slate 200 */
  --bg-input: #ffffff;

  --border-default: #e2e8f0;   /* Slate 200 */
  --border-subtle: #edf2f7;
  --border-focus: #ea580c;

  --text-primary: #0f172a;     /* Slate 900 */
  --text-secondary: #334155;   /* Slate 700 */
  --text-tertiary: #64748b;    /* Slate 500 */
  --text-disabled: #94a3b8;

  --accent-orange: #ea580c;
  --accent-orange-hover: #c2410c;
  --accent-orange-subtle: #fff7ed; /* Orange 50 */
  --accent-orange-border: #fed7aa; /* Orange 200 */

  --color-success: #059669;
  --color-success-subtle: #ecfdf5;
  --color-success-border: #a7f3d0;

  --color-warning: #d97706;
  --color-warning-subtle: #fffbeb;
  --color-warning-border: #fde68a;

  --color-danger: #dc2626;
  --color-danger-subtle: #fef2f2;
  --color-danger-border: #fecaca;

  --color-info: #0284c7;
  --color-info-subtle: #f0f9ff;
  --color-info-border: #bae6fd;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   1. AUTHENTICATION OVERLAY & LOGIN CARD (LIGHT THEME)
   ========================================================================== */

.auth-wrapper {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease;
}

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

.auth-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: #ffffff;
  color: var(--accent-orange);
  box-shadow: var(--shadow-sm);
}

.auth-logo-badge {
  width: 44px;
  height: 44px;
  background: var(--accent-orange);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.05em;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.auth-header-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-header-text p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.auth-security-notice {
  background: var(--accent-orange-subtle);
  border: 1px solid var(--accent-orange-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c2410c;
  font-size: 0.76rem;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 0.75rem;
  color: var(--text-tertiary);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem 0.65rem 2.35rem;
  color: var(--text-primary);
  font-size: 0.84rem;
  outline: none;
  transition: all 0.15s ease;
}

.input-with-icon input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px var(--accent-orange-border);
}

.auth-error-banner {
  background: var(--color-danger-subtle);
  border: 1px solid var(--color-danger-border);
  color: var(--color-danger);
  font-size: 0.76rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-xs);
  animation: shake 0.25s ease;
  font-weight: 500;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-footer-meta {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

/* ==========================================================================
   2. APP LAYOUT & TOP NAVIGATION (LIGHT THEME)
   ========================================================================== */

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}

.app-header {
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-badge {
  width: 30px;
  height: 30px;
  background: var(--accent-orange);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.05em;
}

.brand-info h2 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.subdomain-badge {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.header-nav-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.nav-tab.active {
  background: var(--bg-surface);
  color: var(--accent-orange);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-default);
}

.badge-count {
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-weight: 700;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Auto-Sync Pill */
.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-success-subtle);
  border: 1px solid var(--color-success-border);
  color: var(--color-success);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
}

.sync-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   3. KPI METRICS RIBBON (LIGHT THEME)
   ========================================================================== */

.main-body {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.kpi-box:hover {
  transform: translateY(-1px);
}

.kpi-box.highlight {
  border-color: var(--accent-orange-border);
  background: linear-gradient(180deg, var(--accent-orange-subtle) 0%, #ffffff 100%);
}

.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.kpi-num {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.kpi-box.highlight .kpi-num {
  color: var(--accent-orange);
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   4. TICKET INTAKE FORM (LIGHT THEME)
   ========================================================================== */

.content-view {
  display: none;
}

.content-view.active {
  display: block;
}

.form-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 1.15rem;
}

.form-header-banner h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-header-banner p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.step-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.step-badge {
  width: 30px;
  height: 30px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--accent-orange);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.step-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: -0.35rem;
}

.req {
  color: var(--color-danger);
  font-weight: 700;
}

.fields-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-box {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.input-box:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px var(--accent-orange-border);
}

.input-box:disabled {
  background: var(--bg-surface-elevated);
  opacity: 0.7;
  cursor: not-allowed;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Category Choice Cards Grid */
.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cat-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  background: var(--bg-surface-elevated);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.cat-card.selected {
  background: var(--accent-orange-subtle);
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 1px var(--accent-orange), 0 4px 10px rgba(234, 88, 12, 0.1);
}

.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cat-card.selected .cat-card-title {
  color: var(--accent-orange);
}

.cat-card-radio {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-card.selected .cat-card-radio {
  border-color: var(--accent-orange);
}

.cat-card.selected .cat-card-radio::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-orange);
}

.cat-card-desc {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  line-height: 1.35;
}

/* Specifics & Quick Pills (Light Theme) */
.specifics-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quick-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.pill-tag {
  font-size: 0.73rem;
  padding: 0.28rem 0.7rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.pill-tag:hover {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
  background: var(--accent-orange-subtle);
}

.pill-tag.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #ffffff;
  font-weight: 600;
}

.segmented-control {
  display: flex;
  gap: 0.5rem;
}

.segmented-btn {
  flex: 1;
  text-align: center;
  padding: 0.55rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.segmented-btn:hover {
  border-color: #cbd5e1;
}

.segmented-btn.active {
  background: var(--accent-orange-subtle);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  font-weight: 700;
}

textarea.input-box {
  min-height: 70px;
  resize: vertical;
}

.form-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-default);
  padding-top: 1.25rem;
}

.operator-note {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.operator-note strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   5. BUTTONS (LIGHT THEME)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
}

.btn-primary:hover {
  background: var(--accent-orange-hover);
  border-color: var(--accent-orange-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-sm {
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
}

.btn-lg {
  font-size: 0.86rem;
  padding: 0.75rem 1.5rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   6. RESOLUTION TRACKER TABLE & CHECKBOXES (LIGHT THEME)
   ========================================================================== */

.tracker-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.tracker-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tracker-header p {
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.tracker-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-box {
  width: 280px;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.78rem;
}

.data-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.data-table td {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.data-table tbody tr:hover td {
  background: #f8fafc;
}

/* Checkbox Column Badges */
.sheet-tick-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  user-select: none;
}

.sheet-tick-badge.ticked {
  background: var(--color-success-subtle);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.sheet-tick-badge.unticked {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.btn-tick-action {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: 0.35rem;
  transition: all 0.15s ease;
}

.btn-tick-action:hover {
  border-color: var(--color-success);
  color: var(--color-success);
  background: var(--color-success-subtle);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.status-pill.pending {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.status-pill.resolved {
  background: var(--color-success-subtle);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.tbom-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #c2410c;
  background: var(--accent-orange-subtle);
  border: 1px solid var(--accent-orange-border);
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-xs);
  display: inline-block;
}

.loading-cell {
  padding: 3rem 1rem;
  color: var(--text-tertiary);
  text-align: center;
}

/* ==========================================================================
   7. TOAST NOTIFICATIONS (LIGHT THEME)
   ========================================================================== */

.toast-shelf {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.15rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 900px) {
  .kpi-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .fields-grid-3 {
    grid-template-columns: 1fr;
  }
  .category-cards-grid {
    grid-template-columns: 1fr;
  }
  .tracker-header {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }
}

/* ==========================================================================
   8. ARABIC LANGUAGE & RTL SUPPORT
   ========================================================================== */

html[dir="rtl"],
html[dir="rtl"] body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .input-with-icon svg {
  left: auto;
  right: 0.75rem;
}

html[dir="rtl"] .input-with-icon input {
  padding: 0.65rem 2.35rem 0.65rem 0.85rem;
  text-align: right;
}

html[dir="rtl"] .toast-shelf {
  right: auto;
  left: 1.5rem;
}

html[dir="rtl"] .toast {
  animation: slideInRtl 0.2s ease;
}

@keyframes slideInRtl {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

html[dir="rtl"] .data-table th,
html[dir="rtl"] .data-table td {
  text-align: right;
}

html[dir="rtl"] .data-table th:first-child,
html[dir="rtl"] .data-table td:first-child {
  text-align: center;
}

html[dir="rtl"] .font-mono {
  direction: ltr;
  display: inline-block;
}

html[dir="rtl"] .sync-status-pill {
  direction: ltr;
}

html[dir="rtl"] .badge-count {
  margin-right: 0.35rem;
  margin-left: 0;
}
