/* ============================================================================
   Gordon's Bait & Tackle — Soft UI (Neumorphism) Theme
   Raised white-highlighted surfaces + recessed inset data wells
   ============================================================================ */

:root {
  --bg: #e6ebf2;
  --surface: #e8edf4;
  --shadow-light: #ffffff;
  --shadow-dark: #c3cddb;
  --shadow-dark-soft: rgba(163, 177, 198, 0.55);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
}

.font-mono-num {
  font-family: var(--font-mono);
}

/* Raised / Extruded Surfaces ("Pop-Out") */
.neu-card {
  background: var(--surface);
  border-radius: 26px;
  box-shadow:
    -10px -10px 22px var(--shadow-light),
    10px 10px 22px var(--shadow-dark-soft);
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.neu-card-sm {
  background: var(--surface);
  border-radius: 18px;
  box-shadow:
    -6px -6px 14px var(--shadow-light),
    6px 6px 14px var(--shadow-dark-soft);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
}

/* Recessed / Inset Surfaces ("Go Back In") */
.neu-inset {
  background: var(--bg);
  border-radius: 16px;
  box-shadow:
    inset 5px 5px 10px var(--shadow-dark),
    inset -5px -5px 10px var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.neu-inset-sm {
  background: var(--bg);
  border-radius: 12px;
  box-shadow:
    inset 3px 3px 7px var(--shadow-dark),
    inset -3px -3px 7px var(--shadow-light);
}

/* Inputs & Selects */
.neu-input {
  width: 100%;
  background: var(--bg);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  padding: 11px 15px;
  font-size: 0.875rem;
  font-weight: 600;
  outline: none;
  box-shadow:
    inset 4px 4px 9px var(--shadow-dark),
    inset -4px -4px 9px var(--shadow-light);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.neu-input::placeholder {
  color: #7c8ba1;
  font-weight: 500;
}

.neu-input:focus {
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow:
    inset 5px 5px 10px var(--shadow-dark),
    inset -5px -5px 10px var(--shadow-light),
    0 0 0 3px rgba(14, 165, 233, 0.18);
}

/* Sculpted Tactile Buttons */
.neu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--surface);
  color: var(--text-main);
  font-weight: 700;
  border-radius: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    -5px -5px 12px var(--shadow-light),
    5px 5px 12px var(--shadow-dark-soft);
  cursor: pointer;
  user-select: none;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, color 0.15s ease, filter 0.15s ease;
}

.neu-btn:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow:
    -6px -6px 15px var(--shadow-light),
    6px 6px 15px var(--shadow-dark);
}

