/* ============================================================
   ARUNE SUPERSEO v2.1 — COMPONENTS
   KPI Cards, Buttons, Badges, Tables, Forms, Modals, etc.
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   KPI CARDS
   ══════════════════════════════════════════════════════════ */

.kpi-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  cursor: default;
}

.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-med);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-card.kpi-primary {
  border-color: rgba(108,99,255,0.3);
  box-shadow: 0 0 0 1px rgba(108,99,255,0.1);
}

.kpi-card.kpi-primary:hover {
  border-color: rgba(108,99,255,0.5);
  box-shadow: var(--shadow-glow-primary), var(--shadow-card);
}

.kpi-card.kpi-accent {
  border-color: rgba(0,212,170,0.3);
  box-shadow: 0 0 0 1px rgba(0,212,170,0.1);
}

.kpi-card.kpi-accent:hover {
  border-color: rgba(0,212,170,0.5);
  box-shadow: var(--shadow-glow-accent), var(--shadow-card);
}

.kpi-card.kpi-danger {
  border-color: rgba(255,77,109,0.3);
  box-shadow: 0 0 0 1px rgba(255,77,109,0.1);
}

.kpi-card.kpi-danger:hover {
  border-color: rgba(255,77,109,0.5);
  box-shadow: var(--shadow-glow-danger), var(--shadow-card);
}

.kpi-card.kpi-warning {
  border-color: rgba(255,184,48,0.3);
  box-shadow: 0 0 0 1px rgba(255,184,48,0.1);
}

.kpi-card.kpi-warning:hover {
  border-color: rgba(255,184,48,0.5);
  box-shadow: var(--shadow-glow-warning), var(--shadow-card);
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.kpi-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}

.kpi-primary .kpi-icon {
  background: rgba(108,99,255,0.15);
  border-color: rgba(108,99,255,0.25);
}

.kpi-accent .kpi-icon {
  background: rgba(0,212,170,0.15);
  border-color: rgba(0,212,170,0.25);
}

.kpi-danger .kpi-icon {
  background: rgba(255,77,109,0.15);
  border-color: rgba(255,77,109,0.25);
}

.kpi-warning .kpi-icon {
  background: rgba(255,184,48,0.15);
  border-color: rgba(255,184,48,0.25);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: var(--space-2) 0;
}

.kpi-primary .kpi-value { color: var(--color-primary-light); }
.kpi-accent  .kpi-value { color: var(--color-accent); }
.kpi-danger  .kpi-value { color: var(--color-danger); }
.kpi-warning .kpi-value { color: var(--color-warning); }

.kpi-bottom {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}

.kpi-change.positive {
  background: rgba(34,211,165,0.15);
  color: var(--color-success);
  border: 1px solid rgba(34,211,165,0.25);
}

.kpi-change.negative {
  background: rgba(255,77,109,0.15);
  color: var(--color-danger);
  border: 1px solid rgba(255,77,109,0.25);
}

.kpi-change.neutral {
  background: rgba(139,143,168,0.15);
  color: var(--color-text-secondary);
  border: 1px solid rgba(139,143,168,0.2);
}

.kpi-sublabel {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}

.btn:hover::after {
  background: rgba(255,255,255,0.06);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  border-color: rgba(108,99,255,0.4);
  box-shadow: 0 2px 12px rgba(108,99,255,0.25);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-primary), 0 2px 12px rgba(108,99,255,0.35);
  transform: translateY(-1px);
}

/* Accent */
.btn-accent {
  background: var(--gradient-accent);
  color: #0D1A16;
  border-color: rgba(0,212,170,0.4);
  box-shadow: 0 2px 12px rgba(0,212,170,0.2);
}

.btn-accent:hover {
  box-shadow: var(--shadow-glow-accent), 0 2px 12px rgba(0,212,170,0.3);
  transform: translateY(-1px);
}

/* Danger */
.btn-danger {
  background: var(--gradient-danger);
  color: #fff;
  border-color: rgba(255,77,109,0.4);
  box-shadow: 0 2px 12px rgba(255,77,109,0.2);
}

.btn-danger:hover {
  box-shadow: var(--shadow-glow-danger);
  transform: translateY(-1px);
}

/* Warning */
.btn-warning {
  background: var(--gradient-warning);
  color: #1A1C30;
  border-color: rgba(255,184,48,0.4);
}

.btn-warning:hover {
  box-shadow: var(--shadow-glow-warning);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.06);
  border-color: var(--color-border-hover);
}

/* Ghost Primary */
.btn-ghost-primary {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(108,99,255,0.35);
}

.btn-ghost-primary:hover {
  background: rgba(108,99,255,0.1);
  border-color: rgba(108,99,255,0.5);
}

