* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f4f6fb; color: #172033; }
.topbar { height: 64px; background: #111827; color: white; display: flex; align-items: center; padding: 0 28px; gap: 32px; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: .04em; }
nav { display: flex; gap: 18px; }
nav a { color: #dbeafe; text-decoration: none; font-weight: 600; }
.container { max-width: 1180px; margin: 28px auto; padding: 0 18px; }
.card { background: white; border: 1px solid #e5e7eb; border-radius: 16px; padding: 24px; margin-bottom: 20px; box-shadow: 0 8px 20px rgba(15, 23, 42, .04); }
h1, h2 { margin-top: 0; }
.muted { color: #64748b; }
.small { font-size: 13px; }
.alert { padding: 12px; background: #fee2e2; border: 1px solid #fecaca; border-radius: 10px; color: #991b1b; margin-bottom: 14px; }
.form-stack { display: grid; gap: 10px; max-width: 640px; }
.search-row { display: flex; gap: 10px; align-items: center; }
input, textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px; }
button, .button-link { background: #2563eb; color: white; border: 0; padding: 11px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; display: inline-block; cursor: pointer; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { padding: 12px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.note { white-space: pre-wrap; background: #f8fafc; border: 1px solid #e2e8f0; padding: 14px; border-radius: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.thumb { display: block; border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; background: #f8fafc; text-decoration: none; color: #172033; }
.thumb img { width: 100%; height: 150px; object-fit: cover; display: block; }
.thumb span, .thumb small { display: block; padding: 8px 10px; overflow-wrap: anywhere; }
.thumb small { color: #64748b; padding-top: 0; }
.login-card { max-width: 460px; margin: 60px auto; }
.token { white-space: pre-wrap; word-break: break-all; background: #f8fafc; padding: 14px; border-radius: 12px; border: 1px solid #e2e8f0; }

.status-box { margin-top: 16px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 14px; border-radius: 12px; }
.inline-check { display: flex; gap: 10px; align-items: center; }
.inline-check input { width: auto; }

/* OTW premium enterprise archive redesign */
:root {
    --otw-bg: #eef3fb;
    --otw-ink: #0f172a;
    --otw-muted: #64748b;
    --otw-card: rgba(255, 255, 255, 0.94);
    --otw-border: rgba(148, 163, 184, 0.28);
    --otw-blue: #2563eb;
    --otw-cyan: #0891b2;
    --otw-green: #059669;
    --otw-amber: #d97706;
    --otw-indigo: #4f46e5;
}

body {
    background:
      radial-gradient(circle at 16% 8%, rgba(37, 99, 235, 0.16), transparent 26rem),
      radial-gradient(circle at 88% 22%, rgba(8, 145, 178, 0.12), transparent 24rem),
      linear-gradient(180deg, #f7faff 0%, #eef3fb 44%, #e9eff8 100%);
}

.topbar {
    background: linear-gradient(90deg, #08111f 0%, #101b31 48%, #0c2038 100%);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.28);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.topbar .brand {
    font-weight: 900;
    letter-spacing: 0.06em;
}

.topbar nav a {
    border-radius: 999px;
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.topbar nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    transform: translateY(-1px);
}

.topbar nav a[href="/archive"] {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.48), rgba(6, 182, 212, 0.22));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.container {
    max-width: 1420px;
}

.archive-premium-shell {
    max-width: 1420px;
    margin: 0 auto;
}

.archive-premium-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 26px;
    align-items: stretch;
    margin: 46px 0 24px 0;
    padding: 34px;
    border-radius: 30px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.92)),
      radial-gradient(circle at top right, rgba(37, 99, 235, 0.13), transparent 24rem);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
    position: relative;
    overflow: hidden;
}

.archive-premium-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

.archive-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 900;
}

.archive-premium-hero h1 {
    margin: 0 0 12px 0;
    font-size: 42px;
    letter-spacing: -0.045em;
    color: #0f172a;
}

.archive-premium-hero p {
    margin: 0;
    max-width: 820px;
    font-size: 18px;
    line-height: 1.55;
    color: #526175;
}

.archive-premium-search {
    display: flex;
    gap: 14px;
    margin-top: 26px;
}

.archive-premium-search input {
    flex: 1;
    height: 54px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    padding: 0 18px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}

.archive-premium-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.archive-premium-search button {
    height: 54px;
    min-width: 120px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, #3675ff 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
    cursor: pointer;
}

.archive-premium-help {
    margin-top: 16px;
    color: #64748b;
    font-size: 14px;
}

.archive-premium-panel {
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    background:
      radial-gradient(circle at top right, rgba(34, 197, 94, 0.32), transparent 12rem),
      linear-gradient(145deg, #0f172a 0%, #17335b 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 210px;
}

.archive-panel-label {
    color: rgba(255, 255, 255, 0.70);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
    font-size: 12px;
}

.archive-panel-value {
    margin-top: 10px;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.archive-panel-subtitle {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.4;
}

.archive-premium-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0 34px 0;
}

.archive-premium-kpi {
    position: relative;
    overflow: hidden;
    min-height: 122px;
    border-radius: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.archive-premium-kpi::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: #2563eb;
}

.archive-premium-kpi span {
    display: block;
    color: #64748b;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.archive-premium-kpi strong {
    display: block;
    margin-top: 12px;
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.archive-premium-kpi small {
    display: block;
    margin-top: 10px;
    color: #64748b;
    font-weight: 700;
}

.archive-premium-kpi.kpi-cyan::before { background: #06b6d4; }
.archive-premium-kpi.kpi-green::before { background: #10b981; }
.archive-premium-kpi.kpi-amber::before { background: #f59e0b; }

.archive-premium-search-state {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    padding: 15px 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.archive-premium-search-state strong {
    color: #0f172a;
}

.archive-premium-search-state span {
    color: #64748b;
}

.archive-premium-month {
    margin: 34px 0 46px 0;
}

.archive-premium-month-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
}

.archive-premium-month-heading span {
    display: block;
    color: #64748b;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 950;
}

.archive-premium-month-heading h2 {
    margin: 5px 0 0 0;
    font-size: 34px;
    color: #0f172a;
    letter-spacing: -0.045em;
}

.archive-premium-month-heading strong {
    display: inline-flex;
    padding: 9px 13px;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.archive-premium-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 20px;
}

.archive-premium-folder-card {
    min-height: 286px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 26px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
    text-decoration: none;
    color: #0f172a;
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.archive-premium-folder-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.archive-premium-folder-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: 0 26px 58px rgba(37, 99, 235, 0.16);
}

.archive-premium-folder-card:hover::before {
    opacity: 1;
}

.archive-premium-folder-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.archive-premium-folder-icon {
    width: 66px;
    height: auto;
    display: block;
}

.archive-premium-folder-date {
    text-align: right;
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
}

.archive-premium-folder-date small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
}

.archive-premium-folder-title {
    font-size: 21px;
    line-height: 1.18;
    font-weight: 950;
    color: #0f172a;
    letter-spacing: -0.035em;
}

.archive-premium-folder-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.archive-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    border: 1px solid transparent;
}

.pill-blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.16);
}

.pill-indigo {
    background: #eef2ff;
    color: #4338ca;
    border-color: rgba(79, 70, 229, 0.16);
}

.pill-green {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(5, 150, 105, 0.16);
}

.pill-orange {
    background: #fff7ed;
    color: #c2410c;
    border-color: rgba(194, 65, 12, 0.16);
}

.pill-muted {
    background: #f1f5f9;
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.16);
}

.archive-premium-folder-note {
    margin: 0;
    color: #475569;
    line-height: 1.5;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-premium-folder-action {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #2563eb;
    font-weight: 950;
}

.archive-premium-folder-action b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #eff6ff;
}

.archive-premium-empty {
    margin-top: 26px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 30px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

@media (max-width: 1020px) {
    .archive-premium-hero {
        grid-template-columns: 1fr;
    }

    .archive-premium-kpis {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 720px) {
    .archive-premium-hero {
        margin-top: 24px;
        padding: 24px;
        border-radius: 24px;
    }

    .archive-premium-hero h1 {
        font-size: 34px;
    }

    .archive-premium-search {
        flex-direction: column;
    }

    .archive-premium-kpis {
        grid-template-columns: 1fr;
    }

    .archive-premium-month-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .archive-premium-folder-grid {
        grid-template-columns: 1fr;
    }
}

/* OTW unbranded premium login page v3 */
body:has(.otw-login-clean-shell) {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 18%, rgba(14, 165, 233, 0.22), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.26), transparent 34%),
    radial-gradient(circle at 52% 88%, rgba(16, 185, 129, 0.12), transparent 28%),
    linear-gradient(135deg, #030712 0%, #0b1120 42%, #111827 100%);
  color: #e5e7eb;
}

body:has(.otw-login-clean-shell) .topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 72px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: none;
}

body:has(.otw-login-clean-shell) .topbar .brand {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.16em;
}

body:has(.otw-login-clean-shell) .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.otw-login-clean-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 112px 18px 36px;
}

.otw-login-clean-shell::before {
  content: "";
  position: absolute;
  inset: 72px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.7), rgba(79, 70, 229, 0.75), rgba(34, 197, 94, 0.55), transparent);
}

.otw-login-clean-bg {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.otw-login-clean-bg-a {
  width: 600px;
  height: 600px;
  top: calc(50% - 420px);
  left: calc(50% - 760px);
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), transparent 66%);
}

