@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #eef8fb;
    --panel: #ffffff;
    --line: rgba(116, 165, 184, 0.2);
    --ink: #103345;
    --muted: #527384;
    --accent: #007ea7;
    --accent-soft: #d7f3f8;
    --sun: #ffb84d;
    --sea: #8ad9e4;
    --sand: #f7e4b6;
    --teal: #18a8a2;
    --danger: #b04835;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Be Vietnam Pro", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 184, 77, 0.16), transparent 25%),
        radial-gradient(circle at bottom right, rgba(138, 217, 228, 0.28), transparent 28%),
        linear-gradient(180deg, #eef8fb 0%, #e4f4f7 52%, #f7fbfc 100%);
    color: var(--ink);
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    --tenant-primary: var(--accent);
    --tenant-secondary: var(--accent-soft);
}

.sidebar {
    padding: 28px 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 251, 253, 0.88)),
        radial-gradient(circle at top, rgba(255, 184, 77, 0.12), transparent 26%);
    border-right: 1px solid rgba(82, 115, 132, 0.12);
    backdrop-filter: blur(14px);
}

.brand h1,
.page-head h2 {
    margin: 0;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.brand-lockup-logo,
.brand-lockup-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    flex: 0 0 52px;
}

.brand-lockup-logo {
    object-fit: cover;
    border: 1px solid rgba(82, 115, 132, 0.14);
    background: white;
}

.brand-lockup-mark {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(0, 126, 167, 0.14), rgba(255, 184, 77, 0.24));
    color: var(--tenant-primary);
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: var(--muted);
}

.nav {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.nav a {
    text-decoration: none;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(82, 115, 132, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.nav a:hover,
.ghost-btn:hover,
.primary-btn:hover {
    transform: translateY(-1px);
}

.nav a:hover {
    border-color: color-mix(in srgb, var(--tenant-primary) 34%, white);
    box-shadow: 0 14px 24px rgba(16, 51, 69, 0.06);
}

.content {
    padding: 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.page-head {
    margin-bottom: 20px;
}

.page-head-rich {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card,
.card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(82, 115, 132, 0.12);
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(16, 51, 69, 0.08);
}

.muted {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.stat-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.stat-card-accent {
    background: linear-gradient(135deg, color-mix(in srgb, var(--tenant-primary) 15%, white), rgba(255, 184, 77, 0.18));
}

.stat-card-soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(234, 248, 251, 0.9));
}

table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #eee4cf;
    vertical-align: top;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tenant-secondary) 72%, white);
    color: var(--tenant-primary);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-meta {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tenant-primary) 14%, white), rgba(255, 184, 77, 0.16));
    border: 1px solid color-mix(in srgb, var(--tenant-primary) 16%, white);
}

.sidebar-meta span,
.login-hint span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.ghost-btn,
.primary-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 140ms ease, opacity 140ms ease;
    font-family: inherit;
    font-weight: 700;
}

.ghost-btn {
    background: rgba(255, 253, 248, 0.85);
    border: 1px solid var(--line);
}

.primary-btn {
    background: linear-gradient(135deg, var(--tenant-primary), color-mix(in srgb, var(--tenant-primary) 72%, var(--teal)));
    color: white;
    box-shadow: 0 18px 36px color-mix(in srgb, var(--tenant-primary) 24%, transparent);
}

.large-btn {
    width: 100%;
    padding: 15px 18px;
    font-size: 16px;
}

.alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 14px 28px rgba(16, 51, 69, 0.06);
}

.alert-body {
    display: grid;
    gap: 4px;
}

.alert-body strong,
.alert-body span {
    display: block;
}

.alert-close {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
}

.alert-error {
    background: #fde6df;
    color: var(--danger);
    border: 1px solid #f3c1b5;
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 184, 77, 0.26), transparent 20%),
        radial-gradient(circle at 85% 20%, rgba(138, 217, 228, 0.28), transparent 18%),
        linear-gradient(135deg, #e7f6fb 0%, #fdfefe 52%, #edf7f8 100%);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.auth-hero {
    padding: 72px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(16, 51, 69, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 51, 69, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
    pointer-events: none;
}

.hero-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px dashed rgba(0, 126, 167, 0.22);
    pointer-events: none;
}

.hero-orbit-one {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -120px;
}

.hero-orbit-two {
    width: 260px;
    height: 260px;
    right: 50px;
    bottom: 40px;
}