/* Sizes */
.btn-sm {
  padding: 5px 12px;
  font-size: var(--text-xs);
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 12px 24px;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  flex-shrink: 0;
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.btn-icon:hover {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.06);
  border-color: var(--color-border-hover);
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════
   BADGES / CHIPS
   ══════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-critical {
  background: rgba(255,77,109,0.2);
  color: var(--color-danger);
  border: 1px solid rgba(255,77,109,0.35);
}

.badge-high {
  background: rgba(255,184,48,0.18);
  color: var(--color-warning);
  border: 1px solid rgba(255,184,48,0.3);
}

.badge-medium {
  background: rgba(255,220,80,0.15);
  color: #FFE066;
  border: 1px solid rgba(255,220,80,0.25);
}

.badge-low {
  background: rgba(96,165,250,0.15);
  color: #93C5FD;
  border: 1px solid rgba(96,165,250,0.25);
}

.badge-success {
  background: rgba(34,211,165,0.15);
  color: var(--color-success);
  border: 1px solid rgba(34,211,165,0.25);
}

.badge-info {
  background: rgba(108,99,255,0.18);
  color: var(--color-primary-light);
  border: 1px solid rgba(108,99,255,0.3);
}

.badge-neutral {
  background: rgba(139,143,168,0.15);
  color: var(--color-text-secondary);
  border: 1px solid rgba(139,143,168,0.2);
}

.badge-accent {
  background: rgba(0,212,170,0.15);
  color: var(--color-accent);
  border: 1px solid rgba(0,212,170,0.25);
}

/* ══════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════ */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.table-wrapper::-webkit-scrollbar {
  height: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table thead th {
  background: var(--color-surface-2);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
  user-select: none;
}

.data-table thead th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.data-table thead th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.data-table thead th.sortable {
  cursor: pointer;
}

.data-table thead th.sortable:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-3);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(108,99,255,0.05);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table td.wrap {
  white-space: normal;
}

.data-table .col-action {
  text-align: right;
}

.data-table .col-center {
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════ */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: var(--color-border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.card-body {
  flex: 1;
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Glassmorphic Card */
.card-glass {
  background: rgba(17,18,36,0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BARS
   ══════════════════════════════════════════════════════════ */

.progress {
  width: 100%;
  height: 8px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-sm { height: 4px; }
.progress-lg { height: 12px; }

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  transition: width var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

.progress-bar.success {
  background: var(--gradient-success);
}

.progress-bar.warning {
  background: var(--gradient-warning);
}

.progress-bar.danger {
  background: var(--gradient-danger);
}

.progress-bar.accent {
  background: var(--gradient-accent);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.progress-label span:last-child {
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */

.form-group {
  margin-bottom: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.form-label.required::after {
  content: '*';
  color: var(--color-danger);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.2);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B8FA8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: var(--lh-relaxed);
}

.form-hint {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--lh-snug);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(255,77,109,0.15);
}

/* Toggle / Switch */
.form-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--color-text-secondary);
  border-radius: 50%;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

input[type="checkbox"]:checked + .toggle-track {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

input[type="checkbox"]:checked + .toggle-track::after {
  transform: translateX(18px);
  background: #fff;
}

/* ══════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════ */

/* Modal overlay — hidden by default, shown via .modal-visible class */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,11,20,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal-overlay.modal-visible {
  display: flex;
  animation: fadeIn 0.2s ease;
}

/* Respect [hidden] attribute on module containers */
.module-container[hidden] { display: none !important; }

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), var(--shadow-glow-primary);
  animation: slideInUp 0.3s var(--transition-bounce);
  overflow: hidden;
}

.modal-sm  { max-width: 440px; }
.modal-lg  { max-width: 840px; }
.modal-xl  { max-width: 1100px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-surface-2);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-surface-2);
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════ */

.tab-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
  overflow-x: auto;
  padding-bottom: 0;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.04);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
  background: rgba(108,99,255,0.07);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Pill-style tabs */
.tab-nav-pills {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 4px;
  flex-wrap: wrap;
}

.tab-btn-pill {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  white-space: nowrap;
}

.tab-btn-pill:hover {
  color: var(--color-text-primary);
}

.tab-btn-pill.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(108,99,255,0.3);
}

/* ══════════════════════════════════════════════════════════
   STATUS INDICATORS
   ══════════════════════════════════════════════════════════ */

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-active {
  background: var(--color-success);
  box-shadow: 0 0 0 0 rgba(34,211,165,0.4);
  animation: pulseGlowGreen 2s infinite;
}

.status-warning {
  background: var(--color-warning);
  box-shadow: 0 0 0 0 rgba(255,184,48,0.4);
  animation: pulseGlowOrange 2s infinite;
}

.status-error {
  background: var(--color-danger);
  box-shadow: 0 0 0 0 rgba(255,77,109,0.4);
  animation: pulseGlowRed 2s infinite;
}

.status-inactive {
  background: var(--color-text-muted);
}

@keyframes pulseGlowGreen {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,165,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34,211,165,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,165,0); }
}

@keyframes pulseGlowOrange {
  0%   { box-shadow: 0 0 0 0 rgba(255,184,48,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(255,184,48,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,184,48,0); }
}

@keyframes pulseGlowRed {
  0%   { box-shadow: 0 0 0 0 rgba(255,77,109,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(255,77,109,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,109,0); }
}

/* Status Badge (text + dot) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.status-badge-active {
  background: rgba(34,211,165,0.12);
  color: var(--color-success);
  border: 1px solid rgba(34,211,165,0.25);
}

.status-badge-warning {
  background: rgba(255,184,48,0.12);
  color: var(--color-warning);
  border: 1px solid rgba(255,184,48,0.25);
}

.status-badge-error {
  background: rgba(255,77,109,0.12);
  color: var(--color-danger);
  border: 1px solid rgba(255,77,109,0.25);
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: var(--z-toast);
  pointer-events: none;
  max-width: 380px;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  pointer-events: all;
  animation: slideInRight 0.35s var(--transition-bounce);
  border-left: 3px solid var(--color-primary);
  position: relative;
  overflow: hidden;
}

.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error   { border-left-color: var(--color-danger); }
.toast.toast-warning { border-left-color: var(--color-warning); }
.toast.toast-info    { border-left-color: var(--color-primary); }

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: var(--lh-snug);
}

.toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--color-text-primary);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.35;
  animation: toastProgress var(--duration, 4s) linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ══════════════════════════════════════════════════════════
   METRIC ROW
   ══════════════════════════════════════════════════════════ */

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.metric-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metric-row:first-child {
  padding-top: 0;
}

.metric-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.metric-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: right;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   TIMELINE
   ══════════════════════════════════════════════════════════ */

.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), rgba(108,99,255,0.1));
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-5);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-2rem - 3px);
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-glow-primary);
  z-index: 1;
}