.otw-login-clean-bg-b {
  width: 620px;
  height: 620px;
  bottom: calc(50% - 520px);
  right: calc(50% - 760px);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.26), transparent 68%);
}

.otw-login-clean-bg-c {
  width: min(860px, 82vw);
  height: min(860px, 82vw);
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(148, 163, 184, 0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), transparent),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 15px);
  opacity: 0.75;
}

.otw-login-clean-wrap {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
}

.otw-login-clean-card {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: 34px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.985), rgba(248,250,252,0.965)),
    radial-gradient(circle at 0% 0%, rgba(14,165,233,0.08), transparent 34%);
  color: #0f172a;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255,255,255,0.06) inset;
}

.otw-login-clean-card::before {
  content: "";
  position: absolute;
  inset: -2px -2px auto -2px;
  height: 10px;
  background: linear-gradient(90deg, #06b6d4 0%, #2563eb 38%, #7c3aed 68%, #22c55e 100%);
}

.otw-login-clean-card::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.09), transparent 70%);
  pointer-events: none;
}

.otw-login-clean-accent {
  position: absolute;
  right: 28px;
  bottom: 26px;
  width: 118px;
  height: 118px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(14,165,233,0.11), rgba(34,197,94,0.08)),
    repeating-linear-gradient(135deg, rgba(15,23,42,0.045) 0 1px, transparent 1px 10px);
  pointer-events: none;
}

