@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #F0F0EC;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
}

/* ── VARIABLES ── */
:root {
  --green: #1D9E75;
  --green-dark: #0F6E56;
  --green-light: #E1F5EE;
  --green-text: #085041;
  --blue: #185FA5;
  --blue-dark: #0C447C;
  --blue-light: #E6F1FB;
  --blue-text: #0C447C;
  --purple: #7F77DD;
  --purple-dark: #534AB7;
  --purple-light: #EEEDFE;
  --purple-text: #3C3489;
  --amber: #EF9F27;
  --amber-light: #FAEEDA;
  --amber-text: #633806;
  --red: #E24B4A;
  --red-light: #FCEBEB;
  --red-text: #791F1F;
  --bg: #F0F0EC;
  --surface: #FFFFFF;
  --border: #E4E4DC;
  --text: #1A1A1A;
  --text-2: #555550;
  --text-3: #99998F;
  --sidebar-w: 232px;
  --topbar-h: 54px;
}

/* ── AUTH ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--green);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text);
}

.logo-accent { color: var(--green); }

.auth-heading {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 5px;
  color: var(--text);
}

.auth-sub {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 22px;
}

.auth-error {
  min-height: 18px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 10px;
}

.auth-switch-text {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

.auth-switch-text a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

/* ── ROLE PICKER ── */
.role-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.role-option {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  background: var(--surface);
}

.role-option:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.role-option.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.role-icon {
  font-size: 22px;
  margin-bottom: 6px;
  display: block;
}

.role-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  display: block;
}

.role-option.selected .role-label {
  color: var(--green-text);
}

/* ── FORMS ── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

textarea { resize: vertical; line-height: 1.5; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { background: var(--bg); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--green); color: white; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }

.btn-blue { background: var(--blue); color: white; border-color: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); }

.btn-purple { background: var(--purple); color: white; border-color: var(--purple); }
.btn-purple:hover { background: var(--purple-dark); }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-full { width: 100%; padding: 11px; }

.btn-accept { background: var(--green-light); color: var(--green-text); border-color: var(--green-light); }
.btn-accept:hover { background: #c5eedd; }
.btn-decline { background: var(--bg); color: var(--text-2); border-color: var(--border); }

/* ── APP LAYOUT ── */
#app-screen {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR INTERNALS ── */
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-close {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 16px;
  padding: 2px 6px;
  cursor: pointer;
}

.role-pill {
  margin: 10px 12px 2px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  text-align: center;
  letter-spacing: 0.3px;
}

.role-pill.pro { background: var(--green-light); color: var(--green-text); }
.role-pill.manager { background: var(--blue-light); color: var(--blue-text); }
.role-pill.client { background: var(--purple-light); color: var(--purple-text); }

.main-nav {
  padding: 6px 8px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 8px 4px;
  display: block;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 1px;
  transition: all 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
}

.nav-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.5;
}

.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn:hover svg { opacity: 0.8; }

.nav-btn.active { font-weight: 500; }
.nav-btn.active svg { opacity: 1; }
.nav-btn.active.pro-nav { background: var(--green-light); color: var(--green-text); }
.nav-btn.active.manager-nav { background: var(--blue-light); color: var(--blue-text); }
.nav-btn.active.client-nav { background: var(--purple-light); color: var(--purple-text); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-text);
  flex-shrink: 0;
}

.sidebar-footer-info { flex: 1; min-width: 0; }
.profile-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-club { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.signout-btn {
  background: none;
  border: none;
  color: var(--text-3);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.signout-btn:hover { background: var(--red-light); color: var(--red); }

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  flex-shrink: 0;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-btn:hover { background: var(--bg); }

.topbar-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── PAGE CONTAINER ── */
.page-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--text);
}

.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.card + .card { margin-top: 16px; }

.card-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title { font-size: 13.5px; font-weight: 500; color: var(--text); }

.card-action {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
}

/* ── TWO COL LAYOUT ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  align-items: start;
}

.right-stack { display: flex; flex-direction: column; gap: 16px; }

/* ── LIST ITEMS ── */
.list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg); }

