:root {
  --maira-navy-950: #011b30;
  --maira-navy-900: #032b4a;
  --maira-navy-800: #063a61;
  --maira-navy-700: #0b4f7b;
  --maira-cyan: #00bde3;
  --maira-cyan-soft: #dff8fd;
  --maira-blue: #1677d2;
  --maira-green: #10a83f;
  --maira-red: #e5484d;
  --maira-orange: #f59e0b;
  --maira-purple: #7c4dce;
  --maira-bg: #f3f7fb;
  --maira-white: #ffffff;
  --maira-text: #0b2340;
  --maira-muted: #60758d;
  --maira-border: #d8e3ed;
  --maira-shadow: 0 12px 36px rgba(7, 43, 75, .09);
  --maira-radius: 16px;
}

html.maira-app-active,
body.maira-host-app-page {
  overflow: hidden !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
}

body.maira-host-app-page.maira-app-mounted > :not(#maira-host-root):not(#wpadminbar) {
  display: none !important;
}

body.maira-host-app-page #wpadminbar {
  z-index: 1000001;
}

.maira-host-root,
.maira-host-root * {
  box-sizing: border-box;
}

.maira-host-root {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  overscroll-behavior-x: none;
  color: var(--maira-text);
  background: var(--maira-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

body.admin-bar .maira-host-root {
  top: 32px !important;
  height: calc(100vh - 32px) !important;
  height: calc(100dvh - 32px) !important;
  min-height: calc(100vh - 32px) !important;
}

.maira-host-root button,
.maira-host-root input,
.maira-host-root select,
.maira-host-root textarea {
  font: inherit;
}

.maira-host-root button,
.maira-host-root a {
  -webkit-tap-highlight-color: transparent;
}

.maira-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--maira-navy-900);
}

.maira-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #cdeef5;
  border-top-color: var(--maira-cyan);
  border-radius: 50%;
  animation: maira-spin .75s linear infinite;
}

@keyframes maira-spin { to { transform: rotate(360deg); } }

.maira-login-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(520px, 1.3fr);
  background:
    radial-gradient(circle at 80% 12%, rgba(0, 189, 227, .20), transparent 26%),
    linear-gradient(135deg, #eef8fc 0%, #fff 52%, #e7f2f8 100%);
}

