/* ============================================================
   Guest Pre-Arrival Assistant — Design System
   Bootstrap 5 + Inter, with --lt-* design tokens.
   ============================================================ */

:root {
  /* Brand */
  --lt-primary: #4f46e5;
  --lt-primary-dark: #4338ca;
  --lt-primary-soft: #eef2ff;
  --lt-accent: #0ea5e9;

  /* Surfaces & text */
  --lt-bg: #f5f6fb;
  --lt-surface: #ffffff;
  --lt-text: #1e2433;
  --lt-muted: #6b7280;
  --lt-border: #e7e9f2;

  /* Sidebar (dark) */
  --lt-sidebar: #111827;
  --lt-sidebar-soft: #1b2436;
  --lt-sidebar-text: #aeb6c6;
  --lt-sidebar-active: #ffffff;

  /* Status palette (soft backgrounds + readable text) */
  --lt-success: #15803d;  --lt-success-bg: #e7f6ec;
  --lt-info: #1d4ed8;     --lt-info-bg: #e6edff;
  --lt-warning: #b45309;  --lt-warning-bg: #fdf0dc;
  --lt-danger: #b91c1c;   --lt-danger-bg: #fde8e8;
  --lt-muted-bg: #eef0f4;

  /* Shape & depth */
  --lt-radius: 16px;
  --lt-radius-sm: 10px;
  --lt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --lt-shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --lt-sidebar-width: 256px;
}

* { box-sizing: border-box; }

html { font-size: 15px; position: relative; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--lt-bg);
  color: var(--lt-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.1px;
}

a { color: var(--lt-primary); text-decoration: none; }
a:hover { color: var(--lt-primary-dark); }

.text-muted-2 { color: var(--lt-muted) !important; }

/* ---------- Focus ring ---------- */
.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(79, 70, 229, .22);
  border-color: var(--lt-primary);
}

/* ============================================================
   Admin shell
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--lt-sidebar-width);
  background: var(--lt-sidebar);
  color: var(--lt-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 1.4rem 1.4rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.3px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-brand .brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--lt-primary), var(--lt-accent));
  display: grid; place-items: center; color: #fff; font-size: 1rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .45);
}
.sidebar-brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--lt-sidebar-text); }

.sidebar-nav { padding: 1rem .75rem; flex: 1; }
.sidebar-nav .nav-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: #5b667c; padding: .5rem .85rem; margin-top: .5rem;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: .8rem;
  padding: .68rem .85rem; margin-bottom: .15rem;
  border-radius: var(--lt-radius-sm);
  color: var(--lt-sidebar-text); font-weight: 500; font-size: .92rem;
  transition: background .15s, color .15s;
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: .95rem; }
.sidebar-nav a:hover { background: var(--lt-sidebar-soft); color: #fff; }
.sidebar-nav a.active { background: var(--lt-primary); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .35); }

.sidebar-foot { padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.sidebar-user { display: flex; align-items: center; gap: .7rem; color: #fff; font-size: .85rem; }
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--lt-sidebar-soft); display: grid; place-items: center;
  font-weight: 600; color: #fff;
}

.admin-main { flex: 1; margin-left: var(--lt-sidebar-width); min-width: 0; }

.topbar {
  height: 68px; background: var(--lt-surface);
  border-bottom: 1px solid var(--lt-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.75rem; position: sticky; top: 0; z-index: 1030;
}
.topbar h1 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.topbar .page-sub { font-size: .8rem; color: var(--lt-muted); }

.admin-content { padding: 1.75rem; max-width: 1280px; }

/* ============================================================
   Cards & stats
   ============================================================ */
.card {
  background: var(--lt-surface);
  border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius);
  box-shadow: var(--lt-shadow);
}
.card-header {
  background: transparent; border-bottom: 1px solid var(--lt-border);
  padding: 1.1rem 1.35rem; font-weight: 650;
}
.card-body { padding: 1.35rem; }

.stat-card { padding: 1.25rem 1.35rem; height: 100%; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.05rem;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 750; line-height: 1.1; margin-top: .85rem; }
.stat-card .stat-label { color: var(--lt-muted); font-size: .85rem; font-weight: 500; }

.icon-primary { background: var(--lt-primary-soft); color: var(--lt-primary); }
.icon-success { background: var(--lt-success-bg); color: var(--lt-success); }
.icon-info { background: var(--lt-info-bg); color: var(--lt-info); }
.icon-warning { background: var(--lt-warning-bg); color: var(--lt-warning); }
.icon-danger { background: var(--lt-danger-bg); color: var(--lt-danger); }

/* ============================================================
   Badges (soft)
   ============================================================ */
.badge-soft {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .32rem .65rem; border-radius: 999px;
  font-size: .76rem; font-weight: 600; line-height: 1;
}
.badge-soft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge-soft-success { background: var(--lt-success-bg); color: var(--lt-success); }
.badge-soft-info { background: var(--lt-info-bg); color: var(--lt-info); }
.badge-soft-warning { background: var(--lt-warning-bg); color: var(--lt-warning); }
.badge-soft-danger { background: var(--lt-danger-bg); color: var(--lt-danger); }
.badge-soft-muted { background: var(--lt-muted-bg); color: var(--lt-muted); }

.celebration-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .6rem; border-radius: 999px;
  background: #fdf2f8; color: #be185d; font-size: .76rem; font-weight: 600;
}

/* ============================================================
   Tables
   ============================================================ */
