:root {
    --lt-primary: #FF2048;
    --lt-primary-hover: #e01a3f;
    --lt-primary-08: rgba(255, 32, 72, 0.08);
    --lt-primary-12: rgba(255, 32, 72, 0.12);
    --lt-primary-20: rgba(255, 32, 72, 0.20);

    --lt-sidebar-bg: #0f1117;
    --lt-sidebar-border: rgba(255, 255, 255, 0.06);
    --lt-sidebar-text: rgba(255, 255, 255, 0.55);
    --lt-sidebar-text-hover: rgba(255, 255, 255, 0.90);
    --lt-sidebar-active-bg: rgba(255, 32, 72, 0.12);
    --lt-sidebar-group: rgba(255, 255, 255, 0.35);

    --lt-bg: #eceef2;
    --lt-bg-subtle: #f4f5f8;
    --lt-card: #ffffff;
    --lt-text: #111827;
    --lt-text-secondary: #374151;
    --lt-muted: #64748b;
    --lt-border: #e2e8f0;
    --lt-border-strong: #cbd5e1;
    --lt-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
    --lt-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.08);
    --lt-radius: 10px;
    --lt-radius-sm: 6px;
    --lt-content-max: 1280px;

    /* Unified type scale — sidebar & content share the same rhythm */
    --lt-text-base: 15px;
    --lt-text-sm: 13px;
    --lt-text-xs: 12px;
    --lt-sidebar-width: 264px;
}

* { box-sizing: border-box; }

body {
    background-color: var(--lt-bg);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--lt-text);
    font-size: var(--lt-text-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Icons ── */
.lt-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Shell ── */
.admin-shell {
    min-height: 100vh;
    display: flex;
}

/* ── Sidebar ── */
.admin-sidebar {
    width: var(--lt-sidebar-width);
    background: var(--lt-sidebar-bg);
    border-right: 1px solid var(--lt-sidebar-border);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    font-size: var(--lt-text-base);
}

.sidebar-top {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--lt-sidebar-border);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.sidebar-bottom {
    padding: 12px 10px 16px;
    border-top: 1px solid var(--lt-sidebar-border);
}

.brand {
    display: flex;
    align-items: center;
    height: 32px;
}

.brand img {
    display: block;
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-group-title {
    font-size: var(--lt-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--lt-sidebar-group);
    padding: 14px 12px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--lt-sidebar-text);
    padding: 9px 12px;
    border-radius: var(--lt-radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--lt-text-base);
    transition: background-color 140ms ease, color 140ms ease;
    margin-bottom: 2px;
}

.sidebar-link .lt-icon {
    opacity: 0.7;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--lt-sidebar-text-hover);
}

.sidebar-link:hover .lt-icon {
    opacity: 1;
}

.sidebar-link.active {
    background: var(--lt-sidebar-active-bg);
    color: #fff;
    font-weight: 600;
}

.sidebar-link.active .lt-icon {
    opacity: 1;
    color: var(--lt-primary);
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--lt-sidebar-text);
    border-radius: var(--lt-radius-sm);
    padding: 9px 12px;
    width: 100%;
    font-size: var(--lt-text-base);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 140ms ease;
    display: flex;
    align-items: center;
    gap: 11px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.sidebar-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--lt-radius-sm);
    text-decoration: none;
    color: var(--lt-sidebar-text-hover);
    font-size: var(--lt-text-base);
    font-weight: 500;
    transition: background 140ms ease;
    flex: 1;
    min-width: 0;
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-user.active {
    background: var(--lt-sidebar-active-bg);
}

.logout-icon-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--lt-sidebar-text);
    border-radius: var(--lt-radius-sm);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 140ms ease;
    flex-shrink: 0;
}

.logout-icon-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--lt-primary-12);
    color: var(--lt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--lt-text-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-user-role {
    font-size: var(--lt-text-xs);
    color: var(--lt-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Content ── */
.admin-content {
    flex: 1;
    min-width: 0;
    padding: 28px 32px 40px;
    background: var(--lt-bg);
}

.admin-content-inner {
    max-width: var(--lt-content-max);
    margin: 0 auto;
}

/* Minimal page header — no card, no duplicate user info */
.admin-page-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--lt-border);
}

.admin-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--lt-text);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
}

