:root {
    --bg: #f8fafc;
    --bg-gradient:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(22, 163, 74, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, #eef4f1 100%);
    --sidebar-bg: rgba(255, 255, 255, 0.88);
    --surface: rgba(255, 255, 255, 0.92);
    --surface-soft: #f8fafc;
    --surface-green: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(220, 252, 231, 0.92));
    --surface-dark: #0f172a;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --muted: #64748b;
    --muted-strong: #475569;
    --primary: #16a34a;
    --primary-strong: #15803d;
    --primary-soft: #dcfce7;
    --primary-soft-strong: #bbf7d0;
    --accent: #22c55e;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --success: #166534;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius: 18px;
    --radius-sm: 14px;
    --sidebar-width: 284px;
    --content-width: 1380px;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --font-heading: "Poppins", "Inter", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-gradient);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

.public-body {
    background: var(--bg-gradient);
}

.app-body {
    overflow-x: hidden;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.public-shell {
    min-height: 100vh;
    display: block;
    overflow-x: hidden;
}

@media (min-width: 1025px) {
    .public-shell {
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

.public-header {
    width: min(1280px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 0.75rem 0;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.public-page {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

@media (min-width: 1025px) {
    .public-page {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100vh;
    padding: 1.25rem 1rem;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(203, 213, 225, 0.72);
    backdrop-filter: blur(18px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.4rem 0.35rem 0.25rem;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.2);
}

.brand-copy {
    display: grid;
    gap: 0.1rem;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-sub {
    color: var(--muted);
    font-size: 0.82rem;
}

.sidebar-close,
.menu-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted-strong);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-close svg,
.menu-toggle svg,
.nav-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.sidebar-section {
    display: grid;
    gap: 0.7rem;
}

.sidebar-label {
    padding: 0 0.45rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 0.28rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.82rem 0.92rem;
    border-radius: 16px;
    color: var(--muted-strong);
    font-weight: 600;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
    background: rgba(241, 245, 249, 0.94);
    color: var(--text);
    transform: translateX(2px);
}

.nav-item-active {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.96), rgba(187, 247, 208, 0.78));
    color: var(--success);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    color: currentColor;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.92);
    box-shadow: var(--shadow-soft);
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.user-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    background: var(--surface-green);
    color: var(--success);
    font-weight: 700;
}

.user-copy {
    display: grid;
    gap: 0.12rem;
}

.user-copy strong {
    font-size: 0.95rem;
}

.user-copy span {
    color: var(--muted);
    font-size: 0.82rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 2.85rem;
    padding: 0.8rem 1.15rem;
    border: 0;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 16px 28px rgba(22, 163, 74, 0.24);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted-strong);
    border: 1px solid var(--border);
}

.btn.is-copied {
    background: rgba(220, 252, 231, 0.98);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.24);
}

.btn.is-copy-failed {
    background: rgba(254, 226, 226, 0.98);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.24);
}

.btn-full {
    width: 100%;
}

.app-main {
    min-width: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(248, 250, 252, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.topbar-copy {
    display: grid;
    gap: 0.1rem;
}

.topbar-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(220, 252, 231, 0.94);
    color: var(--success);
    font-size: 0.88rem;
    font-weight: 700;
}

.topbar-chip-soft {
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted-strong);
    border: 1px solid var(--border);
}

.app-backdrop {
    display: none;
}

.page {
    width: min(var(--content-width), calc(100% - 3rem));
    margin: 0 auto;
    padding: 1.5rem 0 2.75rem;
}

.flash-stack {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.flash {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 500;
}

.flash-success {
    color: var(--success);
    border-color: rgba(22, 101, 52, 0.14);
    background: rgba(220, 252, 231, 0.88);
}

.flash-danger {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.16);
    background: rgba(254, 226, 226, 0.9);
}

.flash-warning {
    color: var(--warning);
    border-color: rgba(217, 119, 6, 0.16);
    background: rgba(254, 243, 199, 0.92);
}

.card {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.panel-card,
.form-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.hero-card,
.auth-card,
.bridge,
.error-card,
.stat-card,
.content-grid>.card {
    padding: 1.5rem;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.9fr);
    gap: 1.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.9));
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-content: flex-start;
    justify-content: flex-end;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.58rem 0.82rem;
    border-radius: 999px;
    background: rgba(220, 252, 231, 0.98);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.12);
    font-size: 0.88rem;
    font-weight: 700;
}