.table-card { overflow: hidden; }
.table { margin: 0; color: var(--lt-text); }
.table thead th {
  background: #fafbff; color: var(--lt-muted);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; border-bottom: 1px solid var(--lt-border);
  padding: .85rem 1.1rem; white-space: nowrap;
}
.table tbody td { padding: .95rem 1.1rem; border-bottom: 1px solid var(--lt-border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table-hover tbody tr:hover { background: #fafbff; }

.guest-cell { display: flex; align-items: center; gap: .7rem; }
.guest-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--lt-primary-soft); color: var(--lt-primary);
  display: grid; place-items: center; font-weight: 650; font-size: .82rem;
}
.guest-name { font-weight: 600; line-height: 1.2; }
.guest-sub { color: var(--lt-muted); font-size: .8rem; }
.res-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--lt-text); }

/* ============================================================
   Buttons
   ============================================================ */
.btn { border-radius: var(--lt-radius-sm); font-weight: 600; font-size: .9rem; padding: .55rem 1.05rem; }
.btn-primary { background: var(--lt-primary); border-color: var(--lt-primary); }
.btn-primary:hover { background: var(--lt-primary-dark); border-color: var(--lt-primary-dark); }
.btn-outline-secondary { color: var(--lt-text); border-color: var(--lt-border); background: #fff; }
.btn-outline-secondary:hover { background: #f3f4fa; color: var(--lt-text); border-color: #d7dae8; }
.btn-light { background: #fff; border: 1px solid var(--lt-border); }
.btn-sm { padding: .4rem .75rem; font-size: .82rem; }

/* ============================================================
   Forms
   ============================================================ */
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: var(--lt-text); }
.form-control, .form-select {
  border-radius: var(--lt-radius-sm); border: 1px solid var(--lt-border);
  padding: .6rem .8rem; font-size: .92rem; background: #fff;
}
.form-control::placeholder { color: #9aa1b2; }
.form-text { font-size: .8rem; }
.field-hint { color: var(--lt-muted); font-size: .8rem; }
.form-section-title { font-weight: 700; font-size: .95rem; margin: 0 0 .25rem; }
.form-section-sub { color: var(--lt-muted); font-size: .82rem; margin-bottom: 1rem; }

/* Definition list for details */
.detail-list { display: grid; grid-template-columns: 170px 1fr; gap: .1rem 1rem; }
.detail-list dt { color: var(--lt-muted); font-weight: 500; font-size: .85rem; padding: .55rem 0; }
.detail-list dd { margin: 0; padding: .55rem 0; font-weight: 500; border-bottom: 1px dashed var(--lt-border); }
.detail-list dt { border-bottom: 1px dashed var(--lt-border); }
.detail-list > dt:last-of-type, .detail-list > dd:last-of-type { border-bottom: 0; }

.link-box {
  display: flex; align-items: center; gap: .5rem;
  background: var(--lt-primary-soft); border: 1px dashed #c7cdf7;
  border-radius: var(--lt-radius-sm); padding: .6rem .8rem;
}
.link-box code { color: var(--lt-primary-dark); font-size: .82rem; word-break: break-all; flex: 1; }

/* ============================================================
   Public / auth layout
   ============================================================ */
.public-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.public-nav {
  background: #fff; border-bottom: 1px solid var(--lt-border);
  padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
}
.brand-inline { display: flex; align-items: center; gap: .65rem; font-weight: 700; color: var(--lt-text); }
.brand-inline .brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--lt-primary), var(--lt-accent));
  display: grid; place-items: center; color: #fff;
}

.auth-screen {
  flex: 1; display: grid; place-items: center; padding: 2.5rem 1rem;
  background:
    radial-gradient(1100px 460px at 50% -8%, #e9ecff 0%, rgba(233, 236, 255, 0) 60%),
    var(--lt-bg);
}
.auth-card {
  width: 100%; max-width: 410px; background: #fff;
  border: 1px solid var(--lt-border); border-radius: var(--lt-radius);
  box-shadow: var(--lt-shadow-md); padding: 2.1rem;
}
.auth-card .brand-mark {
  width: 50px; height: 50px; border-radius: 14px; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--lt-primary), var(--lt-accent));
  display: grid; place-items: center; color: #fff; font-size: 1.3rem;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .4);
}
.demo-creds {
  margin-top: 1.25rem; padding: .8rem 1rem; border-radius: var(--lt-radius-sm);
  background: #fafbff; border: 1px dashed var(--lt-border);
  font-size: .82rem; color: var(--lt-muted);
}
.demo-creds code { color: var(--lt-primary-dark); }

/* Guest form */
.guest-screen { flex: 1; background: var(--lt-bg); padding: 2.5rem 1rem; }
.guest-hero {
  max-width: 760px; margin: 0 auto 1.25rem; text-align: center;
}
.guest-hero .pill {
  display: inline-flex; gap: .4rem; align-items: center;
  background: var(--lt-primary-soft); color: var(--lt-primary);
  padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.guest-card { max-width: 760px; margin: 0 auto; }

/* Landing hero */
.hero {
  background:
    radial-gradient(900px 420px at 80% -10%, #e9ecff 0%, rgba(233, 236, 255, 0) 60%),
    var(--lt-surface);
  border-bottom: 1px solid var(--lt-border);
  padding: 4.5rem 1.5rem;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; }
.hero p.lead { color: var(--lt-muted); max-width: 620px; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--lt-primary-soft); color: var(--lt-primary); font-size: 1.1rem; margin-bottom: .9rem;
}

/* ============================================================
   Misc
   ============================================================ */
.page-empty { text-align: center; padding: 3rem 1rem; color: var(--lt-muted); }
.page-empty i { font-size: 2.2rem; color: #c3c8d8; margin-bottom: .75rem; }

footer.app-foot { color: var(--lt-muted); font-size: .82rem; padding: 1.25rem 1.5rem; text-align: center; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list dt { padding-bottom: 0; border-bottom: 0; }
  .detail-list dd { padding-top: .15rem; }
}