.otw-login-clean-head {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.otw-login-clean-icon {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 62%, #06b6d4);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.otw-login-clean-icon span {
  display: block;
  width: 25px;
  height: 30px;
  border-radius: 8px 8px 10px 10px;
  border: 3px solid #ffffff;
  border-top-width: 8px;
  position: relative;
  box-sizing: border-box;
}

.otw-login-clean-icon span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 14px;
  height: 11px;
  transform: translateX(-50%);
  border: 3px solid #ffffff;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-sizing: border-box;
}

.otw-login-clean-head-copy {
  flex: 1 1 auto;
}

.otw-login-clean-kicker {
  margin: 2px 0 8px;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.otw-login-clean-head-copy h1 {
  margin: 0;
  color: #020617;
  font-size: 3.05rem;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.otw-login-clean-head-copy p {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 1.08rem;
  line-height: 1.55;
}

.otw-login-clean-alert {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.92rem;
  font-weight: 800;
}

.otw-login-clean-form {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
}

.otw-login-clean-form label {
  margin-top: 8px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 900;
}

.otw-login-clean-form input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid #cbd5e1;
  background: rgba(248,250,252,0.94);
  color: #0f172a;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.otw-login-clean-form input:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.otw-login-clean-form input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.otw-login-clean-submit {
  width: 100%;
  min-height: 60px;
  margin-top: 18px;
  border: 0;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #2563eb 100%);
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 20px 38px rgba(37, 99, 235, 0.30);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.otw-login-clean-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 26px 48px rgba(37, 99, 235, 0.38);
}

.otw-login-clean-footer {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #475569;
  font-size: 0.88rem;
}

.otw-login-clean-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 800;
}

.otw-login-clean-meta {
  color: #64748b;
}

.otw-login-clean-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.85);
}

@media (max-width: 640px) {
  body:has(.otw-login-clean-shell) .topbar {
    height: 62px;
  }

  .otw-login-clean-shell {
    min-height: 100svh;
    padding: 88px 12px 24px;
  }

  .otw-login-clean-card {
    padding: 28px;
    border-radius: 28px;
  }

  .otw-login-clean-head {
    gap: 14px;
    margin-bottom: 24px;
  }

  .otw-login-clean-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .otw-login-clean-head-copy h1 {
    font-size: 2.45rem;
  }

  .otw-login-clean-head-copy p {
    font-size: 1rem;
  }

  .otw-login-clean-footer {
    flex-direction: column;
    gap: 8px;
  }
}
/* END OTW unbranded premium login page v3 */

