/*
 * THERA CHECK IN — Gate 56R1
 * Global iOS UX convergence for the corrective surface set only.
 * Presentation layer only: no business, authorization, finance, chat, attendance or tenant semantics.
 */
:root {
  --g56r1-navy: #08243e;
  --g56r1-navy-2: #0b2f50;
  --g56r1-teal: #0b796d;
  --g56r1-teal-soft: #eaf7f4;
  --g56r1-orange: #b96110;
  --g56r1-orange-soft: #fff5e9;
  --g56r1-red: #b42318;
  --g56r1-red-soft: #fff1f1;
  --g56r1-ink: #10233a;
  --g56r1-muted: #64748b;
  --g56r1-line: rgba(15, 42, 68, .11);
  --g56r1-surface: rgba(255, 255, 255, .96);
  --g56r1-radius-xl: 20px;
  --g56r1-radius-lg: 16px;
  --g56r1-radius-md: 12px;
  --g56r1-shadow: 0 8px 28px rgba(8, 36, 62, .07);
  --g56r1-control-h: 44px;
}

html:has(body.tci-g56r1) { overflow-x: clip; }
body.tci-g56r1 {
  color: var(--g56r1-ink);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
body.tci-g56r1 *, body.tci-g56r1 *::before, body.tci-g56r1 *::after { box-sizing: border-box; }
body.tci-g56r1 main, body.tci-g56r1 [role="main"] { min-width: 0; }
body.tci-g56r1 img, body.tci-g56r1 video, body.tci-g56r1 canvas { max-width: 100%; height: auto; }
body.tci-g56r1 table { max-width: 100%; }

body.tci-g56r1 :is(h1,h2,h3,h4,p) { overflow-wrap: anywhere; }
body.tci-g56r1 h1 { letter-spacing: -.035em; line-height: 1.08; }
body.tci-g56r1 h2 { letter-spacing: -.022em; line-height: 1.15; }
body.tci-g56r1 h3 { letter-spacing: -.012em; line-height: 1.2; }
body.tci-g56r1 :is(.text-muted,.muted,.helper,.help-text,small) { color: var(--g56r1-muted); }

body.tci-g56r1 :is(button,.btn,[role="button"],input,select,textarea) {
  font: inherit;
}
body.tci-g56r1 :is(button,.btn,[role="button"]):not(.icon-button):not([class*="icon-only"]) {
  min-height: var(--g56r1-control-h);
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
}
body.tci-g56r1 :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  min-height: var(--g56r1-control-h);
  border-radius: 12px !important;
  border-color: var(--g56r1-line) !important;
  background: rgba(255,255,255,.98);
}
body.tci-g56r1 :is(input,select,textarea,button,a):focus-visible {
  outline: 3px solid rgba(11,121,109,.24) !important;
  outline-offset: 2px;
}

body.tci-g56r1 .g56r1-page-shell {
  width: min(100%, 1180px);
  margin-inline: auto;
  min-width: 0;
}
body.tci-g56r1 .g56r1-surface,
body.tci-g56r1 :is(.card,.panel,.section-card,.content-card)[data-g56r1-surface="true"] {
  background: var(--g56r1-surface);
  border: 1px solid var(--g56r1-line);
  border-radius: var(--g56r1-radius-xl);
  box-shadow: var(--g56r1-shadow);
}
body.tci-g56r1 .g56r1-section {
  scroll-margin-top: 88px;
  min-width: 0;
}
body.tci-g56r1 .g56r1-section > :first-child { margin-top: 0; }
body.tci-g56r1 .g56r1-section > :last-child { margin-bottom: 0; }
body.tci-g56r1 .g56r1-technical { border-style: dashed !important; box-shadow: none !important; }
body.tci-g56r1 .g56r1-technical summary { cursor: pointer; font-weight: 750; color: var(--g56r1-ink); }

