html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#app {
    min-height: 100%;
}


:root {
    /* Light mode borders */
    --corp-border: rgba(0, 0, 0, 0.08);
    --corp-border-soft: rgba(0, 0, 0, 0.06);
    --corp-border-dash: rgba(0, 0, 0, 0.14);
    /* Light mode surfaces */
    --corp-surface: rgba(255, 255, 255, 0.78);
    --corp-surface-strong: rgba(255, 255, 255, 0.85);
    --corp-surface-soft: rgba(255, 255, 255, 0.65);
    --corp-surface-faint: rgba(255, 255, 255, 0.55);
    /* Glass blur */
    --corp-blur: blur(14px);
    /* Brand accent (teal) */
    --corp-accent: #115857;
    --corp-accent-soft: rgba(17, 88, 87, 0.10);
    --corp-accent-border: rgba(17, 88, 87, 0.22);
}

.mud-theme-dark {
    /* Dark mode borders */
    --corp-border: rgba(255, 255, 255, 0.10);
    --corp-border-soft: rgba(255, 255, 255, 0.08);
    --corp-border-dash: rgba(255, 255, 255, 0.18);
    /* Dark mode surfaces */
    --corp-surface: rgba(22, 22, 24, 0.65);
    --corp-surface-strong: rgba(22, 22, 24, 0.70);
    --corp-surface-soft: rgba(255, 255, 255, 0.04);
    --corp-surface-faint: rgba(255, 255, 255, 0.03);
    /* Accent in dark mode (kept as you had it) */
    --corp-accent: #5B8CFF;
    --corp-accent-soft: rgba(91, 140, 255, 0.14);
    --corp-accent-border: rgba(91, 140, 255, 0.18);
}


.corp-panel {
    border: 1px solid var(--corp-border);
    background: var(--corp-surface);
    backdrop-filter: var(--corp-blur);
}

.corp-panel--strong {
    background: var(--corp-surface-strong);
}

.corp-panel--soft {
    border: 1px solid var(--corp-border-soft);
    background: var(--corp-surface-soft);
}

.corp-panel--faint {
    border: 1px dashed var(--corp-border-dash);
    background: var(--corp-surface-faint);
}


/* App shell background (subtle) */
.adm-shell {
    background: rgba(0, 0, 0, 0.015);
}

.mud-theme-dark .adm-shell {
    background: rgba(255, 255, 255, 0.02);
}

/* Drawer (left nav) */
.adm-drawer {
    width: 280px;
    border-right: 1px solid var(--corp-border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--corp-blur);
}

.mud-theme-dark .adm-drawer {
    background: rgba(20, 20, 22, 0.65);
}

/* Brand block inside drawer */
.adm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 14px;
    cursor: pointer;
    user-select: none;
}

.adm-logo {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.adm-brandTitle {
    font-weight: 850;
    letter-spacing: -0.2px;
}

.adm-brandSub {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

/* Drawer nav tuning */
.adm-divider {
    opacity: 0.7;
}

.adm-nav .mud-nav-link {
    border-radius: 12px;
    margin: 4px 10px;
}

.adm-drawerFooter {
    padding: 14px 12px 16px;
}

/* Top app bar */
.adm-appbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: var(--corp-blur);
    border-bottom: 1px solid var(--corp-border);
}

.mud-theme-dark .adm-appbar {
    background: rgba(18, 18, 20, 0.65);
}

.adm-appbarTitle {
    font-weight: 800;
}

.adm-iconBtn {
    opacity: 0.9;
}

.adm-userBtn {
    text-transform: none;
    font-weight: 700;
}

.adm-userName {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Main content */
.adm-main {
    padding: 22px 22px 40px;
}

.adm-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page header row */
.adm-pageHead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.adm-hTitle {
    font-weight: 900;
    letter-spacing: -0.4px;
}

.adm-hSub {
    opacity: 0.75;
    margin-top: 6px;
}

.adm-headActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Generic admin panels
   - Removed duplicate `.adm-panel` blocks; now one source of truth */
.adm-panel {
    border-radius: 18px;
    border: 1px solid var(--corp-border);
    background: var(--corp-surface);
    backdrop-filter: var(--corp-blur);
}

.adm-panelHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.adm-muted {
    opacity: 0.75;
}

/* KPI cards */
.adm-kpi {
    border-radius: 18px;
    padding: 18px;
    height: 100%;
    border: 1px solid var(--corp-border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--corp-blur);
}

.mud-theme-dark .adm-kpi {
    background: var(--corp-surface-strong);
}

.adm-kpiTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    opacity: 0.95;
}

.adm-chip {
    border-radius: 999px;
}

.adm-kpiValue {
    font-weight: 900;
    letter-spacing: -0.6px;
    margin-top: 10px;
}

/* Alert / empty / action rows */
.adm-alertRow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--corp-border-soft);
    background: var(--corp-surface-soft);
}

