:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d5dae2;
  --primary: #111827;
  --primary-soft: #eef1f6;
  --success: #0f9f6e;
  --success-deep: #087a55;
  --danger: #d14343;
  --danger-deep: #a92f2f;
  --warning: #b7791f;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 8px 28px rgba(17, 24, 39, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --atlytix: #1f6feb;
  --erp: #7c3aed;
  --tp: #d97706;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.22);
  outline-offset: 2px;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -0.035em; }
p { line-height: 1.6; }

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-light { color: rgba(255,255,255,.65); }
.muted { color: var(--muted); }

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-lockup-light { color: #fff; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: #111827;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.brand-lockup-light .brand-mark { color: #111827; background: #fff; }
.brand-link { text-decoration: none; }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 34px; }

.button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.booking-form[data-busy="true"] .button:disabled, .stack-form[data-busy="true"] .button:disabled { cursor: wait; }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(17,24,39,.14); }
.button-primary:hover { background: #202939; }
.button-light { color: #111827; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.button-ghost { background: var(--surface-2); color: var(--text); }
.button-danger-ghost { background: #fff2f2; color: var(--danger-deep); }
.button-large { min-height: 50px; padding-inline: 20px; }
.text-link { font-weight: 700; color: var(--text); text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.back-link { display: inline-block; margin-bottom: 36px; color: var(--muted); font-size: 14px; text-decoration: none; }
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
}

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .9fr) minmax(520px, 1.1fr); }
.login-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 54px clamp(40px, 5vw, 78px);
  color: #fff;
  background:
    radial-gradient(circle at 10% 5%, rgba(85,130,255,.45), transparent 34%),
    radial-gradient(circle at 90% 85%, rgba(52,211,153,.20), transparent 28%),
    linear-gradient(145deg, #0b1220, #121a2b 58%, #1a2234);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand-panel::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -220px;
  top: 18%;
  box-shadow: 0 0 0 80px rgba(255,255,255,.018), 0 0 0 160px rgba(255,255,255,.012);
}
.login-brand-copy { max-width: 520px; position: relative; z-index: 1; }
.login-brand-copy h1 { font-size: clamp(46px, 6vw, 82px); line-height: .98; margin-bottom: 24px; }
.login-brand-copy p { max-width: 450px; font-size: 18px; color: rgba(255,255,255,.72); }
.login-brand-foot { position: relative; z-index: 1; font-size: 13px; color: rgba(255,255,255,.48); }
.logo-strip { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.login-logo-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; min-height: 64px; padding: 10px 16px; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 12px 32px rgba(0,0,0,.10); }
.login-logo-badge img { display: block; max-width: 130px; max-height: 38px; width: auto; height: auto; }
.login-logo-badge.company-atlytix img { max-width: 82px; max-height: 44px; }
.login-form-panel { display: grid; place-items: center; padding: 48px; background: #fff; }
.login-card { width: min(100%, 520px); }
.login-card h2 { font-size: 34px; margin-bottom: 8px; }
.login-card > .muted { margin-bottom: 26px; }
.company-picker { display: grid; gap: 10px; margin: 24px 0; }
.company-choice {
  width: 100%;
  min-height: 82px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: border .15s ease, box-shadow .15s ease, transform .15s ease;
}
.company-choice:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.company-choice.is-selected { border-color: #9aa6ba; box-shadow: 0 0 0 3px rgba(17,24,39,.05); }
.company-choice strong { display: block; font-size: 15px; }
.company-choice small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.choice-check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); font-weight: 900; }
.company-choice.is-selected .choice-check { color: white; background: var(--primary); }
.company-wordmark-wrap { display: inline-flex; align-items: center; justify-content: center; width: 152px; min-height: 52px; padding: 7px 10px; border-radius: 14px; background: #f8fafc; border: 1px solid #eef2f6; overflow: hidden; }
.company-wordmark { display: block; width: 100%; height: 100%; max-width: 132px; max-height: 36px; object-fit: contain; object-position: left center; }
.company-wordmark-wrap.company-atlytix .company-wordmark { max-width: 76px; max-height: 42px; }
.company-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
}
.company-atlytix.company-logo, .company-atlytix .company-logo, .company-logo.company-atlytix { background: var(--atlytix); }
.company-erp.company-logo, .company-erp .company-logo, .company-logo.company-erp { background: var(--erp); }
.company-tp.company-logo, .company-tp .company-logo, .company-logo.company-tp { background: var(--tp); }
.stack-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.field span { display: flex; justify-content: space-between; gap: 10px; }
.field em { color: var(--muted); font-style: normal; font-weight: 500; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 13px;
  background: #fff;
  color: var(--text);
}
.field input[readonly] { background: #f7f8fb; color: #4b5563; }
.field input:focus, .field select:focus { border-color: #8794a8; }
.form-error { border: 1px solid #f1c7c7; background: #fff5f5; color: #a92f2f; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; display: grid; gap: 2px; }
.form-error strong { font-size: 13px; }
.form-error span { display: block; font-weight: 550; }
.login-links { margin-top: 28px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.login-links a { color: var(--muted); text-decoration: none; }
.login-links a:hover { color: var(--text); }

/* Simple screens */
.simple-shell, .tablet-pair-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: linear-gradient(145deg, #f3f5f9, #fff); }
.simple-card, .tablet-pair-card { width: min(100%, 520px); padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.simple-card h1, .tablet-pair-card h1 { font-size: 34px; margin: 10px 0 10px; }
.admin-login-card .brand-lockup { margin-bottom: 38px; }
.admin-icon, .pair-icon { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--primary-soft); margin-bottom: 24px; font-size: 22px; font-weight: 900; }
.tablet-pair-card .brand-lockup { margin-bottom: 38px; }
.tablet-pair-card .text-link { display: inline-block; margin-top: 26px; font-size: 13px; }

/* App shell */
.app-shell { min-height: 100vh; }
.topbar {
  height: 74px;
  padding: 0 clamp(20px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.identity-pill { min-height: 36px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 800; }
.identity-pill.company-atlytix { color: #1357bd; background: #eaf2ff; }
.identity-pill.company-erp { color: #6732ba; background: #f2ebff; }
.identity-pill.company-tp { color: #9c5a0b; background: #fff4df; }
.identity-pill { gap: 10px; }
.identity-pill span { display: inline-flex; align-items: center; }
.identity-logo { display: block; max-width: 86px; max-height: 22px; width: auto; height: auto; }
.dashboard { width: min(1500px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 64px; }
.status-hero {
  min-height: 238px;
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 52px);
  color: #fff;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.status-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -180px; top: -180px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 90px rgba(255,255,255,.02); }
.status-hero.is-available { background: linear-gradient(135deg, #0c7f5a, #11a978); }
.status-hero.is-occupied { background: linear-gradient(135deg, #9e3535, #d04a4a); }
.status-main, .status-meta, .status-hero > .button { position: relative; z-index: 2; }
.status-main h1 { margin: 12px 0 10px; font-size: clamp(38px, 5vw, 70px); line-height: 1; }
.status-main p { margin: 0; color: rgba(255,255,255,.76); font-size: 16px; }
.status-dot-wrap { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(255,255,255,.12); }
.status-meta { min-width: 180px; display: grid; text-align: right; }
.status-meta span, .status-meta small { color: rgba(255,255,255,.65); }
.status-meta strong { margin: 5px 0; font-size: 26px; }
.status-meta small { font-size: 11px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 22px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.calendar-card { overflow: hidden; }
.calendar-toolbar { padding: 24px 24px 18px; display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.calendar-toolbar h2 { margin: 0; font-size: 26px; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.segmented { padding: 4px; border-radius: 12px; background: var(--surface-2); display: inline-flex; }
.segmented button { border: 0; min-width: 58px; padding: 8px 10px; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.segmented button.active { background: #fff; color: var(--text); box-shadow: 0 3px 10px rgba(17,24,39,.08); }
.date-nav { padding: 0 24px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.calendar-body { min-height: 520px; }
.side-column { display: grid; gap: 22px; }
.upcoming-card, .info-card { padding: 22px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title h3, .info-card h3 { margin: 0; font-size: 21px; }
.count-badge { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; }
.upcoming-list { display: grid; }
.upcoming-item { border: 0; border-top: 1px solid var(--line); padding: 15px 0; background: transparent; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; text-align: left; cursor: pointer; }
.upcoming-item:first-child { border-top: 0; }
.upcoming-copy { min-width: 0; }
.upcoming-copy strong, .upcoming-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-copy strong { font-size: 13px; }
.upcoming-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.company-dot { width: 8px; height: 8px; border-radius: 50%; }
.company-dot.company-atlytix { background: var(--atlytix); }
.company-dot.company-erp { background: var(--erp); }
.company-dot.company-tp { background: var(--tp); }
.info-card p { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.info-card .text-link { font-size: 13px; }
.empty-state { display: grid; gap: 4px; padding: 20px 0; color: var(--muted); }
.empty-state strong { color: var(--text); font-size: 13px; }
.empty-state span { font-size: 12px; }
.footer { padding: 0 20px 28px; text-align: center; color: #9ca3af; font-size: 11px; }

/* Timeline */
.timeline-wrap { display: grid; grid-template-columns: 70px 1fr; padding: 24px 24px 34px 12px; }
.timeline-labels { position: relative; }
.timeline-labels span { position: absolute; right: 14px; color: #9ca3af; font-size: 10px; font-weight: 700; }
.timeline-grid {
  position: relative;
  min-height: 500px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour-height) - 1px), #edf0f4 calc(var(--hour-height) - 1px), #edf0f4 var(--hour-height));
}
.timeline-booking {
  position: absolute;
  left: 12px;
  right: 12px;
  border: 0;
  border-radius: 11px;
  padding: 7px 12px 7px 14px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(17,24,39,.07);
  display: grid;
  align-content: start;
  gap: 1px;
}
.timeline-booking::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.timeline-booking.company-atlytix { background: #edf4ff; color: #164e9e; }
.timeline-booking.company-atlytix::before { background: var(--atlytix); }
.timeline-booking.company-erp { background: #f5efff; color: #5e2caa; }
.timeline-booking.company-erp::before { background: var(--erp); }
.timeline-booking.company-tp { background: #fff6e8; color: #925408; }
.timeline-booking.company-tp::before { background: var(--tp); }
.timeline-booking .booking-time { font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.timeline-booking strong { font-size: 12px; }
.timeline-booking small { font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 5px; color: #9ca3af; pointer-events: none; }
.timeline-empty strong { color: #6b7280; font-size: 13px; }
.timeline-empty span { font-size: 11px; }
.now-line { position: absolute; left: 0; right: 0; height: 1px; background: #ef4444; z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; left: -4px; top: -3px; }
.now-line span { position: absolute; left: 8px; top: -10px; padding: 2px 5px; color: #b91c1c; background: #fff; border-radius: 5px; font-size: 9px; font-weight: 800; }

/* Week */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); overflow-x: auto; min-height: 520px; }
.week-day { min-width: 110px; border-right: 1px solid var(--line); }
.week-day:last-child { border-right: 0; }
.week-day.is-today { background: #fafcff; }
.week-day-head { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 18px 10px 14px; display: grid; place-items: center; gap: 4px; cursor: pointer; }
.week-day-head span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.week-day-head strong { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.week-day.is-today .week-day-head strong { color: white; background: var(--primary); }
.week-day-bookings { padding: 10px 8px; display: grid; align-content: start; gap: 8px; }
.week-booking { border: 0; border-left: 3px solid currentColor; border-radius: 8px; padding: 8px; text-align: left; cursor: pointer; display: grid; gap: 2px; }
.week-booking.company-atlytix { color: #1556b5; background: #edf4ff; }
.week-booking.company-erp { color: #6730b6; background: #f5efff; }
.week-booking.company-tp { color: #995a0b; background: #fff6e8; }
.week-booking span, .week-booking small { font-size: 9px; }
.week-booking strong { font-size: 10px; }
.week-booking small { opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.free-day { padding: 10px 4px; color: #b0b7c3; font-size: 10px; text-align: center; }

/* Modals */
.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  background: rgba(8, 15, 27, .46);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  overflow-y: auto;
}
.modal { width: min(100%, 620px); max-height: calc(100vh - 48px); overflow: auto; padding: 26px; background: #fff; border-radius: 24px; box-shadow: 0 28px 90px rgba(0,0,0,.24); }
.modal-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 24px; }
.modal-header h2 { margin: 0; font-size: 28px; }
.modal-close { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--surface-2); font-size: 24px; line-height: 1; cursor: pointer; }
.booking-form { display: grid; gap: 18px; }
.field-grid { display: grid; gap: 12px; }
.field-grid.three { grid-template-columns: 1.35fr 1fr 1fr; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.fixed-company { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); background: #fafbfc; border-radius: 14px; font-size: 13px; }
.modal-actions { margin-top: 6px; display: flex; justify-content: flex-end; gap: 10px; }
.split-actions { justify-content: space-between; }
.detail-company { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #f7f8fa; }
.detail-company strong, .detail-company small { display: block; }
.detail-company small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.booking-details { margin: 22px 0; display: grid; gap: 0; }
.booking-details div { padding: 13px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 100px 1fr; gap: 12px; }
.booking-details div:last-child { border-bottom: 1px solid var(--line); }
.booking-details dt { color: var(--muted); font-size: 12px; }
.booking-details dd { margin: 0; font-size: 13px; font-weight: 700; }
.permission-note { margin: 18px 0 0; padding: 12px; border-radius: 12px; background: #f6f7f9; color: var(--muted); font-size: 12px; }
.duration-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.duration-picker button { min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.duration-picker button.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.duration-picker button:disabled { cursor: not-allowed; opacity: .34; background: #f4f5f7; }
.time-validation { min-height: 18px; margin-top: -6px; font-size: 12px; font-weight: 650; }
.time-validation.is-valid { color: #4b5563; }
.time-validation.is-error { color: var(--danger-deep); }
.button-spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: button-spin .65s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }

.company-fieldset { border: 0; padding: 0; margin: 0; }
.company-fieldset legend { margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.tablet-company-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tablet-company-option { position: relative; cursor: pointer; }
.tablet-company-option input { position: absolute; opacity: 0; pointer-events: none; }
.tablet-company-option > span, .tablet-company-option > strong { pointer-events: none; }
.tablet-company-option { min-height: 112px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 11px; }
.tablet-company-option:has(input:checked) { border-color: #7f8ba0; box-shadow: 0 0 0 3px rgba(17,24,39,.06); background: #fafbfc; }
.tablet-company-logo-wrap { min-height: 48px; width: 100%; display: flex; align-items: center; justify-content: center; }
.tablet-company-logo { display: block; max-width: 145px; max-height: 38px; width: auto; height: auto; object-fit: contain; }
.tablet-company-logo-wrap.company-atlytix .tablet-company-logo { max-width: 82px; max-height: 48px; }

/* Tablet */
.tablet-shell {
  min-height: 100vh;
  padding: clamp(26px, 4vw, 54px);
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  position: relative;
}
.tablet-shell::before, .tablet-shell::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; border: 1px solid rgba(255,255,255,.08); }
.tablet-shell::before { width: 620px; height: 620px; right: -260px; top: -280px; box-shadow: 0 0 0 120px rgba(255,255,255,.015); }
.tablet-shell::after { width: 400px; height: 400px; left: -220px; bottom: -240px; }
.tablet-available { background: radial-gradient(circle at 15% 0%, rgba(67,229,176,.22), transparent 32%), linear-gradient(145deg, #075d44, #0b8a61 58%, #0d966a); }
.tablet-occupied { background: radial-gradient(circle at 15% 0%, rgba(255,167,167,.18), transparent 32%), linear-gradient(145deg, #752626, #a83838 58%, #bc4545); }
.tablet-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.tablet-clock { display: grid; text-align: right; }
.tablet-clock strong { font-size: clamp(26px, 3vw, 40px); letter-spacing: -.04em; }
.tablet-clock span { margin-top: 3px; color: rgba(255,255,255,.6); font-size: 12px; }
.tablet-status { position: relative; z-index: 1; align-self: center; max-width: 980px; padding: 40px 0; }
.tablet-status-label { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 900; letter-spacing: .1em; }
.tablet-status h1 { margin: 20px 0 14px; font-size: clamp(62px, 9vw, 126px); line-height: .88; max-width: 1050px; }
.tablet-status > p { margin: 0; color: rgba(255,255,255,.68); font-size: clamp(17px, 2vw, 26px); }
.tablet-current-card { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 10px 18px; padding: 14px 18px; margin-top: 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.07); backdrop-filter: blur(10px); }
.tablet-current-card span { font-weight: 800; }
.tablet-current-card strong { font-size: 18px; }
.tablet-current-card small { color: rgba(255,255,255,.68); }
.tablet-text-button { margin-top: 16px; padding: 0; color: rgba(255,255,255,.72); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.tablet-bottom-panel { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
.tablet-next-list { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.tablet-next-item { min-width: 150px; display: grid; gap: 2px; padding-right: 16px; border-right: 1px solid rgba(255,255,255,.13); }
.tablet-next-item span { color: rgba(255,255,255,.62); font-size: 11px; }
.tablet-next-item strong { font-size: 13px; }
.tablet-next-item small { max-width: 170px; color: rgba(255,255,255,.55); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tablet-next p { color: rgba(255,255,255,.62); font-size: 13px; }
.tablet-actions { display: flex; gap: 10px; }
.tablet-primary-action, .tablet-secondary-action { min-height: 64px; padding: 0 26px; border-radius: 18px; font-weight: 850; cursor: pointer; }
.tablet-primary-action { min-width: 210px; border: 0; color: #111827; background: #fff; box-shadow: 0 18px 38px rgba(0,0,0,.15); display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 17px; }
.tablet-secondary-action { border: 1px solid rgba(255,255,255,.2); color: #fff; background: rgba(255,255,255,.08); }
.tablet-settings { position: fixed; right: 14px; bottom: 10px; z-index: 3; width: 36px; height: 36px; border: 0; color: rgba(255,255,255,.4); background: transparent; font-size: 22px; cursor: pointer; }

/* Toast */
#toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 220px; max-width: 360px; padding: 13px 16px; border-radius: 13px; color: #fff; background: #111827; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s ease; font-size: 13px; font-weight: 700; }
.toast.error { background: #a93434; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; }
  .login-shell { grid-template-columns: .8fr 1.2fr; }
  .login-brand-copy h1 { font-size: 50px; }
}

@media (max-width: 820px) {
  .login-shell { display: block; background: #fff; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 28px 20px; }
  .mobile-brand { display: flex; }
  .dashboard { width: min(100% - 24px, 1500px); padding-top: 20px; }
  .status-hero { min-height: 210px; align-items: start; flex-direction: column; }
  .status-hero .button { align-self: stretch; }
  .status-meta { text-align: left; }
  .content-grid { margin-top: 14px; gap: 14px; }
  .side-column { grid-template-columns: 1fr; gap: 14px; }
  .calendar-toolbar { align-items: start; flex-direction: column; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .timeline-wrap { grid-template-columns: 55px 1fr; padding-inline: 6px 12px; }
  .timeline-booking { left: 8px; right: 5px; }
  .field-grid.three, .field-grid.two { grid-template-columns: 1fr; }
  .tablet-company-picker { grid-template-columns: 1fr 1fr 1fr; }
  .tablet-bottom-panel { grid-template-columns: 1fr; }
  .tablet-actions { justify-content: stretch; }
  .tablet-primary-action, .tablet-secondary-action { flex: 1; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .brand-lockup.brand-link > span:last-child { display: none; }
  .company-wordmark-wrap { width: 124px; }
  .login-logo-badge { min-width: 124px; }
  .login-logo-badge img { max-width: 104px; }
  .identity-pill { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .status-hero { padding: 24px; border-radius: 20px; }
  .status-main h1 { font-size: 39px; }
  .calendar-toolbar { padding: 20px 16px 14px; }
  .calendar-toolbar h2 { font-size: 22px; }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .date-nav { padding-inline: 16px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; padding: 22px 18px max(20px, env(safe-area-inset-bottom)); }
  .tablet-company-picker { grid-template-columns: 1fr; }
  .duration-picker { grid-template-columns: 1fr 1fr; }
  .tablet-shell { padding: 24px 18px; }
  .tablet-status h1 { font-size: 54px; }
  .tablet-bottom-panel { padding-top: 18px; }
  .tablet-actions { flex-direction: column; }
  .tablet-primary-action, .tablet-secondary-action { width: 100%; }
  .tablet-next-list { display: grid; }
  .tablet-next-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 7px 0; grid-template-columns: 60px 1fr; }
  .tablet-next-item small { grid-column: 2; }
  .simple-card, .tablet-pair-card { padding: 26px 20px; border-radius: 22px; }
  .company-choice { grid-template-columns: 1fr auto; }
  .company-choice > span:nth-child(2) { grid-column: 1; }
  .company-wordmark-wrap { grid-column: 1 / -1; width: 100%; justify-content: flex-start; }
  .login-logo-badge { min-width: 0; flex: 1 1 120px; }
}

/* V1.5 smart booking + PWA / kiosk polish */
.booking-smart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.smart-slot-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.smart-slot-button:hover { background: var(--surface-2); }
.next-slot-suggestion {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #c9ddff;
  border-radius: 12px;
  background: #f2f7ff;
  color: #174a94;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.next-slot-suggestion[hidden] { display: none; }
.next-slot-use {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  color: #fff;
  background: #1f6feb;
  font-weight: 800;
  cursor: pointer;
}

.tablet-next-when { display: grid; gap: 1px; min-width: 78px; }
.tablet-next-when small { color: rgba(255,255,255,.58); font-size: 10px; text-transform: none; }
.tablet-next-when b { color: #fff; font-size: 13px; }
.tablet-next-title { max-width: 180px; }

body.tablet-mode { overscroll-behavior: none; background: #075d44; }
body.tablet-mode .tablet-shell { min-height: 100dvh; height: 100dvh; width: 100%; padding-top: max(clamp(26px, 4vw, 54px), env(safe-area-inset-top)); padding-right: max(clamp(26px, 4vw, 54px), env(safe-area-inset-right)); padding-bottom: max(clamp(26px, 4vw, 54px), env(safe-area-inset-bottom)); padding-left: max(clamp(26px, 4vw, 54px), env(safe-area-inset-left)); touch-action: manipulation; }
body.tablet-mode .tablet-shell, body.tablet-mode .tablet-header, body.tablet-mode .tablet-status, body.tablet-mode .tablet-bottom-panel { -webkit-user-select: none; user-select: none; }
body.tablet-mode input, body.tablet-mode textarea, body.tablet-mode select { -webkit-user-select: text; user-select: text; }
body.standalone-mode .tablet-settings { right: max(14px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }

.kiosk-card { margin: 18px 0 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.kiosk-card.is-active { border-color: #bfe8d9; background: #effaf6; }
.kiosk-card > div:first-child { display: flex; align-items: center; gap: 9px; }
.kiosk-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.kiosk-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px rgba(148,163,184,.13); }
.kiosk-card.is-active .kiosk-status-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(15,159,110,.13); }
.kiosk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

@media (max-width: 820px) {
  .booking-smart-row { grid-template-columns: 1fr; }
  .smart-slot-button { width: 100%; }
}

@media (max-width: 560px) {
  .next-slot-suggestion { align-items: stretch; flex-direction: column; }
  .next-slot-use { width: 100%; }
  .tablet-next-item { grid-template-columns: 82px 1fr; }
  .tablet-next-title { grid-column: 2; }
}
@media (max-width: 560px) {
  .tablet-next-when small { grid-column: auto; }
}

/* V1.6 remembered company session */
.remember-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
  user-select: none;
  padding: 4px 1px;
}
.remember-row > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.remember-check {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.remember-row > input:checked + .remember-check {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 4px var(--primary), inset 0 0 0 6px #fff;
}
.remember-row > input:focus-visible + .remember-check {
  outline: 3px solid rgba(17,24,39,.12);
  outline-offset: 2px;
}
.remember-copy { display: grid; gap: 3px; line-height: 1.3; }
.remember-copy strong { font-size: 13px; color: var(--text); }
.remember-copy small { font-size: 11px; color: var(--muted); font-weight: 500; }