.admin-page-desc {
    color: var(--lt-muted);
    font-size: var(--lt-text-base);
    margin: 6px 0 0;
    max-width: 560px;
    line-height: 1.5;
}

.admin-page-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-page-body > .alert:first-child,
.admin-page-body > .row:first-child,
.admin-page-body > .page-toolbar:first-child,
.admin-page-body > .admin-card:first-child,
.admin-page-body > form:first-child {
    margin-top: 0;
}

/* ── Page toolbar ── */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.page-toolbar-desc {
    color: var(--lt-muted);
    font-size: var(--lt-text-base);
    max-width: 520px;
    line-height: 1.5;
    margin-right: auto;
}

.page-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Cards ── */
.admin-card {
    background: var(--lt-card);
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius);
    padding: 20px 22px;
    box-shadow: var(--lt-shadow);
}

.admin-card + .admin-card,
.page-toolbar + .admin-card,
.admin-card + .row,
.row + .admin-card {
    margin-top: 0;
}

.admin-card:has(.lt-filter-bar) {
    background: var(--lt-card);
    padding: 18px 20px;
}

.admin-card:has(.lt-table) {
    padding-bottom: 20px;
}

.admin-card:has(.lt-table) > .section-title,
.admin-card:has(.lt-table) > h5.section-title {
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--lt-border);
}

.admin-inner-card {
    padding: 16px 18px;
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius-sm);
    background: var(--lt-bg-subtle);
}

.admin-card-title {
    font-weight: 600;
    font-size: var(--lt-text-base);
    color: var(--lt-text);
}

.section-title {
    font-weight: 600;
    color: var(--lt-text);
    font-size: 16px;
    letter-spacing: -0.01em;
    margin-bottom: 0;
}

.section-subtitle {
    color: var(--lt-muted);
    font-size: var(--lt-text-base);
    margin-top: 3px;
    line-height: 1.5;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--lt-border);
}

/* ── Buttons ── */
.btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--lt-radius-sm);
    transition: all 140ms ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.btn-primary {
    background: var(--lt-primary);
    border-color: var(--lt-primary);
    font-size: var(--lt-text-base);
    padding: 8px 16px;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--lt-primary-hover);
    border-color: var(--lt-primary-hover);
}

.btn-outline-secondary {
    font-size: var(--lt-text-base);
    padding: 8px 16px;
    color: var(--lt-text-secondary);
    border-color: var(--lt-border-strong);
    background: #fff;
}

.btn-outline-secondary:hover {
    background: var(--lt-bg-subtle);
    border-color: var(--lt-border-strong);
    color: var(--lt-text);
}

.btn-outline-primary {
    font-size: var(--lt-text-base);
    padding: 8px 16px;
    color: var(--lt-primary);
    border-color: var(--lt-primary-20);
    background: #fff;
}

.btn-outline-primary:hover {
    background: var(--lt-primary-08);
    border-color: var(--lt-primary-20);
    color: var(--lt-primary);
}

.btn-outline-danger {
    font-size: var(--lt-text-base);
    font-weight: 600;
}

.btn-danger {
    font-size: var(--lt-text-base);
    font-weight: 600;
}

.btn-sm {
    font-size: var(--lt-text-sm);
    padding: 6px 12px;
    border-radius: 5px;
    gap: 4px;
}

.btn-filter,
.btn-clear {
    height: 38px;
    padding: 0 16px;
    font-size: var(--lt-text-base);
}

/* ── Tables ── */
.table {
    --bs-table-bg: transparent;
}

.table thead th {
    background: var(--lt-bg-subtle);
    color: var(--lt-text-secondary);
    font-weight: 600;
    font-size: var(--lt-text-sm);
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid var(--lt-border-strong);
    padding: 11px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    font-size: var(--lt-text-base);
    color: var(--lt-text);
    vertical-align: middle;
    border-bottom: 1px solid var(--lt-border);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background-color 100ms ease;
}

