/* WD Smart System — Design System (SMARTFnB) */

:root {
  --wd-cyan: #4ab3e1;
  --wd-blue: #2d7bb5;
  --wd-navy: #0a2e52;
  --wd-deep: #060d18;
  --bg: #071018;
  --surface: #0f1f35;
  --surface-2: #152a45;
  --border: #1e3a5f;
  --border-light: #2a5080;
  --text: #e8f4fc;
  --muted: #8eb8d4;
  --primary: #4ab3e1;
  --primary-mid: #2d7bb5;
  --primary-dark: #1a5f94;
  --glow: rgba(74, 179, 225, 0.25);
  --danger: #f87171;
  --ok: #4ade80;
  --warn: #fbbf24;
  --radius: 14px;
  --shadow-3d: 0 4px 0 #0a2e52, 0 8px 24px rgba(0,0,0,0.35);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(74,179,225,0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45,123,181,0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(10,46,82,0.5), transparent);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--wd-cyan); }

/* ── Brand header (auth - legacy) ── */
.brand-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand-logo {
  width: 88px;
  height: auto;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 12px rgba(74,179,225,0.3));
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--wd-cyan), var(--wd-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.brand-app {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.3rem 0.85rem;
  background: linear-gradient(135deg, rgba(45,123,181,0.25), rgba(10,46,82,0.5));
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wd-cyan);
}

/* ── Auth pages (SMARTWS-style: light bg + split card) ── */
.page-auth {
  background: #eef2f7;
  color: #1e293b;
  min-height: 100vh;
  background-image: none;
}

.page-auth a { color: var(--wd-blue); }
.page-auth a:hover { color: var(--wd-cyan); }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-split {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(10, 46, 82, 0.12), 0 2px 8px rgba(0,0,0,0.06);
}

