@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-page: #f4f7fb;
    --bg-page-deep: #ecf1f8;
    --bg-surface: #ffffff;
    --bg-surface-strong: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-deep: #111c33;
    --border-soft: #e3eaf3;
    --border-mid: #d4deea;
    --text-primary: #162338;
    --text-secondary: #637a91;
    --text-muted: #93a6b9;
    --brand: #2563eb;
    --brand-deep: #1d4ed8;
    --brand-soft: #e9f1ff;
    --brand-ghost: rgba(37, 99, 235, 0.08);
    --accent: #10b981;
    --success: #17935f;
    --warning: #c47b18;
    --danger: #dc4d41;
    --info: #4f6cf7;
    --sidebar-width: 252px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 22px 48px rgba(15, 23, 42, 0.10);
    --content-max: 1500px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-primary);
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 28%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.05), transparent 24%),
        linear-gradient(180deg, #f9fbfd 0%, var(--bg-page) 58%, var(--bg-page-deep) 100%);
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-sidebar-deep) 100%);
    color: #d8e3f2;
    padding: 18px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 20;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f8dff 0%, var(--brand) 58%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(216, 227, 242, 0.58);
}

.brand-name {
    font-size: 1.12rem;
    font-weight: 700;
    color: #f8fbff;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 15px;
}

.sidebar-card-title {
    margin: 0 0 6px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(216, 227, 242, 0.50);
}

.sidebar-card-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fbff;
}

.sidebar-card-note {
    margin: 8px 0 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: rgba(216, 227, 242, 0.72);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
}

.nav-section-label {
    padding: 12px 10px 4px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(216, 227, 242, 0.42);
}

.nav-link-custom {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    text-decoration: none;
    color: rgba(216, 227, 242, 0.82);
    transition: all 0.18s ease;
}

.nav-link-custom:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-link-custom.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.16));
    border-color: rgba(96, 165, 250, 0.26);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-link-custom.active .nav-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #d8e3f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-title {
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-subtitle {
    font-size: 0.75rem;
    color: rgba(216, 227, 242, 0.54);
}

.user-badge-sidebar {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-badge-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fbff;
}

.user-badge-role {
    display: inline-flex;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.18);
    color: #dbeafe;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mobile-topbar {
    display: none;
}

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 24px 14px;
    background: rgba(249, 251, 253, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
}

.header-title {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.header-meta {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.header-pill-strong {
    color: var(--text-primary);
    font-weight: 700;
}

.content-body {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding: 18px 24px 28px;
}

.glass-panel,
.hero-panel,
.stat-card,
.dashboard-grid-card,
.info-card,
.auth-shell,
.auth-form-card,
.auth-visual-card,
.module-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.glass-panel,
.module-card,
.dashboard-grid-card,
.hero-panel {
    border-radius: 20px;
}

.glass-panel {
    padding: 22px;
    margin-bottom: 20px;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 18px;
    padding: 24px;
    margin-bottom: 22px;
}

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.hero-copy {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.72;
    color: var(--text-secondary);
    max-width: 64ch;
}

.hero-badges,
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid #d8e7ff;
    color: var(--brand-deep);
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-aside {
    display: grid;
    gap: 14px;
}

.info-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.info-card-label {
    margin: 0 0 10px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.info-card-value {
    font-size: 1.32rem;
    font-weight: 700;
    color: var(--text-primary);
}

.info-card-note {
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.58;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    border-radius: 18px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: var(--brand);
}

.stat-card.sent::before { background: var(--success); }
.stat-card.pending::before { background: var(--warning); }
.stat-card.failed::before { background: var(--danger); }
.stat-card.postponed::before { background: var(--accent); }

.stat-label {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f4f8fd;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.stat-value {
    display: block;
    margin-top: 16px;
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    line-height: 1;
    font-weight: 700;
}

.stat-note {
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.56;
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
    gap: 22px;
}

.dashboard-grid-card {
    padding: 22px;
}

.section-heading,
.module-header,
.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.section-heading,
.module-header {
    margin-bottom: 18px;
}

.page-intro {
    margin-bottom: 22px;
}

.section-title,
.module-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.2;
}

.page-title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.section-copy,
.module-copy,
.page-copy {
    color: var(--text-secondary);
}

.section-copy,
.module-copy {
    margin: 8px 0 0;
    line-height: 1.58;
    font-size: 0.92rem;
}

.page-copy {
    margin: 8px 0 0;
    max-width: 68ch;
    font-size: 0.93rem;
    line-height: 1.64;
}

.page-intro-tight {
    margin-bottom: 16px;
}

.page-actions,
.inline-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.metric-list,
.panel-stack {
    display: grid;
    gap: 12px;
}

.panel-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 15px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid var(--border-soft);
}

.metric-row-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.metric-row-value {
    font-weight: 700;
    color: var(--text-primary);
}

.custom-table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: #ffffff;
}

.custom-table {
    width: 100%;
    min-width: 740px;
    border-collapse: collapse;
}

.custom-table th {
    padding: 14px 16px;
    background: #f7fafe;
    color: var(--text-secondary);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 1px solid var(--border-soft);
}

.custom-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: top;
    font-size: 0.92rem;
}

.custom-table tbody tr:hover {
    background: #f9fbff;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
}

.status-badge.sent { background: rgba(23, 147, 95, 0.10); color: var(--success); border-color: rgba(23, 147, 95, 0.14); }
.status-badge.pending { background: rgba(196, 123, 24, 0.10); color: var(--warning); border-color: rgba(196, 123, 24, 0.16); }
.status-badge.failed { background: rgba(220, 77, 65, 0.10); color: var(--danger); border-color: rgba(220, 77, 65, 0.16); }
.status-badge.postponed { background: rgba(79, 108, 247, 0.10); color: var(--info); border-color: rgba(79, 108, 247, 0.14); }
.status-badge.sending { background: rgba(16, 185, 129, 0.10); color: var(--accent); border-color: rgba(16, 185, 129, 0.14); }
.status-badge.draft,
.status-badge.cancelled,
.status-badge.paused { background: rgba(99, 122, 145, 0.10); color: var(--text-secondary); border-color: rgba(99, 122, 145, 0.14); }

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-control-custom {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-mid);
    background: #ffffff;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: #8bb5ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    background: #ffffff;
}

.form-check-custom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-custom input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn-custom:hover {
    transform: translateY(-1px);
}

.btn-primary-custom {
    background: linear-gradient(180deg, #3b82f6 0%, var(--brand) 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.btn-secondary-custom {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-soft);
}

.btn-danger-custom {
    background: rgba(220, 77, 65, 0.10);
    color: var(--danger);
    border-color: rgba(220, 77, 65, 0.14);
}

.btn-success-custom {
    background: rgba(23, 147, 95, 0.10);
    color: var(--success);
    border-color: rgba(23, 147, 95, 0.14);
}

.btn-action-sm {
    min-height: 36px;
    padding: 8px 13px;
    font-size: 0.81rem;
}

.alert-custom {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(23, 147, 95, 0.08);
    color: var(--success);
    border-color: rgba(23, 147, 95, 0.14);
}

.alert-danger {
    background: rgba(220, 77, 65, 0.08);
    color: var(--danger);
    border-color: rgba(220, 77, 65, 0.14);
}

.form-shell {
    width: min(860px, 100%);
    margin: 0 auto;
}

.form-columns,
.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.filter-bar {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-grow {
    flex: 1 1 220px;
}

.filter-fixed {
    width: 220px;
    max-width: 100%;
}

.helper-text {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.validation-text {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--danger);
}

.note-box {
    padding: 16px 18px;
    border-radius: 16px;
    background: #f5f9ff;
    border: 1px solid #dbe7fb;
}

.note-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-deep);
}

.note-box p,
.note-box div {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.58;
    color: var(--text-secondary);
}