.table tbody tr:hover {
    background-color: rgba(244, 245, 248, 0.9);
}

.lt-table { margin-bottom: 0; }

.text-monospace {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
    font-size: var(--lt-text-sm);
    letter-spacing: -0.01em;
}

/* ── Badges ── */
.lt-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: var(--lt-text-sm);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.lt-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lt-badge-success { background: rgba(34, 197, 94, 0.10); color: #15803d; }
.lt-badge-success::before { background: #22c55e; }

.lt-badge-danger { background: rgba(239, 68, 68, 0.10); color: #b91c1c; }
.lt-badge-danger::before { background: #ef4444; }

.lt-badge-warning { background: rgba(234, 179, 8, 0.12); color: #92400e; }
.lt-badge-warning::before { background: #eab308; }

.lt-badge-info { background: rgba(59, 130, 246, 0.10); color: #1d4ed8; }
.lt-badge-info::before { background: #3b82f6; }

.lt-badge-neutral { background: #f3f4f6; color: #6b7280; }
.lt-badge-neutral::before { background: #9ca3af; }

.lt-channel-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lt-channel-sms { background: rgba(34, 197, 94, 0.08); color: #15803d; }
.lt-channel-whatsapp { background: rgba(37, 211, 102, 0.10); color: #166534; }

/* ── Metrics / Stat Cards ── */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-tile {
    background: var(--lt-card);
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius);
    padding: 18px 20px;
    box-shadow: var(--lt-shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

a.metric-tile-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.metric-tile-link:hover {
    border-color: var(--lt-border-strong);
    box-shadow: var(--lt-shadow-lg);
    transform: translateY(-1px);
}

a.metric-tile-link:active {
    transform: translateY(0);
}

.metric-tile-meta {
    font-size: var(--lt-text-xs);
    color: var(--lt-muted);
    margin-top: 4px;
    font-weight: 500;
}

.metrics-row--dash {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.metrics-row--dash > .metric-tile,
.metrics-row--dash > a.metric-tile-link {
    flex: 1 1 calc(20% - 12px);
    min-width: 200px;
    min-height: 88px;
}

.lt-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lt-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--lt-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lt-stat-icon.primary { background: var(--lt-primary-08); color: var(--lt-primary); }
.lt-stat-icon.success { background: rgba(34, 197, 94, 0.10); color: #16a34a; }
.lt-stat-icon.warning { background: rgba(234, 179, 8, 0.12); color: #ca8a04; }
.lt-stat-icon.danger { background: rgba(239, 68, 68, 0.10); color: #dc2626; }
.lt-stat-icon.info { background: rgba(59, 130, 246, 0.10); color: #2563eb; }

.lt-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--lt-text);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.lt-stat-label {
    color: var(--lt-muted);
    font-size: var(--lt-text-sm);
    font-weight: 500;
    margin-top: 3px;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ── Filter Bar ── */
.lt-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.lt-filter-bar .lt-filter-field {
    flex: 1 1 0;
    min-width: 160px;
}

.lt-filter-bar .lt-filter-field.search-field {
    flex: 2 1 0;
    min-width: 220px;
}

.lt-filter-bar .lt-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lt-filter-bar .form-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--lt-text-secondary);
    margin-bottom: 8px;
}

.lt-filter-bar .form-control,
.lt-filter-bar .form-select {
    height: 38px;
    font-size: var(--lt-text-base);
    padding-left: 12px;
    padding-right: 12px;
}

/* ── Forms ── */
.form-label {
    font-weight: 600;
    font-size: var(--lt-text-base);
    color: var(--lt-text-secondary);
    margin-bottom: 6px;
}

.form-control, .form-select, textarea {
    border-radius: var(--lt-radius-sm);
    border: 1px solid var(--lt-border-strong);
    font-family: inherit;
    font-size: var(--lt-text-base);
    color: var(--lt-text);
    padding: 8px 12px;
    min-height: 38px;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.form-control:focus, .form-select:focus, textarea:focus {
    box-shadow: 0 0 0 3px var(--lt-primary-08);
    border-color: var(--lt-primary-20);
}

.form-check-input:checked {
    background-color: var(--lt-primary);
    border-color: var(--lt-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--lt-primary-08);
    border-color: var(--lt-primary-20);
}

.form-text {
    font-size: 13px;
    color: var(--lt-muted);
    margin-top: 6px;
}

.field-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

/* ── Empty State ── */
.lt-empty-state {
    padding: 40px 24px;
    text-align: center;
}

.lt-empty-state .lt-empty-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--lt-radius-sm);
    background: var(--lt-bg-subtle);
    color: var(--lt-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.lt-empty-state .lt-empty-title {
    font-weight: 600;
    color: var(--lt-text);
    margin-bottom: 4px;
    font-size: var(--lt-text-base);
}

.lt-empty-state .lt-empty-desc {
    color: var(--lt-muted);
    font-size: var(--lt-text-base);
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Pagination ── */
.lt-pagination-info {
    color: var(--lt-muted);
    font-size: 14px;
    font-weight: 500;
}

.lt-pagination .page-item { margin: 0 3px; }

.lt-pagination .page-link {
    border: 1px solid var(--lt-border-strong);
    border-radius: 8px;
    color: var(--lt-text);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    line-height: 1.2;
    transition: all 140ms ease;
    min-width: 40px;
    text-align: center;
    font-family: inherit;
}

.lt-pagination .page-link:hover {
    background: var(--lt-primary-08);
    border-color: var(--lt-primary-20);
    color: var(--lt-primary);
}

.lt-pagination .page-item.active .page-link {
    background: var(--lt-primary);
    border-color: var(--lt-primary);
    color: #fff;
}

.lt-pagination .page-item.disabled .page-link {
    background: #f9fafb;
    border-color: var(--lt-border);
    color: #d1d5db;
    cursor: not-allowed;
}

/* ── Color Swatches ── */
.admin-color-swatch {
    height: 18px;
    width: 18px;
    border-radius: 4px;
    border: 1px solid var(--lt-border);
    flex-shrink: 0;
}

.admin-color-swatch-lg {
    height: 64px;
    width: 100%;
    border-radius: var(--lt-radius-sm);
    border: 1px solid var(--lt-border);
}

.admin-color-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Tabs ── */
.admin-tab-pills .nav-link {
    border-radius: var(--lt-radius-sm);
    padding: 10px 18px;
    color: var(--lt-muted);
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: all 140ms ease;
    border: 1px solid transparent;
}

.admin-tab-pills .nav-link:hover {
    color: var(--lt-text);
    background: var(--lt-bg-subtle);
}

.admin-tab-pills .nav-link.active {
    background: var(--lt-primary-08);
    color: var(--lt-primary);
    border-color: var(--lt-primary-12);
}

/* ── Misc ── */
.admin-icon-circle {
    height: 40px;
    width: 40px;
    border-radius: var(--lt-radius-sm);
    background: var(--lt-primary-08);
    color: var(--lt-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-code-block {
    display: block;
    background: #f9fafb;
    border: 1px solid var(--lt-border);
    padding: 10px 12px;
    border-radius: var(--lt-radius-sm);
    font-size: 13px;
}

.admin-alert {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--lt-radius-sm);
    padding: 12px 14px;
}

.admin-logo-card {
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius-sm);
    padding: 14px;
    text-align: center;
    background: #fafafa;
}

.admin-logo-card img {
    max-height: 100px;
    max-width: 100%;
    object-fit: contain;
}

.admin-logo-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lt-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.admin-empty-state {
    padding: 32px 20px;
    text-align: center;
    border: 1px dashed var(--lt-border-strong);
    border-radius: var(--lt-radius-sm);
    background: #fafafa;
}

.admin-empty-mini {
    color: var(--lt-muted);
    font-size: 12px;
}

.admin-note-block {
    background: #f9fafb;
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius-sm);
    padding: 14px;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
}

.alert {
    border-radius: var(--lt-radius-sm);
    font-size: 15px;
    font-weight: 500;
    border-width: 1px;
    padding: 14px 18px;
}

.alert-success {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.06);
    color: #15803d;
}

.alert-danger {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

.admin-card nav[aria-label="Page navigation"] {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--lt-border);
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--lt-border);
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Modals ── */
.modal-content {
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--lt-border);
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--lt-border);
    background: var(--lt-bg-subtle);
}

/* ── Media Grid ── */
.media-grid-card {
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius-sm);
    overflow: hidden;
    background: #fff;
    transition: box-shadow 140ms ease, border-color 140ms ease;
}

.media-grid-card:hover {
    box-shadow: var(--lt-shadow);
    border-color: var(--lt-border-strong);
}

.media-grid-thumb {
    aspect-ratio: 1;
    background: #f9fafb;
    border-bottom: 1px solid var(--lt-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.media-grid-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-grid-footer {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.media-grid-filename {
    font-size: 11px;
    color: var(--lt-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* ── Auth Pages ── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #0f1117 0%, #1a1d27 50%, #0f1117 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.auth-header {
    padding: 36px 36px 0;
    text-align: center;
}

.auth-logo img {
    height: 30px;
    width: auto;
}

.auth-title {
    margin-top: 22px;
    font-size: 22px;
    font-weight: 700;
    color: var(--lt-text);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--lt-muted);
    font-size: 13px;
    margin-top: 6px;
}

.auth-body {
    padding: 28px 36px;
}

.auth-footer {
    padding: 16px 36px;
    text-align: center;
    color: var(--lt-muted);
    font-size: 11px;
    border-top: 1px solid var(--lt-border);
    background: #fafafa;
}

.auth-otp-input {
    height: 48px;
    text-align: center;
    font-size: 20px;
    letter-spacing: 8px;
    font-weight: 600;
}

/* ── Data Tracking ── */
.tracking-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius-sm);
    margin-bottom: 10px;
    transition: background-color 140ms ease, border-color 140ms ease;
}

.tracking-switch:hover {
    background: var(--lt-bg-subtle);
    border-color: var(--lt-border-strong);
}

.tracking-switch-info {
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.tracking-switch-label {
    font-weight: 600;
    font-size: 15px;
    color: var(--lt-text);
    margin-bottom: 4px;
}

.tracking-switch-desc {
    font-size: 14px;
    color: var(--lt-muted);
    line-height: 1.5;
}

.form-check-input.form-switch-lg {
    width: 3em;
    height: 1.55em;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
}

.section-badge-sensitive { background: rgba(239, 68, 68, 0.08); color: #b91c1c; }
.section-badge-nonsensitive { background: rgba(59, 130, 246, 0.08); color: #1d4ed8; }
.section-badge-other { background: #f3f4f6; color: #6b7280; }

.tracking-section-title {
    font-weight: 600;
    font-size: 17px;
    color: var(--lt-text);
    letter-spacing: -0.02em;
}

.tracking-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tracking-status-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tracking-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-dot-active { background: #22c55e; }
.status-dot-inactive { background: #ef4444; }

/* ── Partner / TinyMCE ── */
.tinymce-editor { width: 100%; min-height: 160px; }

.tox.tox-tinymce {
    border-radius: var(--lt-radius-sm) !important;
    border: 1px solid var(--lt-border-strong) !important;
    overflow: hidden;
    box-shadow: none !important;
}

.tox.tox-tinymce.tox-tinymce--focused {
    box-shadow: 0 0 0 3px var(--lt-primary-08) !important;
    border-color: var(--lt-primary-20) !important;
}

.tox .tox-edit-area__iframe { background: #fff; }
.tox .tox-toolbar__primary { background: #fff; }

.checkbox-preview-box {
    height: 16px;
    width: 16px;
    border-radius: 3px;
    border: 2px solid #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox-preview-supporting a { text-decoration: underline; }

.cursor-pointer { cursor: pointer; }

.media-item {
    transition: box-shadow 140ms ease, transform 140ms ease;
    border-radius: var(--lt-radius-sm);
}

.media-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--lt-shadow);
}

.border-primary.border-2 {
    border-width: 2px !important;
    border-color: var(--lt-primary) !important;
}

.drop-zone {
    border: 1px dashed var(--lt-border-strong);
    border-radius: var(--lt-radius-sm);
    background: #fafafa;
    padding: 32px;
    text-align: center;
}

.text-muted-lt { color: var(--lt-muted); }
.text-sm { font-size: var(--lt-text-base); }
.text-xs { font-size: var(--lt-text-sm); }
.text-xxs { font-size: var(--lt-text-xs); }

.admin-page-body .row {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

/* ── Dashboard ── */
.dash-overview-row {
    --bs-gutter-y: 1rem;
    align-items: stretch;
}

.dash-overview-row > [class*="col-"] {
    display: flex;
}

.dash-chart-card {
    display: flex;
    flex-direction: column;
}

.dash-chart-card .admin-card-header {
    flex-shrink: 0;
    margin-bottom: 20px;
}

.dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--lt-card) 0%, var(--lt-bg-subtle) 100%);
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow);
    position: relative;
    overflow: hidden;
}

.dash-welcome::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--lt-primary);
    border-radius: var(--lt-radius) 0 0 var(--lt-radius);
}

.dash-welcome-greeting {
    font-size: 17px;
    font-weight: 600;
    color: var(--lt-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.dash-welcome-summary {
    font-size: var(--lt-text-sm);
    color: var(--lt-muted);
    margin: 6px 0 0;
}

.dash-welcome-stat {
    font-weight: 600;
    color: var(--lt-text-secondary);
}

.dash-welcome-date {
    text-align: right;
    flex-shrink: 0;
}

.dash-welcome-day {
    display: block;
    font-size: var(--lt-text-sm);
    font-weight: 600;
    color: var(--lt-text-secondary);
}

.dash-welcome-full-date {
    display: block;
    font-size: var(--lt-text-xs);
    color: var(--lt-muted);
    margin-top: 2px;
}

.dash-card-subtitle {
    font-size: var(--lt-text-sm);
    color: var(--lt-muted);
    margin: 4px 0 0;
}

.dash-card-link {
    font-size: var(--lt-text-sm);
    font-weight: 600;
    color: var(--lt-primary);
    text-decoration: none;
    transition: color 150ms ease;
}

.dash-card-link:hover {
    color: var(--lt-primary-hover);
}

.dash-chart-total {
    font-size: var(--lt-text-sm);
    font-weight: 600;
    color: var(--lt-muted);
    font-variant-numeric: tabular-nums;
}

.dash-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex: 1;
    min-height: 200px;
    padding-top: 8px;
}

.dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.dash-bar-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--lt-muted);
    height: 18px;
    font-variant-numeric: tabular-nums;
}

.dash-bar-track {
    flex: 1;
    width: 100%;
    max-width: 48px;
    display: flex;
    align-items: flex-end;
    background: var(--lt-bg-subtle);
    border-radius: 6px 6px 2px 2px;
    overflow: hidden;
}

.dash-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--lt-primary) 0%, rgba(255, 32, 72, 0.65) 100%);
    border-radius: 6px 6px 2px 2px;
    min-height: 0;
    transition: height 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-bar-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lt-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-panel-title {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--lt-border);
}

.dash-health-card {
    display: flex;
    flex-direction: column;
}

.dash-health-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.dash-health-item-compact {
    gap: 0;
}

.dash-health-channel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.dash-health-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dash-health-label {
    font-size: var(--lt-text-sm);
    font-weight: 500;
    color: var(--lt-text-secondary);
}

.dash-health-value {
    font-size: var(--lt-text-sm);
    font-weight: 700;
    color: var(--lt-text);
    font-variant-numeric: tabular-nums;
}

.dash-health-divider {
    height: 1px;
    background: var(--lt-border);
    margin: 2px 0 0;
}

.dash-health-section-label {
    font-size: var(--lt-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lt-muted);
    margin: 14px 0 0;
}

.dash-progress {
    height: 6px;
    background: var(--lt-bg-subtle);
    border-radius: 99px;
    overflow: hidden;
}

.dash-progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-progress-fill.success { background: #22c55e; }
.dash-progress-fill.info { background: #3b82f6; }
.dash-progress-fill.warning { background: #eab308; }

.dash-inline-bar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    max-width: 120px;
    margin-left: auto;
    position: relative;
    height: 6px;
    background: var(--lt-bg-subtle);
    border-radius: 99px;
    overflow: visible;
}

.dash-inline-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--lt-primary-20);
    border-radius: 99px;
    transition: width 400ms ease;
}

.dash-inline-bar-label {
    position: absolute;
    right: -36px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--lt-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-table th:last-child,
.dash-table td:last-child {
    padding-right: 44px;
}

.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--lt-muted);
    gap: 12px;
}

.dash-empty .lt-icon {
    opacity: 0.35;
}

.dash-empty p {
    margin: 0;
    font-size: var(--lt-text-sm);
}

.dash-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--lt-border);
}

.dash-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-activity-item:first-child {
    padding-top: 0;
}

.dash-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--lt-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-activity-icon.email {
    background: rgba(59, 130, 246, 0.10);
    color: #2563eb;
}

.dash-activity-icon.audit {
    background: var(--lt-primary-08);
    color: var(--lt-primary);
}

.dash-activity-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-activity-title {
    font-size: var(--lt-text-sm);
    font-weight: 600;
    color: var(--lt-text);
}

.dash-activity-detail {
    font-size: var(--lt-text-xs);
    color: var(--lt-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-activity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.dash-activity-meta time {
    font-size: 11px;
    color: var(--lt-muted);
    white-space: nowrap;
}

.dash-quick-card {
    align-self: flex-start;
    padding-bottom: 20px;
}

.dash-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dash-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    min-height: 44px;
    background: var(--lt-bg-subtle);
    border: 1px solid var(--lt-border);
    border-radius: var(--lt-radius-sm);
    text-decoration: none;
    color: var(--lt-text-secondary);
    font-size: var(--lt-text-sm);
    font-weight: 500;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.dash-quick-link:hover {
    background: var(--lt-card);
    border-color: var(--lt-border);
    color: var(--lt-text);
    transform: translateX(2px);
}

.dash-quick-link .lt-icon {
    color: var(--lt-muted);
    transition: color 150ms ease;
}

.dash-quick-link:hover .lt-icon {
    color: var(--lt-primary);
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .admin-sidebar { width: 240px; }
    .admin-content { padding: 20px 20px 32px; }
    .admin-page-title { font-size: 20px; }
    .metrics-row--dash > .metric-tile,
    .metrics-row--dash > a.metric-tile-link {
        flex: 1 1 calc(50% - 8px);
    }
    .lt-filter-bar .lt-filter-field { flex: 1 1 calc(50% - 8px); min-width: 140px; }
    .lt-filter-bar .lt-filter-field.search-field { flex: 1 1 100%; }
    .lt-filter-bar .lt-filter-actions { flex: 1 1 100%; }
}

@media (max-width: 575.98px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .admin-shell { flex-direction: column; }
    .admin-content { padding: 16px 16px 32px; }
    .admin-page-header { padding: 20px; }
    .admin-card { padding: 20px; }
    .admin-card:has(.lt-table) .table-responsive {
        margin-left: -20px;
        margin-right: -20px;
    }
    .lt-filter-bar .lt-filter-field { flex: 1 1 100%; }
    .auth-body, .auth-header { padding-left: 24px; padding-right: 24px; }
    .dash-welcome { flex-direction: column; align-items: flex-start; }
    .dash-welcome-date { text-align: left; }
    .metrics-row--dash > .metric-tile,
    .metrics-row--dash > a.metric-tile-link {
        flex: 1 1 100%;
    }
    .dash-quick-links { grid-template-columns: 1fr; }
    .dash-activity-meta { display: none; }
    .dash-inline-bar-label { position: static; transform: none; }
    .dash-table th:last-child,
    .dash-table td:last-child { padding-right: 12px; }
}
