/* dist_style.css – Apple-Inspired Light Theme — Mobile-First Enhanced */
/* UPDATED: Aligned with dist_portal.css Apple light theme. Replaces B2B Dark Professional Theme. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* ── Backgrounds ── */
  --bg:        #f5f5f7;
  --surface:   #ffffff;
  --card:      #ffffff;
  --card-hi:   #f0f0f2;

  /* ── Borders ── */
  --border:    rgba(0,0,0,.08);
  --border-hi: rgba(0,0,0,.14);

  /* ── Brand / Actions ── */
  --primary:   #0071e3;
  --primary-h: #0077ed;
  --primary-lo:#004a99;

  /* ── Semantic colours ── */
  --success:   #34c759;
  --warning:   #ff9500;
  --danger:    #ff3b30;
  --info:      #0071e3;

  /* ── Text ── */
  --text:      #1d1d1f;
  --muted:     #6e6e73;

  /* ── Shape & spacing ── */
  --radius:    14px;
  --radius-sm: 9px;

  /* ── Shadows ── */
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);

  /* ── Typography ── */
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'SF Mono', 'Fira Mono', monospace;

  /* ── Layout ── */
  --nav-h:     62px;
  --tap-min:   44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-h); text-decoration: underline; }

/* ── NAVBAR ───────────────────────────────────────────── */
.navbar {
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

.admin-nav {
  background: rgba(255,255,255,.92);
  border-color: rgba(0,113,227,.15);
}

.nav-brand {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-logo { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--tap-min);
  height: var(--tap-min);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: all .25s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin-left: auto;
}
.nav-links a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: .4rem .85rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.nav-links a:hover {
  background: rgba(0,0,0,.05);
  color: var(--text);
  text-decoration: none;
}
.nav-links a.active {
  background: rgba(0,0,0,.05);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.btn-nav-out {
  background: rgba(255,59,48,.08) !important;
  color: var(--danger) !important;
  margin-left: .25rem;
}
.btn-nav-out:hover {
  background: rgba(255,59,48,.15) !important;
  text-decoration: none !important;
}

.nav-user {
  font-size: .78rem;
  color: var(--muted);
  padding-left: .75rem;
  border-left: 0.5px solid var(--border-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.badge {
  background: var(--danger);
  color: #fff;
  border-radius: 99px;
  padding: 1px 6px;
  font-size: .68rem;
  font-weight: 700;
  margin-left: 3px;
  vertical-align: middle;
  line-height: 1.4;
}

/* ── LAYOUT ───────────────────────────────────────────── */
.page-wrap    { max-width: 1200px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.page-wrap-sm { max-width: 520px;  margin: 3rem auto; padding: 0 1rem; }

/* ── CARDS ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 0.5px solid var(--border);
  gap: .75rem;
}
.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}

/* ── PAGE HEADER ──────────────────────────────────────── */
.page-header { margin-bottom: 1.75rem; }
.page-header h1 {
  font-size: clamp(1.3rem, 4vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--text);
}

/* ── GRIDS ────────────────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  min-height: var(--tap-min);
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1;
  letter-spacing: -.01em;
}
.btn-full { width: 100%; }
.btn-sm   { min-height: 32px; padding: .28rem .85rem; font-size: .8rem; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-h);
  color: #fff;
  text-decoration: none;
}

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .88; }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { opacity: .88; }

.btn-warning { background: var(--warning); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 0.5px solid var(--border-hi);
}
.btn-ghost:hover {
  background: #f5f5f7;
  color: var(--text);
  text-decoration: none;
}

/* ── FORMS ────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
input[type=text], input[type=email], input[type=url],
input[type=number], input[type=password], input[type=tel],
select, textarea {
  width: 100%;
  background: #f5f5f7;
  border: 0.5px solid var(--border-hi);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: .88rem;
  padding: .5rem .8rem;
  outline: none;
  transition: all .15s;
  min-height: 38px;
}
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,113,227,.1);
}
input[readonly] { opacity: .55; cursor: default; }
select option   { background: #fff; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ── TABLES ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
table       { width: 100%; border-collapse: collapse; }
th, td      { padding: .65rem 1rem; text-align: left; }
th {
  background: #f5f5f7;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
}
td {
  font-size: .85rem;
  color: #3a3a3c;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,.015); }

/* ── FLASH MESSAGES ───────────────────────────────────── */
.flash-msg {
  padding: .75rem 1rem;
  border-radius: 6px;
  background: var(--card);
  margin-bottom: 1.25rem;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ── ALERTS ───────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: .85rem;
  font-weight: 500;
}
.alert-success { background: #eafaf0; color: #1a6630; border-left: 3px solid var(--success); }
.alert-danger  { background: #fff0ee; color: #9a1a14; border-left: 3px solid var(--danger); }
.alert-warning { background: #fff5e6; color: #7a4800; border-left: 3px solid var(--warning); }
.alert-info    { background: #e8f1fc; color: #004a99; border-left: 3px solid var(--info); }

/* ── FILTER BAR ───────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  align-items: center;
}
.filter-bar input,
.filter-bar select {
  flex: 1;
  min-width: 160px;
  background: #fff;
  border: 0.5px solid var(--border-hi);
  min-height: 34px;
}

/* ── FLEX UTILS ───────────────────────────────────────── */
.flex              { display: flex; }
.items-center      { align-items: center; }
.justify-between   { justify-content: space-between; }
.gap-1             { gap: .5rem; }
.gap-2             { gap: 1rem; }
.mt-1              { margin-top: .5rem; }
.mt-2              { margin-top: 1rem; }
.mt-3              { margin-top: 1.5rem; }
.mb-1              { margin-bottom: .5rem; }
.mb-2              { margin-bottom: 1rem; }
.mb-3              { margin-bottom: 1.5rem; }
.text-sm           { font-size: .85rem; }
.text-muted        { color: var(--muted); }
.text-center       { text-align: center; }

/* ── MODAL ────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
}

/* ── AUTH PAGES ───────────────────────────────────────── */
.auth-logo {
  text-align: center;
  padding: 2rem 0 1.5rem;
}
.auth-logo h1 { font-size: 1.35rem; font-weight: 600; margin-bottom: .25rem; color: var(--text); }
.auth-logo p  { color: var(--muted); font-size: .88rem; }
.logo-icon    { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--primary); }

/* ── TRUST STRIP ──────────────────────────────────────── */
.trust-strip {
  border-left: 3px solid var(--success);
  padding: .9rem 1.15rem;
  background: #eafaf0;
  border-radius: 0 6px 6px 0;
}
.trust-strip p { margin: 0; font-size: .83rem; color: var(--muted); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════
   RESERVATION STATUS BADGES
═══════════════════════════════════════════════════════════ */
.badge-reserved {
  display: inline-block;
  background: #e8f1fc;
  color: #004a99;
  border: 0.5px solid rgba(0,113,227,.2);
  border-radius: 99px;
  padding: .18rem .65rem;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending {
  display: inline-block;
  background: #fff5e6;
  color: #7a4800;
  border: 0.5px solid rgba(255,149,0,.2);
  border-radius: 99px;
  padding: .18rem .65rem;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active-res {
  display: inline-block;
  background: #eafaf0;
  color: #1a6630;
  border: 0.5px solid rgba(52,199,89,.2);
  border-radius: 99px;
  padding: .18rem .65rem;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   PROJECT TYPE CARD SELECTORS
═══════════════════════════════════════════════════════════ */
.project-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 480px) {
  .project-type-cards { grid-template-columns: 1fr; }
}

.project-type-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .12s;
  background: var(--card);
  text-align: center;
  user-select: none;
  box-shadow: var(--shadow-sm);
}
.project-type-card:hover {
  border-color: var(--primary);
  background: #f0f6ff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.project-type-card.selected {
  border-color: var(--primary);
  background: #e8f1fc;
  box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}
.project-type-card .ptc-icon {
  font-size: 2rem;
  margin-bottom: .5rem;
  display: block;
}
.project-type-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--text);
}
.project-type-card p {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   ODM REVIEW NOTICE PANEL
═══════════════════════════════════════════════════════════ */
.odm-review-panel {
  background: #fff5e6;
  border: 0.5px solid rgba(255,149,0,.25);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
}
.odm-review-panel strong { color: var(--warning); }

/* ═══════════════════════════════════════════════════════════
   SPINNER
═══════════════════════════════════════════════════════════ */
.spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.5px solid rgba(0,113,227,.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .5s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   MOBILE NAV
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-user   { display: none; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: .5rem 1rem 1rem;
    gap: .25rem;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    display: none;
    z-index: 199;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    min-height: var(--tap-min);
    padding: .65rem 1rem;
    border-radius: 6px;
    font-size: .95rem;
  }
}