.neu-btn:active:not(:disabled) {
  transform: scale(0.96);
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.neu-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.neu-btn-primary {
  background: linear-gradient(145deg, #0ea5e9, #0284c7);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    -5px -5px 12px var(--shadow-light),
    5px 5px 14px rgba(2, 132, 199, 0.35);
}

.neu-btn-primary:hover:not(:disabled) {
  box-shadow:
    -6px -6px 14px var(--shadow-light),
    6px 6px 16px rgba(2, 132, 199, 0.45);
}

.neu-btn-emerald {
  background: linear-gradient(145deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    -5px -5px 12px var(--shadow-light),
    5px 5px 14px rgba(5, 150, 105, 0.35);
}

.neu-btn-danger {
  background: linear-gradient(145deg, #f43f5e, #dc2626);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    -5px -5px 12px var(--shadow-light),
    5px 5px 14px rgba(220, 38, 38, 0.32);
}

.neu-btn-amber {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    -5px -5px 12px var(--shadow-light),
    5px 5px 14px rgba(217, 119, 6, 0.32);
}

.neu-btn-indigo {
  background: linear-gradient(145deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    -5px -5px 12px var(--shadow-light),
    5px 5px 14px rgba(79, 70, 229, 0.32);
}

/* Navigation Pills */
.neu-tab {
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  border-radius: 14px;
  padding: 9px 15px;
  font-size: 0.8125rem;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.neu-tab:hover {
  color: var(--text-main);
}

.neu-tab-active {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

/* Sculpted Square Logo Frame (High Clarity in Light & Dark Mode) */
.neu-logo-ring {
  background: #ffffff;
  border-radius: 16px;
  padding: 4px;
  box-shadow:
    -6px -6px 14px var(--shadow-light),
    6px 6px 14px var(--shadow-dark-soft);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.neu-logo-ring:hover {
  transform: scale(1.04);
}

/* Big Tactile Kiosk Keypad Keys */
.neu-key {
  background: var(--surface);
  border-radius: 18px;
  min-height: 62px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    -6px -6px 14px var(--shadow-light),
    6px 6px 14px var(--shadow-dark-soft);
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease, box-shadow 0.1s ease;
}

.neu-key:active {
  transform: scale(0.96);
  box-shadow:
    inset 4px 4px 9px var(--shadow-dark),
    inset -4px -4px 9px var(--shadow-light);
}

/* Unified Soft UI Modals & Popups */
@keyframes neuModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes neuModalPopIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.neu-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 60;
  animation: neuModalFadeIn 0.14s ease-out;
}

.neu-modal-backdrop > * {
  background: var(--surface);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    -10px -10px 24px rgba(255, 255, 255, 0.65),
    12px 12px 28px rgba(15, 23, 42, 0.22);
  animation: neuModalPopIn 0.16s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.neu-dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

/* Smooth View, Toast, Banner & Live Status Animations */
@keyframes neuViewEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes neuToastEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes neuSlideDown {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes neuPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.neu-view-enter {
  animation: neuViewEnter 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.neu-toast-enter {
  animation: neuToastEnter 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.neu-slide-down {
  animation: neuSlideDown 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.neu-pulse-dot {
  animation: neuPulseRing 2s infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.qr-biz-card {
  width: 3.5in;
  height: 2in;
  max-width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  position: relative;
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.qr-biz-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media print {
  body { background: #ffffff !important; }
  .no-print { display: none !important; }
  .neu-card, .neu-card-sm, .neu-inset {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
  }

  body.printing-qr-card * {
    visibility: hidden !important;
  }
  body.printing-qr-card #qr-business-card-print,
  body.printing-qr-card #qr-business-card-print * {
    visibility: visible !important;
  }
  body.printing-qr-card #qr-business-card-print {
    position: fixed !important;
    left: 0.5in !important;
    top: 0.5in !important;
    width: 3.5in !important;
    height: 2in !important;
    margin: 0 !important;
    border: 1px dashed #64748b !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ============================================================================
   Premium UI: Soft Charcoal Dark Mode, Mobile Bottom Nav, Avatars & Shimmers
   ============================================================================ */

html[data-theme="dark"] {
  --bg: #18202c;
  --surface: #1e2736;
  --shadow-light: #273347;
  --shadow-dark: #101620;
  --shadow-dark-soft: rgba(7, 11, 18, 0.72);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dark: #7dd3fc;
}

html[data-theme="dark"] .neu-card,
html[data-theme="dark"] .neu-card-sm,
html[data-theme="dark"] .neu-btn,
html[data-theme="dark"] .neu-key,
html[data-theme="dark"] .neu-logo-ring,
html[data-theme="dark"] .neu-modal-backdrop > * {
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .neu-inset,
html[data-theme="dark"] .neu-inset-sm,
html[data-theme="dark"] .neu-input,
html[data-theme="dark"] .neu-dialog-icon {
  border-color: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-900 { color: #f1f5f9 !important; }
html[data-theme="dark"] .text-slate-700 { color: #e2e8f0 !important; }
html[data-theme="dark"] .text-slate-600 { color: #cbd5e1 !important; }
html[data-theme="dark"] .text-slate-500 { color: #94a3b8 !important; }
html[data-theme="dark"] .text-slate-400 { color: #64748b !important; }
html[data-theme="dark"] .text-sky-900,
html[data-theme="dark"] .text-sky-800 { color: #7dd3fc !important; }
html[data-theme="dark"] .text-sky-700 { color: #38bdf8 !important; }
html[data-theme="dark"] .text-emerald-800,
html[data-theme="dark"] .text-emerald-700 { color: #34d399 !important; }
html[data-theme="dark"] .text-teal-800 { color: #2dd4bf !important; }
html[data-theme="dark"] .text-indigo-900,
html[data-theme="dark"] .text-indigo-800 { color: #a5b4fc !important; }
html[data-theme="dark"] .text-amber-900,
html[data-theme="dark"] .text-amber-800,
html[data-theme="dark"] .text-amber-700 { color: #fbbf24 !important; }
html[data-theme="dark"] .text-rose-800,
html[data-theme="dark"] .text-rose-700,
html[data-theme="dark"] .text-rose-600 { color: #fb7185 !important; }
html[data-theme="dark"] .bg-slate-200 { background-color: #2b3648 !important; color: #cbd5e1 !important; }
html[data-theme="dark"] .border-slate-300\/60 { border-color: rgba(148, 163, 184, 0.2) !important; }
html[data-theme="dark"] .bg-amber-50\/70,
html[data-theme="dark"] .bg-amber-50 { background-color: rgba(245, 158, 11, 0.14) !important; }
html[data-theme="dark"] .bg-rose-50\/70,
html[data-theme="dark"] .bg-rose-50 { background-color: rgba(244, 63, 94, 0.15) !important; }
html[data-theme="dark"] .bg-emerald-50\/70 { background-color: rgba(16, 185, 129, 0.15) !important; }
html[data-theme="dark"] select option { background-color: #1e2736; color: #f1f5f9; }

/* Employee Avatar Circles */
.neu-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
}

html[data-theme="dark"] .neu-avatar {
  border-color: rgba(255, 255, 255, 0.18);
}

/* Live Notification Pill Badge */
.neu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.45);
}

/* Mobile Fixed Bottom Navigation Bar */
.neu-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 -8px 24px var(--shadow-dark-soft);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px;
}

html[data-theme="dark"] .neu-bottom-nav {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.neu-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px;
  min-width: 60px;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  position: relative;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.neu-bottom-item-active {
  color: var(--accent-dark);
  background: var(--bg);
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
}

/* Soft Shimmer Loading Skeletons */
@keyframes neuShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.neu-skeleton {
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 25%, rgba(255, 255, 255, 0.45) 50%, rgba(148, 163, 184, 0.12) 75%);
  background-size: 200% 100%;
  animation: neuShimmer 1.35s ease-in-out infinite;
}

html[data-theme="dark"] .neu-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
}

/* Filter Chips */
.neu-chip {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: -3px -3px 7px var(--shadow-light), 3px 3px 7px var(--shadow-dark-soft);
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

html[data-theme="dark"] .neu-chip {
  border-color: rgba(255, 255, 255, 0.08);
}

.neu-chip-active {
  background: linear-gradient(145deg, #0ea5e9, #0284c7);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

@media print {
  html[data-theme="dark"], html[data-theme="dark"] body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
}

/* ============================================================================
   Standard US Letter Print Layout (Fixes Phone & Tablet Printing)
   Leaves QR Business Cards (body.printing-qr-card) at exact 3.5" x 2"
   ============================================================================ */
@page {
  size: letter portrait;
  margin: 0.4in;
}

@page schedule-landscape {
  size: letter landscape;
  margin: 0.35in;
}

@media print {
  html, body {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    animation: none !important;
    transform: none !important;
  }

  /* Standard Letter Landscape Schedule Grid (even when printing from a phone!) */
  #schedule-print-sheet {
    page: schedule-landscape;
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 4px !important;
    border: none !important;
    box-shadow: none !important;
  }

  #schedule-print-sheet table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  #schedule-print-sheet th,
  #schedule-print-sheet td {
    padding: 4px !important;
    font-size: 9.5px !important;
    vertical-align: top !important;
    break-inside: avoid !important;
  }

  /* Standard Letter Portrait Timesheets (forces horizontal table even from a phone!) */
  #payroll-print-sheet {
    width: 100% !important;
    padding: 4px !important;
    border: none !important;
    box-shadow: none !important;
  }

  #payroll-print-sheet .print-ts-head {
    display: grid !important;
    grid-template-columns: 2fr 1.6fr 4fr 1.1fr 1.1fr !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    font-size: 9.5px !important;
  }

  #payroll-print-sheet .print-ts-row {
    display: grid !important;
    grid-template-columns: 2fr 1.6fr 4fr 1.1fr 1.1fr !important;
    gap: 6px !important;
    padding: 5px 8px !important;
    font-size: 10px !important;
    align-items: center !important;
    break-inside: avoid !important;
  }

  #payroll-print-sheet .print-ts-row > div {
    grid-column: auto !important;
  }

  #payroll-print-sheet .print-emp-group {
    break-inside: avoid-page !important;
    padding: 8px !important;
    margin-bottom: 10px !important;
  }
}
