/* ==========================================================================
   Rahman & Associates - Regal Legal Heritage & Luxury Modern Law Firm Theme
   Super Mobile-Friendly & Ultra-Fast Zero-Lag Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-bengali: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-latin: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Regal Legal Theme Colors - Midnight Navy & Rich Majestic Gold */
  --color-primary-navy: #09121F;      /* Deepest Supreme Court Navy */
  --color-navy-card: #0F1D33;         /* Card background dark */
  --color-navy-light: #182A4A;        /* Elevated dark surface */
  
  --color-gold-base: #C59B27;         /* Burnished Gold */
  --color-gold-light: #DFB743;        /* Bright Gold Accent */
  --color-gold-dark: #967215;         /* Deep Antique Gold */
  --color-gold-glow: rgba(197, 155, 39, 0.25);

  --color-emerald: #0D9488;           /* Trust Teal/Emerald */
  --color-rose: #E11D48;

  --bg-body: #F9FAFB;
  --bg-card: #FFFFFF;
  --text-primary: #0F172A;
  --text-muted: #475569;
  --border-subtle: #E2E8F0;
}

/* Safe area support for notch and home bars */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-bengali);
  background-color: var(--bg-body);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #09121F;
}
::-webkit-scrollbar-thumb {
  background: #C59B27;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #DFB743;
}

/* ==========================================================================
   Regal Gold & Navy Accents
   ========================================================================== */

/* Gold Gradient Text */
.text-gold-gradient {
  background: linear-gradient(135deg, #B48518 0%, #D4AF37 40%, #F5C754 70%, #C59B27 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-navy-gradient {
  background: linear-gradient(135deg, #09121F 0%, #1E3A8A 50%, #0F172A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Gold Button Style */
.btn-gold {
  background: linear-gradient(135deg, #C59B27 0%, #DFB743 50%, #B88E1E 100%);
  color: #09121F;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(197, 155, 39, 0.35);
  transition: all 0.25s ease;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #D4AF37 0%, #F0CB5A 50%, #C59B27 100%);
  box-shadow: 0 6px 20px rgba(197, 155, 39, 0.5);
  transform: translateY(-2px);
}
.btn-gold:active {
  transform: translateY(0);
}

/* Navy Button Style */
.btn-navy {
  background: #09121F;
  color: #F8FAFC;
  border: 1px solid #1E2D4A;
  transition: all 0.25s ease;
}
.btn-navy:hover {
  background: #101E35;
  border-color: #C59B27;
  color: #F5C754;
}

/* Badges */
.badge-gold {
  background: rgba(197, 155, 39, 0.12);
  border: 1px solid rgba(197, 155, 39, 0.35);
  color: #967215;
}

.badge-gold-dark {
  background: rgba(223, 183, 67, 0.15);
  border: 1px solid rgba(223, 183, 67, 0.4);
  color: #F5C754;
}

/* Navigation blur */
.glass-nav-regal {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(197, 155, 39, 0.2);
}

.glass-nav-scrolled {
  box-shadow: 0 4px 20px rgba(9, 18, 31, 0.08);
}

/* Cards & Elevated Containers */
.regal-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.regal-card:hover {
  border-color: #C59B27;
  box-shadow: 0 16px 32px -8px rgba(197, 155, 39, 0.15), 0 4px 12px rgba(0, 0, 0, 0.03);
  transform: translateY(-3px);
}

/* Subtle Law Geometric Pattern */
.bg-court-pattern {
  background-color: #09121F;
  background-image: radial-gradient(rgba(197, 155, 39, 0.15) 1px, transparent 1px);
  background-size: 28px 28px;
}

.bg-light-pattern {
  background-image: radial-gradient(rgba(9, 18, 31, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ==========================================================================
   Super Mobile-Friendly Specific Rules
   ========================================================================== */

/* Touch-optimized tap targets (min 44px) */
.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Horizontal pill scrollbar hiding for clean swipe on phones */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Mobile Sticky Bottom Tab Bar */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(9, 18, 31, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(197, 155, 39, 0.35);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

/* Pulsing call/wa button */
@keyframes goldPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(197, 155, 39, 0.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(197, 155, 39, 0);
  }
}

.pulse-gold {
  animation: goldPulse 2s infinite ease-out;
}

/* Native Dialog with Smooth Backdrop */
dialog {
  border: none;
  padding: 0;
  max-width: min(92vw, 560px);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(9, 18, 31, 0.5);
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(9, 18, 31, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Accordion Smooth Chevron */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
}
details[open] summary .accordion-chevron {
  transform: rotate(180deg);
}

/* ==========================================================================
   Admin Dashboard & Toast Notifications (ZnexBD Regal Law Aesthetic)
   ========================================================================== */

/* Admin Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.status-new {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-in-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-resolved {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-active-case {
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-urgent {
  background: rgba(225, 29, 72, 0.2);
  color: #FB7185;
  border: 1px solid rgba(225, 29, 72, 0.5);
}

/* Printable Case Brief & Docket Styles */
@media print {
  aside, nav, header, #auth-screen, .no-print, button, #lead-search-input, .lead-filter-btn {
    display: none !important;
  }
  
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  main {
    padding: 0 !important;
    background: #ffffff !important;
  }

  dialog[open]#lead-docket-dialog {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 1cm !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  th, td {
    color: #111827 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  * {
    color: #111827 !important;
    background: transparent !important;
  }

  .print-only {
    display: block !important;
  }
}

/* Toast Notification */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.law-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #09121F;
  color: #FFFFFF;
  border: 1px solid #C59B27;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-size: 0.875rem;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.law-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Admin Sidebar Active Link */
.admin-nav-link.active {
  background: rgba(197, 155, 39, 0.15);
  color: #DFB743;
  border-left: 3px solid #C59B27;
  font-weight: 700;
}

/* Mobile Dock Active Link */
.mobile-dock-btn.active {
  color: #DFB743 !important;
}
.mobile-dock-btn.active svg {
  color: #DFB743 !important;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.safe-area-bottom {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

/* Touch & Mobile Friendliness for Public Site */
@media (max-width: 640px) {
  body:not(.admin-body) input,
  body:not(.admin-body) select,
  body:not(.admin-body) textarea {
    font-size: 16px;
  }
  body:not(.admin-body) .touch-target {
    min-height: 44px;
  }
}

/* Admin Dashboard Compact, Professional & Executive Sizing */
body.admin-body {
  font-size: 12px;
  line-height: 1.4;
}

body.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.admin-body select {
  font-size: 11.5px !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
  min-height: 30px !important;
  height: 30px !important;
  border-radius: 0.375rem !important;
}

body.admin-body textarea {
  font-size: 11.5px !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 0.375rem !important;
}

body.admin-body .touch-target {
  min-height: auto !important;
  min-width: auto !important;
}

/* Compact Admin Buttons */
body.admin-body button:not(.mobile-dock-btn) {
  border-radius: 0.375rem;
  font-size: 11.5px;
}

body.admin-body .btn-gold {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  font-size: 11.5px !important;
  min-height: 30px !important;
  border-radius: 0.375rem !important;
}

/* Compact table cells */
body.admin-body table th,
body.admin-body table td {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
}

/* Compact stat & info cards */
body.admin-body .admin-panel > div.grid > div {
  padding: 0.85rem !important;
}

body.admin-body .status-pill {
  font-size: 10px !important;
  padding: 0.15rem 0.5rem !important;
}