.eyebrow {
    margin: 0 0 0.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 700;
}

h1,
h2 {
    margin: 0 0 0.65rem;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

h2 {
    font-size: 1.18rem;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

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

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
}

.stat-card p {
    margin: 0 0 0.4rem;
}

.stat-card h2 {
    margin: 0;
    font-size: 2rem;
}

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

.content-grid-dashboard>.card:last-child {
    grid-column: 1 / -1;
}

.section-head {
    margin-bottom: 1rem;
}

.section-head-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.toolbar-tight {
    margin-top: 0.75rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.form-grid label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted-strong);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.filters-grid input,
.filters-grid select,
.inline-card input {
    width: 100%;
    min-height: 3rem;
    padding: 0.82rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-grid textarea {
    min-height: 8rem;
    resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.filters-grid input:focus,
.filters-grid select:focus,
.inline-card input:focus {
    outline: none;
    border-color: rgba(22, 163, 74, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.check-row input {
    width: auto;
    min-height: auto;
}

.switch-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--muted-strong);
    font-weight: 600;
    cursor: pointer;
}

.form-grid .switch-field {
    display: inline-flex;
}

.switch-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.switch-ui {
    position: relative;
    display: inline-flex;
    width: 2.8rem;
    height: 1.6rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.95);
    transition: background 160ms ease, box-shadow 160ms ease;
}

.switch-ui::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.24rem;
    height: 1.24rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
    transition: transform 160ms ease;
}

.switch-field input:checked+.switch-ui {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.switch-field input:checked+.switch-ui::after {
    transform: translateX(1.18rem);
}

.switch-field input:focus-visible+.switch-ui {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.switch-field-card {
    align-items: flex-start;
    width: 100%;
    justify-content: flex-start;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
}

.switch-field-card small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.switch-field-tight {
    gap: 0.55rem;
    font-size: 0.88rem;
}

.switch-field-tight .switch-ui {
    width: 2.45rem;
    height: 1.42rem;
}

.switch-field-tight .switch-ui::after {
    top: 0.14rem;
    left: 0.14rem;
    width: 1.14rem;
    height: 1.14rem;
}

.switch-field-tight input:checked+.switch-ui::after {
    transform: translateX(1.03rem);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.filters-grid label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted-strong);
    font-weight: 500;
}

.filter-actions {
    margin-top: 0;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    position: static;
    top: auto;
    z-index: 1;
    padding: 0.92rem 1rem;
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.data-table thead th:first-child {
    border-top-left-radius: 14px;
}

.data-table thead th:last-child {
    border-top-right-radius: 14px;
}

.data-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}

.data-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.6);
}

.data-table tbody tr:hover td {
    background: rgba(240, 253, 244, 0.5);
}

.data-table a {
    color: var(--primary-strong);
    font-weight: 600;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.detail-list>div {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.88);
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.detail-list dd {
    margin: 0.45rem 0 0;
    font-weight: 700;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-active {
    color: var(--success);
    background: rgba(220, 252, 231, 0.96);
}

.status-inactive {
    color: var(--danger);
    background: rgba(254, 226, 226, 0.94);
}

.status-neutral {
    color: var(--warning);
    background: rgba(254, 243, 199, 0.96);
}

.btn-sm {
    min-height: 2.2rem;
    padding: 0.5rem 0.85rem;
    border-radius: 12px;
    font-size: 0.88rem;
}

.campaign-list-table thead th {
    position: static;
    top: auto;
    z-index: auto;
    white-space: nowrap;
}

.campaign-list-table tbody td {
    padding: 1.25rem 0.95rem;
    vertical-align: middle;
    background: transparent;
}

.campaign-list-table tbody tr:nth-child(even) td {
    background: transparent;
}

.campaign-list-table tbody tr:hover td {
    background: rgba(240, 253, 244, 0.72);
}

.campaign-cell {
    display: grid;
    gap: 0.1rem;
}

.campaign-name {
    font-size: 0.96rem;
    font-weight: 700;
}

.campaign-description {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.campaign-slug {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    background: rgba(248, 250, 252, 0.96);
    color: #64748b;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8rem;
}

.preview-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.campaign-list-table .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted-strong);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.campaign-list-table .icon-btn svg {
    width: 1rem;
    height: 1rem;
}

.campaign-list-table .icon-btn:hover {
    border-color: rgba(22, 163, 74, 0.3);
    background: rgba(240, 253, 244, 0.95);
    color: var(--primary-strong);
    transform: translateY(-1px);
}

.campaign-list-table [data-tooltip] {
    position: relative;
}

.campaign-list-table [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.4rem);
    transform: translate(-50%, 4px);
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 15;
}

.campaign-list-table [data-tooltip]::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.17rem);
    width: 0.45rem;
    height: 0.45rem;
    background: #0f172a;
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    transition: opacity 140ms ease;
    pointer-events: none;
    z-index: 14;
}