.g56r1-segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--g56r1-line);
  background: rgba(241,245,249,.86);
  margin-block: 12px 16px;
  max-width: 100%;
}
.g56r1-segmented button {
  min-height: 36px !important;
  padding: 7px 14px;
  border: 0;
  background: transparent;
  color: var(--g56r1-muted);
  box-shadow: none !important;
}
.g56r1-segmented button[aria-selected="true"] {
  background: #fff;
  color: var(--g56r1-navy);
  box-shadow: 0 2px 8px rgba(8,36,62,.10) !important;
}
.g56r1-collapsed { display: none !important; }

.g56r1-disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  color: var(--g56r1-ink);
  background: transparent;
  border: 0;
  box-shadow: none !important;
  padding-inline: 0;
  text-align: left;
}
.g56r1-disclosure-toggle::after { content: '›'; font-size: 23px; transform: rotate(90deg); transition: transform .18s ease; }
.g56r1-disclosure-toggle[aria-expanded="true"]::after { transform: rotate(-90deg); }

.g56r1-secret {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.g56r1-secret code {
  display: inline-block;
  max-width: min(100%, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f6f9;
  color: var(--g56r1-ink);
  letter-spacing: .08em;
}
.g56r1-secret[data-revealed="false"] code { filter: blur(6px); user-select: none; }
.g56r1-secret button { min-height: 34px !important; padding: 5px 10px; }
.g56r1-uri-disclosure { margin-block: 8px; border: 1px dashed var(--g56r1-line); border-radius: 12px; padding: 9px 12px; }
.g56r1-uri-disclosure summary { cursor: pointer; font-weight: 700; }
.g56r1-uri-disclosure code { display:block; margin-top:8px; overflow:auto; max-width:100%; white-space:pre-wrap; word-break:break-all; }

/* Security: calm three-surface hierarchy; enrollment becomes the focused surface. */
body.tci-g56r1-security .g56r1-section { margin-bottom: 16px; }
body.tci-g56r1-security .g56r1-security-status {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(11,121,109,.18); background: var(--g56r1-teal-soft);
  color: var(--g56r1-teal); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800;
}
body.tci-g56r1-security.g56r1-enrollment-active .g56r1-security-totp-card { display: none !important; }
body.tci-g56r1-security.g56r1-enrollment-active .g56r1-security-overview { opacity: .92; }
body.tci-g56r1-security .g56r1-enrollment-surface {
  border: 1px solid rgba(11,121,109,.22) !important;
  box-shadow: 0 14px 38px rgba(8,36,62,.10) !important;
  background: rgba(255,255,255,.99) !important;
}
body.tci-g56r1-security .g56r1-enrollment-surface::before {
  content: 'Thiết lập xác thực'; display:block; color:var(--g56r1-teal); font-size:12px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px;
}

/* Work schedule: summary first, one working surface at a time. */
body.tci-g56r1-work-schedule .g56r1-schedule-grid { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; }
body.tci-g56r1-work-schedule .g56r1-schedule-grid table { min-width: 820px; border-collapse: separate; border-spacing: 0; }
body.tci-g56r1-work-schedule .g56r1-schedule-grid :is(th,td) { vertical-align: top; }
body.tci-g56r1-work-schedule .g56r1-schedule-grid :is(th,td):first-child { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--g56r1-line); }
body.tci-g56r1-work-schedule .g56r1-approval-list > * { margin-block: 0 10px; }
body.tci-g56r1-work-schedule .g56r1-advanced { opacity: .96; }

/* Daily report: financial truth remains intact, secondary detail is progressive. */
body.tci-g56r1-daily-report .g56r1-kpi-zone { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
body.tci-g56r1-daily-report .g56r1-detail-section { border-top: 1px solid var(--g56r1-line); padding-top: 14px; }
body.tci-g56r1-daily-report .g56r1-detail-body[hidden] { display:none !important; }
body.tci-g56r1-daily-report .g56r1-exception-zone { border-color: rgba(180,35,24,.18) !important; background: linear-gradient(180deg,#fff,var(--g56r1-red-soft)); }

/* Tour approvals: compact review rows, stable action rail. */
body.tci-g56r1-tour-approvals .g56r1-approval-item {
  border: 1px solid var(--g56r1-line) !important;
  border-radius: var(--g56r1-radius-lg) !important;
  box-shadow: 0 4px 16px rgba(8,36,62,.045) !important;
  padding: 16px !important;
  margin-bottom: 10px !important;
}
body.tci-g56r1-tour-approvals .g56r1-approval-item :is(p,dl) { margin-block: 4px; }
body.tci-g56r1-tour-approvals .g56r1-approval-item :is(button,.btn) { min-height: 38px; }
body.tci-g56r1-tour-approvals .g56r1-filter-zone { position: sticky; top: 64px; z-index: 7; backdrop-filter: blur(14px); }

/* Branding: a small studio, not a raw admin form. */
body.tci-g56r1-branding .g56r1-brand-section { padding: 18px; margin-bottom: 14px; }
body.tci-g56r1-branding .g56r1-brand-assets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
body.tci-g56r1-branding .g56r1-brand-assets > * { min-width:0; border:1px solid var(--g56r1-line); border-radius:14px; padding:10px; background:#fff; }
body.tci-g56r1-branding .g56r1-brand-assets img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:10px; background:#f3f6f9; }
body.tci-g56r1-branding input[type="file"] { min-height: auto; width:100%; font-size:12px; }
body.tci-g56r1-branding .g56r1-terminology-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }

/* Tenant governance/system status: exceptions and decisions before internals. */
body.tci-g56r1-governance .g56r1-domain-row,
body.tci-g56r1-system-status .g56r1-status-row {
  display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:12px; align-items:center;
  min-width:0; border:1px solid var(--g56r1-line); border-radius:13px; padding:11px 13px; background:#fff;
}
body.tci-g56r1-governance .g56r1-domain-row + .g56r1-domain-row,
body.tci-g56r1-system-status .g56r1-status-row + .g56r1-status-row { margin-top:8px; }
body.tci-g56r1-governance .g56r1-domain-row :is(.badge,.pill),
body.tci-g56r1-system-status .g56r1-status-row :is(.badge,.pill) { white-space:nowrap; }

@media (max-width: 900px) {
  body.tci-g56r1-daily-report .g56r1-kpi-zone { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.tci-g56r1-branding .g56r1-brand-assets { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  body.tci-g56r1 { --g56r1-radius-xl: 16px; --g56r1-radius-lg: 14px; }
  body.tci-g56r1 main, body.tci-g56r1 [role="main"] { width:100%; max-width:100%; overflow-x:clip; }
  body.tci-g56r1 h1 { font-size: clamp(26px,8vw,34px) !important; }
  body.tci-g56r1 h2 { font-size: 20px !important; }
  body.tci-g56r1 .g56r1-page-shell { width:100%; }
  .g56r1-segmented { display:grid; width:100%; grid-auto-columns:1fr; }
  body.tci-g56r1-daily-report .g56r1-kpi-zone,
  body.tci-g56r1-branding .g56r1-brand-assets,
  body.tci-g56r1-branding .g56r1-terminology-grid { grid-template-columns:1fr; }
  body.tci-g56r1-governance .g56r1-domain-row,
  body.tci-g56r1-system-status .g56r1-status-row { grid-template-columns:1fr; }
  body.tci-g56r1-tour-approvals .g56r1-filter-zone { position:relative; top:auto; }
  body.tci-g56r1-tour-approvals .g56r1-approval-item { padding:14px !important; }
  body.tci-g56r1 :is(button,.btn,[role="button"]):not(.icon-button):not([class*="icon-only"]) { width:auto; max-width:100%; }
}
@media (prefers-reduced-motion: reduce) {
  body.tci-g56r1 *, body.tci-g56r1 *::before, body.tci-g56r1 *::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