/* OTW unbranded login topbar removal v3c */
body:has(.otw-login-clean-shell) .topbar {
  display: none;
}

body:has(.otw-login-clean-shell) .otw-login-clean-shell {
  padding-top: 38px;
}

body:has(.otw-login-clean-shell) .otw-login-clean-shell::before {
  display: none;
}

@media (max-width: 640px) {
  body:has(.otw-login-clean-shell) .otw-login-clean-shell {
    padding-top: 24px;
  }
}
/* END OTW unbranded login topbar removal v3c */

/* OTW superadmin console v1 */
.superadmin-shell {
  display: grid;
  gap: 22px;
}

.superadmin-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  padding: 34px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.22), transparent 32%),
    linear-gradient(135deg, #020617, #0f172a 58%, #172554);
  color: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.20);
}

.superadmin-eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.13);
  color: #bae6fd;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.superadmin-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.superadmin-hero p {
  width: min(760px, 100%);
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.superadmin-status {
  min-width: 250px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.60);
  align-self: flex-start;
}

.superadmin-status span,
.superadmin-section-title p,
.superadmin-company-head p,
.superadmin-company-metrics span,
.superadmin-user-row small {
  color: #64748b;
}

.superadmin-status strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
}

.superadmin-create-card,
.superadmin-list-card,
.superadmin-company-card,
.device-limit-banner {
  border: 1px solid #e2e8f0;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.superadmin-create-card,
.superadmin-list-card {
  padding: 28px;
}

.superadmin-section-title {
  margin-bottom: 20px;
}

.superadmin-section-title h2 {
  margin: 0 0 6px;
  color: #0f172a;
}

.superadmin-section-title p {
  margin: 0;
}

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

.superadmin-form label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

.superadmin-form input,
.superadmin-form select {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  padding: 0 14px;
  background: #f8fafc;
}

.superadmin-form input:focus,
.superadmin-form select:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.superadmin-form button {
  min-height: 50px;
  align-self: end;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.superadmin-alert,
.device-limit-banner {
  margin-bottom: 18px;
  padding: 16px;
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.superadmin-company-list {
  display: grid;
  gap: 16px;
}

.superadmin-company-card {
  padding: 20px;
}

.superadmin-company-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.superadmin-company-head h3 {
  margin: 0 0 5px;
  color: #0f172a;
}

.superadmin-company-head p {
  margin: 0;
}

.superadmin-plan-pill {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.superadmin-company-metrics,
.device-plan-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.superadmin-company-metrics div,
.device-plan-summary div {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.superadmin-company-metrics span,
.device-plan-summary span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 800;
}

.superadmin-company-metrics strong,
.device-plan-summary strong {
  color: #0f172a;
  font-size: 1.15rem;
}

.superadmin-users {
  display: grid;
  gap: 8px;
}

.superadmin-user-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #f8fafc;
}

.superadmin-empty {
  padding: 22px;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
}

@media (max-width: 820px) {
  .superadmin-hero,
  .superadmin-company-head {
    flex-direction: column;
  }

  .superadmin-form,
  .superadmin-company-metrics,
  .device-plan-summary {
    grid-template-columns: 1fr;
  }
}
/* END OTW superadmin console v1 */

/* OTW archive compact status hero v1 */
.archive-premium-hero {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch;
}

.archive-premium-hero-content {
  max-width: 100%;
}

.archive-premium-panel {
  display: none !important;
}

.archive-premium-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.82);
  color: #1e293b;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.archive-premium-status-badge span {
  display: inline-flex;
  align-items: center;
}

.archive-premium-status-badge strong {
  color: #0f172a;
}

.archive-premium-status-badge small {
  color: #64748b;
  font-weight: 700;
}

.archive-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

.archive-status-dot.is-active {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.archive-status-dot.is-empty {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

@media (max-width: 760px) {
  .archive-premium-status-badge {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 18px;
  }

  .archive-status-dot {
    display: none;
  }
}
/* END OTW archive compact status hero v1 */

/* OTW company kill switch controls v1 */
.superadmin-company-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.superadmin-company-actions form {
  margin: 0;
}

.superadmin-action-btn {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.superadmin-action-btn.warning {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.superadmin-action-btn.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.superadmin-action-btn.danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.superadmin-action-btn:hover {
  filter: brightness(0.98);
}
/* END OTW company kill switch controls v1 */