.list-item-info { flex: 1; min-width: 0; }
.list-item-title { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-blue { background: #378ADD; }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }

.mono { font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text-2); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-green { background: var(--green-light); color: var(--green-text); }
.badge-blue { background: var(--blue-light); color: var(--blue-text); }
.badge-amber { background: var(--amber-light); color: var(--amber-text); }
.badge-red { background: var(--red-light); color: var(--red-text); }
.badge-purple { background: var(--purple-light); color: var(--purple-text); }
.badge-gray { background: var(--bg); color: var(--text-3); border: 1px solid var(--border); }

/* ── SEARCH ── */
.search-wrap {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13.5px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='7' cy='7' r='4.5' stroke='%23aaa' stroke-width='1.5'/%3E%3Cpath d='M10.5 10.5L13 13' stroke='%23aaa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center;
  color: var(--text);
  outline: none;
  font-family: 'DM Sans', sans-serif;
}

.search-input:focus { border-color: var(--green); background-color: var(--surface); box-shadow: 0 0 0 3px rgba(29,158,117,0.1); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: var(--surface);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 20px;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── TOAST ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: slideUp 0.2s ease;
  max-width: 320px;
  font-family: 'DM Sans', sans-serif;
}

.toast-success { background: #1a1a1a; }
.toast-error { background: var(--red); }

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

/* ── EMPTY STATE ── */
.empty-state {
  padding: 48px 20px;
  text-align: center;
}

.empty-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.empty-title { font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.empty-desc { font-size: 13px; color: var(--text-3); max-width: 280px; margin: 0 auto 16px; line-height: 1.5; }

/* ── MISC ── */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-3);
  font-size: 13px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 16px;
}

.info-box {
  background: var(--bg);
  border-radius: 7px;
  padding: 10px 12px;
}

.info-lbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.info-val { font-size: 13.5px; font-weight: 500; color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .menu-btn { display: flex; }
  .app-body { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page-container { padding: 16px; }
  .topbar-signout { display: flex !important; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .auth-card { padding: 24px 18px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── SKELETON LOADING ── */
.skeleton-row { height: 14px; background: linear-gradient(90deg, var(--bg) 25%, #e8e8e0 50%, var(--bg) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── SPINNER ── */
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.6s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MARK HIGHLIGHT ── */
mark { background: var(--amber-light); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ── QUICK ACTIONS ── */
.quick-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.quick-action-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.15s; font-family: 'DM Sans', sans-serif; }
.quick-action-btn:hover { border-color: var(--green); background: var(--green-light); transform: translateY(-1px); }
.quick-action-btn:active { transform: translateY(0); }
.qa-icon { font-size: 24px; line-height: 1; }
.qa-label { font-size: 12.5px; font-weight: 500; color: var(--text); text-align: center; line-height: 1.3; }

/* ── PAYMENT PILLS ── */
.payment-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 500; }
.payment-paid { background: var(--green-light); color: var(--green-text); }
.payment-unpaid { background: var(--amber-light); color: var(--amber-text); }

/* ── CALENDAR ── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day { padding: 4px; min-height: 64px; background: var(--bg); border-radius: 6px; font-size: 11px; cursor: pointer; transition: background 0.1s; }
.cal-day:hover { background: var(--border); }
.cal-day.today { background: var(--green-light); border: 1.5px solid var(--green); }
.cal-event { background: var(--green); color: white; border-radius: 4px; padding: 2px 5px; font-size: 10px; margin-top: 2px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ── STREAK BADGE ── */
.streak-badge { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #FF6B35, #F7931A); color: white; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; }

/* ── SKILL DOTS ── */
.skill-dot { transition: background 0.12s, transform 0.1s; }
.skill-dot:hover { transform: scale(1.2); }

/* ── SMART SEARCH WRAP ── */
.smart-search-wrap { background: var(--surface); }

/* ── NOTIFICATION PANEL ── */
.notif-panel { position: fixed; top: 54px; right: 16px; width: 340px; max-height: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); z-index: 200; overflow: hidden; display: flex; flex-direction: column; }

/* ── SIDEBAR OVERFLOW FIX ── */
.sidebar { overflow: hidden; }
.main-nav { overflow-y: auto; flex: 1; }

/* ── MOBILE FIXES ── */
@media (max-width: 480px) {
  .quick-action-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .quick-action-btn { padding: 12px 6px; }
  .qa-icon { font-size: 20px; }
  .qa-label { font-size: 11px; }
  .cal-day { min-height: 44px; }
  .cal-event { font-size: 9px; padding: 1px 3px; }
}

/* ── Trusted device / remember me ── */
#si-remember:checked + label { color: var(--text); }
#si-error a { text-decoration: none; }
#si-error a:hover { text-decoration: underline; }

/* ── Splash screen dots (injected by JS but base style here) ── */
.splash-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); opacity: 0.3;
  animation: splash-pulse 0.9s ease-in-out infinite;
}
@keyframes splash-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ════════════════════════════════════════════════════════
   BOTTOM NAV BAR (mobile)
   ════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-bottom: constant(safe-area-inset-bottom, 0); /* iOS 11.0 */
}

.bottom-nav {
  display: none;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 6px 4px 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-3);
  transition: color 0.12s;
  -webkit-tap-highlight-color: transparent;
  min-height: 60px;
}

.bottom-nav-btn .bnav-icon {
  font-size: 19px;
  line-height: 1;
  transition: transform 0.12s;
}

.bottom-nav-btn .bnav-label {
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

.bottom-nav-btn.active {
  color: var(--green);
}

.bottom-nav-btn.active .bnav-icon {
  transform: translateY(-1px);
}

/* Manager active color */
.role-manager ~ * .bottom-nav-btn.active,
body[data-role="manager"] .bottom-nav-btn.active {
  color: var(--blue);
}

/* Client active color */
body[data-role="client"] .bottom-nav-btn.active {
  color: var(--purple);
}

/* ── Show bottom nav + adjust page padding on mobile ── */
@media (max-width: 768px) {
  .bottom-nav { display: grid; }
  /* Push page content up so it's not behind bottom nav */
  .page-container {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0));
  }
  /* Topbar: make taller and move elements down for easier thumb reach */
  .topbar {
    height: 52px;
    padding: 0 12px;
  }
  /* Make menu button bigger for easier tapping */
  .menu-btn {
    padding: 8px;
    min-width: 40px;
    min-height: 40px;
  }
  #topbar-back {
    min-width: 36px;
    min-height: 36px;
    display: flex !important;
  }
  .topbar-title {
    font-size: 14px;
  }
}

/* ── Safe area for notched phones ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
  }
}
