@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Serif+Display&family=Fraunces:wght@300;500;600&family=Manrope:wght@400;500;600&family=Space+Grotesk:wght@400;500;600&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #f5f1ea;
  --surface: #ffffff;
  --ink: #201f1a;
  --muted: #6f6a5f;
  --accent: #c46b3b;
  --accent-strong: #a5552d;
  --accent-soft: #f3d4c2;
  --danger: #c44545;
  --border: rgba(32, 31, 26, 0.12);
  --shadow: 0 18px 40px rgba(32, 31, 26, 0.08);
  --radius: 18px;
  --bg-gradient: radial-gradient(circle at top, #fff7ef 0%, var(--bg) 45%, #ede6dd 100%);
  --surface-soft: #fbfaf7;
  --surface-muted: #fffdf9;
  --flash-bg: #fff3dc;
  --flash-border: #f1d2a4;
  --footer-bg: rgba(255, 255, 255, 0.9);
  --status-medium-bg: #f0efed;
  --status-medium-ink: var(--ink);
  --status-low-bg: #e5eefb;
  --status-low-ink: var(--ink);
  --status-hold-bg: #fde9cc;
  --status-hold-ink: var(--ink);
  --font-body: "Space Grotesk", sans-serif;
  --font-heading: "Fraunces", serif;
}