.note-box code,
.code-preview {
    font-family: Consolas, monospace;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.kpi-card {
    padding: 16px;
    border-radius: 16px;
    background: #f9fbff;
    border: 1px solid var(--border-soft);
}

.kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.kpi-value {
    margin-top: 10px;
    font-size: 1.45rem;
    font-weight: 700;
}

.progress-shell {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #f2f6fb;
    border: 1px solid var(--border-soft);
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand) 0%, #22c55e 100%);
}

.code-preview {
    padding: 16px;
    border-radius: 16px;
    background: #f7fafd;
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
    font-size: 0.84rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
}

.list-meta {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.table-inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 40px 20px 24px;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #edf4ff;
    border: 1px solid #d8e5fb;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-deep);
    letter-spacing: 0.08em;
}

.empty-state-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-state-copy {
    line-height: 1.65;
    font-size: 0.92rem;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.auth-shell {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(390px, 1fr) minmax(0, 1fr);
    gap: 18px;
    border-radius: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-md);
}

.auth-form-card,
.auth-visual-card {
    border-radius: 20px;
    padding: 30px;
}

.auth-form-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.auth-visual-card {
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.auth-kicker {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--brand);
    font-weight: 700;
}

.auth-title {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 3vw, 2.4rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--text-secondary);
    line-height: 1.68;
    font-size: 0.96rem;
}

.auth-visual-title {
    margin: 14px 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
    max-width: 12ch;
    font-weight: 700;
}

.auth-visual-copy {
    margin: 0;
    max-width: 46ch;
    line-height: 1.74;
    color: var(--text-secondary);
    font-size: 0.96rem;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.auth-feature {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-soft);
}

