/* PawTrack Core Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Chocolate, Chestnut, White, Rust Terracotta & Amber Gold */
  --primary: #ea9d1e;
  --primary-hover: #f5aa2d;
  --primary-light: rgba(234, 157, 30, 0.16);

  --secondary: #b85410;
  --secondary-hover: #ce6015;
  --secondary-light: rgba(184, 84, 16, 0.2);

  --accent-gold: #ea9d1e;
  --accent-gold-light: rgba(234, 157, 30, 0.18);
  
  --accent-rust: #b85410;
  --accent-rust-light: rgba(184, 84, 16, 0.18);
  
  --accent-chestnut: #54280e;
  --accent-chocolate: #241208;
  --accent-white: #ffffff;

  --danger: #ba3820;
  --danger-hover: #a12f1a;
  --danger-light: rgba(186, 56, 32, 0.18);

  --warning: #ea9d1e;
  --warning-light: rgba(234, 157, 30, 0.18);

  --success: #ea9d1e;
  --info: #ffffff;

  /* Neutrals & Surfaces - Deep Dark Chocolate Roast */
  --bg-main: #180d07;
  --bg-surface: #23130a;
  --bg-surface-elevated: #2f1a0e;
  --bg-card: rgba(35, 19, 10, 0.96);
  --bg-glass: rgba(35, 19, 10, 0.88);

  --border-subtle: rgba(234, 157, 30, 0.16);
  --border-focus: #ea9d1e;
  --border-glass: rgba(234, 157, 30, 0.25);

  /* High-Contrast Crystal-Clear Typography */
  --text-main: #ffffff;
  --text-muted: #e5cdbe;
  --text-dim: #b08a72;
  --text-inverse: #180d07;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows - Clean Warm Elevation (Zero Neon Glows) */
  --shadow-sm: 0 1px 3px rgba(12, 6, 3, 0.4);
  --shadow-md: 0 4px 12px -2px rgba(12, 6, 3, 0.55), 0 2px 6px -1px rgba(12, 6, 3, 0.35);
  --shadow-lg: 0 12px 28px -4px rgba(12, 6, 3, 0.68), 0 4px 12px -2px rgba(12, 6, 3, 0.45);

  --backdrop-blur: blur(16px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  /* Clean, High-Contrast Light Theme with Warm Ivory Linen and Deep Chocolate Text */
  --primary: #b85410;
  --primary-hover: #9c450c;
  --primary-light: #fbeee4;

  --secondary: #54280e;
  --secondary-hover: #401e0a;
  --secondary-light: #f5eae0;

  --accent-gold: #b85410;
  --accent-gold-light: #fff5e8;
  
  --accent-rust: #b85410;
  --accent-rust-light: #fbeee4;
  
  --accent-chestnut: #54280e;
  --accent-chocolate: #241208;
  --accent-white: #ffffff;

  --danger: #9c2818;
  --danger-hover: #801e10;
  --danger-light: #faeae8;

  --warning: #b85410;
  --warning-light: #fbeee4;

  --success: #54280e;
  --info: #54280e;

  --bg-main: #faf6f2;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f4eae0;
  --bg-card: #ffffff;
  --bg-glass: #ffffff;

  --border-subtle: #e6d5c6;
  --border-glass: #d9c1ad;
  --border-focus: #b85410;

  /* High Contrast Deep Chocolate Typography */
  --text-main: #241208;
  --text-muted: #54280e;
  --text-dim: #7d5138;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(36, 18, 8, 0.07);
  --shadow-md: 0 4px 10px -1px rgba(36, 18, 8, 0.09), 0 2px 4px -2px rgba(36, 18, 8, 0.05);
  --shadow-lg: 0 10px 22px -3px rgba(36, 18, 8, 0.12), 0 4px 8px -4px rgba(36, 18, 8, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars globally across Chrome, Safari, Edge, Opera */
*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  background: transparent !important;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(234, 157, 30, 0.09) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(184, 84, 16, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(84, 40, 14, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
}

[data-theme="light"] body {
  background-image: none !important;
  background-color: #faf6f2 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  transition: var(--transition);
}

input, select, textarea {
  font-family: var(--font-body);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.925rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
  min-height: 42px;
}

textarea {
  resize: none !important;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(234, 157, 30, 0.35);
}

/* App Header & Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.65rem 1.25rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.logo-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c2410c, #7c2d12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ea9d1e;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.35);
  border: 1.5px solid rgba(254, 215, 170, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Navigation Role Switcher */
.role-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-surface-elevated);
  padding: 3px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: clamp(2px, 0.25vw, 4px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.role-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(5px, 0.45vw, 7px) clamp(8px, 0.85vw, 15px);
  border-radius: var(--radius-full);
  font-size: clamp(0.75rem, 0.78vw, 0.84rem);
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1.15;
  margin: 0;
  cursor: pointer;
  user-select: none;
  position: relative;
  text-decoration: none;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Hide icons on desktop - Text only */
.role-tab-btn i,
.role-tab-btn svg {
  display: none;
}

.role-tab-btn span {
  display: inline-block;
  text-align: center;
  line-height: 1.15;
  margin: 0;
  padding: 0;
  pointer-events: none;
  white-space: nowrap;
}

.role-tab-btn:hover {
  color: var(--text-main);
  background: rgba(234, 157, 30, 0.08);
}

.role-tab-btn:active {
  transform: scale(0.96);
}

.role-tab-btn.active {
  background: var(--primary) !important;
  color: #180d07 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(184, 84, 16, 0.3) !important;
}

[data-theme="light"] .role-tab-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(184, 84, 16, 0.22) !important;
}

.role-tab-btn.active.officer-tab {
  background: linear-gradient(135deg, #b85410, #54280e);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .role-tab-btn.active.officer-tab {
  background: linear-gradient(135deg, #54280e, #241208);
  color: #ffffff;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-toggle-btn, .theme-toggle-btn, .notif-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.lang-toggle-btn:hover, .theme-toggle-btn:hover, .notif-bell-btn:hover {
  color: var(--text-main);
  border-color: var(--border-glass);
  background: rgba(234, 157, 30, 0.1);
  transform: translateY(-1px);
}

.lang-indicator-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #ea9d1e;
  color: #180d07;
  font-size: 0.52rem;
  font-weight: 800;
  height: 14px;
  line-height: 13px;
  padding: 0 3px;
  border-radius: 99px;
  border: 1.5px solid var(--bg-surface);
  text-transform: uppercase;
  letter-spacing: -0.2px;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .lang-indicator-badge {
  background: #b85410;
  color: #ffffff;
  border-color: #ffffff;
}

.lang-toggle-btn:hover, .theme-toggle-btn:hover, .notif-bell-btn:hover {
  color: var(--text-main);
  border-color: var(--border-glass);
}

.notif-badge-pill {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  height: 17px;
  min-width: 17px;
  padding: 0 3px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-main);
}

/* Main Content Area */
.app-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  min-height: 40px;
}

.btn-primary {
  background: linear-gradient(135deg, #ea9d1e, #b85410);
  color: #180d07;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #b85410, #54280e);
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: linear-gradient(135deg, #b85410, #54280e);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  filter: brightness(1.08);
}

.btn-danger {
  background: linear-gradient(135deg, #ba3820, #54280e);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-glass);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  min-height: 32px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.95rem;
  border-radius: var(--radius-lg);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-safe {
  background: rgba(234, 157, 30, 0.16);
  color: #ea9d1e;
  border: 1px solid rgba(234, 157, 30, 0.35);
}

.badge-lost {
  background: rgba(186, 56, 32, 0.2);
  color: #ff9b85;
  border: 1px solid rgba(186, 56, 32, 0.4);
}

.badge-impounded {
  background: rgba(184, 84, 16, 0.22);
  color: #ffd085;
  border: 1px solid rgba(184, 84, 16, 0.4);
}

.badge-reunited {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
  padding: 1.5rem 1.25rem;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-inner,
.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  line-height: 1.45;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
  display: inline-block;
}

/* ==========================================================================
   Responsive Navigation & Multi-Screen Adaptive Layout System
   ========================================================================== */

/* Intermediate Desktop & Small Laptops (993px - 1280px) */
@media (min-width: 993px) and (max-width: 1280px) {
  .app-header {
    padding: 0.55rem 0.95rem;
  }

  .header-container {
    gap: 0.6rem;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-tagline {
    font-size: 0.6rem;
  }

  .role-tabs {
    padding: 2px 3px;
    gap: 2px;
  }

  .role-tab-btn {
    padding: 5px 9px;
    font-size: 0.77rem;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .lang-toggle-btn,
  .theme-toggle-btn,
  .notif-bell-btn {
    width: 35px;
    height: 35px;
  }
}

/* Compact Desktop & Tablet Landscape (993px - 1100px) */
@media (min-width: 993px) and (max-width: 1100px) {
  .app-header {
    padding: 0.5rem 0.75rem;
  }

  .header-container {
    gap: 0.4rem;
  }

  .brand-tagline {
    display: none;
  }

  .role-tabs {
    padding: 2px;
    gap: 2px;
  }

  .role-tab-btn {
    padding: 4px 7px;
    font-size: 0.73rem;
  }

  .header-actions {
    gap: 0.35rem;
  }
}

/* Mobile & Tablet Floating Bottom Navigation (< 992px) */
@media (max-width: 992px) {
  .app-header {
    padding: 0.65rem 1rem;
    overflow: visible;
  }

  .header-container {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.5rem;
  }

  /* Floating Bottom Navigation permanently fixed to the bottom of the screen - ICON ONLY */
  .role-tabs {
    position: fixed !important;
    bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    top: auto !important;
    max-width: 440px !important;
    width: calc(100% - 20px) !important;
    margin: 0 auto !important;
    z-index: 9999 !important;
    background: rgba(24, 13, 7, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(234, 157, 30, 0.28) !important;
    border-radius: var(--radius-full) !important;
    padding: 5px 6px !important;
    box-shadow: 0 12px 32px rgba(12, 6, 3, 0.8), 0 0 0 1px rgba(234, 157, 30, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .role-tabs {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(184, 84, 16, 0.25) !important;
    box-shadow: 0 12px 28px rgba(36, 18, 8, 0.16) !important;
  }

  .role-tab-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: var(--radius-full) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    line-height: 1 !important;
    color: var(--text-muted) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .role-tab-btn i,
  .role-tab-btn svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    flex-shrink: 0 !important;
    stroke: currentColor !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  /* Hide navigation text on mobile - Icon Only */
  .role-tab-btn span {
    display: none !important;
  }

  .role-tab-btn:hover {
    color: var(--text-main) !important;
    background: rgba(234, 157, 30, 0.12) !important;
  }

  .role-tab-btn:active {
    transform: scale(0.92) !important;
  }

  .role-tab-btn.active {
    background: var(--primary) !important;
    color: #180d07 !important;
    box-shadow: 0 4px 14px rgba(234, 157, 30, 0.4) !important;
  }

  .role-tab-btn.active svg {
    stroke: #180d07 !important;
    transform: scale(1.08) !important;
  }

  [data-theme="light"] .role-tab-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(184, 84, 16, 0.3) !important;
  }

  [data-theme="light"] .role-tab-btn.active svg {
    stroke: #ffffff !important;
  }

  .app-main {
    padding: 1.15rem 1rem;
    padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 640px) {
  .footer-inner,
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 0.5rem 0.65rem;
  }

  .header-container {
    gap: 0.35rem;
  }

  .logo-icon-box {
    width: 32px;
    height: 32px;
  }

  .logo-icon-box svg {
    width: 18px;
    height: 18px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    display: none;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .lang-toggle-btn,
  .theme-toggle-btn,
  .notif-bell-btn {
    width: 32px;
    height: 32px;
  }

  .lang-toggle-btn svg,
  .theme-toggle-btn svg,
  .notif-bell-btn svg {
    width: 16px;
    height: 16px;
  }

  .header-user-name {
    display: none;
  }

  .header-user-pill-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    padding: 0;
  }

  .role-tabs {
    bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
    max-width: 360px !important;
    width: calc(100% - 14px) !important;
    padding: 4px !important;
    gap: 2px !important;
  }

  .role-tab-btn {
    height: 40px !important;
  }

  .role-tab-btn i,
  .role-tab-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
  }

  .role-tab-btn span {
    display: none !important;
  }

  .app-main {
    padding: 0.85rem 0.75rem;
    padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 340px) {
  .role-tabs {
    max-width: 304px !important;
    width: calc(100% - 8px) !important;
    padding: 3px !important;
    gap: 1px !important;
  }

  .role-tab-btn {
    height: 36px !important;
  }

  .role-tab-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
}