.campaign-list-table [data-tooltip]:hover::after,
.campaign-list-table [data-tooltip]:hover::before {
    opacity: 1;
}

.campaign-list-table [data-tooltip]:hover::after {
    transform: translate(-50%, 0);
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.33rem 0.6rem;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.78);
    color: #334155;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.operator-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.operator-avatars {
    display: inline-flex;
    align-items: center;
    padding-left: 0.3rem;
}

.operator-avatar {
    display: inline-grid;
    place-items: center;
    width: 1.68rem;
    height: 1.68rem;
    margin-left: -0.3rem;
    border-radius: 999px;
    border: 2px solid #fff;
    background: rgba(22, 163, 74, 0.16);
    color: var(--success);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
}

.operator-avatar:first-child {
    margin-left: 0;
}

.operator-avatar-more {
    background: rgba(226, 232, 240, 0.94);
    color: #475569;
}

.operator-avatar-empty {
    background: rgba(226, 232, 240, 0.6);
    color: #64748b;
}

.operator-meta {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.click-cell {
    display: grid;
    gap: 0.12rem;
}

.click-value {
    font-size: 1rem;
    line-height: 1.1;
}

.click-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: max-content;
    padding: 0.15rem 0.42rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.click-trend-up {
    background: rgba(220, 252, 231, 0.98);
    color: var(--success);
}

.click-trend-flat {
    background: rgba(226, 232, 240, 0.86);
    color: #64748b;
}

.status-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
}

.campaign-list-table .status-pill {
    min-width: 4.85rem;
    justify-content: center;
    padding: 0.34rem 0.58rem;
    font-size: 0.74rem;
}

.campaign-list-table .status-active {
    color: #166534;
    background: rgba(220, 252, 231, 0.98);
}

.campaign-list-table .status-inactive {
    color: #475569;
    background: rgba(226, 232, 240, 0.88);
}

.status-toggle {
    display: inline-flex;
    position: relative;
    cursor: pointer;
}

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

.status-toggle-ui {
    position: relative;
    width: 2.3rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.72);
    transition: background 180ms ease;
}

.status-toggle-ui::after {
    content: "";
    position: absolute;
    top: 0.14rem;
    left: 0.14rem;
    width: 1.07rem;
    height: 1.07rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
    transition: transform 180ms ease;
}

.status-toggle input:checked+.status-toggle-ui {
    background: rgba(34, 197, 94, 0.72);
}

.status-toggle input:checked+.status-toggle-ui::after {
    transform: translateX(0.95rem);
}

.status-toggle input:focus-visible+.status-toggle-ui {
    outline: 2px solid rgba(34, 197, 94, 0.4);
    outline-offset: 2px;
}

.action-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-action-primary {
    min-width: 3.65rem;
}

.menu-wrap {
    position: relative;
}

.menu-trigger {
    color: #334155;
}

.kebab-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 18;
    display: none;
    min-width: 160px;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.kebab-menu:not([hidden]) {
    display: grid;
}

.kebab-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2rem;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted-strong);
    font-size: 0.83rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.kebab-item:hover {
    background: rgba(241, 245, 249, 0.88);
}

.kebab-item-disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.kebab-item-disabled:hover {
    background: transparent;
}

.kebab-item-danger {
    color: #b91c1c;
}

.campaign-toast {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 60;
    max-width: min(320px, calc(100vw - 2rem));
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(22, 101, 52, 0.2);
    background: rgba(220, 252, 231, 0.98);
    color: #166534;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.campaign-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.campaign-toast.is-error {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(254, 226, 226, 0.98);
    color: #b91c1c;
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-list {
    display: grid;
    gap: 0.9rem;
}

.report-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.82);
}

.report-label {
    display: grid;
    gap: 0.15rem;
}

.report-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.95);
    overflow: hidden;
}

.report-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #4ade80);
}

.truncate-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-card {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)) auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.86);
}