.auth-feature-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-feature-copy {
    line-height: 1.55;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.auth-mini-note {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f5f9ff;
    border: 1px solid #dbe7fb;
    color: var(--brand-deep);
    line-height: 1.58;
    font-size: 0.9rem;
}

.auth-mini-note strong {
    display: block;
    margin-bottom: 6px;
}

.auth-link-row {
    margin-top: 18px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.auth-link-row a {
    color: var(--brand-deep);
    font-weight: 700;
    text-decoration: none;
}

.auth-shell-single {
    width: min(460px, 100%);
    display: block;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.auth-shell-single .auth-form-card {
    padding: 34px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.mobile-overlay {
    display: none;
}

.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .hero-panel,
    .dashboard-grid,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 25;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 18px;
        background: rgba(15, 23, 42, 0.96);
        color: #e7eef8;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        width: min(86vw, 320px);
        height: 100dvh;
        box-shadow: 24px 0 60px rgba(15, 23, 42, 0.32);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 19;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        display: block;
    }

    body.nav-open .mobile-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .header {
        position: static;
        padding: 22px 20px 14px;
        align-items: flex-start;
    }

    .header-actions {
        display: none;
    }

    .content-body {
        padding: 20px 20px 30px;
    }

    .panel-grid,
    .form-columns,
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .stats-grid,
    .auth-feature-grid {
        grid-template-columns: 1fr;
    }

    .glass-panel,
    .hero-panel,
    .dashboard-grid-card,
    .auth-form-card,
    .auth-visual-card,
    .auth-shell,
    .module-card {
        padding: 18px;
        border-radius: 18px;
    }

    .auth-container {
        padding: 16px;
    }

    .auth-shell-single .auth-form-card {
        padding: 24px;
        border-radius: 20px;
    }

    .custom-table {
        min-width: 620px;
    }

    .section-heading,
    .page-intro,
    .module-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.dashboard-overview-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.overview-tile {
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.overview-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.overview-value {
    margin-top: 10px;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
}

.overview-copy {
    margin-top: 6px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.stat-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.data-list {
    display: grid;
    gap: 12px;
}

.data-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}

.data-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.data-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.data-copy {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.form-section-divider {
    height: 1px;
    margin: 8px 0 20px;
    background: linear-gradient(90deg, transparent 0%, var(--border-soft) 18%, var(--border-soft) 82%, transparent 100%);
}

.module-card > .custom-table-container {
    margin-top: 4px;
}

@media (max-width: 1180px) {
    .dashboard-overview-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-overview-strip {
        grid-template-columns: 1fr;
    }
}

.auth-shell-standard {
    margin: 0 auto;
}

.auth-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.auth-login-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f8dff 0%, var(--brand) 58%, #0ea5e9 100%);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.auth-shell-standard .auth-title {
    margin: 2px 0 0;
    font-size: clamp(1.85rem, 3vw, 2.2rem);
}

.auth-login-row {
    margin-bottom: 22px;
}

.auth-login-check {
    color: var(--text-secondary);
    font-size: 0.92rem;
    cursor: pointer;
}

.auth-login-note {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.auth-login-submit {
    width: 100%;
}

.dashboard-page-head {
    margin-bottom: 18px;
}

.dashboard-overview-strip-standard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid-standard {
    align-items: start;
}

.dashboard-grid-standard .dashboard-grid-card {
    min-height: 100%;
}

@media (max-width: 1180px) {
    .dashboard-overview-strip-standard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-overview-strip-standard {
        grid-template-columns: 1fr;
    }
}

.sidebar-close {
    display: none;
    margin-left: auto;
}

.sidebar .mobile-menu-toggle {
    display: none;
}

.table-primary {
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-side-stack {
    display: grid;
    gap: 16px;
}

.dashboard-side-panel {
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--border-soft);
}

.quick-link-list {
    display: grid;
    gap: 10px;
}

.quick-link-item {
    display: block;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: #ffffff;
    text-decoration: none;
}

.quick-link-item:hover {
    background: #f8fbff;
}

.quick-link-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quick-link-copy {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.empty-state-compact {
    padding: 34px 20px;
}

.overview-tile-alert {
    border-color: #f3d7d4;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f7 100%);
}

@media (max-width: 920px) {
    .sidebar .mobile-menu-toggle,
    .sidebar-close {
        display: inline-flex;
    }
}

:root {
    --sidebar-width: 250px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
}

body {
    background: #f4f6f9;
}

.sidebar {
    padding: 12px 10px 14px;
    gap: 10px;
}

.brand-section {
    padding: 8px 10px 10px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    box-shadow: none;
}

.brand-name {
    font-size: 1.05rem;
}

.sidebar-card {
    border-radius: 8px;
    padding: 12px;
}

.sidebar-card-minimal {
    background: rgba(255,255,255,0.04);
}

.sidebar-nav {
    gap: 2px;
}

.nav-link-custom {
    padding: 10px 10px;
    border-radius: 8px;
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-subtitle {
    display: none;
}

.user-badge-sidebar {
    padding-top: 12px;
}

.user-badge-role {
    border-radius: 6px;
}

.header {
    padding: 12px 20px;
    background: #ffffff;
    backdrop-filter: none;
}

.header-title {
    font-size: 1.6rem;
}

.header-pill {
    padding: 7px 10px;
    border-radius: 6px;
    box-shadow: none;
}

.content-body {
    padding: 16px 20px 24px;
}

.module-card,
.dashboard-grid-card,
.glass-panel,
.hero-panel,
.info-card,
.stat-card,
.overview-tile,
.dashboard-side-panel,
.quick-link-item,
.auth-form-card,
.login-box-standard {
    border-radius: 8px;
    box-shadow: none;
}

.module-card,
.dashboard-grid-card,
.glass-panel {
    padding: 16px;
}

.page-title {
    font-size: 1.5rem;
}

.page-copy,
.section-copy,
.module-copy {
    font-size: 0.9rem;
}

.dashboard-overview-strip {
    gap: 12px;
    margin-bottom: 16px;
}

.overview-tile {
    padding: 14px 16px;
}

.overview-value {
    font-size: 1.9rem;
}

.dashboard-grid {
    gap: 16px;
}

.dashboard-grid-card {
    padding: 16px;
}

.custom-table-container {
    border-radius: 6px;
}

.custom-table th {
    padding: 11px 14px;
    background: #f8f9fa;
}

.custom-table td {
    padding: 11px 14px;
}

.btn-custom {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 6px;
}

.btn-action-sm {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.form-control-custom {
    min-height: 40px;
    border-radius: 6px;
}

.note-box,
.kpi-card,
.auth-mini-note {
    border-radius: 8px;
}

.login-page-shell {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.login-box-standard {
    width: min(380px, 100%);
    background: #ffffff;
    border: 1px solid var(--border-soft);
    padding: 24px;
}

.login-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.login-box-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f8dff 0%, var(--brand) 58%, #0ea5e9 100%);
    color: #ffffff;
    font-weight: 700;
}

.login-box-title {
    margin: 2px 0 0;
    font-size: 1.75rem;
    line-height: 1.1;
}

.login-box-copy {
    margin: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.login-box-note {
    margin-top: 14px;
}

.sidebar-select,
.sidebar-submit {
    width: 100%;
}

.admin-navbar-actions {
    gap: 8px;
}

.empty-state-compact {
    padding: 28px 16px;
}

@media (max-width: 920px) {
    .header {
        padding: 14px 16px;
    }

    .content-body {
        padding: 14px 16px 22px;
    }
}

.form-shell-wide {
    max-width: 100%;
}

.admin-note-box {
    background: #f8fbff;
    border-color: #d9e6f7;
}

.note-box-tight {
    margin-bottom: 18px;
}

.settings-toggle-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: #fbfcfe;
}

.settings-toggle-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 4px;
}

.admin-inline-label {
    margin-bottom: 4px;
}

.table-primary-subtle {
    font-weight: 600;
}

.table-actions-head,
.table-actions-cell {
    text-align: right;
}

.table-actions-cell {
    white-space: nowrap;
}

.table-inline-form-right {
    justify-content: flex-end;
}

.table-action-form {
    margin: 0;
}

.form-control-compact {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.86rem;
}

.form-select-compact {
    min-width: 128px;
}

.form-select-compact-wide {
    min-width: 180px;
}

.admin-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.page-actions-wrap {
    flex-wrap: wrap;
}

.module-card-spaced {
    margin-bottom: 24px;
}

.form-group-tight {
    margin-bottom: 0;
}

.admin-filter-bar {
    align-items: end;
}

@media (max-width: 920px) {
    .admin-filter-actions,
    .table-inline-form-right,
    .table-actions-cell {
        justify-content: flex-start;
        text-align: left;
    }

    .form-select-compact,
    .form-select-compact-wide {
        min-width: 100%;
    }

    .settings-toggle-card {
        grid-template-columns: 1fr;
    }
}

.form-shell-narrow {
    max-width: 760px;
}

.page-shell-centered {
    margin-left: auto;
    margin-right: auto;
}

.page-shell-wide {
    max-width: 920px;
}

.page-shell-compact {
    max-width: 620px;
    margin-top: 48px;
    margin-bottom: 48px;
}

.page-shell-error {
    margin-top: 32px;
    margin-bottom: 32px;
}

.page-shell-text-center {
    text-align: center;
}

.empty-state-plain {
    padding: 10px 0 0;
    background: transparent;
    border: 0;
}

.page-actions-centered {
    justify-content: center;
}

.page-actions-spaced-top {
    margin-top: 24px;
}

.page-actions-top-gap {
    margin-top: 16px;
}

.note-box-top-gap {
    margin-top: 8px;
}

.helper-text-spaced {
    margin-bottom: 8px;
}

.helper-text-top-gap {
    margin-top: 6px;
}

.code-preview-top-gap {
    margin-top: 20px;
}

.panel-stack-top-gap {
    margin-top: 24px;
}

.module-header-tight {
    margin-bottom: 14px;
}

.campaign-status-badge {
    margin-bottom: 10px;
}

.sidebar-logout-form {
    margin-top: 12px;
}

.auth-main {
    width: 100%;
}

.validation-hidden {
    display: none;
}

.validation-visible {
    display: flex;
}

/* Model Admin Theme Refresh */
body.theme-model-admin {
    --bg-page: #f3f6fb;
    --bg-page-deep: #eef2f8;
    --bg-surface: #ffffff;
    --bg-surface-strong: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-deep: #f8fbff;
    --border-soft: #dde6f1;
    --border-mid: #cfd9e7;
    --text-primary: #172235;
    --text-secondary: #6a7c93;
    --text-muted: #92a3b8;
    --brand: #2563eb;
    --brand-deep: #1d4ed8;
    --brand-soft: #eef4ff;
    --brand-ghost: rgba(37, 99, 235, 0.08);
    --accent: #0f9d8a;
    --success: #13855f;
    --warning: #c17f14;
    --danger: #d54d4d;
    --info: #3d78f2;
    --sidebar-width: 286px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f3f6fb 48%, #eef2f8 100%);
    color: var(--text-primary);
}

body.theme-model-admin .app-container {
    gap: 0;
}

body.theme-model-admin .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: var(--text-primary);
    border-right: 1px solid var(--border-soft);
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.04);
    padding: 20px 16px 18px;
}

body.theme-model-admin .brand-section {
    padding: 2px 6px 14px;
}

body.theme-model-admin .brand-logo {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

body.theme-model-admin .brand-kicker {
    color: #90a2b8;
}

body.theme-model-admin .brand-name {
    color: var(--text-primary);
}

body.theme-model-admin .sidebar-card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    border-radius: 18px;
}

body.theme-model-admin .sidebar-card-minimal {
    background: #ffffff;
}

body.theme-model-admin .sidebar-card-title {
    color: #7c8fa6;
}

body.theme-model-admin .sidebar-card-value {
    color: var(--text-primary);
}

body.theme-model-admin .sidebar-card-note {
    color: var(--text-secondary);
}

body.theme-model-admin .sidebar-card-hero {
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

body.theme-model-admin .sidebar-nav {
    gap: 5px;
}

body.theme-model-admin .nav-section-label {
    color: #8ea1b7;
    padding-top: 16px;
}

body.theme-model-admin .nav-link-custom {
    color: #465a72;
    border-radius: 14px;
    padding: 12px 12px;
}

body.theme-model-admin .nav-link-custom:hover {
    background: #f4f7fb;
    color: var(--text-primary);
    border-color: var(--border-soft);
}

body.theme-model-admin .nav-link-custom.active {
    background: linear-gradient(135deg, #edf4ff 0%, #f4f8ff 100%);
    color: var(--brand-deep);
    border-color: #cfe0ff;
    box-shadow: none;
}

body.theme-model-admin .nav-icon {
    background: #f3f6fb;
    color: #48617f;
    border-radius: 12px;
}

body.theme-model-admin .nav-link-custom.active .nav-icon {
    background: linear-gradient(135deg, #4f8dff 0%, var(--brand) 100%);
    color: #ffffff;
}

body.theme-model-admin .user-badge-sidebar {
    border-top: 1px solid var(--border-soft);
}

body.theme-model-admin .user-badge-name {
    color: var(--text-primary);
}

body.theme-model-admin .user-badge-role {
    background: #edf4ff;
    color: var(--brand-deep);
}

body.theme-model-admin .main-wrapper {
    background: transparent;
}

body.theme-model-admin .header {
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(221, 230, 241, 0.9);
    backdrop-filter: blur(14px);
    padding: 22px 28px;
}

body.theme-model-admin .header-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #89a0ba;
    margin-bottom: 6px;
}

body.theme-model-admin .header-title {
    font-size: 2rem;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

body.theme-model-admin .header-meta {
    color: var(--text-secondary);
}

body.theme-model-admin .header-actions {
    gap: 10px;
}

body.theme-model-admin .header-pill {
    min-height: 50px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

body.theme-model-admin .header-pill span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8ba0b8;
}

body.theme-model-admin .header-pill strong {
    font-size: 0.92rem;
    color: var(--text-primary);
}

body.theme-model-admin .header-pill-soft {
    background: #f9fbff;
}

body.theme-model-admin .header-pill-strong {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
}

body.theme-model-admin .content-body {
    padding: 26px 28px 30px;
}

body.theme-model-admin .content-shell {
    max-width: 1440px;
}

body.theme-model-admin .module-card,
body.theme-model-admin .dashboard-grid-card,
body.theme-model-admin .module-card-soft,
body.theme-model-admin .auth-form-card,
body.theme-model-admin .login-box-standard,
body.theme-model-admin .overview-tile,
body.theme-model-admin .quick-link-item,
body.theme-model-admin .kpi-card,
body.theme-model-admin .note-box,
body.theme-model-admin .code-preview,
body.theme-model-admin .empty-state,
body.theme-model-admin .settings-toggle-card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

body.theme-model-admin .module-card,
body.theme-model-admin .dashboard-grid-card,
body.theme-model-admin .module-card-soft {
    padding: 22px;
}

body.theme-model-admin .page-intro,
body.theme-model-admin .module-header,
body.theme-model-admin .section-heading {
    gap: 18px;
}

body.theme-model-admin .page-title,
body.theme-model-admin .section-title,
body.theme-model-admin .module-title {
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

body.theme-model-admin .page-title {
    font-size: 1.65rem;
}

body.theme-model-admin .page-copy,
body.theme-model-admin .section-copy,
body.theme-model-admin .module-copy,
body.theme-model-admin .helper-text,
body.theme-model-admin .data-copy,
body.theme-model-admin .list-meta {
    color: var(--text-secondary);
}

body.theme-model-admin .btn-custom {
    border-radius: 12px;
    min-height: 42px;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: none;
}

body.theme-model-admin .btn-primary-custom {
    background: linear-gradient(135deg, #4f8dff 0%, var(--brand) 100%);
    border-color: transparent;
    color: #ffffff;
}

body.theme-model-admin .btn-primary-custom:hover {
    background: linear-gradient(135deg, #3f7df4 0%, #1f57d4 100%);
}

body.theme-model-admin .btn-secondary-custom {
    background: #ffffff;
    border-color: var(--border-soft);
    color: var(--text-primary);
}

body.theme-model-admin .btn-secondary-custom:hover {
    background: #f5f8fc;
}

body.theme-model-admin .btn-danger-custom {
    background: #fff4f4;
    border-color: #ffd8d8;
    color: #b63f3f;
}

body.theme-model-admin .btn-success-custom {
    background: #effcf6;
    border-color: #cbefdf;
    color: #0f7c57;
}

body.theme-model-admin .form-control-custom,
body.theme-model-admin select.form-control-custom,
body.theme-model-admin textarea.form-control-custom {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: #fbfcfe;
    color: var(--text-primary);
    padding: 10px 14px;
}

body.theme-model-admin .form-control-custom:focus {
    border-color: #99b9ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    outline: 0;
}

body.theme-model-admin .form-label {
    color: #4b6078;
    font-weight: 700;
    font-size: 0.83rem;
    letter-spacing: 0.01em;
}

body.theme-model-admin .custom-table-container {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: none;
}

body.theme-model-admin .custom-table {
    border-collapse: separate;
    border-spacing: 0;
}

body.theme-model-admin .custom-table th {
    background: #f8fbff;
    color: #6f859d;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    border-bottom: 1px solid var(--border-soft);
}

body.theme-model-admin .custom-table td {
    background: #ffffff;
    border-bottom: 1px solid #edf2f7;
}

body.theme-model-admin .custom-table tbody tr:hover td {
    background: #fbfdff;
}

body.theme-model-admin .table-primary {
    font-weight: 700;
    color: var(--text-primary);
}

body.theme-model-admin .status-badge {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 7px 10px;
}

body.theme-model-admin .dashboard-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fbff 58%, #f1f6ff 100%);
}

body.theme-model-admin .dashboard-hero-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #89a0ba;
    margin-bottom: 10px;
}

body.theme-model-admin .dashboard-hero-title {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

body.theme-model-admin .dashboard-hero-text {
    margin: 0 0 20px;
    color: var(--text-secondary);
    max-width: 60ch;
    line-height: 1.7;
}

body.theme-model-admin .dashboard-hero-panel {
    align-self: stretch;
    border-radius: 18px;
    padding: 22px;
    background: linear-gradient(180deg, #1f4fd8 0%, #2c6bf0 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.20);
}

body.theme-model-admin .dashboard-hero-panel-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.72;
}

body.theme-model-admin .dashboard-hero-panel-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
}

body.theme-model-admin .dashboard-hero-panel-copy {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
}

body.theme-model-admin .model-overview-grid {
    margin-bottom: 20px;
}

body.theme-model-admin .model-overview-tile {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

body.theme-model-admin .overview-label {
    color: #7c91a8;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

body.theme-model-admin .overview-value {
    font-size: 2rem;
    letter-spacing: -0.03em;
}

body.theme-model-admin .overview-copy {
    color: var(--text-secondary);
}

body.theme-model-admin .overview-tile-alert {
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
    border-color: #f2d6d6;
}

body.theme-model-admin .model-dashboard-grid {
    align-items: start;
}

body.theme-model-admin .model-dashboard-primary {
    min-width: 0;
}

body.theme-model-admin .model-dashboard-side {
    display: grid;
    gap: 18px;
}

body.theme-model-admin .model-side-card {
    min-width: 0;
}

body.theme-model-admin .data-row {
    padding: 16px 0;
    border-bottom: 1px solid #eef2f7;
}

body.theme-model-admin .data-row:first-child {
    padding-top: 0;
}

body.theme-model-admin .data-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

body.theme-model-admin .data-title {
    font-weight: 700;
    color: var(--text-primary);
}

body.theme-model-admin .metric-row-value {
    font-weight: 800;
    color: var(--text-primary);
}

body.theme-model-admin .quick-link-item {
    text-decoration: none;
    padding: 16px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

body.theme-model-admin .quick-link-item:hover {
    border-color: #cfe0ff;
    transform: translateY(-1px);
}

body.theme-model-admin .quick-link-title {
    color: var(--text-primary);
    font-weight: 700;
}

body.theme-model-admin .quick-link-copy {
    color: var(--text-secondary);
}

body.theme-model-admin .empty-state {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

body.theme-model-admin .alert-custom {
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

body.theme-model-admin .auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 28%),
        linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
}

body.theme-model-admin .model-login-shell {
    min-height: auto;
    width: 100%;
    padding: 0;
}

body.theme-model-admin .model-login-card {
    width: min(460px, 100%);
    padding: 30px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

body.theme-model-admin .model-login-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--brand-deep);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}

body.theme-model-admin .model-login-header {
    align-items: flex-start;
    margin-bottom: 4px;
}

body.theme-model-admin .login-box-title {
    margin: 0 0 6px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

body.theme-model-admin .model-login-copy {
    margin-bottom: 0;
    max-width: 34ch;
}

body.theme-model-admin .model-login-form {
    margin-top: 22px;
}

body.theme-model-admin .model-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.theme-model-admin .model-login-helper {
    color: #8ea1b7;
    font-size: 0.84rem;
}

body.theme-model-admin .auth-login-submit {
    width: 100%;
    margin-top: 4px;
}

body.theme-model-admin .model-login-note {
    margin-top: 18px;
    background: #f8fbff;
    border-color: #d9e6f7;
}

body.theme-model-admin .module-card > .custom-table-container,
body.theme-model-admin .dashboard-grid-card > .custom-table-container {
    margin-top: 8px;
}

@media (max-width: 1100px) {
    body.theme-model-admin .dashboard-hero-card {
        grid-template-columns: 1fr;
    }

    body.theme-model-admin .header {
        padding: 18px 20px;
    }

    body.theme-model-admin .content-body {
        padding: 20px;
    }
}

@media (max-width: 920px) {
    body.theme-model-admin .sidebar {
        box-shadow: 18px 0 44px rgba(15, 23, 42, 0.10);
    }

    body.theme-model-admin .header {
        padding: 16px;
    }

    body.theme-model-admin .header-actions {
        width: 100%;
    }

    body.theme-model-admin .header-pill {
        flex: 1 1 160px;
    }

    body.theme-model-admin .content-body {
        padding: 16px;
    }

    body.theme-model-admin .module-card,
    body.theme-model-admin .dashboard-grid-card,
    body.theme-model-admin .module-card-soft,
    body.theme-model-admin .model-login-card {
        padding: 18px;
        border-radius: 16px;
    }

    body.theme-model-admin .dashboard-hero-title {
        font-size: 1.9rem;
    }

    body.theme-model-admin .model-login-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* AI Studio Theme */
body.theme-ai-studio {
    --bg-page: #f5f8ff;
    --bg-page-deep: #eef3ff;
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-surface-strong: #ffffff;
    --border-soft: rgba(163, 181, 214, 0.26);
    --border-mid: rgba(112, 139, 196, 0.28);
    --text-primary: #122036;
    --text-secondary: #627792;
    --text-muted: #8ca0ba;
    --brand: #386bff;
    --brand-deep: #2149d8;
    --brand-soft: rgba(56, 107, 255, 0.12);
    --brand-ghost: rgba(56, 107, 255, 0.08);
    --accent: #19b79b;
    --success: #16936a;
    --warning: #c4851d;
    --danger: #d44f63;
    --info: #5a7dff;
    --sidebar-width: 292px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --shadow-sm: 0 16px 40px rgba(33, 57, 105, 0.08);
    --shadow-md: 0 28px 64px rgba(33, 57, 105, 0.12);
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 107, 255, 0.16), transparent 22%),
        radial-gradient(circle at 100% 100%, rgba(25, 183, 155, 0.10), transparent 26%),
        linear-gradient(180deg, #fbfcff 0%, #f5f8ff 48%, #eef3ff 100%);
}

body.theme-ai-studio .mobile-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(163, 181, 214, 0.24);
}

body.theme-ai-studio .sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 250, 255, 0.96) 100%);
    border-right: 1px solid rgba(163, 181, 214, 0.20);
    box-shadow: 20px 0 50px rgba(33, 57, 105, 0.06);
    backdrop-filter: blur(18px);
}

body.theme-ai-studio .brand-logo {
    border-radius: 18px;
    background: linear-gradient(135deg, #6fa4ff 0%, #386bff 50%, #19b79b 100%);
    box-shadow: 0 16px 34px rgba(56, 107, 255, 0.30);
}

body.theme-ai-studio .brand-kicker,
body.theme-ai-studio .nav-section-label,
body.theme-ai-studio .sidebar-card-title,
body.theme-ai-studio .header-kicker,
body.theme-ai-studio .overview-label {
    color: #86a0c0;
}

body.theme-ai-studio .brand-name,
body.theme-ai-studio .sidebar-card-value,
body.theme-ai-studio .user-badge-name,
body.theme-ai-studio .header-title,
body.theme-ai-studio .page-title,
body.theme-ai-studio .module-title,
body.theme-ai-studio .section-title,
body.theme-ai-studio .table-primary,
body.theme-ai-studio .data-title,
body.theme-ai-studio .metric-row-value,
body.theme-ai-studio .quick-link-title {
    color: var(--text-primary);
}

body.theme-ai-studio .sidebar-card,
body.theme-ai-studio .module-card,
body.theme-ai-studio .dashboard-grid-card,
body.theme-ai-studio .module-card-soft,
body.theme-ai-studio .overview-tile,
body.theme-ai-studio .login-box-standard,
body.theme-ai-studio .note-box,
body.theme-ai-studio .code-preview,
body.theme-ai-studio .empty-state,
body.theme-ai-studio .quick-link-item,
body.theme-ai-studio .settings-toggle-card,
body.theme-ai-studio .kpi-card,
body.theme-ai-studio .alert-custom {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(163, 181, 214, 0.24);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

body.theme-ai-studio .sidebar-card-hero,
body.theme-ai-studio .ai-side-card-highlight {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(239,245,255,0.92) 100%);
}

body.theme-ai-studio .nav-link-custom {
    color: #4b6280;
    border-radius: 15px;
}

body.theme-ai-studio .nav-link-custom:hover {
    background: rgba(56, 107, 255, 0.06);
    border-color: rgba(56, 107, 255, 0.12);
}

body.theme-ai-studio .nav-link-custom.active {
    background: linear-gradient(135deg, rgba(56, 107, 255, 0.14), rgba(25, 183, 155, 0.10));
    border-color: rgba(56, 107, 255, 0.18);
    color: #2046c8;
}

body.theme-ai-studio .nav-icon {
    background: rgba(56, 107, 255, 0.08);
    color: #3d5f8b;
}

body.theme-ai-studio .nav-link-custom.active .nav-icon {
    background: linear-gradient(135deg, #6fa4ff 0%, #386bff 55%, #19b79b 100%);
}

body.theme-ai-studio .user-badge-role,
body.theme-ai-studio .model-login-badge,
body.theme-ai-studio .ai-login-badge {
    background: linear-gradient(135deg, rgba(56, 107, 255, 0.12), rgba(25, 183, 155, 0.12));
    color: #2149d8;
}

body.theme-ai-studio .header {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(163, 181, 214, 0.20);
}

body.theme-ai-studio .header-pill {
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(163, 181, 214, 0.24);
    backdrop-filter: blur(14px);
}

body.theme-ai-studio .content-shell {
    max-width: 1460px;
}

body.theme-ai-studio .btn-custom {
    border-radius: 14px;
}

body.theme-ai-studio .btn-primary-custom {
    background: linear-gradient(135deg, #5d8dff 0%, #386bff 58%, #19b79b 100%);
    box-shadow: 0 16px 30px rgba(56, 107, 255, 0.20);
}

body.theme-ai-studio .btn-primary-custom:hover {
    background: linear-gradient(135deg, #4c7cf0 0%, #2e5fe6 58%, #169d85 100%);
}

body.theme-ai-studio .btn-secondary-custom {
    background: rgba(255,255,255,0.78);
    border-color: rgba(163, 181, 214, 0.24);
}

body.theme-ai-studio .form-control-custom,
body.theme-ai-studio select.form-control-custom,
body.theme-ai-studio textarea.form-control-custom {
    background: rgba(250, 252, 255, 0.92);
    border: 1px solid rgba(163, 181, 214, 0.22);
}

body.theme-ai-studio .form-control-custom:focus {
    box-shadow: 0 0 0 4px rgba(56, 107, 255, 0.12);
    border-color: rgba(56, 107, 255, 0.34);
}

body.theme-ai-studio .custom-table-container {
    border: 1px solid rgba(163, 181, 214, 0.22);
    background: rgba(255,255,255,0.68);
}

body.theme-ai-studio .custom-table th {
    background: rgba(245, 248, 255, 0.88);
    color: #7690af;
}

body.theme-ai-studio .custom-table td {
    background: rgba(255,255,255,0.74);
    border-bottom: 1px solid rgba(226, 234, 245, 0.84);
}

body.theme-ai-studio .custom-table tbody tr:hover td {
    background: rgba(249, 251, 255, 0.95);
}

body.theme-ai-studio .status-badge {
    background: rgba(255,255,255,0.64);
    backdrop-filter: blur(10px);
}

body.theme-ai-studio .ai-hero-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.88) 0%, rgba(247,250,255,0.92) 62%, rgba(237,244,255,0.96) 100%);
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.95fr);
    position: relative;
    overflow: hidden;
}

body.theme-ai-studio .ai-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(56, 107, 255, 0.10), transparent 26%);
    pointer-events: none;
}

body.theme-ai-studio .ai-hero-copy,
body.theme-ai-studio .ai-hero-panel {
    position: relative;
    z-index: 1;
}

body.theme-ai-studio .dashboard-hero-kicker {
    color: #6f8cb0;
}

body.theme-ai-studio .dashboard-hero-title {
    font-size: clamp(2rem, 3.1vw, 2.85rem);
}

body.theme-ai-studio .dashboard-hero-text,
body.theme-ai-studio .dashboard-hero-panel-copy,
body.theme-ai-studio .page-copy,
body.theme-ai-studio .section-copy,
body.theme-ai-studio .module-copy,
body.theme-ai-studio .list-meta,
body.theme-ai-studio .helper-text,
body.theme-ai-studio .data-copy,
body.theme-ai-studio .quick-link-copy,
body.theme-ai-studio .model-login-helper {
    color: var(--text-secondary);
}

body.theme-ai-studio .ai-hero-panel {
    background: linear-gradient(160deg, rgba(56, 107, 255, 0.92) 0%, rgba(56, 107, 255, 0.78) 48%, rgba(25, 183, 155, 0.88) 100%);
    box-shadow: 0 26px 48px rgba(56, 107, 255, 0.22);
}

body.theme-ai-studio .dashboard-hero-panel-label,
body.theme-ai-studio .dashboard-hero-panel-copy,
body.theme-ai-studio .dashboard-hero-panel-value {
    color: #ffffff;
}

body.theme-ai-studio .ai-overview-grid {
    gap: 16px;
}

body.theme-ai-studio .ai-overview-tile {
    background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(248,250,255,0.9) 100%);
}

body.theme-ai-studio .ai-overview-attention {
    background: linear-gradient(180deg, rgba(255,255,255,0.84) 0%, rgba(255,246,247,0.92) 100%);
    border-color: rgba(229, 166, 176, 0.30);
}

body.theme-ai-studio .ai-dashboard-grid,
body.theme-ai-studio .ai-dashboard-side,
body.theme-ai-studio .ai-quick-link-list {
    gap: 18px;
}

body.theme-ai-studio .ai-primary-panel,
body.theme-ai-studio .ai-side-card,
body.theme-ai-studio .ai-login-card,
body.theme-ai-studio .ai-empty-state {
    position: relative;
    overflow: hidden;
}

body.theme-ai-studio .ai-primary-panel::after,
body.theme-ai-studio .ai-side-card::after,
body.theme-ai-studio .ai-login-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(56, 107, 255, 0.10), transparent 68%);
    pointer-events: none;
}

body.theme-ai-studio .quick-link-item:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 107, 255, 0.22);
}

body.theme-ai-studio .auth-container {
    background:
        radial-gradient(circle at top left, rgba(56, 107, 255, 0.16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(25, 183, 155, 0.12), transparent 24%),
        linear-gradient(180deg, #fbfcff 0%, #eff4ff 100%);
}

body.theme-ai-studio .ai-login-shell {
    width: 100%;
}

body.theme-ai-studio .ai-login-card {
    width: min(500px, 100%);
    padding: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,255,0.96) 100%);
}

body.theme-ai-studio .ai-login-header {
    gap: 14px;
}

body.theme-ai-studio .login-box-title {
    font-size: 2.1rem;
}

body.theme-ai-studio .ai-login-row {
    align-items: center;
}

body.theme-ai-studio .ai-login-note {
    background: linear-gradient(180deg, rgba(247,250,255,0.88) 0%, rgba(240,246,255,0.94) 100%);
}

@media (max-width: 1100px) {
    body.theme-ai-studio .ai-hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    body.theme-ai-studio .header {
        padding: 16px;
    }

    body.theme-ai-studio .content-body {
        padding: 16px;
    }

    body.theme-ai-studio .module-card,
    body.theme-ai-studio .dashboard-grid-card,
    body.theme-ai-studio .module-card-soft,
    body.theme-ai-studio .ai-login-card {
        border-radius: 16px;
        padding: 18px;
    }

    body.theme-ai-studio .dashboard-hero-title,
    body.theme-ai-studio .login-box-title {
        font-size: 1.9rem;
    }

    body.theme-ai-studio .ai-login-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* AI Studio Cleanup */
body.theme-ai-studio .sidebar {
    padding: 18px 10px 16px;
}

body.theme-ai-studio .sidebar-card {
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(33, 57, 105, 0.05);
}

body.theme-ai-studio .sidebar-card-note {
    color: #8ea1b7;
    line-height: 1.55;
}

body.theme-ai-studio .sidebar-nav {
    overflow-y: auto;
    scrollbar-width: thin;
}

body.theme-ai-studio .nav-link-custom {
    padding: 10px 12px;
    gap: 10px;
}

body.theme-ai-studio .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

body.theme-ai-studio .header {
    padding: 14px 20px;
}

body.theme-ai-studio .header-title {
    font-size: 1.2rem;
    margin: 0;
}

body.theme-ai-studio .header-kicker {
    margin-bottom: 2px;
}

body.theme-ai-studio .header-meta {
    font-size: 0.9rem;
}

body.theme-ai-studio .header-pill {
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 10px;
}

body.theme-ai-studio .header-pill span {
    font-size: 0.68rem;
}

body.theme-ai-studio .header-pill strong {
    font-size: 0.88rem;
}

body.theme-ai-studio .content-body {
    padding: 18px 18px 22px;
}

body.theme-ai-studio .module-card,
body.theme-ai-studio .dashboard-grid-card,
body.theme-ai-studio .module-card-soft,
body.theme-ai-studio .overview-tile,
body.theme-ai-studio .login-box-standard,
body.theme-ai-studio .quick-link-item,
body.theme-ai-studio .empty-state,
body.theme-ai-studio .alert-custom {
    border-radius: 14px;
    backdrop-filter: none;
}

body.theme-ai-studio .ai-dashboard-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    background: rgba(255,255,255,0.78);
}

body.theme-ai-studio .ai-dashboard-title {
    margin: 6px 0 10px;
    font-size: 1.9rem;
    letter-spacing: -0.03em;
}

body.theme-ai-studio .ai-dashboard-text {
    margin: 0;
    max-width: 62ch;
}

body.theme-ai-studio .ai-dashboard-actions {
    flex-shrink: 0;
}

body.theme-ai-studio .ai-overview-grid-clean {
    gap: 14px;
    margin-bottom: 16px;
}

body.theme-ai-studio .ai-overview-tile-clean {
    background: #ffffff;
    min-height: 120px;
}

body.theme-ai-studio .ai-overview-tile-attention {
    border-color: rgba(229, 166, 176, 0.28);
    background: #fffafb;
}

body.theme-ai-studio .ai-dashboard-grid-clean {
    gap: 16px;
    align-items: start;
}

body.theme-ai-studio .ai-dashboard-side-clean,
body.theme-ai-studio .ai-quick-link-list-clean {
    gap: 16px;
}

body.theme-ai-studio .ai-primary-panel-clean,
body.theme-ai-studio .ai-side-card-clean,
body.theme-ai-studio .ai-empty-state-clean,
body.theme-ai-studio .ai-login-card-clean {
    overflow: visible;
}

body.theme-ai-studio .ai-primary-panel-clean::after,
body.theme-ai-studio .ai-side-card-clean::after,
body.theme-ai-studio .ai-login-card-clean::after {
    content: none;
}

body.theme-ai-studio .data-row {
    padding: 14px 0;
}

body.theme-ai-studio .quick-link-item {
    padding: 14px 16px;
    background: #ffffff;
}

body.theme-ai-studio .login-page-shell.ai-login-shell-clean {
    padding: 24px 16px;
}

body.theme-ai-studio .ai-login-card-clean {
    width: min(460px, 100%);
    padding: 28px;
    background: #ffffff;
}

body.theme-ai-studio .ai-login-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 10px;
}