.adm-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed var(--corp-border-dash);
    background: var(--corp-surface-faint);
}

.adm-actionRow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--corp-border-soft);
    background: var(--corp-surface-soft);
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

    .adm-actionRow:hover {
        transform: translateY(-1px);
        border-color: var(--corp-border);
    }

.adm-actionText {
    flex: 1;
}

.adm-actionTitle {
    font-weight: 850;
}

.adm-actionSub {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 2px;
}


.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient( 180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.02) 40%, transparent );
}

.mud-theme-dark .auth-layout {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 50%);
}

/* Top bar */
.auth-topbar {
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-brandText {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

/* Centered content */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Auth card (use Mud surface token for theme consistency) */
.auth-card {
    width: 100%;
    max-width: 720px;
    padding: 32px;
    border-radius: 22px;
    border: 1px solid var(--corp-border);
    background: var(--mud-palette-surface);
}

/* Mobile refinement (kept because you referenced it) */
@media (max-width: 960px) {
    .auth-left {
        padding-right: 0;
        margin-bottom: 24px;
    }
}


.corp-nav {
    padding: 10px 8px;
}

.corp-nav__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 6px;
}

.corp-nav__logo {
    border-radius: 14px;
}

.corp-nav__brandText {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

/* Section headings */
.corp-nav__sectionTitle {
    padding: 10px 12px 6px;
    letter-spacing: 0.12em;
    opacity: 0.75;
    font-weight: 800;
}

.corp-nav__section {
    display: grid;
    gap: 4px;
    padding: 0 6px 8px;
}

/* Nav link wrapper */
.corp-nav__link {
    border-radius: 14px;
    margin: 0 4px;
}

    /* MudNavLink applies `.mud-nav-link` internally; keep Mud behavior intact */
    .corp-nav__link .mud-nav-link {
        border-radius: 14px;
        padding: 10px 12px;
        transition: background 0.15s ease, transform 0.12s ease;
    }

        /* Hover */
        .corp-nav__link .mud-nav-link:hover {
            transform: translateY(-1px);
            background: rgba(0, 0, 0, 0.04);
        }

.mud-theme-dark .corp-nav__link .mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Active (selected route) */
.corp-nav__link .mud-nav-link.active {
    background: var(--corp-accent-soft);
    border: 1px solid var(--corp-accent-border);
    position: relative; /* needed for ::before indicator */
}

    /* Left indicator bar */
    .corp-nav__link .mud-nav-link.active::before {
        content: "";
        position: absolute;
        left: 6px;
        top: 10px;
        bottom: 10px;
        width: 3px;
        border-radius: 999px;
        background: var(--corp-accent);
    }

/* Empty state card inside nav */
.corp-nav__empty {
    border-radius: 18px;
    padding: 14px;
    margin: 10px 10px 0;
    border: 1px solid var(--corp-border);
    background: rgba(255, 255, 255, 0.7);
}

.mud-theme-dark .corp-nav__empty {
    background: rgba(15, 23, 42, 0.72);
}


.adm-filterBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.adm-filterSearch {
    flex: 1;
    min-width: 280px;
}

.adm-filterSelect {
    min-width: 180px;
}

/* Table container polish */
.adm-table {
    border-radius: 16px;
    overflow: hidden;
}

    /* MudTable has an internal container; round it too */
    .adm-table .mud-table-container {
        border-radius: 16px;
    }

/* Clickable cell */
.adm-td-link {
    cursor: pointer;
}

/* Company display cell */
.adm-companyCell {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.adm-companyName {
    font-weight: 850;
}

.adm-companySub {
    font-size: 12px;
    opacity: 0.70;
    margin-top: 4px;
}

/* Status chip */
.adm-statusChip {
    border-radius: 999px;
    font-weight: 800;
}


.corp-card {
    border-radius: 18px;
    border: 1px solid var(--corp-border);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: var(--corp-blur);
    overflow: hidden;
}

.mud-theme-dark .corp-card {
    background: var(--corp-surface);
}

/* Header */
.corp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 12px;
}

.corp-title {
    font-weight: 900;
    letter-spacing: -0.4px;
}

.corp-subtitle {
    opacity: 0.75;
    margin-top: 6px;
    max-width: 70ch;
}

.corp-req {
    font-weight: 900;
}

/* Dividers */
.corp-divider {
    opacity: 0.65;
}

.corp-dividerSoft {
    opacity: 0.35;
}

/* Content grid padding */
.corp-grid {
    padding: 16px 18px 18px;
}

/* Section header */
.corp-sectionHead {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 2px 0;
}

.corp-sectionIcon {
    font-size: 22px;
    margin-top: 2px;
    opacity: 0.9;
}

.corp-sectionTitle {
    font-weight: 850;
    letter-spacing: -0.2px;
}

.corp-sectionHint {
    opacity: 0.72;
    margin-top: 2px;
}

/* Inputs: premium feel without breaking MudBlazor */
.corp-card .mud-input-control {
    border-radius: 14px;
}

/* Outlined inputs: increase border visibility on hover */
.corp-card .mud-input-outlined-border {
    opacity: 0.85;
}

.corp-card .mud-input-control:hover .mud-input-outlined-border {
    opacity: 1;
}

/* Actions row */
.corp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

    /* Button rounding + emphasis */
    .corp-actions .mud-button-filled-primary,
    .corp-actions .mud-button-outlined {
        border-radius: 14px;
        font-weight: 800;
    }

/* Chip in header */
.corp-header__right .mud-chip {
    border-radius: 999px;
    font-weight: 800;
}

/* Mobile spacing */
@media (max-width: 600px) {
    .corp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .corp-grid {
        padding: 14px 14px 16px;
    }

    .corp-actions {
        justify-content: stretch;
    }

        .corp-actions .mud-button-root {
            flex: 1;
        }
}


.adm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.adm-toolbarSearch {
    flex: 1;
    min-width: 320px;
}

.adm-toolbarSelect {
    min-width: 180px;
}


.corp-miniPanel {
    border-radius: 16px;
    border: 1px solid var(--corp-border);
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: var(--corp-blur);
    padding: 14px 14px 12px;
}

.mud-theme-dark .corp-miniPanel {
    background: var(--corp-surface-soft);
}

/* Hover polish */
.corp-miniPanel:hover {
    border-color: var(--corp-border);
}

.mud-theme-dark .corp-miniPanel:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.corp-miniPanelHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.corp-miniPanelTitle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.corp-miniPanelIcon {
    font-size: 22px;
    margin-top: 2px;
    opacity: 0.9;
}

.corp-miniPanelText {
    font-weight: 850;
    letter-spacing: -0.2px;
}

.corp-miniPanelHint {
    opacity: 0.72;
    margin-top: 2px;
}

.corp-miniPanelChip {
    border-radius: 999px;
    font-weight: 800;
    opacity: 0.9;
}

/* Checkbox row layout */
.corp-channelRow {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 2px;
}

/* MudCheckbox tuning */
.corp-channelChk .mud-checkbox {
    border-radius: 12px;
}

/* Label emphasis */
.corp-channelChk .mud-typography {
    font-weight: 800;
    opacity: 0.92;
}


.news-formatbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    margin-bottom: 6px;
    border: 1px solid var(--corp-border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
}

.mud-theme-dark .news-formatbar {
    border: 1px solid var(--corp-border);
    background: rgba(20, 20, 22, 0.50);
}

.news-uploadbar {
    padding: 10px 12px;
    border: 1px solid var(--corp-border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
}

.mud-theme-dark .news-uploadbar {
    border: 1px solid var(--corp-border);
    background: rgba(20, 20, 22, 0.50);
}

.news-coverPreview {
    border: 1px solid var(--corp-border-soft);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.70);
}

.mud-theme-dark .news-coverPreview {
    border: 1px solid var(--corp-border);
    background: rgba(20, 20, 22, 0.40);
}

.news-coverPreview img {
    width: 100%;
    height: auto;
    display: block;
}