.inline-card label {
    display: grid;
    gap: 0.45rem;
}

.nested-card {
    margin: 0;
    padding: 1.25rem;
    background: rgba(248, 250, 252, 0.9);
}

.assignment-card {
    grid-column: 1 / -1;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 0.9rem;
    padding: 1.35rem;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.96));
}

.empty-state-center {
    justify-items: center;
    text-align: center;
}

.empty-state-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    background: rgba(220, 252, 231, 0.98);
    color: var(--success);
}

.empty-state-icon svg {
    width: 1.4rem;
    height: 1.4rem;
}

.empty-state h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.empty-state p {
    margin: 0;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.helper-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.helper-list li {
    color: var(--muted-strong);
    padding-left: 1.15rem;
    position: relative;
}

.helper-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58rem;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--accent);
}

.field-hint {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.link-preview-panel {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(34, 197, 94, 0.16);
    border-radius: 18px;
    background: rgba(240, 253, 244, 0.85);
}

.link-preview-panel .preview-link {
    font-size: 0.96rem;
}

.assignment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.55rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 600;
}

.summary-chip strong {
    color: var(--text);
}

.table-wrap {
    overflow-x: auto;
}

.table-wrap .data-table {
    min-width: 720px;
}

.preview-link {
    margin: 0;
    word-break: break-word;
    font-weight: 600;
}

.preview-link a {
    color: var(--primary-strong);
}

.assignment-table {
    min-width: 920px;
}

.assignment-table input,
.assignment-table select {
    width: 100%;
}

.assignment-table td>label {
    display: grid;
    gap: 0.45rem;
}

.assignment-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.assignment-operator-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.assignment-operator-card.is-selected {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.88));
    box-shadow: 0 16px 32px rgba(22, 163, 74, 0.08);
}

.assignment-operator-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.assignment-operator-copy {
    display: grid;
    gap: 0.2rem;
}

.assignment-operator-copy strong {
    font-size: 1rem;
}

.assignment-operator-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.assignment-operator-meta .muted {
    line-height: 1.35;
}

.assignment-operator-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: flex-end;
}

.assignment-settings {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.assignment-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.assignment-settings-grid-compact {
    gap: 0.75rem;
}

.assignment-settings-grid label,
.schedule-custom-panel label {
    display: grid;
    gap: 0.45rem;
}

.compact-field span {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.compact-field input,
.compact-field select {
    min-height: 2.55rem;
    padding: 0.68rem 0.82rem;
}

.schedule-custom-panel {
    display: grid;
    gap: 0.75rem;
    padding: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
}

.schedule-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.check-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    font-size: 0.88rem;
}

.check-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.1rem;
    padding: 0 0.65rem;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.check-chip input:checked+span {
    background: rgba(220, 252, 231, 0.98);
    border-color: rgba(34, 197, 94, 0.22);
    color: var(--success);
    font-weight: 700;
}

.check-chip-compact {
    padding: 0.2rem;
}

.check-chip-compact span {
    min-width: 2.7rem;
    min-height: 2.2rem;
    padding: 0 0.7rem;
}

.schedule-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.bridge-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    /* Offset any top padding from parent if needed */
    margin-top: -2rem;
}

.bridge {
    max-width: 540px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 40px -4px rgba(0, 0, 0, 0.08);
    border-radius: 32px;
    padding: 3rem 2.5rem;
    text-align: center;
}

.bridge-visual {
    margin-bottom: 2rem;
}

.bridge-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border: 4px solid rgba(22, 163, 74, 0.08);
    border-top: 4px solid var(--primary);
    border-right: 4px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.bridge-content {
    margin-bottom: 2.5rem;
}

.bridge-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.01em;
    margin-bottom: 0.5rem;
}