body.theme-ai-studio .ai-login-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7d95b3;
    margin-bottom: 6px;
}

body.theme-ai-studio .ai-login-card-clean .login-box-title {
    margin: 0 0 8px;
    font-size: 1.85rem;
}

body.theme-ai-studio .ai-login-card-clean .login-box-copy {
    line-height: 1.6;
}

body.theme-ai-studio .ai-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.theme-ai-studio .ai-login-note {
    background: #f7faff;
}

@media (max-width: 1100px) {
    body.theme-ai-studio .ai-dashboard-intro {
        flex-direction: column;
    }
}

@media (max-width: 920px) {
    body.theme-ai-studio .header {
        padding: 14px 16px;
    }

    body.theme-ai-studio .content-body {
        padding: 14px 16px 20px;
    }

    body.theme-ai-studio .ai-dashboard-title,
    body.theme-ai-studio .ai-login-card-clean .login-box-title {
        font-size: 1.6rem;
    }

    body.theme-ai-studio .ai-login-heading {
        grid-template-columns: 1fr;
    }

    body.theme-ai-studio .ai-login-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* CRM ERP Theme */
/* CRM ERP Theme */
body.theme-crm-erp {
    --bg-page: #f8fafc;
    --bg-page-deep: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.72);
    --bg-surface-strong: #ffffff;
    --border-soft: rgba(15, 23, 42, 0.06);
    --border-mid: rgba(15, 23, 42, 0.12);
    --text-primary: #0f172a; /* slate-900 */
    --text-secondary: #475569; /* slate-600 */
    --text-muted: #94a3b8; /* slate-400 */
    --brand: #4f46e5; /* Indigo */
    --brand-deep: #4338ca;
    --brand-soft: rgba(79, 70, 229, 0.06);
    --brand-ghost: rgba(79, 70, 229, 0.03);
    --accent: #7c3aed; /* Violet */
    --success: #059669; /* Emerald */
    --warning: #d97706; /* Amber */
    --danger: #e11d48; /* Rose */
    --info: #2563eb; /* Blue */
    --sidebar-width: 240px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.05);
    
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px;
    color: var(--text-primary);
    background: 
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.05), transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.04), transparent 45%),
        #f8fafc;
    min-height: 100vh;
}

