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

:root {
    --portal-blue: #0c2d5a;
    --portal-blue-2: #14457f;
    --portal-blue-3: #e9f0fb;
    --portal-bg: #eef2f8;
    --portal-card: #ffffff;
    --portal-ink: #0e1726;
    --portal-muted: #5b6678;
    --portal-line: #e4eaf3;
    --portal-green: #1f9d6b;
    --portal-orange: #f8a600;
    --portal-shadow: 0 1px 2px rgba(12, 45, 90, 0.06), 0 12px 34px rgba(12, 45, 90, 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
}

body.portal-front-page {
    background: var(--portal-bg);
    color: var(--portal-ink);
    font-family: "Manrope", sans-serif;
    margin: 0;
}

.portal-front-page a {
    color: inherit;
    text-decoration: none;
}

.portal-main {
    margin: 0 auto;
    max-width: 1280px;
    padding-left: 24px;
    padding-right: 24px;
}

.portal-hero h1,
.portal-module h2,
.portal-panel h2,
.portal-stat strong {
    font-family: "Sora", "Manrope", sans-serif;
}

.portal-main {
    padding-bottom: 56px;
    padding-top: 28px;
}

.portal-hero {
    align-items: end;
    background: var(--portal-hero-gradient);
    border-radius: var(--radius-lg);
    color: #fff;
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 28px;
}

.portal-kicker {
    color: #bfd4f1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.portal-hero h1 {
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    margin: 0;
}

.portal-hero p {
    color: #dfe9f7;
    font-size: 16px;
    margin: 12px 0 0;
    max-width: 680px;
}

.portal-hero--simple {
    align-items: center;
    margin-bottom: 24px;
    min-height: 120px;
}

.portal-hero--simple h1 {
    margin: 0;
}

.portal-overview-columns {
    align-items: stretch;
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.portal-overview-columns--count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.portal-overview-columns--count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.portal-overview-column {
    background: var(--portal-card);
    border: 1px solid var(--portal-line);
    border-radius: var(--radius-md);
    box-shadow: var(--portal-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    padding: 20px;
}

.portal-overview-column__head {
    align-items: center;
    border-bottom: 1px solid var(--portal-line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: -4px 0 0;
    padding-bottom: 14px;
}

.portal-overview-column__head h2 {
    color: var(--portal-ink);
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 18px;
    margin: 0;
}

.portal-overview-column__head a {
    color: var(--portal-blue);
    font-size: 13px;
    font-weight: 800;
}

.portal-overview-summary {
    color: var(--portal-ink);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.portal-overview-summary strong {
    color: var(--portal-blue);
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 28px;
    margin-right: 4px;
}

.portal-overview-summary span {
    color: var(--portal-muted);
    display: block;
    font-size: 14px;
    margin-top: 6px;
}

.portal-overview-document-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-overview-document-list a {
    background: #f7f9fd;
    border: 1px solid var(--portal-line);
    border-radius: var(--radius-md);
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.portal-overview-document-list a:hover {
    border-color: rgba(12, 45, 90, 0.18);
    box-shadow: 0 8px 20px rgba(12, 45, 90, 0.08);
}

.portal-overview-document-list strong {
    color: var(--portal-blue);
    font-size: 14px;
}

.portal-overview-document-list span,
.portal-overview-document-list small {
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-overview-empty,
.portal-overview-empty-state {
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.portal-overview-empty-state {
    background: var(--portal-card);
    border: 1px solid var(--portal-line);
    border-radius: var(--radius-md);
    box-shadow: var(--portal-shadow);
    padding: 24px;
}

.portal-overview-column .product_catList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    max-width: none;
    width: 100%;
}

.portal-workbench .product_catList,
.portal-shop-category-archive .product_catList,
.shop-categories-archive .product_catList {
    margin: 0 auto;
    max-width: 718px;
}

.portal-shop-category-archive {
    margin: 0 auto 40px;
    max-width: 1180px;
    padding: 32px 24px 0;
}

.portal-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.portal-btn {
    align-items: center;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(12, 45, 90, 0.16);
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    min-height: 44px;
    padding: 0 16px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}

.portal-btn--light {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .8);
    color: var(--portal-blue);
    box-shadow: none;
}

.portal-btn--dark {
    background: var(--portal-blue);
    border: 1px solid var(--portal-blue);
    border-bottom: 3px solid var(--portal-orange);
    color: #fff;
}

.portal-btn:hover {
    box-shadow: 0 6px 18px rgba(12, 45, 90, .2);
    transform: translateY(-1px);
}

.portal-btn--light:hover {
    background: var(--portal-blue-3);
    box-shadow: none;
}

.portal-btn--dark:hover {
    background: var(--portal-blue-2);
    border-color: var(--portal-blue-2);
}

.portal-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.portal-stats--manager {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portal-stat--budget strong {
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.15;
    word-break: break-word;
}

.portal-stat--budget.is-loading strong {
    align-items: center;
    display: flex;
    min-height: 38px;
}

.portal-stat__spinner {
    animation: portal-stat-spin 0.8s linear infinite;
    border: 3px solid var(--portal-line);
    border-radius: 50%;
    border-top-color: var(--portal-blue);
    height: 24px;
    width: 24px;
}

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

.portal-stat--budget.is-healthy strong {
    color: var(--portal-green);
}

.portal-stat--budget.is-warning strong {
    color: var(--portal-orange);
}

.portal-stat--budget.is-critical strong {
    color: #d64545;
}

.portal-stat--budget.is-error strong {
    color: var(--portal-muted);
}

.portal-stat--unterweisungen strong {
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.15;
}

.portal-stat__progress,
.portal-overview-progress {
    background: #e8eef6;
    border-radius: var(--radius-pill);
    height: 10px;
    margin: 10px 0 6px;
    overflow: hidden;
    width: 100%;
}

.portal-stat__progress-fill,
.portal-overview-progress__fill {
    background: linear-gradient(90deg, var(--portal-green) 0%, #34c48d 100%);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0;
    transition: width 0.35s ease;
}

.portal-overview-progress {
    margin-bottom: 14px;
}

.portal-stat,
.portal-module,
.portal-panel {
    background: var(--portal-card);
    border: 1px solid var(--portal-line);
    border-radius: var(--radius-md);
    box-shadow: var(--portal-shadow);
}

.portal-stat {
    display: block;
    padding: 18px;
}

.portal-stat span,
.portal-stat small {
    color: var(--portal-muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.portal-stat strong {
    color: var(--portal-blue);
    display: block;
    font-size: 30px;
    margin: 8px 0 2px;
}

.portal-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.portal-module {
    border-top: 4px solid var(--portal-blue);
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 22px;
}

.portal-module--docs {
    border-top-color: var(--portal-blue-2);
}

.portal-module--calendar {
    border-top-color: var(--portal-green);
}

.portal-module span {
    color: var(--portal-blue-2);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-module h2 {
    color: var(--portal-ink);
    font-size: 21px;
    line-height: 1.2;
    margin: 18px 0 10px;
}

.portal-module p {
    color: var(--portal-muted);
    font-size: 14px;
    margin: 0;
}

.portal-module small {
    color: var(--portal-blue);
    font-weight: 800;
    margin-top: auto;
    padding-top: 20px;
}

.portal-workbench {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
}

.portal-panel {
    padding: 20px;
}

.portal-panel__head {
    align-items: center;
    border-bottom: 1px solid var(--portal-line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: -4px 0 16px;
    padding-bottom: 14px;
}

.portal-panel h2 {
    color: var(--portal-ink);
    font-size: 18px;
    margin: 0;
}

.portal-panel__head a {
    color: var(--portal-blue);
    font-size: 13px;
    font-weight: 800;
}

.portal-category-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-category {
    background: #f7f9fd;
    border: 1px solid var(--portal-line);
    border-radius: var(--radius-md);
    display: grid;
    min-height: 168px;
    overflow: hidden;
}

.portal-category img {
    height: 112px;
    object-fit: cover;
    width: 100%;
}

.portal-category > span {
    align-items: center;
    background: var(--portal-blue-3);
    color: var(--portal-blue);
    display: flex;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 42px;
    font-weight: 700;
    height: 112px;
    justify-content: center;
}

.portal-category strong {
    align-items: center;
    color: var(--portal-blue);
    display: flex;
    font-size: 14px;
    justify-content: center;
    line-height: 1.25;
    min-height: 56px;
    padding: 10px;
    text-align: center;
}

.portal-panel--notifications {
    display: grid;
    gap: 12px;
}

.portal-panel--notifications a {
    border: 1px solid var(--portal-line);
    border-radius: var(--radius-md);
    display: block;
    padding: 14px;
}

.portal-panel--notifications strong {
    color: var(--portal-blue);
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.portal-panel--notifications span {
    color: var(--portal-muted);
    display: block;
    font-size: 13px;
}

@media (max-width: 980px) {
    .portal-header {
        position: static;
    }

    .portal-header__main,
    .portal-header__nav,
    .portal-subnav,
    .portal-main {
        padding-left: 18px;
        padding-right: 18px;
    }

    .portal-header__main,
    .portal-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-actions {
        width: 100%;
    }

    .portal-actions a {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .portal-header__nav,
    .portal-workbench,
    .portal-overview-columns {
        grid-template-columns: 1fr;
    }

    .portal-overview-column .product_catList {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .portal-brand img {
        height: 46px;
    }

    .portal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .portal-hero {
        padding: 22px;
    }

    .portal-hero__actions,
    .portal-btn {
        width: 100%;
    }

    .portal-btn {
        justify-content: center;
    }

    .portal-stats,
    .portal-grid,
    .portal-category-grid {
        grid-template-columns: 1fr;
    }
}