/* Brand panel — kiri (laptop) / atas (mobile) */
.auth-brand {
  background: linear-gradient(160deg, #0a2e52 0%, #1a4a7a 55%, #2d7bb5 100%);
  color: #fff;
  padding: 1.75rem 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-inner { width: 100%; }

.brand-logo-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.85rem;
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.brand-logo-wrap img {
  width: 58px;
  height: auto;
}

.auth-product {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.auth-tagline {
  font-size: 0.78rem;
  opacity: 0.85;
  letter-spacing: 0.04em;
}

/* Form panel — kanan (laptop) / bawah (mobile) */
.auth-form-panel {
  padding: 1.5rem 1.75rem 1.25rem;
  background: #fff;
}

.auth-form-panel .page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.auth-form-panel .subtitle {
  color: #64748b;
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

.page-auth .form-group { margin-bottom: 0.75rem; }

.page-auth label {
  color: #475569;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.page-auth input,
.page-auth select,
.page-auth textarea {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.page-auth input:focus,
.page-auth select:focus,
.page-auth textarea:focus {
  border-color: var(--wd-blue);
  box-shadow: 0 0 0 3px rgba(45,123,181,0.15);
  background: #fff;
}

.page-auth .password-toggle { color: #94a3b8; }
.page-auth .password-toggle:hover { color: var(--wd-blue); background: rgba(45,123,181,0.08); }

.page-auth .btn {
  margin-top: 0.25rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.88rem;
}

.page-auth .footer-link {
  margin-top: 0.85rem;
  color: #64748b;
}

.page-auth .auth-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.page-auth .auth-footer .powered {
  font-size: 0.68rem;
  color: #94a3b8;
}

.page-auth .alert-ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.page-auth .alert-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.auth-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0.75rem 0;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.auth-note {
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.5rem;
}

/* Laptop / tablet — split kiri-kanan, muat tanpa scroll */
@media (min-width: 768px) {
  .auth-split {
    flex-direction: row;
    max-width: 780px;
    max-height: 92vh;
  }

  .auth-brand {
    flex: 0 0 36%;
    padding: 2rem 1.5rem;
  }

  .auth-form-panel {
    flex: 1;
    padding: 1.75rem 2rem;
    overflow-y: auto;
  }

  .auth-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }
}

/* Laptop skrin pendek — lebih padat */
@media (min-width: 768px) and (max-height: 780px) {
  .auth-page { padding: 0.5rem; align-items: flex-start; padding-top: 1rem; }

  .auth-split { max-height: 96vh; }

  .auth-brand { padding: 1.25rem 1rem; }
  .brand-logo-wrap { width: 56px; height: 56px; margin-bottom: 0.5rem; }
  .brand-logo-wrap img { width: 44px; }
  .auth-product { font-size: 1.05rem; }
  .auth-tagline { font-size: 0.72rem; }

  .auth-form-panel { padding: 1.25rem 1.5rem; }
  .page-auth .form-group { margin-bottom: 0.55rem; }
  .auth-form-panel .subtitle { margin-bottom: 0.65rem; }
  .page-auth input, .page-auth select, .page-auth textarea { padding: 0.45rem 0.65rem; }
}

/* Mobile kekal elok — panel brand ringkas */
@media (max-width: 767px) {
  .auth-brand { padding: 1.25rem 1rem; }
  .brand-logo-wrap { width: 56px; height: 56px; margin-bottom: 0.5rem; }
  .brand-logo-wrap img { width: 44px; }
  .auth-product { font-size: 1.1rem; }
}

/* Legacy auth-card (unused) */
.auth-card {
  display: none;
}

/* ── App pages (dashboard, dalaman) — terbalik login: biru bg, putih kad ── */
.page-app {
  background: linear-gradient(160deg, #0a2e52 0%, #1a4a7a 50%, #2d7bb5 100%);
  background-attachment: fixed;
  color: #1e293b;
  min-height: 100vh;
}

.page-app a { color: var(--wd-blue); }
.page-app a:hover { color: var(--wd-cyan); }

/* Topbar putih */
.page-app .topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 1.5rem;
  box-shadow: 0 2px 12px rgba(10, 46, 82, 0.1);
}

.page-app .topbar-logo {
  width: 32px;
  height: auto;
  filter: none;
}

.page-app .topbar-brand {
  gap: 0.6rem;
}

.page-app .topbar .brand-logo-wrap-sm {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(10,46,82,0.12);
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.page-app .topbar .brand-logo-wrap-sm img {
  width: 28px;
  height: auto;
}

.page-app .topbar .brand-text {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--wd-blue);
  background: none;
  -webkit-text-fill-color: var(--wd-blue);
}

.page-app .topbar .shop-name {
  color: #64748b;
  font-size: 0.78rem;
}

.page-app .nav-links a {
  color: #475569;
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.page-app .nav-links a:hover {
  color: var(--wd-blue);
  background: rgba(45,123,181,0.08);
}

.page-app .nav-links a.active {
  color: var(--wd-blue);
  font-weight: 600;
}

/* Log keluar — ikon pintu 2D */
.page-app .logout-form { display: inline; margin: 0; }

.page-app .btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: #fff;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.page-app .btn-logout:hover {
  color: var(--wd-blue);
  border-color: var(--wd-blue);
  background: rgba(45,123,181,0.06);
}

.page-app .btn-logout svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-app .container {
  max-width: 720px;
  padding: 1.25rem 1.5rem 2rem;
}

@media (min-width: 768px) {
  .page-app .container--wide,
  .page-app .container:has(.dashboard-layout) {
    max-width: 920px;
  }
}

/* Dashboard laptop — welcome kiri, modul kanan */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard-layout {
    display: grid;
    grid-template-columns: minmax(220px, 32%) 1fr;
    gap: 1rem;
    align-items: stretch;
  }

  .dashboard-layout .card {
    margin-bottom: 0;
    height: 100%;
  }

  .dashboard-layout .welcome-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem;
    min-height: 100%;
  }

  .dashboard-layout .welcome-icon {
    margin: 0 auto 0.75rem;
  }

  .dashboard-layout .welcome-title {
    font-size: 0.92rem;
    word-break: break-word;
  }

  .dashboard-layout .welcome-role {
    font-size: 0.76rem;
  }
}

/* Kad putih */
.page-app .card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(10, 46, 82, 0.1);
}

.page-app .card h2,
.page-app .section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

.page-app .welcome-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.page-app .welcome-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-app .welcome-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(45,123,181,0.1);
  border: 1px solid rgba(45,123,181,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
}

.page-app .welcome-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--wd-blue);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-app .text-muted { color: #64748b; }

/* Modul senarai — gaya SMARTWS portal (ikon 2D) */
.page-app .module-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-app .module-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.page-app .module-item:hover:not(.disabled) {
  border-color: var(--wd-blue);
  box-shadow: 0 2px 12px rgba(45,123,181,0.12);
  text-decoration: none;
  color: #0f172a;
}

.page-app .module-item.disabled {
  opacity: 0.55;
  pointer-events: none;
  background: #f8fafc;
}

.page-app .module-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-app .module-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--wd-blue);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-app .module-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.page-app .module-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
}

.page-app .module-phase {
  font-size: 0.68rem;
  color: #94a3b8;
}

.page-app .module-arrow {
  color: #cbd5e1;
  font-size: 1.25rem;
  line-height: 1;
}

.page-app .module-note {
  margin-top: 0.85rem;
  font-size: 0.82rem;
}

/* Borang & jadual dalam app — tema cerah */
.page-app label {
  color: #475569;
  font-size: 0.76rem;
}

.page-app input,
.page-app select,
.page-app textarea {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.84rem;
  padding: 0.5rem 0.7rem;
}

.page-app input:focus,
.page-app select:focus,
.page-app textarea:focus {
  border-color: var(--wd-blue);
  box-shadow: 0 0 0 3px rgba(45,123,181,0.15);
  background: #fff;
}

/* Butang padat dalam app */
.page-app .btn {
  padding: 0.48rem 1rem;
  font-size: 0.82rem;
  box-shadow: 0 2px 0 var(--wd-navy), 0 4px 10px rgba(45,123,181,0.2);
}

.page-app .btn-compact {
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
  box-shadow: 0 2px 0 var(--wd-navy), 0 3px 8px rgba(45,123,181,0.18);
}

.page-app .btn-compact.btn-danger {
  box-shadow: 0 2px 0 #450a0a;
}

/* Butang ikon — kunci/buka pekerja */
.page-app .inline-form {
  display: inline;
  margin: 0;
}

.page-app .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: none;
}