body.theme-crm-erp .mobile-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 16px;
}

body.theme-crm-erp .sidebar {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-md);
    margin: 12px 0 12px 12px;
    height: calc(100vh - 24px);
    padding: 16px 12px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.theme-crm-erp .brand-section {
    padding: 2px 4px 8px;
}

body.theme-crm-erp .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
    font-size: 0.8rem;
}

body.theme-crm-erp .brand-copy {
    gap: 0;
}

body.theme-crm-erp .brand-name {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

body.theme-crm-erp .sidebar-card,
body.theme-crm-erp .module-card,
body.theme-crm-erp .dashboard-grid-card,
body.theme-crm-erp .module-card-soft,
body.theme-crm-erp .overview-tile,
body.theme-crm-erp .login-box-standard,
body.theme-crm-erp .quick-link-item,
body.theme-crm-erp .empty-state,
body.theme-crm-erp .alert-custom,
body.theme-crm-erp .note-box,
body.theme-crm-erp .code-preview,
body.theme-crm-erp .settings-toggle-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    padding: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-crm-erp .sidebar-card:hover,
body.theme-crm-erp .module-card:hover,
body.theme-crm-erp .dashboard-grid-card:hover,
body.theme-crm-erp .overview-tile:hover,
body.theme-crm-erp .quick-link-item:hover {
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: var(--shadow-md);
    transform: translateY(-1.5px);
}

body.theme-crm-erp .sidebar-card {
    padding: 10px 12px;
}

body.theme-crm-erp .sidebar-card-title,
body.theme-crm-erp .overview-label,
body.theme-crm-erp .header-meta,
body.theme-crm-erp .page-copy,
body.theme-crm-erp .section-copy,
body.theme-crm-erp .module-copy,
body.theme-crm-erp .list-meta,
body.theme-crm-erp .helper-text,
body.theme-crm-erp .data-copy,
body.theme-crm-erp .quick-link-copy {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

body.theme-crm-erp .sidebar-card-title {
    margin-bottom: 2px;
}

body.theme-crm-erp .sidebar-card-value,
body.theme-crm-erp .page-title,
body.theme-crm-erp .section-title,
body.theme-crm-erp .module-title,
body.theme-crm-erp .header-title,
body.theme-crm-erp .table-primary,
body.theme-crm-erp .data-title,
body.theme-crm-erp .metric-row-value,
body.theme-crm-erp .quick-link-title {
    color: var(--text-primary);
    font-weight: 700;
}

body.theme-crm-erp .sidebar-nav {
    gap: 2px;
}

body.theme-crm-erp .nav-section-label {
    color: var(--text-muted);
    padding: 8px 8px 2px;
    font-size: 0.72rem;
}

body.theme-crm-erp .nav-link-custom {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border: 1px solid transparent;
    margin-bottom: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.88rem;
}

body.theme-crm-erp .nav-link-custom:hover {
    background: rgba(15, 23, 42, 0.03);
    color: var(--text-primary);
    transform: translateX(2px);
}

body.theme-crm-erp .nav-link-custom.active {
    background: var(--brand-soft);
    color: var(--brand-deep);
    border-color: rgba(79, 70, 229, 0.12);
    font-weight: 600;
}

body.theme-crm-erp .nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    font-size: 0.65rem;
}

body.theme-crm-erp .nav-link-custom.active .nav-icon {
    background: var(--brand);
    color: #ffffff;
}

body.theme-crm-erp .user-badge-sidebar {
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
}

body.theme-crm-erp .user-badge-name {
    font-size: 0.88rem;
}

body.theme-crm-erp .user-badge-role {
    background: var(--brand-soft);
    color: var(--brand-deep);
    padding: 3px 8px;
    font-size: 0.65rem;
}

body.theme-crm-erp .header {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 20px;
}

body.theme-crm-erp .header-title {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 800;
}

body.theme-crm-erp .header-meta {
    font-size: 0.82rem;
    margin-top: 2px;
}

body.theme-crm-erp .header-actions {
    gap: 6px;
}

body.theme-crm-erp .header-pill {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-soft);
}