.maira-login-brand {
  position: relative;
  padding: clamp(38px, 6vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: white;
  background: linear-gradient(150deg, var(--maira-navy-950), var(--maira-navy-900) 62%, #075d88);
}

.maira-login-brand::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -210px;
  width: 480px;
  height: 480px;
  border: 70px solid rgba(0, 189, 227, .12);
  border-radius: 50%;
}

.maira-brand-logo {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 108px;
  padding: 6px 10px;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.maira-login-brand h1 {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 32px 0 14px;
  color: white;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.maira-login-brand p {
  position: relative;
  z-index: 1;
  max-width: 500px;
  color: #c8e0ec;
  font-size: 17px;
}

.maira-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.maira-brand-pill {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #d9eff7;
  background: rgba(255, 255, 255, .06);
  font-size: 13px;
}

.maira-login-panel {
  display: grid;
  place-items: center;
  padding: 34px;
}

.maira-auth-card {
  width: min(480px, 100%);
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(208, 225, 236, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 28px 80px rgba(5, 43, 72, .14);
  backdrop-filter: blur(16px);
}

.maira-auth-card h2 {
  margin: 0 0 8px;
  color: var(--maira-navy-900);
  font-size: 30px;
  line-height: 1.2;
}

.maira-auth-card > p {
  margin: 0 0 26px;
  color: var(--maira-muted);
}

.maira-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: #edf3f7;
}

.maira-auth-tab {
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--maira-muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.maira-auth-tab.is-active {
  color: var(--maira-navy-900);
  background: white;
  box-shadow: 0 3px 10px rgba(3, 43, 74, .08);
}

.maira-field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.maira-field label {
  color: #183653;
  font-weight: 700;
  font-size: 14px;
}

.maira-input,
.maira-select,
.maira-textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cbd9e4;
  border-radius: 10px;
  outline: 0;
  color: var(--maira-text);
  background: white;
  transition: border-color .2s, box-shadow .2s;
}

.maira-textarea { min-height: 88px; resize: vertical; }

.maira-input:focus,
.maira-select:focus,
.maira-textarea:focus {
  border-color: var(--maira-cyan);
  box-shadow: 0 0 0 3px rgba(0, 189, 227, .15);
}

.maira-help-text {
  margin-top: -4px;
  color: var(--maira-muted);
  font-size: 12px;
}

.maira-btn {
  min-height: 44px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none !important;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}

.maira-btn:hover { transform: translateY(-1px); }
.maira-btn:active { transform: translateY(0); }
.maira-btn:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.maira-btn-block { width: 100%; }
.maira-btn-primary { color: #fff; background: linear-gradient(135deg, var(--maira-navy-900), #075986); box-shadow: 0 8px 20px rgba(3, 43, 74, .18); }
.maira-btn-cyan { color: #013650; background: linear-gradient(135deg, #2dd4ef, var(--maira-cyan)); }
.maira-btn-wa { color: white; background: linear-gradient(135deg, #18b94d, #079837); box-shadow: 0 8px 20px rgba(9, 151, 55, .2); }
.maira-btn-outline { color: var(--maira-navy-900); border-color: #9ebbd0; background: white; }
.maira-btn-danger { color: #b4232d; border-color: #f2b8bd; background: #fff1f2; }
.maira-btn-soft { color: var(--maira-navy-900); background: #eaf3f8; }
.maira-btn-sm { min-height: 36px; padding: 7px 11px; font-size: 13px; }
.maira-btn-wa-small { min-height: 38px; padding: 8px 13px; font-size: 13px; }

.maira-demo-box {
  margin-top: 18px;
  padding: 13px;
  border: 1px dashed #88c9d8;
  border-radius: 10px;
  color: #31556a;
  background: #eefbfe;
  font-size: 13px;
}

.maira-demo-actions { display: flex; gap: 8px; margin-top: 10px; }

.maira-app {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  overflow: hidden;
  max-width: 100%;
}

.maira-sidebar {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  color: white;
  background: linear-gradient(180deg, var(--maira-navy-950), var(--maira-navy-900) 70%, #03233d);
  overflow: auto;
}

.maira-side-logo {
  width: 112px;
  height: 76px;
  margin: 0 auto 25px;
  padding: 2px 8px;
  border-radius: 12px;
  object-fit: cover;
  background: white;
}

.maira-nav {
  display: grid;
  gap: 7px;
}

.maira-nav-button {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 10px;
  color: #d9e8f0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 650;
}

.maira-nav-button:hover { color: white; background: rgba(255,255,255,.07); }
.maira-nav-button.is-active { color: white; background: linear-gradient(135deg, #00add5, #02c9e9); box-shadow: 0 8px 18px rgba(0, 189, 227, .2); }
.maira-nav-icon { width: 22px; text-align: center; font-size: 19px; }

.maira-side-account {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.maira-account-row { display: flex; align-items: center; gap: 11px; }
.maira-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #03415e; background: var(--maira-cyan); font-weight: 850; }
.maira-account-name { color: white; font-weight: 750; }
.maira-account-meta { color: #a9c3d1; font-size: 12px; }
.maira-logout { margin-top: 12px; color: #d9e8f0; }

.maira-main {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background:
    radial-gradient(circle at 92% 0%, rgba(0,189,227,.08), transparent 24%),
    var(--maira-bg);
}

.maira-main,
.maira-content,
.maira-content > *,
.maira-grid,
.maira-card,
.maira-live-card,
.maira-attendance-layout,
.maira-attendance-main,
.maira-topbar > * {
  min-width: 0;
  max-width: 100%;
}

.maira-topbar {
  min-height: 88px;
  padding: 18px clamp(20px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(208, 221, 232, .8);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.maira-topbar h1 { margin: 0; color: var(--maira-text); font-size: clamp(24px, 2.5vw, 34px); line-height: 1.15; letter-spacing: -.025em; }
.maira-topbar-sub { margin-top: 4px; color: var(--maira-muted); font-size: 13px; }
.maira-top-actions { display: flex; align-items: center; gap: 12px; }

.maira-period-pill,
.maira-clock {
  min-height: 52px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--maira-border);
  border-radius: 12px;
  color: var(--maira-navy-900);
  background: white;
  box-shadow: 0 4px 15px rgba(4, 44, 74, .05);
}

.maira-clock { min-width: 158px; justify-content: center; flex-direction: column; gap: 0; }
.maira-clock-date { color: var(--maira-muted); font-size: 12px; }
.maira-clock-time { font-size: 21px; line-height: 1.2; font-weight: 850; letter-spacing: .02em; }
.maira-online-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.12); }

.maira-period-pill.period-closing { border-color: #efb04f; animation: maira-closing 1.15s ease-in-out infinite; }
@keyframes maira-closing { 50% { box-shadow: 0 0 0 5px rgba(245,158,11,.18); background: #fff8e8; } }

.maira-content { width: 100%; max-width: 100%; padding: 28px clamp(18px, 3vw, 42px) 48px; overflow-x: hidden; }
.maira-grid { display: grid; gap: 18px; }
.maira-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.maira-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.maira-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.maira-span-2 { grid-column: span 2; }

.maira-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--maira-border);
  border-radius: var(--maira-radius);
  background: var(--maira-white);
  box-shadow: 0 7px 25px rgba(6, 45, 75, .055);
}

.maira-card-compact { padding: 17px; }
.maira-card-head { margin-bottom: 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.maira-card h2, .maira-card h3 { margin: 0; color: var(--maira-text); line-height: 1.25; }
.maira-card h2 { font-size: 23px; }
.maira-card h3 { font-size: 17px; }
.maira-card p { color: var(--maira-muted); }

.maira-kpi { position: relative; overflow: hidden; }
.maira-kpi::after { content: ""; position: absolute; width: 90px; height: 90px; right: -25px; top: -26px; border-radius: 50%; background: rgba(0,189,227,.09); }
.maira-kpi-label { color: var(--maira-muted); font-size: 13px; }
.maira-kpi-value { margin-top: 8px; color: var(--maira-navy-900); font-size: 31px; line-height: 1; font-weight: 850; }
.maira-kpi-value small { font-size: 14px; font-weight: 700; }
.maira-kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--maira-blue); background: #eaf4ff; font-size: 20px; }

.maira-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}
.maira-status-active, .maira-status-success { color: #087530; background: #e2f7e9; }
.maira-status-pending { color: #8a5b00; background: #fff3cf; }
.maira-status-inactive, .maira-status-cancelled { color: #7b8794; background: #edf0f3; }
.maira-status-danger { color: #a8242d; background: #ffe7e8; }
.maira-status-info { color: #075c9a; background: #e4f2ff; }

.maira-hero-card {
  padding: clamp(23px, 3vw, 34px);
  color: white;
  border: 0;
  background: linear-gradient(135deg, var(--maira-navy-950), var(--maira-navy-800));
  box-shadow: var(--maira-shadow);
}
.maira-hero-card h2 { color: white; font-size: 28px; }
.maira-hero-card p { color: #bdd7e5; }
.maira-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.maira-hero-time { font-size: clamp(34px, 5vw, 58px); line-height: 1; font-weight: 850; letter-spacing: -.035em; }
.maira-active-indicator { display: inline-flex; align-items: center; gap: 10px; color: #62e5ff; font-weight: 800; }
.maira-pulse-dot { width: 17px; height: 17px; border-radius: 50%; background: var(--maira-cyan); box-shadow: 0 0 0 7px rgba(0,189,227,.18); animation: maira-pulse 1.3s ease-in-out infinite; }
@keyframes maira-pulse { 50% { transform: scale(.78); box-shadow: 0 0 0 13px rgba(0,189,227,.05); } }

.maira-attendance-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, .72fr); gap: 18px; align-items: stretch; }
.maira-attendance-main { display: grid; gap: 16px; }
.maira-live-card { padding: 24px; border: 1px solid var(--maira-border); border-radius: 16px; background: white; }
.maira-live-card.is-current { border-color: #74d7e8; box-shadow: 0 0 0 4px rgba(0,189,227,.09); }
.maira-live-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.maira-live-title { margin: 0; font-size: 24px; color: var(--maira-text); }
.maira-live-name { margin-top: 4px; color: #335675; font-size: 17px; }
.maira-live-time { margin: 14px 0 17px; color: var(--maira-navy-900); font-size: clamp(32px, 4vw, 47px); line-height: 1; font-weight: 850; letter-spacing: -.03em; }
.maira-duration-label { margin: 0 0 9px; color: #34516d; font-weight: 750; }
.maira-duration-options { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 17px; }
.maira-radio-pill { min-width: 75px; min-height: 44px; padding: 9px 14px; display: block; border: 1px solid #bdd0de; border-radius: 10px; color: #31506c; background: white; cursor: pointer; text-align: center; font-weight: 750; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.maira-radio-pill.is-selected { color: #033a55; border-color: var(--maira-cyan); background: var(--maira-cyan-soft); box-shadow: 0 0 0 2px rgba(0,189,227,.13); }
.maira-share-preview { max-width: 100%; margin: 13px 0 0; padding: 12px 14px; border-left: 3px solid var(--maira-cyan); border-radius: 8px; color: #35526b; background: #f1f8fb; font-size: 13px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.maira-result-card { height: 100%; }
.maira-private-head { display: flex; align-items: center; gap: 9px; }
.maira-result-number { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.maira-result-number .maira-input { border-radius: 10px 0 0 10px; }
.maira-input-suffix { padding: 10px 14px; display: grid; place-items: center; border: 1px solid #cbd9e4; border-left: 0; border-radius: 0 10px 10px 0; color: var(--maira-muted); background: #f7fafc; }
.maira-note { margin-top: 15px; padding: 12px; border-radius: 9px; color: #4a5e72 !important; background: #f2f5f8; font-size: 13px; }

.maira-alert { padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid; border-radius: 11px; }
.maira-alert-info { color: #135f86; border-color: #b5e1ef; background: #eaf9fd; }
.maira-alert-warning { color: #79510a; border-color: #efd69b; background: #fff8e5; }
.maira-alert-danger { color: #922b33; border-color: #f0b9bd; background: #fff0f1; }
.maira-alert-success { color: #126731; border-color: #b7e4c4; background: #ecf9f0; }

.maira-table-wrap { width: 100%; overflow: auto; border: 1px solid var(--maira-border); border-radius: 12px; }
.maira-table { width: 100%; border-collapse: collapse; min-width: 680px; color: var(--maira-text); }
.maira-table th { padding: 11px 13px; color: #476279; background: #eff5f8; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.maira-table td { padding: 12px 13px; border-top: 1px solid #e3ebf1; vertical-align: middle; }
.maira-table tbody tr:hover td { background: #f9fcfd; }
.maira-table .maira-number { text-align: right; font-variant-numeric: tabular-nums; }

.maira-day-tabs { display: flex; gap: 7px; overflow: auto; padding-bottom: 3px; }
.maira-day-tab { min-width: 82px; padding: 9px 13px; border: 1px solid var(--maira-border); border-radius: 10px; color: #45627b; background: white; cursor: pointer; font-weight: 700; }
.maira-day-tab.is-active { color: white; border-color: var(--maira-navy-900); background: var(--maira-navy-900); }
.maira-schedule-table { min-width: 760px; table-layout: fixed; }
.maira-schedule-table th:first-child, .maira-schedule-table td:first-child { position: sticky; left: 0; z-index: 3; width: 90px; text-align: center; background: #f7fafc; }
.maira-schedule-cell { min-height: 55px; padding: 8px; border-radius: 8px; color: #284963; background: #f3f8fb; }
.maira-schedule-cell strong { display: block; color: var(--maira-navy-900); }
.maira-schedule-cell small { color: var(--maira-muted); }
.maira-schedule-cell.is-empty { color: #90a1af; background: #fafcfd; border: 1px dashed #d8e3eb; }
.maira-schedule-row.active-hour td { background: #effcff; animation: maira-hour-blink 1.15s ease-in-out infinite; }
.maira-schedule-row.active-hour td:first-child { color: #003b55; font-weight: 850; box-shadow: inset 4px 0 0 var(--maira-cyan); }
@keyframes maira-hour-blink { 50% { background: #dff8fd; } }

.maira-place-status { display: grid; gap: 10px; }
.maira-place-row { padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--maira-border); border-radius: 11px; background: #fbfdfe; }
.maira-place-row.is-live { border-color: #86dcea; background: #edfbfe; }
.maira-place-name { font-weight: 800; }
.maira-place-host { color: var(--maira-muted); font-size: 13px; }

.maira-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maira-section-gap { margin-top: 20px; }
.maira-empty { padding: 34px 18px; color: var(--maira-muted); text-align: center; }
.maira-empty-icon { display: block; margin-bottom: 8px; font-size: 33px; }

.maira-guide-hero { padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; color: white; border-radius: 17px; background: linear-gradient(135deg, var(--maira-navy-950), #075d88); }
.maira-guide-hero h2 { color: white; font-size: 28px; }
.maira-guide-hero p { margin: 6px 0 0; color: #c7e0eb; }
.maira-guide-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.maira-guide-step { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 17px 0; border-top: 1px solid #e2eaf0; }
.maira-guide-step:first-child { border-top: 0; }
.maira-step-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #013d59; background: var(--maira-cyan-soft); font-weight: 850; }
.maira-guide-step h4 { margin: 0 0 5px; color: var(--maira-navy-900); font-size: 16px; }
.maira-guide-step p, .maira-guide-step li { color: #536c81; }
.maira-guide-step ul, .maira-guide-step ol { margin: 7px 0 0; padding-left: 20px; }
.maira-guide-details { border: 1px solid var(--maira-border); border-radius: 13px; background: white; overflow: hidden; }
.maira-guide-details + .maira-guide-details { margin-top: 12px; }
.maira-guide-details summary { padding: 16px 18px; cursor: pointer; color: var(--maira-navy-900); font-weight: 800; list-style: none; }
.maira-guide-details summary::-webkit-details-marker { display: none; }
.maira-guide-details summary::after { content: "+"; float: right; color: var(--maira-cyan); font-size: 22px; }
.maira-guide-details[open] summary::after { content: "−"; }
.maira-guide-body { padding: 0 18px 18px; }

.maira-modal-backdrop { position: fixed; inset: 0; z-index: 1000002; padding: 20px; display: grid; place-items: center; background: rgba(1, 27, 48, .62); backdrop-filter: blur(4px); }
.maira-modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border-radius: 18px; background: white; box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.maira-modal h3 { margin: 0 0 8px; font-size: 23px; }
.maira-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.maira-toast-stack { position: fixed; z-index: 1000004; right: 22px; bottom: 22px; display: grid; gap: 9px; width: min(390px, calc(100vw - 30px)); }
.maira-toast { padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; border-radius: 11px; color: white; background: var(--maira-navy-900); box-shadow: 0 12px 35px rgba(0,0,0,.2); animation: maira-toast-in .25s ease-out; }
.maira-toast.is-error { background: #a92f38; }
.maira-toast.is-success { background: #087936; }
@keyframes maira-toast-in { from { opacity: 0; transform: translateY(10px); } }

.maira-loading-line { height: 3px; position: fixed; top: 0; left: 0; right: 0; z-index: 1000005; overflow: hidden; background: rgba(0,189,227,.15); }
.maira-loading-line::after { content: ""; display: block; width: 38%; height: 100%; background: var(--maira-cyan); animation: maira-loading 1s ease-in-out infinite; }
@keyframes maira-loading { from { transform: translateX(-110%); } to { transform: translateX(290%); } }

.maira-code-chip { padding: 5px 9px; border-radius: 7px; color: #044968; background: #dff7fb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 850; }
.maira-muted { color: var(--maira-muted); }
.maira-strong { font-weight: 800; }
.maira-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.maira-no-margin { margin: 0 !important; }
.maira-mt-8 { margin-top: 8px; }
.maira-mt-16 { margin-top: 16px; }
.maira-mb-16 { margin-bottom: 16px; }
.maira-hidden { display: none !important; }
.maira-mobile-only { display: none !important; }

@media (max-width: 1100px) {
  .maira-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .maira-attendance-layout { grid-template-columns: 1fr; }
  .maira-result-card { height: auto; }
  .maira-top-actions .maira-period-pill { display: none; }
}

@media (max-width: 900px) {
  .maira-login-page { grid-template-columns: 1fr; }
  .maira-login-brand { min-height: 260px; padding: 30px; }
  .maira-login-brand h1 { margin-top: 22px; font-size: 40px; }
  .maira-brand-foot { display: none; }
  .maira-app { display: block; height: 100%; min-height: 0; padding-bottom: 0; overflow: hidden; }
  .maira-sidebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; min-height: 66px; height: 66px; padding: 7px 9px calc(7px + env(safe-area-inset-bottom)); display: block; overflow: visible; }
  .maira-side-logo, .maira-side-account { display: none; }
  .maira-nav { height: 100%; display: flex; justify-content: flex-start; gap: 3px; overflow-x: auto; scrollbar-width: none; }
  .maira-nav::-webkit-scrollbar { display: none; }
  .maira-nav-button { min-width: 67px; min-height: 52px; padding: 6px; flex: 1 0 67px; flex-direction: column; justify-content: center; gap: 1px; font-size: 10px; text-align: center; }
  .maira-mobile-only { display: flex !important; }
  .maira-nav-icon { font-size: 18px; }
  .maira-main { height: 100%; min-height: 0; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .maira-topbar { width: 100%; min-height: 75px; padding: 13px 14px; gap: 8px; overflow: hidden; }
  .maira-topbar h1 { font-size: 23px; }
  .maira-topbar-sub { display: none; }
  .maira-clock { min-width: 120px; min-height: 47px; }
  .maira-clock-date { display: none; }
  .maira-clock-time { font-size: 18px; }
  .maira-content { width: 100%; padding: 18px 12px 40px; }
  .maira-grid-3 { grid-template-columns: 1fr; }
  .maira-span-2 { grid-column: auto; }
  .maira-hero-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  body.admin-bar .maira-host-root {
    top: 46px !important;
    height: calc(100vh - 46px) !important;
    height: calc(100dvh - 46px) !important;
    min-height: calc(100vh - 46px) !important;
  }
  .maira-login-panel { padding: 18px 14px 30px; }
  .maira-login-brand { min-height: 220px; }
  .maira-login-brand h1 { font-size: 33px; }
  .maira-brand-logo { width: 118px; height: 82px; }
  .maira-auth-card { padding: 23px 18px; }
  .maira-grid-2, .maira-grid-4 { grid-template-columns: 1fr; }
  .maira-card { width: 100%; padding: 16px; }
  .maira-live-card { width: 100%; padding: 16px; }
  .maira-live-title { font-size: 21px; }
  .maira-live-time { font-size: 34px; }
  .maira-duration-options { display: grid; grid-template-columns: repeat(3, 1fr); }
  .maira-radio-pill { width: 100%; min-width: 0; padding: 8px 4px; }
  .maira-live-title-row { flex-wrap: wrap; }
  .maira-live-title-row > div { min-width: 0; max-width: 100%; }
  .maira-live-name { overflow-wrap: anywhere; }
  .maira-live-card > .maira-btn-wa { width: 100%; max-width: 100%; white-space: normal; }
  .maira-topbar h1 { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .maira-clock { min-width: 108px; padding: 7px 9px; }
  .maira-clock-time { font-size: 16px; white-space: nowrap; }
  .maira-alert { min-width: 0; overflow-wrap: anywhere; }
  .maira-modal-backdrop { padding: 10px; }
  .maira-modal { max-width: calc(100vw - 20px); padding: 18px; }
  .maira-top-actions .maira-btn { display: none; }
  .maira-guide-hero { grid-template-columns: 1fr; }
  .maira-toast-stack { right: 15px; bottom: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .maira-host-root *, .maira-host-root *::before, .maira-host-root *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
