/* ══════════════════════════════════════════════════════════════════
   Cards — flat solid surface per brand_identity_v2.md §5.2
   Cycle 17 B: glass-morphism DEMOTED. The prototype is flat, solid and
   confident — solid white cards, a crisp 1px border, a barely-there
   shadow. No backdrop-filter on card surfaces. The `--surface-glass-*`
   and `--glass-*` tokens are NOT deleted (Lane A keeps them defined);
   they are simply no longer applied as a headline card style.
   ══════════════════════════════════════════════════════════════════ */

/* Base card — flat white surface, 1px line border, 12px radius, faint
   shadow. Bootstrap's default `.card` background/border get replaced. */
.card {
  background: var(--wasla-surface, #ffffff);
  border: 1px solid var(--wasla-line, #E4E7EC);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(20, 40, 70, 0.06);
  transition: box-shadow var(--motion-card, 200ms ease),
              transform var(--motion-card, 200ms ease),
              border-color var(--motion-hover, 150ms ease-out);
}

/* Clickable cards (KPI tiles, link cards) get a slight lift + a
   blue-tinted hover border. Reduced-motion zeroes the motion tokens
   so the lift is instant. */
.card-clickable,
.kpi-row .card,
.card-stat {
  cursor: pointer;
}

.card-clickable:hover,
.kpi-row .card:hover,
.card-stat:hover {
  box-shadow: 0 4px 12px rgba(20, 40, 70, 0.10);
  transform: translateY(-1px);
  border-color: var(--wasla-blue, #0557E7);
}

/* Buttons — press effect only. We do NOT apply glass to buttons. */
.btn:active {
  transform: scale(0.98);
  transition: transform var(--motion-press, 80ms ease-in);
}

/* Cards inside <table>, <td>, or <th> contexts stay solid white —
   no special treatment needed now that the base card is already flat,
   but the explicit rule is kept for clarity. */
table .card,
td .card,
th .card {
  background: #ffffff;
}

[data-bs-theme="dark"] table .card,
[data-bs-theme="dark"] td .card,
[data-bs-theme="dark"] th .card {
  background: var(--wasla-surface);
}

/* Bootstrap's default .text-success (#198754) and .text-danger (#dc3545)
   render at 4.49:1 on the off-white card bg — exactly under WCAG AA's
   4.5:1 by 0.01. We darken them inside cards only so AA passes without
   affecting outside-card usage. */
.card .text-success { color: #146c43 !important; }
.card .text-danger  { color: #b02a37 !important; }
[data-bs-theme="dark"] .card .text-success { color: #75b798 !important; }
[data-bs-theme="dark"] .card .text-danger  { color: #ea868f !important; }
