/* ---- CSS Variables ---- */
:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --text: #111111;
  --text-muted: #777777;
  --border: #111111;
  --border-subtle: #dddddd;
  --accent: #111111;
  --error: #cc0000;
  --nav-h: 64px;
  --header-h: 52px;
}

[data-theme="dark"] {
  --bg: #111111;
  --surface: #1c1c1c;
  --text: #f0f0f0;
  --text-muted: #888888;
  --border: #f0f0f0;
  --border-subtle: #333333;
  --accent: #f0f0f0;
  --error: #ff7777;
}

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

html {
  height: 100%;
}

body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 14px);
  right: calc(env(safe-area-inset-right) + 14px);
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  font-family: inherit;
  touch-action: manipulation;
}

/* ---- Centered Screens (password, onboarding, etc.) ---- */
.screen-centered {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-centered .inner {
  width: 100%;
  max-width: 360px;
}

/* ---- Cards ---- */
.card {
  border: 2px solid var(--border);
  padding: 24px;
}

/* ---- Typography ---- */
.app-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.screen-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.screen-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ---- Form Elements ---- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  border-radius: 0;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
}

.form-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='%23111111' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="dark"] .form-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='%23f0f0f0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(var(--invert, 0));
  cursor: pointer;
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.form-input[type="number"] {
  -moz-appearance: textfield;
}

.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* ---- Global touch behaviour ---- */
button, a, [role="button"] {
  touch-action: manipulation;
}

/* ---- Buttons ---- */
.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 0;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  font-size: 13px;
}

.btn-sm {
  padding: 13px 14px;
  font-size: 12px;
}

.btn + .btn {
  margin-top: 10px;
}

.btn-danger {
  background: var(--bg);
  color: var(--error);
  border-color: var(--error);
}

/* ---- Error / Info Messages ---- */
.error-msg {
  color: var(--error);
  font-size: 13px;
  margin-bottom: 12px;
}

