/* ==========================================================================
   DESIGN SYSTEM - ADVOCATE DIARY (ATMS)
   Prestige Legal Navy & Burnished Gold Palette, Executive Typography & Elevation
   ========================================================================== */

:root {
  /* Prestige Legal Palette (HSL Tailored) */
  --primary-950: hsl(222, 60%, 8%);   /* #060e1a - Deepest Executive Ink */
  --primary-900: hsl(220, 50%, 12%);  /* #0f1c30 - Core Judicial Navy */
  --primary-800: hsl(220, 40%, 18%);  /* #1c2b44 - Slate Navy */
  --primary-700: hsl(220, 32%, 26%);  /* #2d3f5e */
  --primary-100: hsl(218, 35%, 93%);
  --primary-50:  hsl(218, 45%, 97%);

  /* Warm Burnished Gold & Brass Accents */
  --accent-gold-900: hsl(38, 75%, 22%); /* Deep bronze */
  --accent-gold-700: hsl(38, 80%, 38%);
  --accent-gold-500: hsl(40, 85%, 48%); /* #df9a15 - Burnished Gold */
  --accent-gold-400: hsl(42, 90%, 58%);
  --accent-gold-100: hsl(40, 85%, 94%);
  --accent-gold-50:  hsl(42, 95%, 98%);

  /* Neutral Crisp Surfaces */
  --bg-app:        hsl(215, 25%, 97%);
  --bg-surface:    #ffffff;
  --bg-subtle:     hsl(215, 20%, 94%);
  --border-subtle: hsl(215, 18%, 88%);
  --border-strong: hsl(215, 22%, 78%);
  
  --text-main:      hsl(222, 45%, 11%); /* Ultra-crisp slate ink */
  --text-muted:     hsl(220, 16%, 42%);
  --text-subtle:    hsl(220, 12%, 62%);
  --text-inverse:   #ffffff;

  /* Court Status Indicators */
  --status-urgent:      hsl(354, 78%, 52%); /* Clashing / Stay / Warrant */
  --status-urgent-bg:   hsl(354, 90%, 96%);
  --status-adjourned:   hsl(35, 88%, 45%);  /* Next Date Logged */
  --status-adjourned-bg: hsl(38, 95%, 95%);
  --status-active:      hsl(215, 75%, 48%); /* Regular Listing */
  --status-active-bg:   hsl(215, 90%, 96%);
  --status-success:     hsl(154, 70%, 34%); /* Disposed / Won / Settled */
  --status-success-bg:  hsl(152, 75%, 94%);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(10, 25, 47, 0.04);
  --shadow-sm: 0 2px 5px rgba(10, 25, 47, 0.06), 0 1px 2px rgba(10, 25, 47, 0.04);
  --shadow-md: 0 4px 14px rgba(10, 25, 47, 0.08), 0 2px 4px rgba(10, 25, 47, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(10, 25, 47, 0.12), 0 4px 8px -2px rgba(10, 25, 47, 0.06);
  --shadow-xl: 0 20px 36px -6px rgba(10, 25, 47, 0.18);
  --shadow-float: 0 14px 32px rgba(10, 25, 47, 0.25);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-smooth);
  --transition-normal: 240ms var(--ease-smooth);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  font-family: var(--font-sans);
  background-color: var(--primary-950);
  color: var(--text-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
}

/* Button & Input Base */
button {
  font-family: var(--font-sans);
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  font-size: 0.95rem;
  touch-action: manipulation;
}

input, textarea, select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

/* Custom Dialog Box Styling */
.custom-dialog-box {
  padding: 1.35rem;
  text-align: center;
}

.dialog-icon-shield {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem auto;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--accent-gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.dialog-icon-shield.urgent {
  background: var(--status-urgent-bg);
  color: var(--status-urgent);
  border-color: rgba(220, 38, 38, 0.25);
}

.dialog-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: 0.35rem;
}

.dialog-message {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1.15rem;
}

/* Auth Viewport Styles */
.auth-viewport-screen {
  padding: 1rem 0.5rem 2rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-header-card {
  text-align: center;
  padding: 1rem 0.5rem;
}

.auth-crest-box {
  width: 54px;
  height: 54px;
  margin: 0 auto 0.75rem auto;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  border: 2px solid var(--accent-gold-500);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold-400);
  box-shadow: 0 4px 16px rgba(10, 25, 47, 0.25);
}

.auth-chamber-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-900);
}

.auth-chamber-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 0.2rem;
}

.auth-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-700);
  margin-top: 0.65rem;
}

.auth-form-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.auth-role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.65rem 0.45rem;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.auth-role-card:hover {
  border-color: var(--accent-gold-500);
  color: var(--text-main);
}

.auth-role-card.active {
  background: var(--primary-900);
  color: var(--accent-gold-400);
  border-color: var(--primary-900);
  box-shadow: var(--shadow-sm);
}

.auth-otp-shield {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.75rem auto;
  border-radius: var(--radius-full);
  background: var(--accent-gold-50);
  color: var(--accent-gold-700);
  border: 1px solid rgba(223, 154, 21, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.otp-box {
  width: 42px;
  height: 48px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--bg-app);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--primary-900);
  transition: all var(--transition-fast);
}

.otp-box:focus {
  border-color: var(--accent-gold-500);
  box-shadow: 0 0 0 3px rgba(223, 154, 21, 0.2);
  background: #ffffff;
}

/* Security Lock Screen */
.security-lock-screen {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

.lock-shield-crest {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  border: 2px solid var(--accent-gold-500);
  color: var(--accent-gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1rem;
}

.lock-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-900);
  letter-spacing: 0.06em;
}

.lock-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.25rem;
}

.lock-role-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.pin-dots-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-strong);
  background: transparent;
  transition: all var(--transition-fast);
}

.pin-dot.filled {
  background: var(--primary-900);
  border-color: var(--primary-900);
}