.bridge-operator-name {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 6vw, 2.8rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.bridge-meta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.pill {
    background: rgba(241, 245, 249, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.pill-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.pill-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.bridge-timer {
    max-width: 320px;
    margin: 0 auto;
}

.countdown {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.countdown strong {
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

.progress-bar {
    height: 6px;
    background: rgba(226, 232, 240, 0.6);
    border-radius: 10px;
    overflow: hidden;
}

.progress-track {
    height: 100%;
    background: var(--primary);
    width: 0;
    animation: progress linear forwards;
}

@keyframes progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

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

.bridge-actions,
.error-actions {
    justify-content: center;
}

.auth-wrap {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(500px, 100%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

@media (max-width: 1120px) {

    .content-grid,
    .hero-card {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(88vw, 320px);
        transform: translateX(-105%);
        transition: transform 180ms ease;
        box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    }

    .nav-toggle:checked~.app-shell .app-sidebar {
        transform: translateX(0);
    }

    .app-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(15, 23, 42, 0.36);
        opacity: 0;
        visibility: hidden;
        transition: opacity 160ms ease, visibility 160ms ease;
    }

    .nav-toggle:checked~.app-shell .app-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle,
    .sidebar-close {
        display: inline-flex;
    }

    .page {
        width: min(var(--content-width), calc(100% - 1.5rem));
        padding: 1rem 0 2rem;
    }

    .app-topbar {
        padding: 0.95rem 1rem;
    }

    .topbar-title {
        font-size: 1.15rem;
    }

    .topbar-right {
        gap: 0.55rem;
    }
}

@media (max-width: 760px) {
    .public-shell {
        padding: 1rem;
    }

    .public-header,
    .public-page {
        width: min(1120px, calc(100% - 1rem));
    }

    .stats-grid,
    .detail-list,
    .filters-grid,
    .compact-grid,
    .inline-card,
    .report-row,
    .schedule-time-grid {
        grid-template-columns: 1fr;
    }

    .section-head-inline,
    .action-row,
    .toolbar,
    .topbar-left,
    .topbar-right {
        align-items: stretch;
    }

    .section-head-inline,
    .action-row {
        flex-direction: column;
    }

    .topbar-left {
        flex-direction: row;
        align-items: center;
    }

    .topbar-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .schedule-days-grid {
        gap: 0.45rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .table-wrap .table-stack-mobile {
        min-width: 100%;
    }

    .table-stack-mobile thead {
        display: none;
    }

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

    .table-stack-mobile tbody {
        display: grid;
        gap: 0.9rem;
    }

    .table-stack-mobile tbody tr {
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(248, 250, 252, 0.96);
        overflow: hidden;
    }

    .table-stack-mobile tbody td {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    }

    .table-stack-mobile tbody td:last-child {
        border-bottom: 0;
    }

    .table-stack-mobile tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.38rem;
        color: var(--muted);
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .table-stack-mobile tbody tr:nth-child(even) td,
    .table-stack-mobile tbody tr:hover td {
        background: transparent;
    }

    .table-stack-mobile .schedule-days-grid {
        gap: 0.45rem;
    }

    .table-stack-mobile .check-row {
        justify-content: flex-start;
    }

    .campaign-list-table .status-cell,
    .campaign-list-table .action-cell {
        display: flex;
        justify-content: flex-start;
    }

    .campaign-list-table .menu-wrap {
        width: 100%;
    }

    .campaign-list-table .kebab-menu {
        position: static;
        margin-top: 0.35rem;
        width: 100%;
    }

    .campaign-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .assignment-operator-head,
    .assignment-operator-switches {
        flex-direction: column;
        align-items: flex-start;
    }

    .assignment-compact-grid,
    .assignment-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {

    .page,
    .public-page {
        width: min(1120px, calc(100% - 0.75rem));
    }

    .panel-card,
    .form-card,
    .hero-card,
    .auth-card,
    .bridge,
    .error-card,
    .stat-card,
    .content-grid>.card {
        padding: 1.1rem;
    }

    .topbar-chip {
        min-height: 2.15rem;
        padding: 0.42rem 0.72rem;
    }

    .empty-state,
    .link-preview-panel {
        padding: 1rem;
    }

    .check-chip-compact {
        flex: 1 0 calc(33.333% - 0.35rem);
        justify-content: center;
    }

    .bridge-operator-name {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }
}

/* ==========================================================================
   Premium Landing Page Styles (SaaS Aesthetic)
   ========================================================================== */
.public-shell:has(.hero-premium) {
    background-color: #ffffff;
    /* Override body bg for premium */
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-premium {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    overflow: hidden;
}

@media (min-width: 1025px) {
    .hero-premium {
        flex: 1;
        min-height: 0;
        padding: 2vh 1.5rem;
    }
}

.hero-premium-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: drift 20s infinite alternate ease-in-out;
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: var(--primary);
}

.glow-2 {
    bottom: -100px;
    right: -100px;
    background: #8b5cf6;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.2);
    }
}

.hero-premium-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-strong);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-title-max {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 640px;
    margin-inline: auto;
}

@media (min-width: 1025px) {
    .hero-subtitle {
        font-size: clamp(1rem, 1.8vh, 1.2rem);
        margin-bottom: 2vh;
    }
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-xl {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
}

.btn-premium {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
    transition: all 0.2s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.btn-premium svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease;
}

.btn-premium:hover svg {
    transform: translateX(4px);
}

.fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- REDESIGN LAYOUT --- */
.hero-premium-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 4rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    text-align: left;
}

@media (max-width: 1024px) {
    .hero-premium-layout {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 3rem;
    }
}

.hero-media {
    position: relative;
    width: 100%;
    z-index: 2;
    filter: drop-shadow(0 25px 45px rgba(22, 163, 74, 0.15));
    border-radius: 16px;
    transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.hero-media:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.hero-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.public-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.public-nav {
    display: none;
}

@media (min-width: 768px) {
    .public-nav {
        display: flex;
        gap: 2rem;
        align-items: center;
    }
}

/* --- PURE CSS MOCKUP --- */
.mockup-window {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    overflow: hidden;
}

.mockup-sidebar {
    width: 22%;
    background: #f8fafc;
    border-right: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.mockup-logo {
    width: 75%;
    height: 1.4rem;
    background: var(--primary-soft-strong);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.mockup-nav-item {
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.mockup-nav-item.mockup-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

.mockup-nav-item svg {
    width: 14px;
    height: 14px;
}

.mockup-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.mockup-header {
    height: 4rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.mockup-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.mockup-user {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted-strong);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mockup-user-avatar {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--primary-soft-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-strong);
    font-weight: 700;
    font-size: 0.85rem;
}

.mockup-user {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: rgba(203, 213, 225, 0.5);
}

.mockup-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.mockup-stats {
    display: flex;
    gap: 1.2rem;
}

.mockup-stat-card {
    flex: 1;
    height: 5.5rem;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.mockup-stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mockup-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-heading);
}

.mockup-stat-card.highlight .mockup-stat-value {
    color: var(--primary);
}

.mockup-chart {
    flex: 1;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    gap: 1.5rem;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.mockup-chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(22, 163, 74, 0.2) 100%);
    border-radius: 6px 6px 0 0;
    opacity: 0.9;
}

/* --- REPLACED INLINE STYLES --- */
.hero-premium-layout .hero-subtitle {
    margin-left: 0;
    max-width: 100%;
}

.hero-premium-layout .hero-actions {
    justify-content: flex-start;
}

.hero-premium-pills {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-pill {
    /* override any margin if exists */
    margin-bottom: 0;
    margin-left: 0;
}


.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.avatars {
    display: flex;
}

.public-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.public-actions .login-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.public-actions .start-btn {
    min-height: 2.2rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.public-footer {
    padding: 2rem 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    text-align: center;
    background: #fff;
}

@media (min-width: 1025px) {
    .public-footer {
        padding: 1.5vh 1rem;
    }
}

.public-footer p {
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 500;
}

/* --- MOBILE RESPONSIVENESS OVERRIDES --- */
@media (max-width: 560px) {

    /* Header adjustments */
    .public-actions {
        gap: 0.75rem;
    }

    .public-actions .login-link {
        font-size: 0.85rem;
    }

    .public-actions .start-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .brand-name {
        font-size: 1.05rem;
        /* tight fit for mobile */
    }

    /* Hero section adjustments */
    .hero-premium {
        padding: 3rem 1rem;
    }

    .hero-media {
        transform: none !important;
        /* reset rotation to prevent clipping */
    }

    .hero-title-max {
        font-size: clamp(2.2rem, 9vw, 2.8rem);
        margin-bottom: 1.25rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2rem;
        padding-right: 0.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem !important;
    }

    .hero-premium-layout {
        gap: 2.5rem;
    }

    /* Mockup Responsive Tweaks */
    .mockup-window {
        aspect-ratio: auto;
        min-height: 400px;
    }

    @media (min-width: 1025px) {
        .mockup-window {
            height: 35vh;
            min-height: 300px;
        }
    }

    .mockup-sidebar {
        display: none;
        /* Hide sidebar in mockup on narrow mobile */
    }

    .mockup-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .mockup-stat-card {
        height: auto;
        padding: 0.75rem;
    }

    .mockup-chart {
        gap: 0.5rem;
        padding: 1rem;
    }

    .mockup-chart-bar {
        border-radius: 4px 4px 0 0;
    }
}