body.theme-crm-erp .header-pill strong {
    font-size: 0.82rem;
    color: var(--text-primary);
}

body.theme-crm-erp .content-body {
    padding: 16px 20px 24px;
}

body.theme-crm-erp .content-shell {
    max-width: 1300px;
}

body.theme-crm-erp .btn-custom {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-crm-erp .btn-primary-custom {
    background: var(--brand);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
}

body.theme-crm-erp .btn-primary-custom:hover {
    background: var(--brand-deep);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    transform: translateY(-1px);
}

body.theme-crm-erp .btn-secondary-custom {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
}

body.theme-crm-erp .btn-secondary-custom:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.15);
    transform: translateY(-1px);
}

body.theme-crm-erp .btn-danger-custom {
    background: rgba(225, 29, 72, 0.08);
    color: var(--danger);
    border-color: rgba(225, 29, 72, 0.15);
}

body.theme-crm-erp .btn-danger-custom:hover {
    background: rgba(225, 29, 72, 0.15);
    border-color: rgba(225, 29, 72, 0.3);
    transform: translateY(-1px);
}

body.theme-crm-erp .btn-success-custom {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
    border-color: rgba(5, 150, 105, 0.15);
}

body.theme-crm-erp .btn-success-custom:hover {
    background: rgba(5, 150, 105, 0.15);
    border-color: rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
}