.info-msg {
  font-size: 14px;
  color: var(--text-muted);
  padding: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ---- Main App Layout ---- */
.main-layout {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.main-header {
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 16px;
  padding-left: 16px;
  flex-shrink: 0;
}

.main-header__titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  flex: 1;
  min-width: 0;
  margin-right: 12px;
}

.main-header__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-header__center {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.header-theme-btn {
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  touch-action: manipulation;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-content {
  padding: 20px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 72px);
}

/* ---- Bottom Navigation ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 8px;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
  color: var(--text);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Home Tab ---- */
.home-welcome {
  margin-bottom: 20px;
}
.home-welcome__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text);
}
.main-header--minimal {
  justify-content: flex-end;
}
.home-stats-block { margin-bottom: 20px; }
.home-stat-row {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-stat-row:last-child { border-bottom: none; }
.home-stat-row:active { opacity: 0.6; }
.home-stat__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.home-stat__label {
  font-size: 13px;
  color: var(--text);
  margin-top: 2px;
}
.home-stat__action {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.home-breakdown {
  margin-bottom: 12px;
}
.home-date-picker {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-date-picker__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.home-date-picker__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.home-date-picker__remove { font-size: 13px; color: var(--error); }
.home-date-picker__cancel { font-size: 13px; color: var(--text-muted); }
.home-hiring {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 12px;
}
.home-hiring__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.home-hiring__sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.home-hiring__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 3px 10px;
}

.feature-rank-block { margin-bottom: 20px; }
.feature-rank__sub {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.feature-rank-item {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.1s;
}
.feature-rank-item:last-of-type { border-bottom: none; }
.feature-rank-item:active { background: var(--border-subtle); }
.feature-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.feature-rank-item--ranked .feature-rank-badge {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.feature-rank-content { flex: 1; min-width: 0; }
.feature-rank-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.feature-rank-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.feature-rank-submit {
  margin: 14px 16px 4px;
  width: calc(100% - 32px);
}
.feature-rank-saved {
  font-size: 13px;
  color: var(--text-muted);
  padding: 14px 16px;
  text-align: center;
}

.streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--border);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.streak-badge--zero {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.motivational-msg {
  font-size: 14px;
  line-height: 1.6;
  padding: 14px;
  border: 2px solid var(--border);
  margin-bottom: 24px;
  background: var(--surface);
}

.progress-section {
  margin-bottom: 8px;
}

.module-section {
  margin-bottom: 28px;
}

.module-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.module-section__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.module-section__done {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.progress-item {
  margin-bottom: 18px;
}

.progress-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.progress-item__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-item__count {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.progress-item__count--done {
  color: var(--text);
  font-weight: 700;
}

.progress-bar {
  height: 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* ---- Completion Banner ---- */
.completion-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.completion-banner--email {
  flex-direction: column;
  align-items: stretch;
}
.completion-banner--complete {
  background: #f0fdf4;
  border-color: #4ade80;
}
.completion-banner--complete .completion-banner__title {
  color: #14532d;
}
.completion-banner--complete .completion-banner__desc {
  color: #166534;
  opacity: 0.85;
}
.completion-banner--complete .completion-banner__yes {
  background: #16a34a;
  color: #fff;
  border-color: transparent;
}
@media (prefers-color-scheme: dark) {
  .completion-banner--complete {
    background: #052e16;
    border-color: #15803d;
  }
  .completion-banner--complete .completion-banner__title,
  .completion-banner--complete .completion-banner__desc {
    color: #86efac;
  }
  .completion-banner--complete .completion-banner__yes {
    background: #15803d;
  }
}
.completion-banner--incomplete {
  background: #fff1f1;
  border-color: #f87171;
}
.completion-banner--incomplete .completion-banner__title {
  color: #7f1d1d;
}
.completion-banner--incomplete .completion-banner__desc {
  color: #991b1b;
  opacity: 0.85;
}
.completion-banner--incomplete .completion-banner__yes {
  background: #dc2626;
  color: #fff;
  border-color: transparent;
}
@media (prefers-color-scheme: dark) {
  .completion-banner--incomplete {
    background: #2d0a0a;
    border-color: #b91c1c;
  }
  .completion-banner--incomplete .completion-banner__title,
  .completion-banner--incomplete .completion-banner__desc {
    color: #fca5a5;
  }
  .completion-banner--incomplete .completion-banner__yes {
    background: #b91c1c;
  }
}
.completion-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.completion-banner__desc {
  font-size: 13px;
  color: var(--muted);
}
.completion-banner__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.completion-banner__email-input {
  font-size: 16px;
  margin-bottom: 12px;
}
.completion-banner__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.completion-banner__yes {
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}
.completion-banner__yes:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.completion-banner__no {
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}

.completion-banner--sent {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.completion-banner__sent-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.completion-banner__sent-check {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.completion-banner__resend {
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  touch-action: manipulation;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 76px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- FAB Track Button ---- */
.fab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 88;
}
.fab-container {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fab-btn {
  width: auto !important;
  height: 44px;
  border-radius: 20px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  touch-action: manipulation;
}
.fab-chevron {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.fab-dropdown {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 180px;
}
.fab-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}
.fab-dropdown-item:last-child {
  border-bottom: none;
}
.fab-dropdown-item--export {
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-weight: 500;
}
.fab-dropdown-item:hover {
  background: var(--border-subtle);
}
.fab-dropdown-item:active {
  background: var(--border-subtle);
}

/* ---- Log Hours Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}

.modal {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  max-height: 92dvh;
  background: var(--bg);
  border-top: 2px solid var(--border);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  touch-action: manipulation;
}

.log-entry {
  border: 2px solid var(--border-subtle);
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
}

.log-entry__remove {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 12px;
  font-family: inherit;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.duration-row {
  display: flex;
  gap: 8px;
}

.duration-row .form-input {
  flex: 1;
}

.unit-select {
  width: 90px;
  flex-shrink: 0;
}

.add-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: 2px dashed var(--border-subtle);
  width: 100%;
  padding: 12px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}

/* ---- Weekly View ---- */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.week-nav__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  flex: 1;
}

.week-nav__btn {
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.week-day {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.week-day:last-child {
  border-bottom: none;
}

.week-day__left {
  min-width: 52px;
  flex-shrink: 0;
}

.week-day__name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.week-day__date {
  font-size: 11px;
  color: var(--text-muted);
}

.week-day.today .week-day__name,
.week-day.today .week-day__date {
  color: var(--text);
}

.today-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--text);
  border-radius: 50%;
  margin-left: 3px;
  vertical-align: middle;
  margin-bottom: 1px;
}

.week-day__entries {
  flex: 1;
  padding-top: 1px;
}

.week-day__entry {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.4;
}

.week-day__empty {
  font-size: 13px;
  color: var(--text-muted);
}

/* Edit Hours: adjust amounts by date */
.edit-help {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.edit-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.edit-amount-row__label {
  font-size: 14px;
  color: var(--text);
}
.edit-amount-input {
  width: 80px;
  text-align: center;
}
.edit-amount-dur {
  display: flex;
  gap: 6px;
  align-items: center;
}
.edit-amount-dur .edit-amount-input {
  width: 70px;
}
.edit-amount-dur .unit-select {
  width: auto;
}
.edit-empty {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

/* ---- Profile Tab ---- */
.profile-block {
  border: 2px solid var(--border);
  margin-bottom: 20px;
}

.profile-block__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-row__label {
  color: var(--text-muted);
}

.profile-row__value {
  font-weight: 600;
  text-align: right;
}

.danger-zone {
  margin-top: 32px;
}

/* ---- Feedback Modal ---- */
.sentiment-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.sentiment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  flex: 1;
  transition: border-color 0.15s, background 0.15s;
}

.sentiment-btn:hover {
  border-color: var(--sentiment-color);
}

.sentiment-btn[data-sentiment="great"].active  { border-color: #2d7a4f; background: rgba(45,122,79,0.12); }
.sentiment-btn[data-sentiment="good"].active   { border-color: #6aab7e; background: rgba(106,171,126,0.12); }
.sentiment-btn[data-sentiment="bad"].active    { border-color: #c97a7a; background: rgba(201,122,122,0.12); }
.sentiment-btn[data-sentiment="terrible"].active { border-color: #a33232; background: rgba(163,50,50,0.12); }

.sentiment-emoji {
  font-size: 28px;
  line-height: 1;
}

.sentiment-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ---- Blurred Preview (non-BB brands) ---- */
.blur-wrapper {
  position: relative;
}

.blur-content {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.blur-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 20px 16px;
  width: calc(100% - 32px);
  max-width: 300px;
  text-align: center;
}

.blur-banner p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* ---- Teacher Waitlist / Not Available Screens ---- */
.info-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.info-screen__icon {
  font-size: 40px;
  margin-bottom: 20px;
  line-height: 1;
}

.info-screen h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.info-screen p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto 24px;
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 20px 0;
}

/* ---- Auth Screens ---- */
.auth-switch {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.btn-link {
  background: none;
  border: none;
  padding: 12px 4px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-decoration: underline;
  touch-action: manipulation;
}

.form-input--readonly {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 2px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 16px;
}

.import-home-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 12px 14px;
  margin-top: 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  gap: 2px;
}
.import-home-btn:hover { background: var(--surface-1); }
.import-home-btn__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.bulk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.bulk-row__label {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.bulk-row__unit {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 50px;
}

.profile-import-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-import-btn__sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ---- Utility ---- */
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 13px; }

/* ---- Monthly Calendar ---- */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 16px;
}
.cal-nav__label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.cal-nav__btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  padding: 12px 14px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.cal-nav__btn:disabled { opacity: 0.25; cursor: default; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}
.cal-header-cell {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-day {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.1s;
}
.cal-day--empty { cursor: default; }
.cal-day--future { opacity: 0.3; cursor: default; }
.cal-day:not(.cal-day--empty):not(.cal-day--future):hover {
  background: var(--surface);
}
.cal-day__num {
  font-size: 13px;
  color: var(--text);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.cal-day__num--today {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.cal-dots {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}
.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-dot--personalSession  { background: #3b82f6; }
.cal-dot--observationHours { background: #10b981; }
.cal-dot--teachingHours    { background: #f59e0b; }

/* ---- Calendar view toggle ---- */
/* ---- Calendar view selector dropdown ---- */
.cal-view-selector-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.cal-view-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cal-view-selector::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 11px;
  color: var(--text);
}
.cal-view-select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 10px 28px 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  min-height: 44px;
  touch-action: manipulation;
}

/* ---- Month view selected day ---- */
.cal-day--selected .cal-day__num--selected {
  border: 1.5px solid var(--text);
  border-radius: 50%;
}
.cal-day__num--selected {
  border: 1.5px solid var(--text);
}

/* ---- Day detail panel (below month grid) ---- */
.day-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.day-detail__header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.day-detail__empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0 8px;
}
.day-detail__section {
  margin-bottom: 12px;
}
.day-detail__type-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.day-detail__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}
.day-detail__row:last-child { border-bottom: none; }
.day-detail__sub { color: var(--text); }
.day-detail__val { color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---- Week list view ---- */
.week-list { display: flex; flex-direction: column; gap: 0; }
.week-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}
.week-row--future { opacity: 0.4; cursor: default; }
.week-row--selected { background: var(--surface); border-radius: 8px; padding: 12px 8px; margin: 0 -8px; }
.week-row__date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.week-row__date--today { color: var(--text); }
.week-row--today .week-row__date { color: var(--text); }
.week-row__entries { display: flex; flex-direction: column; gap: 4px; }
.week-row__entry {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.week-row__entry-label { color: var(--text); }
.week-row__entry-val { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.week-row__empty { font-size: 14px; color: var(--border-subtle); }

/* ---- Day view ---- */
.day-view { padding-top: 8px; }
.day-view__empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 0;
}
.day-view__section { margin-bottom: 16px; }
.day-view__type-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.day-view__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
}
.day-view__row:last-child { border-bottom: none; }
.day-view__sub { color: var(--text); }
.day-view__val { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.hours-mode-row { display: flex; justify-content: flex-start; margin-bottom: 4px; }

.section-label-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.section-label-row .section-label { margin: 0; }
.unit-toggle { display: flex; background: var(--border-subtle); border-radius: 12px; padding: 2px; }
.unit-toggle-btn { border: none; border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted); background: transparent; line-height: 1; min-height: 44px; display: flex; align-items: center; touch-action: manipulation; }
.unit-toggle-btn--active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }

.cal-filters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.cal-filter-row { display: flex; gap: 6px; }
.cal-filter-btn { border: 1px solid var(--border-subtle); border-radius: 16px; padding: 10px 12px; font-size: 14px; font-weight: 500; font-family: inherit; background: transparent; color: var(--text-muted); cursor: pointer; white-space: nowrap; flex-shrink: 0; min-height: 44px; touch-action: manipulation; }
.cal-filter-btn--active { background: var(--text); border-color: var(--text); color: var(--bg); }

.cal-filter-dropdowns { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-dropdown { position: relative; }
.filter-dropdown-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-subtle); border-radius: 20px; padding: 11px 14px; font-size: 14px; font-weight: 500; font-family: inherit; background: var(--surface); color: var(--text-muted); cursor: pointer; white-space: nowrap; min-height: 44px; touch-action: manipulation; }
.filter-dropdown-btn--active { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-dd-caret { font-size: 10px; opacity: 0.6; }
.filter-dropdown-panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 160px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; z-index: 200; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.filter-dropdown-panel--right { left: auto; right: 0; }
.filter-dropdown--open .filter-dropdown-panel { display: block; }
.filter-option { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; font-size: 14px; color: var(--text); user-select: none; }
.filter-option:hover { background: var(--border-subtle); }
.filter-option input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; accent-color: var(--text); }
.filter-option-view { padding: 10px 16px; font-size: 14px; font-family: inherit; font-weight: 400; color: var(--text-muted); cursor: pointer; user-select: none; min-height: 44px; display: flex; align-items: center; }
.filter-option-view:hover { background: var(--border-subtle); }
.filter-option-view--active { color: var(--text); }

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-toolbar .cal-filter-dropdowns { margin-bottom: 0; }