:root[data-mode="dark"] {
  --bg: #161512;
  --surface: #1e1d19;
  --ink: #f4efe6;
  --muted: #b8afa2;
  --accent: #e09660;
  --accent-strong: #f2b285;
  --accent-soft: #3a2a1f;
  --danger: #e16d6d;
  --border: rgba(244, 239, 230, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --bg-gradient: radial-gradient(circle at top, #2a2018 0%, #1b1915 48%, #12110f 100%);
  --surface-soft: #262420;
  --surface-muted: #24221e;
  --flash-bg: #3b2e1e;
  --flash-border: #6b4b2b;
  --footer-bg: rgba(26, 24, 21, 0.9);
  --status-medium-bg: #2b2a26;
  --status-medium-ink: #c9c3b9;
  --status-low-bg: #1f2736;
  --status-low-ink: #bcd0f5;
  --status-hold-bg: #2f2517;
  --status-hold-ink: #e3c397;
}

:root[data-theme="coastal"][data-mode="light"] {
  --bg: #edf4f6;
  --surface: #ffffff;
  --ink: #12242d;
  --muted: #4c5f67;
  --accent: #2b7a87;
  --accent-strong: #1b5f6a;
  --accent-soft: #d2eef1;
  --danger: #d05353;
  --border: rgba(18, 36, 45, 0.12);
  --shadow: 0 18px 40px rgba(18, 36, 45, 0.12);
  --radius: 0;
  --bg-gradient: radial-gradient(circle at top, #f7fcff 0%, #eef6f8 48%, #e0ecf0 100%);
  --surface-soft: #f6fbfc;
  --surface-muted: #f9fdfd;
  --flash-bg: #e7f6f8;
  --flash-border: #bfe3e8;
  --footer-bg: rgba(255, 255, 255, 0.92);
  --status-medium-bg: #eef1f3;
  --status-medium-ink: var(--ink);
  --status-low-bg: #e3f1fa;
  --status-low-ink: var(--ink);
  --status-hold-bg: #fde8cf;
  --status-hold-ink: #6f4a16;
  --font-body: "Manrope", sans-serif;
  --font-heading: "DM Serif Display", serif;
}

:root[data-theme="coastal"][data-mode="dark"] {
  --bg: #0f171c;
  --surface: #162127;
  --ink: #e4f1f4;
  --muted: #a9bcc2;
  --accent: #3aa9b8;
  --accent-strong: #7fd6e1;
  --accent-soft: #1a2d34;
  --danger: #e27676;
  --border: rgba(228, 241, 244, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --radius: 0;
  --bg-gradient: radial-gradient(circle at top, #1a2b32 0%, #111b20 48%, #0c1418 100%);
  --surface-soft: #1a272d;
  --surface-muted: #18252b;
  --flash-bg: #1f2e33;
  --flash-border: #36545c;
  --footer-bg: rgba(14, 20, 24, 0.92);
  --status-medium-bg: #20282d;
  --status-medium-ink: #c6d2d6;
  --status-low-bg: #1a2835;
  --status-low-ink: #b6cfe2;
  --status-hold-bg: #2a2218;
  --status-hold-ink: #e2c8a0;
  --font-body: "Manrope", sans-serif;
  --font-heading: "DM Serif Display", serif;
}

:root[data-theme="sage"][data-mode="light"] {
  --bg: #f2f4ee;
  --surface: #ffffff;
  --ink: #1f2a1f;
  --muted: #5c685a;
  --accent: #5f8460;
  --accent-strong: #47684b;
  --accent-soft: #d9e7d7;
  --danger: #c55656;
  --border: rgba(31, 42, 31, 0.12);
  --shadow: 0 18px 40px rgba(31, 42, 31, 0.12);
  --bg-gradient: radial-gradient(circle at top, #f8faf4 0%, #eef2ea 48%, #e1e8db 100%);
  --surface-soft: #f7faf3;
  --surface-muted: #fbfdf8;
  --flash-bg: #eff6e6;
  --flash-border: #cfe2c3;
  --footer-bg: rgba(255, 255, 255, 0.92);
  --status-medium-bg: #eff1eb;
  --status-medium-ink: var(--ink);
  --status-low-bg: #e5f0e2;
  --status-low-ink: var(--ink);
  --status-hold-bg: #f7e7cc;
  --status-hold-ink: #6d4c1e;
  --font-body: "Work Sans", sans-serif;
  --font-heading: "Cormorant Garamond", serif;
}

:root[data-theme="sage"][data-mode="dark"] {
  --bg: #111814;
  --surface: #18211a;
  --ink: #e7f0e8;
  --muted: #b1c0b2;
  --accent: #7fb687;
  --accent-strong: #b7e1bc;
  --accent-soft: #1c2c20;
  --danger: #e07a7a;
  --border: rgba(231, 240, 232, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --bg-gradient: radial-gradient(circle at top, #1a2a1e 0%, #121c15 48%, #0e1611 100%);
  --surface-soft: #1d2720;
  --surface-muted: #1a241d;
  --flash-bg: #243123;
  --flash-border: #3f5a42;
  --footer-bg: rgba(12, 18, 14, 0.92);
  --status-medium-bg: #232b25;
  --status-medium-ink: #cbd7cc;
  --status-low-bg: #1f2b24;
  --status-low-ink: #c3ddc5;
  --status-hold-bg: #2c2419;
  --status-hold-ink: #e1caa3;
  --font-body: "Work Sans", sans-serif;
  --font-heading: "Cormorant Garamond", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-gradient);
  min-height: 100vh;
  padding-bottom: 56px;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2 {
  font-family: var(--font-heading);
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.2rem;
}

.page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-card {
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-tag {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero-card h1 {
  font-size: 2.1rem;
}

.hero-card p {
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-panel {
  background: var(--surface-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-panel-header {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.hero-panel-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.hero-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-stat .label {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-stat .value {
  font-weight: 600;
}

.hero-queue {
  display: grid;
  gap: 10px;
}

.queue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

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

.feature h2 {
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  display: grid;
  place-items: center;
}

.brand-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
  align-items: center;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
}

.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.badge-rack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.badge-token {
  --badge-accent: var(--accent);
  --badge-deep: var(--accent-strong);
  --badge-ink: #ffffff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.badge-medal {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--badge-accent) 35%, var(--badge-deep) 100%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  display: grid;
  place-items: center;
  position: relative;
}

.badge-medal::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

.badge-code {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--badge-ink);
  text-transform: uppercase;
  line-height: 1;
}

.badge-ribbon {
  width: 16px;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--badge-accent);
  margin-top: -2px;
}

.badge-token.small .badge-medal {
  width: 24px;
  height: 24px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.badge-token.small .badge-medal::after {
  inset: 4px;
}

.badge-token.small .badge-code {
  font-size: 0.5rem;
}

.badge-token.small .badge-ribbon {
  border-left-width: 6px;
  border-right-width: 6px;
  border-top-width: 6px;
}

.badge-token.badge-plus {
  --badge-accent: var(--border);
  --badge-deep: var(--muted);
  --badge-ink: var(--ink);
}

.badge-token[data-badge="first-finish"] {
  --badge-accent: #c46b3b;
  --badge-deep: #a5552d;
}

.badge-token[data-badge="consistency"] {
  --badge-accent: #4f8a8b;
  --badge-deep: #2f6465;
}

.badge-token[data-badge="momentum"] {
  --badge-accent: #556bdc;
  --badge-deep: #3846a8;
}

.badge-token[data-badge="no-rework"] {
  --badge-accent: #8a4f74;
  --badge-deep: #643455;
}

.badge-token[data-badge="cleanup-crew"] {
  --badge-accent: #d28b2a;
  --badge-deep: #a1661a;
}

.badge-token[data-badge="scheduler"] {
  --badge-accent: #2f7d6d;
  --badge-deep: #1d5b4f;
}

.badge-token[data-badge="client-steward"] {
  --badge-accent: #3c6e8f;
  --badge-deep: #2b516a;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.profile-trigger .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  min-width: 200px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 10;
}

.profile-dropdown.open {
  display: grid;
  gap: 8px;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--muted);
}

.profile-dropdown a,
.profile-dropdown .profile-link {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--ink);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
}

.profile-dropdown a:hover,
.profile-dropdown .profile-link:hover {
  background: rgba(196, 107, 59, 0.12);
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.tab-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(196, 107, 59, 0.35);
}

.modal-tab {
  display: none;
}

.modal-tab.active {
  display: block;
}

.badge-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.badge-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.badge-title {
  font-weight: 600;
}

.badge-desc {
  font-size: 0.85rem;
}

.empty-state {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: var(--surface-muted);
  text-align: center;
}

.empty-state .title {
  font-weight: 600;
  margin-bottom: 6px;
}

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

.calendar-title {
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.calendar-cell {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  border-radius: 8px;
  padding: 8px 0;
  text-align: center;
  font-size: 0.85rem;
}

.calendar-cell.header {
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
}

.calendar-cell.empty {
  border: none;
  background: transparent;
}

.calendar-cell.day {
  cursor: pointer;
}

.calendar-cell.day.holiday {
  background: #f5ddb8;
  border-color: #e6b77a;
  color: #7a4a10;
}



.site-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.site-nav a:hover {
  background: rgba(196, 107, 59, 0.12);
}

.content {
  margin-top: 28px;
}

.impersonation-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--flash-bg);
  border: 1px solid var(--flash-border);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.summary-card {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.summary-value {
  font-size: 1.2rem;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.search-bar .input {
  flex: 1;
}

.per-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.9rem;
}

.tab.active {
  background: var(--accent-soft);
  border-color: rgba(196, 107, 59, 0.35);
  color: var(--accent-strong);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-stack {
  display: grid;
  gap: 18px;
}

.table-card {
  padding: 20px;
}

.table {
  display: grid;
  gap: 12px;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 0.8fr 0.8fr 0.8fr 2fr;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.table-row > div {
  min-width: 0;
}

.jobs-table .table-row {
  grid-template-columns: 2.6fr 1.05fr 1.9fr 0.8fr 0.8fr 0.5fr 1fr 2.1fr;
}

.jobs-table.completed .table-row {
  grid-template-columns: 2.6fr 1.05fr 1.9fr 0.8fr 0.8fr 0.5fr 2.1fr;
}



.job-row.dragging {
  opacity: 0.6;
}

.job-row.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

.job-row.running {
  background: #7c2e26;
  color: #fff7f2;
  border: 1px solid #5a201a;
  box-shadow: 0 12px 24px rgba(124, 46, 38, 0.3);
}

.jobs-table:not(.completed) .job-row.status-medium {
  background: var(--status-medium-bg);
}

.jobs-table:not(.completed) .job-row.status-low {
  background: var(--status-low-bg);
}

.jobs-table:not(.completed) .job-row.status-hold_client,
.jobs-table:not(.completed) .job-row.status-hold_other {
  background: var(--status-hold-bg);
}

.jobs-table:not(.completed) .job-row.running {
  background: #7c2e26;
  color: #fff7f2;
  border: 1px solid #5a201a;
  box-shadow: 0 12px 24px rgba(124, 46, 38, 0.3);
}


.status-medium {
  background: var(--status-medium-bg);
  color: var(--status-medium-ink);
}

.status-low {
  background: var(--status-low-bg);
  color: var(--status-low-ink);
}

.status-hold_client,
.status-hold_other {
  background: var(--status-hold-bg);
  color: var(--status-hold-ink);
}

.job-row.running .pill.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--surface);
}

.job-row.running .muted,
.job-row.running .status,
.job-row.running .percent-pill,
.job-row.running .button.ghost,
.job-row.running .button.start,
.job-row.running .button.stop {
  color: var(--surface);
}

.job-row.running .percent-pill {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.job-row.running .button.ghost,
.job-row.running .button.start,
.job-row.running .button.stop {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.job-row.running .status {
  background: rgba(255, 255, 255, 0.12);
}

.job-row.running .job-description-full {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-line;
}

.table-row.summary-row {
  grid-template-columns: 1.5fr 1.5fr;
}

.summary-link {
  color: inherit;
  font-weight: 600;
}

.summary-row.selected {
  outline: 2px solid rgba(196, 107, 59, 0.3);
  background: var(--surface-muted);
}

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

.summary-header h2 {
  color: inherit;
}

.schedule-icon {
  font-size: 1rem;
  color: #c46b3b;
}

.table-row.session-row {
  grid-template-columns: 1.4fr 1.4fr 0.8fr;
}

.table-row.client-row {
  grid-template-columns: 1.2fr 1fr 1.5fr 1.2fr;
}

.table-row.user-row {
  grid-template-columns: 1.6fr 1fr 0.9fr 1.5fr;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-actions .icon {
  width: 20px;
  height: 20px;
  display: block;
}

.client-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.notes-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.note-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.note-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.note-content {
  white-space: pre-line;
}

.note-empty {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.modal-content {
  position: relative;
  width: min(520px, 90vw);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 1;
}

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

.modal-actions {
  gap: 12px;
}

.table-row.schedule-row {
  grid-template-columns: 2fr 1.3fr 0.9fr 1fr 0.6fr 1.4fr;
}

.table-row.empty {
  grid-template-columns: 1fr;
  text-align: center;
  color: var(--muted);
}

.table-row.table-header {
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.row-actions .button {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.percent-pill {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.percent-pill .percent-text {
  line-height: 1;
}

.percent-pill.percent-warn {
  background: #f5ddb8;
  border-color: #e6b77a;
  color: #7a4a10;
}

.percent-pill.percent-over {
  background: #f6c9c2;
  border-color: #e59f96;
  color: #8a2b21;
}

.title {
  font-weight: 600;
}

.job-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.muted {
  color: var(--muted);
}

.muted.small {
  font-size: 0.85rem;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  margin-top: 8px;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

.input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface-muted);
  color: var(--ink);
}

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

.modal-content .grid.two {
  align-items: start;
}

.modal-content .grid.two label {
  min-width: 0;
}

.modal-content .input {
  width: 100%;
}


.form-actions {
  display: flex;
  justify-content: flex-end;
}

.danger-zone {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}


.button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 20px rgba(196, 107, 59, 0.3);
}

.button.primary:hover {
  transform: translateY(-1px);
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.button.ghost.start {
  background: #e3f3de;
  border-color: #b7d9ae;
  color: #2f5b2b;
}

.button.ghost.stop {
  background: #f6ddd9;
  border-color: #e5b4ab;
  color: #7c2e26;
}

.button.danger {
  background: var(--danger);
  color: white;
}

.button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-transform: capitalize;
  white-space: nowrap;
}

.status-high {
  background: #f6c9c2;
  color: #8a2b21;
}

.status-medium {
  background: #e5e3df;
  color: #5e5a52;
}

.status-low {
  background: #cfe2f8;
  color: #204a7a;
}

.status-hold_client {
  background: #f5ddb8;
  color: #7a4a10;
}

.status-hold_other {
  background: #f5ddb8;
  color: #7a4a10;
}

.status-completed {
  background: #d3e7f2;
  color: #2c4c66;
}

.status-deleted {
  background: #e5e3df;
  color: #5e5a52;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.pill.active {
  background: #cfe3d2;
  color: #2d5a32;
}

.flash {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flash.toast {
  position: fixed;
  margin: 0;
  z-index: 1000;
  max-width: 320px;
  transform: translateX(12px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.flash.toast.lockout {
  top: 50%;
  left: 50%;
  right: auto;
  max-width: min(560px, 92vw);
  transform: translate(-50%, -50%);
}

.flash.toast.lockout .flash-item {
  padding: 18px 22px;
  font-size: 1rem;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.lockout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 900;
}

.flash.toast.toast-enter {
  transform: translateX(0);
  opacity: 1;
}

.flash.toast.lockout.toast-enter {
  transform: translate(-50%, -50%);
}

.flash-item {
  background: var(--flash-bg);
  border: 1px solid var(--flash-border);
  padding: 10px 14px;
  border-radius: 12px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.flash-item.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

.badge-toast {
  right: 28px;
  bottom: 80px;
}

.badge-toast .flash-item {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.badge-toast-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-toast-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.badge-toast-name {
  font-weight: 600;
}

.auth-card {
  max-width: 420px;
  margin: 0 auto;
}

.form-help {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.link-button:hover {
  color: var(--accent-strong);
}

.helper {
  margin-top: 16px;
  font-size: 0.9rem;
}

.month-filter {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

@media (max-width: 980px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-indicator {
  color: inherit;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.support-indicator svg {
  width: 16px;
  height: 16px;
  transform-origin: 50% 15%;
}

.has-unread .support-indicator,
.support-indicator.visible {
  opacity: 1;
  width: auto;
  margin-right: 6px;
}

.has-unread .support-indicator svg,
.support-indicator.visible svg {
  animation: bell-ring 1.2s ease-in-out infinite;
}

@keyframes bell-ring {
  0% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(15deg);
  }
  30% {
    transform: rotate(-12deg);
  }
  45% {
    transform: rotate(9deg);
  }
  60% {
    transform: rotate(-6deg);
  }
  75% {
    transform: rotate(3deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.support-open #support-unread {
  opacity: 0;
  width: 0;
  margin-left: 0;
}

.support-dropdown {
  position: relative;
}

.support-list {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  display: none;
  z-index: 20;
}

.support-list.open {
  display: grid;
  gap: 8px;
}

.support-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.support-list.strip {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-height: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.support-thread-item {
  appearance: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 0 !important;
  padding: 8px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.support-list .support-thread-item {
  border-radius: 0 !important;
}

.support-toggle {
  border-radius: 0;
}

.support-thread-item span:nth-child(2) {
  flex: 1;
}

.support-close {
  font-size: 1rem;
  color: var(--muted);
  margin-left: 6px;
  padding: 0 4px;
  line-height: 1;
  border-radius: 6px;
}

.support-close:hover {
  background: rgba(196, 107, 59, 0.12);
  color: var(--ink);
}

:root[data-mode="dark"] .support-thread-item {
  color: var(--muted);
}

.support-thread-item:hover {
  background: rgba(196, 107, 59, 0.12);
}

.support-drawer {
  position: fixed;
  left: 24px;
  right: auto;
  bottom: 80px;
  max-width: 560px;
  width: min(560px, calc(100% - 48px));
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  max-height: 70vh;
  z-index: 900;
  animation: slideUp 0.25s ease;
}

.support-drawer.open {
  display: flex;
}

.support-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

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

.support-title {
  font-weight: 600;
}

.support-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

.support-messages {
  padding: 16px 18px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.support-message {
  display: grid;
  gap: 6px;
}

.support-message.from-user .bubble {
  background: var(--accent-soft);
  color: var(--accent-strong);
  justify-self: end;
}

.support-message.from-admin .bubble {
  background: var(--surface-muted);
  color: var(--ink);
}

.support-message .bubble {
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 80%;
  white-space: pre-line;
}

.support-message .timestamp {
  font-size: 0.75rem;
  color: var(--muted);
}

.support-form {
  display: flex;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--border);
}

.support-form textarea {
  flex: 1;
  resize: vertical;
}

.support-note {
  padding: 0 18px 14px;
  font-size: 0.85rem;
}

.mobile-blocker {
  position: fixed;
  inset: 0;
  background: #0c1016;
  color: #f4f6f8;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  text-align: center;
  overflow: auto;
}

.mobile-blocker-card {
  display: grid;
  gap: 16px;
  background: rgba(24, 30, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 24px;
  max-width: 320px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.mobile-blocker-card .title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .mobile-blocker {
    display: flex;
    align-items: flex-start;
  }
  .mobile-blocker-card {
    margin-top: 12vh;
    padding: 18px;
    max-width: 92vw;
    border-radius: 16px;
  }
  .mobile-blocker-card .title {
    font-size: 1rem;
    line-height: 1.35;
  }
}

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

.theme-toggle {
  padding: 6px 12px;
  font-size: 0.8rem;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle svg,
.mode-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
}

.mode-toggle {
  width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  padding: 0;
}

.theme-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 200px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: none;
  z-index: 20;
}

.theme-menu.open {
  display: grid;
  gap: 8px;
}

.theme-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
}

.theme-option.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}

.theme-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.theme-swatch.ember {
  background: linear-gradient(135deg, #f5e1d1 0%, #c46b3b 100%);
}

.theme-swatch.coastal {
  background: linear-gradient(135deg, #d1eef2 0%, #2b7a87 100%);
}

.theme-swatch.sage {
  background: linear-gradient(135deg, #dcead7 0%, #5f8460 100%);
}

:root[data-theme="coastal"] * {
  border-radius: 0 !important;
}

:root[data-theme="coastal"] *::before,
:root[data-theme="coastal"] *::after {
  border-radius: 0 !important;
}
