* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
  background-clip: content-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: linear-gradient(180deg, #d8e4f5 0%, #c3d4ec 100%);
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

h1 {
  margin-top: 0;
  color: #1d4e89;
}

a {
  color: #38a0ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Prevent underline on links/buttons with icons or + symbols */
a:has(span:only-child),
.button,
button,
a[class*="button"],
button[class*="button"] {
  text-decoration: none !important;
}

a:hover:has(span:only-child),
.button:hover,
button:hover,
a[class*="button"]:hover,
button[class*="button"]:hover {
  text-decoration: none !important;
}

.button {
  display: inline-block;
  background: #38a0ff;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
}


.hero {
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 38px;
  line-height: 1.1;
  color: #1d4e89;
}

.lead {
  color: #444;
  font-size: 18px;
  margin: 0 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.card {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.card h3 {
  margin: 0 0 8px;
  color: #1d4e89;
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}


/* Layout */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

/* Navbar */
.nav {
  background: #f7fbff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  color: #1d4e89;
  text-decoration: none;
}

.nav-links, .nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links a, .nav-actions .nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-links a:hover, .nav-actions .nav-link:hover {
  background: rgba(29,78,137,0.08);
}

/* Footer */
.footer {
  background: #f7fbff;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 22px 18px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 800;
  color: #1d4e89;
}

.footer-sub {
  color: #555;
  margin-top: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1100px;
  margin: 14px auto 0;
  color: #777;
  font-size: 14px;
}

.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 30px 0 60px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.auth-card h1 {
  margin: 0 0 8px;
  color: #1d4e89;
}

.auth-sub {
  margin: 0 0 16px;
  color: #555;
}

.auth-form p {
  margin: 0 0 12px;
}

.auth-form label {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  outline: none;
  box-sizing: border-box; /* ← ADD THIS */
}


.auth-form input:focus {
  border-color: rgba(56,160,255,0.9);
  box-shadow: 0 0 0 4px rgba(56,160,255,0.18);
}

.alert {
  background: rgba(241, 196, 15, 0.18);
  border: 1px solid rgba(241, 196, 15, 0.45);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.auth-alt {
  margin-top: 14px;
  color: #444;
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  outline: none;
  box-sizing: border-box; /* ← ADD THIS */
}

.auth-form p {
  margin-bottom: 14px;
}

.button {
  display: inline-block;
  background: #38a0ff;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button-secondary {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
  transition: all 0.2s ease;
}

.button-secondary:hover {
  background: rgba(255,255,255,0.16);
}

.button-danger {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(255,107,107,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255,107,107,0.4);
  text-decoration: none;
  transition: all 0.2s ease;
}

.button-danger:hover {
  background: rgba(255,107,107,0.25);
}


.button:hover,
.button:focus {
  background: #2b8de6;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(56, 160, 255, 0.35);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(56, 160, 255, 0.25);
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease; /* smooth animation */
}

.auth-form input:hover {
  border-color: rgba(56, 160, 255, 0.6);
}

.auth-form input:focus {
  border-color: #38a0ff;
  box-shadow: 0 0 0 4px rgba(56, 160, 255, 0.18);
  background: #ffffff;
}

.auth-form label {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.auth-form input:focus + label {
  color: #38a0ff;
}

.nav-link {
  cursor: pointer;
}

.logout-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.logout-btn {
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  color: #333;
  font-weight: 600;
}

.logout-btn:hover {
  background: rgba(29,78,137,0.08);
}

/* ===== App Shell (Logged-in OS feel) ===== */
.app-body {
  background: linear-gradient(180deg, #0b1730 0%, #102448 100%);
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.app-shell[data-nav-layout="topbar"] {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  padding-left: 0;
}

.app-topbar-nav {
  background: linear-gradient(135deg, #132f5e 0%, #0f2550 100%);
  border-bottom: 1px solid rgba(96, 165, 250, 0.28);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  grid-column: 1 / -1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 20px;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
}

.topbar-top {
  display: none;
}

.topbar-bottom {
  display: none;
}

.app-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-brand a {
  color: #38a0ff;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  transition: all 0.2s ease;
  cursor: help;
}

.app-brand a:hover {
  color: #3b82f6;
  opacity: 0.8;
}

.app-brand-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
}

.app-nav-horizontal {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.app-nav-horizontal::-webkit-scrollbar {
  height: 4px;
}

.app-nav-horizontal::-webkit-scrollbar-track {
  background: transparent;
}

.app-nav-horizontal::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 2px;
}

.app-nav-horizontal::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

.nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.nav-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.2);
}

.nav-item.active {
  background-color: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border-color: #3b82f6;
}

.nav-icon {
  font-size: 16px;
}

.nav-text {
  display: inline;
}

body[data-show-icons="false"] .nav-icon {
  display: none !important;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-user .dot {
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border-radius: 50%;
  flex-shrink: 0;
}

.app-user-actions {
  display: flex;
  gap: 8px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-user-name {
  font-weight: 800;
  color: #fff;
  font-size: 12px;
}

.app-user-sub {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
}

@media (max-width: 1200px) {
  .nav-text {
    display: none !important;
  }

  .nav-item {
    padding: 6px 8px;
    gap: 0;
  }

  .topbar-content {
    gap: 12px;
  }

  .topbar-left {
    gap: 8px;
    padding: 8px 10px;
  }

  .topbar-center {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .app-topbar-nav {
    flex-direction: column;
  }

  .topbar-top {
    padding: 10px 16px;
    flex-direction: row;
    gap: 12px;
  }

  .topbar-bottom {
    padding: 8px 16px;
    overflow-x: auto;
  }

  .app-brand {
    flex-shrink: 0;
  }

  .app-brand a {
    font-size: 14px;
  }

  .app-brand-sub {
    display: none;
  }

  .topbar-right {
    gap: 8px;
    margin-left: auto;
  }

  .user-info {
    display: none;
  }

  .app-user-actions {
    gap: 6px;
  }

  .nav-item {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
  }

  .nav-icon {
    font-size: 14px;
  }
}

.app-sidebar {
  background: linear-gradient(180deg, #162f5c 0%, #123264 100%);
  color: #e5e7eb;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  transition: padding 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  width: 220px;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) transparent;
}

.app-sidebar::-webkit-scrollbar {
  width: 8px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
  background-clip: content-box;
}

.app-sidebar.collapsed {
  padding: 18px 8px;
  width: 70px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
  background: rgba(59, 130, 246, 0.08);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.sidebar-header-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.sidebar-user-info .app-user-name {
  font-size: 12px;
  font-weight: 700;
}

.sidebar-user-info .app-user-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.app-sidebar.collapsed .app-brand-sub,
.app-sidebar.collapsed .nav-text,
.app-sidebar.collapsed .app-user-name,
.app-sidebar.collapsed .app-user-sub,
.app-sidebar.collapsed .logout-form,
.app-sidebar.collapsed .sidebar-user-info {
  display: none;
}

.app-sidebar.collapsed .app-brand {
  flex-grow: 1;
  text-align: center;
}

.app-sidebar.collapsed .app-brand a {
  font-size: 14px;
  font-weight: 900;
}

.app-sidebar.collapsed .app-brand a::before {
  content: attr(data-short);
}

.app-sidebar.collapsed .app-brand a {
  font-size: 0;
}

.app-sidebar.collapsed .app-brand a::before {
  font-size: 14px;
}

.app-sidebar.collapsed .sidebar-header {
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 8px 4px;
}

.toggle-btn {
  flex-shrink: 0;
  min-width: 24px;
}

.app-nav {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
}

.nav-item.active {
  background: rgba(56,160,255,0.18);
  border: 1px solid rgba(56,160,255,0.35);
}

.nav-icon {
  font-size: 18px;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  white-space: nowrap;
}

.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.app-sidebar.collapsed .nav-item:hover::after,
.app-sidebar.collapsed .nav-item::after {
  content: attr(title);
  position: absolute;
  left: 70px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-brand a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  font-size: 20px;
}

.app-brand-sub {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-top: 4px;
}

.app-sidebar-bottom {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #38a0ff;
}

.app-user-name {
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-size: 15px;
}

.app-user-sub {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
}

.app-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 650;
  transition: all 0.2s ease;
  font-size: 13px;
  min-width: 80px;
  white-space: nowrap;
}

.app-logout:hover,
.app-logout.active {
  background-color: rgba(56, 160, 255, 0.2);
  color: #38a0ff;
  border-color: rgba(56, 160, 255, 0.4);
  transform: translateY(-1px);
}

.app-logout.logout-danger {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.2);
  color: rgba(255, 180, 180, 0.9);
}

.app-logout.logout-danger:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff9999;
  border-color: rgba(255, 107, 107, 0.4);
}

.app-main {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
  color: #eff6ff;
  margin-left: 220px;
  transition: margin-left 0.3s ease;
}

.app-shell.sidebar-collapsed .app-main {
  margin-left: 70px;
}

.app-shell[data-nav-layout="topbar"] .app-main {
  grid-column: 1;
  grid-row: 2;
  margin-left: 0;
}

.app-shell[data-nav-layout="topbar"] .app-sidebar {
  display: none;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(37, 99, 235, 0.72);
  backdrop-filter: blur(10px);
}

.app-topbar-title {
  font-size: 18px;
  font-weight: 850;
  color: #fff;
}

.app-content {
  padding: 18px;
}

/* App panels */
.app-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 16px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 220px 1fr; }
  .app-grid { grid-template-columns: 1fr; }
}

.app-sidebar-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-bottom: 8px;
}

.app-sidebar-link:hover {
  background: rgba(255,255,255,0.08);
}

.app-sidebar-link.active {
  background: rgba(56,160,255,0.25);
  color: #38a0ff;
}

.app-logout.logout-danger {
  color: #ff6b6b;
}

.app-logout.logout-danger:hover {
  background: rgba(255, 107, 107, 0.12);
}

a.button-secondary {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
}
a.button-secondary:hover {
  background: rgba(255,255,255,0.16);
}

.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.grid-3 { display:grid; grid-template-columns: 1fr 120px 140px; gap:12px; }
.stack { display:flex; flex-direction:column; gap:14px; }

.panel-title { margin:0 0 10px 0; font-size:14px; opacity:.9; }

.form-row { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.form-row.inline { flex-direction:row; align-items:center; justify-content:space-between; }
.form-row label { font-size:13px; opacity:.8; font-weight:700; }

.help { font-size:12px; opacity:.7; margin-top:4px; }

.toggle { display:flex; align-items:center; gap:8px; }
.toggle input[type="checkbox"] { transform: scale(1.2); }

/* Google Places Autocomplete dropdown (dark theme) */
.pac-container {
  background: #0f3460 !important;
  border: 1px solid #34495e !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35) !important;
  padding: 6px 0 !important;
  font-family: inherit !important;
  z-index: 9999 !important;
}

.pac-item {
  color: #ecf0f1 !important;
  padding: 10px 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  cursor: pointer !important;
  font-size: 13px !important;
}

.pac-item:first-child {
  border-top: none !important;
}

.pac-item:hover,
.pac-item-selected {
  background: rgba(56, 160, 255, 0.18) !important;
}

.pac-item .pac-item-query {
  color: #38a0ff !important;
  font-weight: 700 !important;
}

.pac-icon {
  filter: brightness(0) invert(1) !important;
  opacity: 0.7 !important;
}


