/* ── Glassmorphism card surface (from ui-theme.css) ── */
.panel,
.topbar,
.toolbar,
.list-panel,
.viewer-panel,
.table-wrap,
.notice,
.auth-panel,
.module-frame-wrap,
.summary-card,
.session-card,
.activity-card,
.meta-card,
.op-card,
.top-card,
.guide-card,
.guide-step,
.decision-card,
.scan-review-shell,
.viewer-meta,
.ops-guide-item,
.folder-item,
.doc-item,
.crumb,
.usage-card,
.usage-summary p,
.cycle-card,
.aircraft-tile,
.qr-wrap,
.camera-wrap,
.cycle-countdown,
.simple-table,
.empty {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: float-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@supports not (backdrop-filter: blur(1px)) {
  .card,
  .panel,
  .topbar,
  .toolbar,
  .list-panel,
  .viewer-panel,
  .table-wrap,
  .notice,
  .auth-panel,
  .module-frame-wrap,
  .summary-card,
  .session-card,
  .activity-card,
  .meta-card,
  .op-card,
  .top-card,
  .guide-card,
  .guide-step,
  .decision-card,
  .scan-review-shell,
  .viewer-meta,
  .ops-guide-item,
  .folder-item,
  .doc-item,
  .crumb,
  .usage-card,
  .usage-summary p,
  .cycle-card,
  .aircraft-tile,
  .qr-wrap,
  .camera-wrap,
  .cycle-countdown,
  .simple-table,
  .empty {
    background: var(--surface-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ── Muted / text color helpers (from ui-theme.css) ── */
.sub,
.muted,
.brand-sub,
.section-note,
.notice-content,
.session-sub,
.activity-sub,
.meta,
.message,
.tip,
.auth-sub,
.auth-hint,
.subtitle,
.cycle-message,
.stats,
.folder-meta,
.doc-meta,
.viewer-meta,
.guide-step-desc,
.tile-label,
.usage-label,
.usage-hint,
.simple-table th,
.simple-table td,
.geo-cell span {
  color: var(--text-muted);
}

h1, h2, h3, h4,
.brand-title,
.top-name,
.title,
.title-sm,
.session-title,
.activity-title,
.portal-todo-title,
.portal-guide-title,
.guide-step-title,
.auth-title,
.usage-value,
.cycle-head h4,
.geo-cell strong {
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Brand elements (from ui-theme.css) ── */
.aca-brand-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.aca-brand-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.home-brand-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.home-brand-hero.is-compact {
  align-items: flex-start;
  gap: 14px;
}

.home-brand-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.aca-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 22px;
  border: 1px solid rgba(228, 0, 18, 0.12);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 232, 232, 0.9), rgba(255, 255, 255, 0.96) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 250, 0.94));
  box-shadow: 0 14px 28px rgba(190, 24, 40, 0.08);
}

.aca-logo-badge.is-center {
  margin: 0 auto 14px;
}

.aca-logo-badge.is-home {
  padding: 10px 12px;
  border-radius: 24px;
}

.aca-logo-badge.is-home-compact {
  padding: 8px 10px;
  border-radius: 20px;
}

.aca-logo-badge.is-compact {
  padding: 8px 12px;
  border-radius: 18px;
}

.aca-logo-badge.is-portal {
  width: 58px;
  height: 34px;
  padding: var(--space-2xs, 4px) var(--space-xs, 8px);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 248, 0.96));
  box-shadow: 0 8px 18px rgba(190, 24, 40, 0.06);
}

.aca-logo-badge.is-micro {
  padding: 6px 10px;
  border-radius: 16px;
}

.aca-logo {
  display: block;
  width: 84px;
  height: auto;
  object-fit: contain;
}

.aca-logo-badge.is-compact .aca-logo {
  width: 66px;
}

.aca-logo-badge.is-home .aca-logo {
  width: 92px;
}

.aca-logo-badge.is-home-compact .aca-logo {
  width: 74px;
}

.aca-logo-badge.is-portal .aca-logo {
  width: 42px;
  max-height: 24px;
}

.aca-logo-badge.is-micro .aca-logo {
  width: 52px;
}

/* ── Inline form (from ui-theme.css) ── */
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.inline-form input:not([type="checkbox"]):not([type="radio"]),
.inline-form select {
  width: 100%;
}

.inline-form .btn {
  min-width: 118px;
}

/* ── App shell top card (from ui-theme.css) ── */
.app-shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

.app-shell .top-card {
  border-radius: var(--radius-xl);
  background: var(--surface-solid);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
  padding: 20px;
}

.app-shell .top-main {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  color: #fff;
  background: var(--accent);
}

.app-shell .top-main .top-name {
  color: #fff;
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-shell .top-main .chip {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
}

.app-shell .top-main .chip-role {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.2);
}

.app-shell .top-main .chip.unread {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
}

.app-shell .top-main .top-actions .btn {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
}

.app-shell .top-main .top-actions .btn-danger {
  background: rgba(192, 37, 62, 0.85);
  border-color: transparent;
}

.app-shell .kpi-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: none;
}

.app-shell .kpi-label {
  color: var(--text-muted);
}

.app-shell .kpi-value {
  color: var(--text);
}

.app-shell .summary-card,
.app-shell .session-card,
.app-shell .activity-card,
.app-shell .notice-item {
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  border-color: var(--line);
  box-shadow: none;
}

.app-shell .meta-pill,
.app-shell .participant-chip,
.app-shell .price-flag,
.app-shell .session-default-name,
.chip,
.badge,
.cycle-pill,
.cycle-badge {
  border-radius: 999px;
}

.app-shell .meta-pill.holiday {
  background: var(--warning-soft);
  border-color: #f0d080;
  color: var(--warning);
}

.app-shell .meta-pill.full,
.notice-item.unread {
  background: var(--danger-soft);
  border-color: #f0b8c2;
  color: var(--danger);
}

.app-shell .module-frame-wrap,
.app-shell .viewer-wrap {
  overflow: hidden;
}

.app-shell .module-frame,
#pdfFrame {
  border-radius: inherit;
}

.app-shell .table-wrap,
.shell .table-wrap {
  border-color: var(--line);
  background: var(--surface-solid);
}

/* ── Login (from ui-theme.css) ── */
.app-shell .login-shell .card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.app-shell .login-badge {
  color: var(--accent);
  border-color: rgba(26, 110, 245, 0.2);
  background: var(--accent-soft);
}

.app-shell .brand-title {
  color: var(--text);
  font-weight: 720;
  letter-spacing: -0.02em;
}

.app-shell .brand-sub {
  color: var(--text-muted);
}

.app-shell .login-highlight span {
  color: var(--text-muted);
  border-color: var(--line-strong);
  background: var(--surface-solid);
}

/* ── Tables (from ui-theme.css) ── */
table.matrix,
.simple-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

table.matrix thead th,
.simple-table th {
  background: #f8fafc;
  color: var(--text-muted);
}

table.matrix th,
table.matrix td,
.simple-table th,
.simple-table td {
  border-color: var(--line);
}

table.matrix tbody tr:nth-child(2n) td,
.simple-table tbody tr:nth-child(2n) td {
  background: #fafbfd;
}

table.matrix tbody tr td:first-child {
  background: #f8fafc;
}