.page-app .btn-icon svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-app .btn-icon-lock {
  background: #ef4444;
}

.page-app .btn-icon-lock:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.page-app .btn-icon-unlock {
  background: #22c55e;
}

.page-app .btn-icon-unlock:hover {
  background: #16a34a;
  transform: scale(1.05);
}

.page-app .btn-secondary {
  background: #fff;
  color: var(--wd-blue);
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.page-app .btn-secondary:hover {
  background: #f1f5f9;
  color: var(--wd-navy);
}

/* Jadual — scroll mendatar pada mobile */
.page-app .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.page-app .table-wrap table {
  min-width: 480px;
}

.page-app th { color: #64748b; border-color: #e2e8f0; font-size: 0.72rem; }
.page-app td { border-color: #f1f5f9; color: #334155; font-size: 0.82rem; padding: 0.55rem 0.65rem; }

.page-app .info-row { border-color: #f1f5f9; }
.page-app .info-row span:first-child { color: #64748b; }
.page-app .info-row span:last-child { color: #0f172a; font-weight: 500; }

.page-app .alert-ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.page-app .alert-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.page-app .banner-danger { background: #fef2f2; color: #dc2626; }
.page-app .banner-warn { background: #fffbeb; color: #b45309; }

.page-app .badge-ok { background: #dcfce7; color: #15803d; }
.page-app .badge-danger { background: #fee2e2; color: #dc2626; }

.page-app .password-toggle { color: #94a3b8; }
.page-app .password-toggle:hover { color: var(--wd-blue); background: rgba(45,123,181,0.08); }

/* ── Topbar (legacy dark — overridden by .page-app) ── */
.topbar {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(15,31,53,0.95) 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar-logo {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(74,179,225,0.25));
}

.topbar .brand-text {
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--wd-cyan), var(--wd-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar .shop-name {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.nav-links a {
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--wd-cyan);
  background: rgba(74,179,225,0.08);
  text-decoration: none;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Cards ── */
.card {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(21,42,69,0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.card h2 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--wd-cyan);
  font-weight: 600;
}

.welcome-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--wd-blue), var(--wd-navy));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-3d);
  flex-shrink: 0;
}

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--wd-blue);
  box-shadow: 0 0 0 3px var(--glow);
}

/* Password toggle */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  color: var(--muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: var(--wd-cyan);
  background: rgba(74,179,225,0.1);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-on { display: none; }
.password-toggle.visible .icon-eye-off { display: none; }
.password-toggle.visible .icon-eye-on { display: block; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  background: linear-gradient(135deg, var(--wd-cyan) 0%, var(--wd-blue) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 0 var(--wd-navy), 0 6px 16px rgba(45,123,181,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--wd-navy), 0 8px 20px rgba(45,123,181,0.45);
  text-decoration: none;
  color: #fff;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--wd-navy);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: 0 2px 0 var(--wd-navy);
  border: 1px solid var(--border);
}

.btn-secondary:hover { color: var(--text); background: var(--border); }
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 4px 0 #450a0a;
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; text-align: center; }

/* ── Alerts & banners ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border: 1px solid transparent;
}

.alert-ok { background: rgba(20,83,45,0.4); color: var(--ok); border-color: rgba(74,222,128,0.2); }
.alert-danger { background: rgba(69,10,10,0.4); color: var(--danger); border-color: rgba(248,113,113,0.2); }

.banner {
  padding: 0.7rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}

.banner-danger { background: rgba(69,10,10,0.6); color: var(--danger); }
.banner-warn { background: rgba(66,32,6,0.6); color: var(--warn); }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

th, td {
  padding: 0.7rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th { color: var(--muted); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-ok { background: rgba(20,83,45,0.5); color: var(--ok); }
.badge-danger { background: rgba(69,10,10,0.5); color: var(--danger); }

.text-muted { color: var(--muted); font-size: 0.85rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--muted); }

/* ── 3D Module tiles ── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.tile {
  background: linear-gradient(160deg, var(--surface-2), var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tile:hover:not(.disabled) {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: 0 8px 24px rgba(45,123,181,0.2);
  text-decoration: none;
  color: var(--text);
}

.tile-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(145deg, var(--wd-cyan) 0%, var(--wd-blue) 50%, var(--wd-navy) 100%);
  box-shadow:
    0 4px 0 var(--wd-navy),
    0 6px 16px rgba(74,179,225,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.tile .label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.tile .phase {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.tile.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.tile.disabled .tile-icon {
  background: linear-gradient(145deg, #334155, #1e293b);
  box-shadow: 0 3px 0 #0f172a;
}

.footer-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.auth-footer .powered {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { flex-wrap: wrap; }
  .topbar { padding: 0.65rem 1rem; }
}

[hidden] { display: none !important; }