body.theme-crm-erp .form-group {
    margin-bottom: 14px;
}

body.theme-crm-erp .form-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.84rem;
    margin-bottom: 6px;
}

body.theme-crm-erp .form-control-custom,
body.theme-crm-erp select.form-control-custom,
body.theme-crm-erp textarea.form-control-custom {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.88rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-crm-erp .form-control-custom:focus {
    background: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: none;
}

body.theme-crm-erp .custom-table-container {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
}

body.theme-crm-erp .custom-table th {
    background: rgba(15, 23, 42, 0.02);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
}

body.theme-crm-erp .custom-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    font-size: 0.86rem;
    background: transparent;
}

body.theme-crm-erp .custom-table tbody tr {
    transition: all 0.15s ease;
}

body.theme-crm-erp .custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.4);
}

body.theme-crm-erp .custom-table tbody tr:hover td {
    color: var(--text-primary);
}

body.theme-crm-erp .table-primary {
    font-weight: 600;
    color: var(--text-primary);
}

body.theme-crm-erp .status-badge {
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

body.theme-crm-erp .status-badge.sent { background: rgba(5, 150, 105, 0.08); color: var(--success); border-color: rgba(5, 150, 105, 0.12); }
body.theme-crm-erp .status-badge.pending { background: rgba(217, 119, 6, 0.08); color: var(--warning); border-color: rgba(217, 119, 6, 0.12); }
body.theme-crm-erp .status-badge.failed { background: rgba(225, 29, 72, 0.08); color: var(--danger); border-color: rgba(225, 29, 72, 0.12); }
body.theme-crm-erp .status-badge.postponed { background: rgba(124, 58, 237, 0.08); color: var(--accent); border-color: rgba(124, 58, 237, 0.12); }
body.theme-crm-erp .status-badge.sending { background: rgba(37, 99, 235, 0.08); color: var(--info); border-color: rgba(37, 99, 235, 0.12); }
body.theme-crm-erp .status-badge.draft { background: rgba(148, 163, 184, 0.08); color: var(--text-secondary); border-color: rgba(148, 163, 184, 0.12); }

body.theme-crm-erp .auth-container {
    min-height: 100vh;
    background: 
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.05), transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.04), transparent 45%),
        #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