.auth-hero h1 {
    font-size: clamp(42px, 5vw, 30px);
    line-height: 0.96;
    margin: 0;
    max-width: 680px;
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 540px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 620px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.travel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.travel-tags span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.glass-card {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(16, 51, 69, 0.08);
}

.glass-card span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-card {
    width: min(480px, 100%);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 32px;
    padding: 34px;
    backdrop-filter: blur(16px);
    box-shadow: 0 30px 60px rgba(16, 51, 69, 0.14);
}

.login-card h2 {
    margin: 0 0 8px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(0, 126, 167, 0.14), rgba(255, 184, 77, 0.22));
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.login-form {
    margin-top: 20px;
}

.field-block {
    display: block;
    margin-bottom: 16px;
}

.field-block span {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.field-block input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(82, 115, 132, 0.18);
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field-block input:focus {
    outline: 0;
    border-color: rgba(0, 126, 167, 0.46);
    box-shadow: 0 0 0 4px rgba(0, 126, 167, 0.12);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    margin: 18px 0 20px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.secondary-btn {
    width: 100%;
    padding: 15px 18px;
    margin-top: 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 126, 167, 0.15);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.secondary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(16, 51, 69, 0.08);
}

.text-link {
    color: var(--tenant-primary);
    text-decoration: none;
    font-weight: 700;
}

.text-link:hover {
    text-decoration: underline;
}

.login-hint {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 184, 77, 0.14), rgba(0, 126, 167, 0.1));
}

.login-support {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 18px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 82px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--tenant-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.insight-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.insight-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.64);
    backdrop-filter: blur(12px);
}

.insight-card strong,
.glass-card strong {
    display: block;
}

.insight-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.5;
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tenant-primary) 14%, white), rgba(24, 168, 162, 0.14));
    color: var(--tenant-primary);
    font-weight: 800;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #e6f8f2;
    color: #0d6c54;
    border: 1px solid #bcebdc;
}

.alert-warning {
    background: #fff6e4;
    color: #8a5b0e;
    border: 1px solid #f3d48b;
}

.hero-dashboard {
    margin-bottom: 20px;
}

.hero-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(82, 115, 132, 0.12);
    background:
        radial-gradient(circle at top right, rgba(255, 184, 77, 0.18), transparent 22%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(230, 247, 250, 0.94));
    box-shadow: 0 24px 48px rgba(16, 51, 69, 0.08);
}

.hero-panel-tenant {
    background:
        radial-gradient(circle at top right, rgba(0, 126, 167, 0.18), transparent 22%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 247, 250, 0.94));
}

.hero-panel h3 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.15;
}

.hero-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(82, 115, 132, 0.12);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
    margin-bottom: 20px;
}

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

.timeline-item {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 12px;
    align-items: start;
}

.timeline-item strong {
    display: block;
    margin-bottom: 6px;
}

.timeline-item p {
    margin: 0;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tenant-primary), var(--sun));
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--tenant-primary) 12%, transparent);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 29, 40, 0.42);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 50;
}

.modal-backdrop.is-visible {
    display: flex;
}

.modal-card {
    width: min(760px, 100%);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 34px 80px rgba(10, 29, 40, 0.18);
}

.modal-card-wide {
    width: min(1080px, 100%);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.modal-head h3 {
    margin: 0;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(82, 115, 132, 0.12);
    background: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-form .field-block textarea,
.modal-form .field-block select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(82, 115, 132, 0.18);
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: rgba(238, 248, 251, 0.86);
    border: 1px solid rgba(82, 115, 132, 0.1);
}

.modal-tab {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.modal-tab.is-active {
    color: white;
    background: linear-gradient(135deg, var(--tenant-primary), color-mix(in srgb, var(--tenant-primary) 72%, var(--teal)));
    box-shadow: 0 14px 28px color-mix(in srgb, var(--tenant-primary) 22%, transparent);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.modal-form .field-block textarea:focus,
.modal-form .field-block select:focus {
    outline: 0;
    border-color: color-mix(in srgb, var(--tenant-primary) 46%, white);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tenant-primary) 12%, transparent);
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.tenant-create-card,
.tenant-card {
    margin-bottom: 20px;
}

.tenant-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.tenant-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tenant-section-head,
.domain-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.tenant-section-head h3,
.tenant-section-head h4,
.domain-item-head strong {
    margin: 0;
}

.tenant-section-head-small {
    margin-bottom: 12px;
}

.tenant-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 18px;
    margin-top: 18px;
}

.tenant-grid {
    display: grid;
    gap: 18px;
}

.tenant-section-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(250, 253, 254, 0.92);
    border: 1px solid rgba(82, 115, 132, 0.1);
}

.tenant-subsection {
    padding-top: 6px;
    border-top: 1px dashed rgba(82, 115, 132, 0.14);
}

.tenant-subsection-head {
    margin-bottom: 14px;
}