.timeline-dot.success { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success); }
.timeline-dot.warning { background: var(--color-warning); box-shadow: 0 0 0 2px var(--color-warning); }
.timeline-dot.danger  { background: var(--color-danger);  box-shadow: 0 0 0 2px var(--color-danger); }

.timeline-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition-fast);
}

.timeline-content:hover {
  border-color: var(--color-border-hover);
}

.timeline-content-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.timeline-content-text {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: var(--lh-snug);
}

/* ══════════════════════════════════════════════════════════
   CHARTS
   ══════════════════════════════════════════════════════════ */

.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-container.sm { height: 200px; }
.chart-container.lg { height: 400px; }

.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.chart-legend-item:hover {
  color: var(--color-text-primary);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-legend-line {
  width: 20px;
  height: 2px;
  border-radius: 1px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   RISK / APPROVAL CARDS
   ══════════════════════════════════════════════════════════ */

.risk-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.risk-card:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.risk-high    { border-left-color: var(--color-danger); }
.risk-medium  { border-left-color: var(--color-warning); }
.risk-low     { border-left-color: #60A5FA; }
.risk-none    { border-left-color: var(--color-success); }

/* Countdown Timer */
.countdown-timer {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.countdown-timer.urgent {
  color: var(--color-danger);
  animation: pulse 1s infinite;
}

.countdown-timer.warning {
  color: var(--color-warning);
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-text-secondary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  max-width: 320px;
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-5);
}

/* ══════════════════════════════════════════════════════════
   DROPDOWN
   ══════════════════════════════════════════════════════════ */

.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  animation: slideInUp 0.2s ease;
  display: none;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.06);
}

.dropdown-item.danger:hover {
  color: var(--color-danger);
  background: rgba(255,77,109,0.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-1) 0;
}

/* ══════════════════════════════════════════════════════════
   TOOLTIPS
   ══════════════════════════════════════════════════════════ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface-3);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-dropdown);
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   INLINE COPY BUTTON
   ══════════════════════════════════════════════════════════ */

.copy-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.copy-btn {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-surface-3);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 1;
}

.copy-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-2);
}

.copy-btn.copied {
  color: var(--color-success);
  border-color: rgba(34,211,165,0.3);
}

/* ══════════════════════════════════════════════════════════
   DIVIDER WITH TEXT
   ══════════════════════════════════════════════════════════ */

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ══════════════════════════════════════════════════════════
   SEARCH INPUT
   ══════════════════════════════════════════════════════════ */

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 8px 14px 8px 36px;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

/* ══════════════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════════════ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(108,99,255,0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spinSlow 0.8s linear infinite;
}

.spinner-sm { width: 14px; height: 14px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

.spinner-accent {
  border-color: rgba(0,212,170,0.2);
  border-top-color: var(--color-accent);
}



/* ================================================================
   ARUNE INTERIORS — PERMANENT PROFESSIONAL CURSOR OVERRIDE
   Completely destroys trishul-cursor and custom image cursors site-wide.
================================================================ */

*, *::before, *::after, html, body {
  cursor: auto !important;
}

a, button, select, textarea, input, .btn, .btn-one, .theme-btn, .submit-btn, .glass-card, .btn-luxury-gold, .btn-luxury-outline {
  cursor: pointer !important;
}

input[type="text"], input[type="email"], input[type="tel"], textarea {
  cursor: text !important;
}

/* Hard disable any magic-cursor or trishul-cursor elements */
#magic-cursor-dot, #magic-cursor-ring, [class*="trishul"], [id*="trishul"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