body.theme-crm-erp .crm-login-shell {
    min-height: auto;
    padding: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

body.theme-crm-erp .crm-login-card {
    width: min(360px, 100%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
}

body.theme-crm-erp .login-box-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

body.theme-crm-erp .login-box-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 6px;
}

body.theme-crm-erp .login-box-copy {
    color: var(--text-secondary);
    font-size: 0.86rem;
    margin-bottom: 20px;
}

body.theme-crm-erp .crm-login-heading {
    display: block;
    margin-bottom: 18px;
}

body.theme-crm-erp .crm-login-options {
    margin-bottom: 16px;
}

body.theme-crm-erp .crm-dashboard-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

body.theme-crm-erp .crm-dashboard-title {
    margin: 0 0 4px;
    font-size: 1.45rem;
    font-weight: 800;
}

body.theme-crm-erp .crm-dashboard-copy {
    margin: 0;
    color: var(--text-secondary);
}

body.theme-crm-erp .crm-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

body.theme-crm-erp .crm-metric-card {
    min-height: 90px;
    position: relative;
    padding: 14px 16px;
    overflow: hidden;
}

body.theme-crm-erp .crm-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

body.theme-crm-erp .overview-tile:nth-child(1)::before { background: var(--brand); }
body.theme-crm-erp .overview-tile:nth-child(2)::before { background: var(--accent); }
body.theme-crm-erp .overview-tile:nth-child(3)::before { background: var(--success); }
body.theme-crm-erp .overview-tile:nth-child(4)::before { background: var(--danger); }

body.theme-crm-erp .overview-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
}

body.theme-crm-erp .overview-copy {
    font-size: 0.8rem;
    margin-top: 2px;
}

body.theme-crm-erp .crm-metric-card-alert {
    background: rgba(225, 29, 72, 0.02);
    border-color: rgba(225, 29, 72, 0.08);
}

body.theme-crm-erp .crm-dashboard-grid {
    gap: 16px;
}

body.theme-crm-erp .crm-dashboard-side,
body.theme-crm-erp .crm-quick-links {
    gap: 16px;
}

body.theme-crm-erp .quick-link-item {
    padding: 12px 14px;
    text-decoration: none;
}

body.theme-crm-erp .settings-toggle-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

body.theme-crm-erp .settings-toggle-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

body.theme-crm-erp .settings-toggle-card label {
    margin: 0;
    cursor: pointer;
}

body.theme-crm-erp .helper-text {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 2px;
}

body.theme-crm-erp .note-box {
    padding: 14px;
    background: var(--brand-soft);
    border-color: rgba(79, 70, 229, 0.1);
}

body.theme-crm-erp .note-box strong {
    color: var(--brand-deep);
    font-size: 0.84rem;
    text-transform: none;
    letter-spacing: normal;
}

@media (max-width: 1100px) {
    body.theme-crm-erp .crm-dashboard-intro {
        flex-direction: column;
    }
}

@media (max-width: 920px) {
    body.theme-crm-erp .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        width: min(85vw, 260px);
        margin: 0;
        height: 100vh;
        border-radius: 0;
        border: 0;
        border-right: 1px solid var(--border-soft);
        background: #ffffff;
    }

    body.theme-crm-erp .header {
        padding: 10px 16px;
    }

    body.theme-crm-erp .content-body {
        padding: 12px 16px;
    }

    body.theme-crm-erp .module-card,
    body.theme-crm-erp .dashboard-grid-card,
    body.theme-crm-erp .module-card-soft,
    body.theme-crm-erp .crm-login-card,
    body.theme-crm-erp .overview-tile {
        padding: 14px;
    }

    body.theme-crm-erp .crm-login-heading {
        grid-template-columns: 1fr;
    }
}

body.theme-crm-erp .content-shell-full {
    max-width: none;
    width: 100%;
}

body.theme-crm-erp .crm-dashboard-grid {
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
}

@media (max-width: 920px) {
    body.theme-crm-erp .content-body {
        padding: 12px 10px;
    }
}



/* Shared List Polish */
.table-link-primary {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
}

.table-link-primary:hover {
    color: var(--brand-deep, var(--brand));
    text-decoration: underline;
}

.table-primary-subtle {
    font-weight: 600;
}

.table-action-form {
    margin: 0;
}

.table-inline-form {
    gap: 8px;
}

body.theme-crm-erp .module-card .custom-table-container {
    margin-top: 6px;
}

body.theme-crm-erp .custom-table {
    min-width: 760px;
}

body.theme-crm-erp .custom-table th {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.035);
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

body.theme-crm-erp .custom-table td {
    padding: 14px 16px;
    vertical-align: middle;
    line-height: 1.5;
}

body.theme-crm-erp .custom-table tbody tr {
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

body.theme-crm-erp .custom-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.62);
}

body.theme-crm-erp .custom-table td .list-meta,
body.theme-crm-erp .custom-table .list-meta {
    line-height: 1.55;
}

body.theme-crm-erp .custom-table .status-badge.draft {
    background: rgba(79, 70, 229, 0.08);
    color: var(--brand-deep);
    border-color: rgba(79, 70, 229, 0.12);
}

body.theme-crm-erp .table-actions-head,
body.theme-crm-erp .table-actions-cell {
    text-align: right;
}

body.theme-crm-erp .table-actions-cell {
    white-space: nowrap;
}

body.theme-crm-erp .table-inline-form-right {
    justify-content: flex-end;
    gap: 8px;
}

body.theme-crm-erp .empty-state-icon {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

@media (max-width: 920px) {
    body.theme-crm-erp .custom-table {
        min-width: 680px;
    }
}

/* Unified Page Shell */
.page-shell-header {
    margin-bottom: 18px;
}

.form-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.form-shell-wide {
    width: min(1120px, 100%);
    max-width: 1120px;
}

.form-shell-narrow {
    width: min(1120px, 100%);
    max-width: 1120px;
}

body.theme-crm-erp .page-shell-header {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.theme-crm-erp .page-shell-header .page-title {
    margin-bottom: 6px;
}

body.theme-crm-erp .form-shell,
body.theme-crm-erp .form-shell-wide,
body.theme-crm-erp .form-shell-narrow {
    width: min(1120px, 100%);
    max-width: 1120px;
}

body.theme-crm-erp .page-shell-wide {
    width: min(1120px, 100%);
    max-width: 1120px;
}