.tenant-subsection-head p,
.tenant-subsection-head span {
    margin: 0;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.compact-form {
    gap: 14px;
}

.form-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-block-span-2 {
    grid-column: span 2;
}

.field-block textarea,
.field-block select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(82, 115, 132, 0.18);
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-block textarea:focus,
.field-block select:focus {
    outline: 0;
    border-color: color-mix(in srgb, var(--tenant-primary) 46%, white);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tenant-primary) 12%, transparent);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.inline-form {
    display: inline-flex;
}

.tenant-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.tenant-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(82, 115, 132, 0.14);
    background: white;
    flex: 0 0 52px;
}

.tenant-logo-fallback {
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--tenant-primary);
    background: linear-gradient(135deg, rgba(0, 126, 167, 0.12), rgba(255, 184, 77, 0.22));
}

.domain-state-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(82, 115, 132, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    padding: 8px 12px 8px 8px;
    font: inherit;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.status-toggle.is-active {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--tenant-primary) 26%, white);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--tenant-primary) 12%, transparent);
}

.status-toggle-knob {
    position: relative;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: rgba(82, 115, 132, 0.18);
    flex: 0 0 46px;
}

.status-toggle-knob::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 6px 12px rgba(16, 51, 69, 0.18);
    transition: transform 140ms ease, background 140ms ease;
}

.status-toggle.is-active .status-toggle-knob {
    background: color-mix(in srgb, var(--tenant-primary) 70%, white);
}

.status-toggle.is-active .status-toggle-knob::after {
    transform: translateX(18px);
}

.tenant-stack,
.domain-list,
.tenant-domain-panel {
    display: grid;
    gap: 16px;
}

.tenant-domain-inline-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed rgba(82, 115, 132, 0.14);
}

.tenant-domain-inline-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(246, 251, 253, 0.94);
    border: 1px solid rgba(82, 115, 132, 0.1);
}

.upload-dropzone {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1.5px dashed color-mix(in srgb, var(--tenant-primary) 26%, white);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 248, 251, 0.94));
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    overflow: hidden;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within {
    border-color: color-mix(in srgb, var(--tenant-primary) 48%, white);
    box-shadow: 0 16px 32px color-mix(in srgb, var(--tenant-primary) 10%, transparent);
    transform: translateY(-1px);
}

.upload-dropzone span {
    font-weight: 700;
}

.upload-dropzone small {
    color: var(--muted);
    line-height: 1.5;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.brand-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.brand-preview-card {
    min-width: 180px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(246, 251, 253, 0.96);
    border: 1px solid rgba(82, 115, 132, 0.1);
}

.brand-preview-image,
.brand-preview-icon {
    display: block;
    margin-top: 12px;
    background: white;
    border: 1px solid rgba(82, 115, 132, 0.12);
}

.brand-preview-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 22px;
}

.brand-preview-icon {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 16px;
}

.domain-item,
.tenant-create-domain {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(82, 115, 132, 0.12);
    background: rgba(246, 251, 253, 0.94);
}

.table-card {
    border-radius: 20px;
    border: 1px solid rgba(82, 115, 132, 0.12);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.86);
}

.data-table thead th {
    font-size: 13px;
    color: var(--muted);
    background: rgba(235, 247, 250, 0.78);
}

.table-note-row td {
    padding-top: 0;
    background: rgba(248, 252, 253, 0.88);
}

.domain-note-stack {
    display: grid;
    gap: 4px;
}

.domain-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.domain-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.checkbox-line-compact {
    margin-top: -4px;
}

@media (max-width: 960px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        padding: 42px 24px 16px;
    }

    .auth-panel {
        padding: 20px 24px 40px;
    }

    .hero-highlights,
    .insight-strip {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .page-head-rich,
    .tenant-card-top,
    .tenant-section-head,
    .domain-item-head,
    .tenant-domain-inline-item {
        flex-direction: column;
    }

    .dashboard-grid,
    .tenant-columns,
    .form-grid-wide {
        grid-template-columns: 1fr;
    }

    .field-block-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        order: -1;
        min-height: auto;
        padding-top: 32px;
    }

    .login-card {
        padding: 24px;
    }

    .auth-hero {
        padding: 20px 24px 40px;
    }

    .auth-hero h1 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        padding: 22px;
    }

    .responsive-table {
        overflow: visible;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        padding: 12px 0;
        border-bottom: 1px solid #eee4cf;
    }

    .data-table td {
        border: 0;
        padding: 6px 0;
    }

    .data-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .table-note-row {
        display: none;
    }

    .table-actions,
    .domain-state-stack {
        gap: 8px;
    }

    .status-toggle {
        width: 100%;
        justify-content: center;
    }

    .tenant-cell {
        min-width: 0;
    }

    .modal-tabs {
        flex-direction: column;
    }
}
