/*
  standard.css
  Basiscss des Portals (Optik wie vorher, ausgelagert)
*/
body{font-family:system-ui,Segoe UI,Arial,sans-serif;margin:0;background:#f5f6fa;color:#222}
    header{background:#fff;color:#15283a;padding:18px 20px;border-bottom:1px solid rgba(70,86,98,.16)}
    .wrap{max-width:1100px;margin:0 auto;padding:20px}
    .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
    .card{background:#fff;border-radius:14px;box-shadow:0 6px 20px rgba(0,0,0,.08);padding:16px}
    .card h3{margin:0 0 8px 0}
    .btn{display:inline-block;padding:10px 14px;border-radius:10px;background:#2563eb;color:#fff;text-decoration:none}
    button.btn{border:0;cursor:pointer;font:inherit}
    .btn.secondary{background:#374151}
    .btn.danger{background:#dc2626}
    .btn.warning{background:#b45309}
    .mobile-print-note{display:none;color:#7a5416;font-weight:800;line-height:1.35}
    .danger-zone{border:1px solid #fecaca;background:#fff7f7}
    .danger-zone h3{color:#991b1b}
    .row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
    form{margin:0}
    input,select{padding:10px;border-radius:10px;border:1px solid #d1d5db}
    .small{color:#6b7280;font-size:.92rem}
    .player-select-card{margin-bottom:20px}
    .player-select-card h2{margin:0 0 8px 0;font-size:1.55rem}
    .module-selection-intro{
        margin:0 0 18px;
        padding:16px 18px;
        background:#fff;
        border:1px solid rgba(76,91,106,.16);
        border-left:5px solid #6d93bd;
        border-radius:8px;
        box-shadow:0 8px 22px rgba(74,87,96,.08);
    }
    .module-selection-intro h2{
        margin:0 0 7px;
        color:#315f91;
        font-size:1.35rem;
        line-height:1.2;
    }
    .module-selection-intro p{
        margin:0;
        color:#3f4f5d;
        font-size:1rem;
        line-height:1.5;
    }
    .module-selection-intro .rich-text{
        color:#3f4f5d;
        font-size:1rem;
        line-height:1.5;
    }
    .module-selection-intro .rich-text h2,
    .module-selection-intro .rich-text h3,
    .module-selection-intro .rich-text h4{
        margin:12px 0 7px;
        color:#315f91;
        line-height:1.2;
    }
    .module-selection-intro .rich-text p{
        margin:0 0 9px;
    }
    .module-selection-intro .rich-text ul,
    .module-selection-intro .rich-text ol{
        margin:0 0 10px 20px;
        padding:0;
    }
    .choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:16px}
    .choice-box{border:1px solid #e5e7eb;border-radius:12px;padding:16px;background:#f9fafb;display:flex;flex-direction:column;gap:10px}
    .choice-box label{font-weight:700}
    .choice-box .btn{border:0;cursor:pointer;text-align:center}
    .notice{margin-top:12px;padding:10px 12px;border-radius:10px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
    .game-card{display:flex;flex-direction:column;min-height:160px}
    .game-description{margin:0;line-height:1.45;flex:1}
    .game-actions{margin-top:16px}
    .auth-card{display:flex;flex-direction:column;gap:10px}
    .auth-card h2{margin:0 0 4px 0;font-size:1.35rem}
    .auth-card label,.player-switch label{font-weight:700}
    .password-field{position:relative;display:flex;align-items:center}
    .password-field input{width:100%;box-sizing:border-box;padding-right:48px}
    .password-toggle{
        position:absolute;
        right:6px;
        top:50%;
        transform:translateY(-50%);
        width:36px;
        height:36px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        border:0;
        border-radius:8px;
        background:transparent;
        color:#374151;
        cursor:pointer;
        line-height:1;
    }
    .password-toggle:hover,
    .password-toggle:focus{background:#eef2f7;outline:none}
    .password-toggle.is-visible{background:#e0ecff;color:#1d4ed8}
    .password-eye{
        position:relative;
        width:19px;
        height:12px;
        display:block;
        border:2px solid currentColor;
        border-radius:50%;
    }
    .password-eye::after{
        content:"";
        position:absolute;
        left:50%;
        top:50%;
        width:6px;
        height:6px;
        border-radius:50%;
        background:currentColor;
        transform:translate(-50%,-50%);
    }
    .premium-player-form,.player-switch{margin-top:14px}
    button:disabled,input:disabled{opacity:.55;cursor:not-allowed}
    .form-two-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    .form-two-columns>div{display:flex;flex-direction:column;gap:8px}
    .profile-form{display:flex;flex-direction:column;gap:12px;max-width:760px}
    .profile-form h2{margin:12px 0 2px;font-size:1.2rem}
    .profile-form label{font-weight:700}
    .profile-form input{width:100%;box-sizing:border-box}
    .profile-details-stack{display:flex;flex-direction:column;gap:16px}
    .profile-detail{padding:0;overflow:hidden}
    .profile-detail>summary,
    .player-name-detail>summary{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:14px;
        cursor:pointer;
        list-style:none;
    }
    .profile-detail>summary::-webkit-details-marker,
    .player-name-detail>summary::-webkit-details-marker{display:none}
    .profile-detail>summary{
        padding:16px 18px;
        background:#f7f2e9;
        border-bottom:1px solid rgba(76,91,106,.12);
    }
    .profile-detail>summary span,
    .player-name-detail>summary span{
        color:#102638;
        font-weight:850;
    }
    .profile-detail>summary small,
    .player-name-detail>summary small{
        color:#687887;
        font-size:.9rem;
        text-align:right;
    }
    .profile-detail>summary::after,
    .player-name-detail>summary::after{
        content:"+";
        flex:0 0 auto;
        width:26px;
        height:26px;
        border-radius:999px;
        display:grid;
        place-items:center;
        background:#fff;
        color:#315f91;
        font-weight:900;
        border:1px solid rgba(76,91,106,.14);
    }
    .profile-detail[open]>summary::after,
    .player-name-detail[open]>summary::after{content:"-"}
    .profile-detail>.profile-form,
    .profile-player-panel{padding:18px}
    .player-name-list{display:flex;flex-direction:column;gap:10px;margin-top:12px}
    .player-name-detail{
        border:1px solid rgba(76,91,106,.13);
        border-radius:10px;
        background:#fff;
        overflow:hidden;
    }
    .player-name-detail>summary{
        padding:13px 14px;
        background:#fbf8f1;
    }
    .player-name-detail[open]>summary{border-bottom:1px solid rgba(76,91,106,.1)}
    .profile-inline-form,
    .fixed-player-note{
        display:flex;
        flex-direction:column;
        gap:10px;
        padding:14px;
    }
    .profile-inline-form label{font-weight:700}
    .profile-action-row{
        display:flex;
        align-items:center;
        gap:10px;
        flex-wrap:wrap;
        padding:0 14px 14px;
    }
    .profile-inline-form .profile-action-row{padding:0}
    .profile-action-row input{flex:1 1 260px;min-width:0}
    .fixed-player-note p{margin:0}
    @media (max-width:720px){
        .desktop-print-action{display:none!important}
        .mobile-print-note{display:block}
    }
    @media (max-width:640px){.form-two-columns{grid-template-columns:1fr}}

/* Portal-Startseite im Seniorenmaterial-Stil */
body.portal-home{
    margin:0;
    background:#fbf8f1;
    color:#15283a;
    font-family:system-ui,Segoe UI,Arial,sans-serif;
}
.portal-home .site-shell{
    width:min(1180px,calc(100% - 40px));
    margin:0 auto;
}
.portal-home .site-header{
    position:sticky;
    top:0;
    z-index:5;
    background:rgba(255,255,255,.92);
    border-bottom:1px solid rgba(70,86,98,.16);
    backdrop-filter:blur(10px);
    padding:0;
    color:#142537;
}
.portal-home .nav-bar{
    min-height:68px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
}
.portal-home .brand{
    display:flex;
    align-items:baseline;
    gap:10px;
    color:#19334f;
    text-decoration:none;
    font-weight:700;
    white-space:nowrap;
}
.portal-home .brand-script{
    color:#4f78a4;
    font-size:1.65rem;
    font-family:"Segoe Script","Brush Script MT",cursive;
    font-weight:600;
}
.portal-home .main-nav{
    display:flex;
    gap:30px;
    align-items:center;
    font-size:.98rem;
}
.portal-home .main-nav a,
.portal-home .nav-link{
    color:#142537;
    text-decoration:none;
}
.portal-home .main-nav a{
    padding:25px 0 21px;
    border-bottom:2px solid transparent;
}
.portal-home .main-nav a.active{
    color:#315f91;
    border-color:#4f78a4;
}
.portal-home .nav-actions{
    display:flex;
    align-items:center;
    gap:12px;
}
.portal-home .user-pill{
    color:#526273;
    background:#f3f0e9;
    border:1px solid rgba(72,89,105,.12);
    border-radius:999px;
    padding:8px 12px;
    font-size:.9rem;
    white-space:nowrap;
}
.portal-home .hero{
    min-height:410px;
    background:
        linear-gradient(90deg,rgba(251,248,241,.98) 0%,rgba(251,248,241,.93) 34%,rgba(251,248,241,.45) 55%,rgba(251,248,241,.05) 100%),
        url("../assets/hero-seniorenmaterial.png") right center/auto 100% no-repeat;
    border-bottom:1px solid rgba(70,86,98,.08);
}
.portal-home .hero-inner{
    min-height:410px;
    display:flex;
    align-items:center;
}
.portal-home .hero-copy{
    max-width:560px;
    padding:44px 0 54px;
}
.portal-home .eyebrow{
    color:#6b7c6e;
    font-weight:700;
    margin-bottom:10px;
}
.portal-home h1{
    margin:0;
    color:#102638;
    font-size:clamp(2.4rem,5vw,4.35rem);
    line-height:1.02;
    letter-spacing:0;
}
.portal-home h1 span{
    display:block;
    color:#547da7;
    font-family:"Segoe Script","Brush Script MT",cursive;
    font-weight:600;
}
.portal-home .hero-copy p{
    color:#61707d;
    font-size:1.25rem;
    line-height:1.45;
    max-width:460px;
    margin:18px 0 24px;
}
.portal-home .hero-search{
    display:flex;
    max-width:475px;
    background:#fff;
    border:1px solid rgba(84,101,116,.18);
    border-radius:10px;
    box-shadow:0 8px 22px rgba(52,69,83,.08);
    overflow:hidden;
}
.portal-home .hero-search input{
    flex:1;
    min-width:0;
    border:0;
    border-radius:0;
    padding:17px 20px;
    font-size:1rem;
    background:#fff;
}
.portal-home .hero-search button{
    border:0;
    background:#557ca5;
    color:#fff;
    padding:0 22px;
    font-weight:700;
    cursor:pointer;
}
.portal-home .access-panel,
.portal-home .player-panel{
    margin:24px 0;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:16px;
}
.portal-home .player-panel{
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:14px;
    padding:18px;
    align-items:center;
}
.portal-home .player-panel>div:first-child{
    display:flex;
    flex-direction:column;
    gap:4px;
}
.portal-home .player-panel span,
.portal-home .premium-player-form span{
    color:#687887;
}
.portal-home .access-card{
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:14px;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:12px;
    box-shadow:0 8px 24px rgba(74,87,96,.07);
}
.portal-home .access-card span{
    color:#687887;
}
.portal-home .category-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin:22px 0;
}
.portal-home .rubric-filter{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:22px 0 8px;
}
.portal-home .rubric-filter a{
    display:inline-flex;
    align-items:center;
    min-height:38px;
    padding:0 14px;
    border-radius:999px;
    color:#285983;
    background:#fff;
    border:1px solid rgba(76,91,106,.14);
    text-decoration:none;
    font-weight:700;
    box-shadow:0 6px 18px rgba(74,87,96,.05);
}
.portal-home .rubric-filter a.active{
    background:#557ca5;
    color:#fff;
    border-color:#557ca5;
}
.portal-home .module-sections{
    display:flex;
    flex-direction:column;
    gap:8px;
}
.portal-home .module-rubric{
    scroll-margin-top:90px;
}
.portal-home .rubric-heading{
    display:flex;
    align-items:center;
    gap:14px;
    margin:28px 0 4px;
}
.portal-home .rubric-heading h2{
    margin:0;
    font-size:1.35rem;
    color:#102638;
}
.portal-home .rubric-heading p{
    margin:3px 0 0;
    color:#61707d;
}
.portal-home .category-tile{
    min-height:116px;
    border-radius:10px;
    border:1px solid rgba(77,92,106,.1);
    padding:20px;
    display:flex;
    gap:18px;
    align-items:flex-start;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
.portal-home .category-tile h2{
    margin:0 0 7px;
    font-size:1.2rem;
    line-height:1.2;
}
.portal-home .category-tile p{
    margin:0 0 12px;
    color:#4f606b;
    font-size:.92rem;
    line-height:1.4;
}
.portal-home .tile-icon{
    flex:0 0 56px;
    height:56px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.58);
    color:#3f6f8e;
    font-weight:800;
    box-shadow:inset 0 0 0 1px rgba(36,60,77,.1);
}
.portal-home .tile-icon img,
.portal-home .mini-item span img{
    display:block;
    width:70%;
    height:70%;
    object-fit:contain;
}
.portal-home .tile-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.portal-home .tile-actions a{
    color:#285983;
    font-weight:700;
    text-decoration:none;
    font-size:.9rem;
}
.portal-home .tile-actions form{
    margin:0;
}
.portal-home .tile-actions button{
    border:0;
    background:transparent;
    color:#285983;
    font:inherit;
    font-size:.9rem;
    font-weight:700;
    padding:0;
    cursor:pointer;
}
.portal-home .tone-1{background:#eaf2fb}
.portal-home .tone-2{background:#edf3e7}
.portal-home .tone-3{background:#fff0cf}
.portal-home .tone-4{background:#f0edf8}
.portal-home .tone-5{background:#f9ebe4}
.portal-home .tone-6{background:#e8f3f4}
.portal-home .tone-7{background:#f3efe4}
.portal-home .tone-8{background:#e7f2ed}
.portal-home .content-panels{
    display:grid;
    grid-template-columns:1fr 1fr 1.1fr;
    gap:18px;
    margin:20px 0 26px;
}
.portal-home .info-panel,
.portal-home .feature-panel{
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    padding:18px;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
.portal-home .panel-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:12px;
}
.portal-home .panel-title h2,
.portal-home .feature-panel h2{
    margin:0;
    font-size:1.05rem;
}
.portal-home .panel-title span{
    background:#efc36b;
    color:#fff;
    border-radius:999px;
    padding:4px 9px;
    font-size:.72rem;
    font-weight:800;
    text-transform:uppercase;
}
.portal-home .mini-item{
    display:flex;
    gap:12px;
    align-items:center;
    color:#142537;
    text-decoration:none;
    padding:9px 0;
}
.portal-home .mini-item span{
    flex:0 0 42px;
    height:42px;
    border-radius:9px;
    display:grid;
    place-items:center;
    background:#f0f4f5;
    color:#557ca5;
    font-weight:800;
}
.portal-home .mini-item div{
    display:flex;
    flex-direction:column;
    min-width:0;
}
.portal-home .mini-item small{
    color:#687887;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:280px;
}
.portal-home .feature-panel{
    background:linear-gradient(135deg,#fff 0%,#f6f0e4 100%);
    display:flex;
    align-items:center;
}
.portal-home .feature-panel p{
    color:#5b6b77;
    line-height:1.45;
}
.portal-home .benefit-band{
    background:#f1ede6;
    border-top:1px solid rgba(70,86,98,.08);
    padding:24px 0;
}
.portal-home .benefit-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}
.portal-home .benefit-grid div{
    display:flex;
    flex-direction:column;
    gap:4px;
}
.portal-home .benefit-grid span{
    color:#61707d;
    line-height:1.35;
}
.portal-home .site-footer{
    background:#fff;
    border-top:1px solid rgba(70,86,98,.08);
    color:#687887;
    font-size:.9rem;
    padding:16px 0;
    text-align:center;
}
.portal-home .site-footer p{
    margin:0;
}
.portal-home .empty-state{
    grid-column:1/-1;
    background:#fff;
    border-radius:12px;
    padding:22px;
    color:#687887;
    border:1px solid rgba(76,91,106,.13);
}
.portal-home .home-rubric-callout{
    margin:26px 0 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:24px;
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
.portal-home .home-rubric-callout span,
.portal-home .section-heading span{
    display:block;
    margin:0 0 5px;
    color:#6b7c6e;
    font-size:.82rem;
    font-weight:900;
    text-transform:uppercase;
}
.portal-home .home-rubric-callout h2,
.portal-home .section-heading h2{
    margin:0;
    color:#102638;
    font-size:1.55rem;
    line-height:1.15;
}
.portal-home .home-rubric-callout p{
    max-width:650px;
    margin:8px 0 0;
    color:#61707d;
    line-height:1.45;
}
.portal-home .article-module{
    margin:0 0 28px;
}
.portal-home .section-heading{
    display:flex;
    justify-content:space-between;
    align-items:end;
    gap:16px;
    margin:0 0 14px;
}
.portal-home .article-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:16px;
}
.portal-home .article-card{
    overflow:hidden;
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
.portal-home .article-card img{
    display:block;
    width:100%;
    max-height:360px;
    aspect-ratio:16/7;
    object-fit:contain;
    background:#edf3e7;
}
.portal-home .article-card-body,
.portal-home .article-card-empty{
    padding:18px;
}
.portal-home .article-card h3{
    margin:0 0 8px;
    color:#102638;
    font-size:1.22rem;
    line-height:1.2;
}
.portal-home .article-card p{
    margin:0 0 12px;
    color:#4f606b;
    line-height:1.5;
}
.portal-home .article-card .article-teaser{
    color:#315f91;
    font-weight:760;
}
.portal-home .article-rich-text{
    margin:0 0 12px;
    color:#4f606b;
    line-height:1.5;
}
.portal-home .article-rich-text h2,
.portal-home .article-rich-text h3,
.portal-home .article-rich-text h4{
    margin:14px 0 8px;
    color:#102638;
    line-height:1.2;
}
.portal-home .article-rich-text h2{
    font-size:1.18rem;
}
.portal-home .article-rich-text h3{
    font-size:1.06rem;
}
.portal-home .article-rich-text h4{
    font-size:1rem;
}
.portal-home .article-rich-text p{
    margin:0 0 10px;
}
.portal-home .article-rich-text ul,
.portal-home .article-rich-text ol{
    margin:0 0 12px 20px;
    padding:0;
}
.portal-home .article-rich-text li{
    margin:0 0 5px;
}
.portal-home .article-rich-text strong,
.portal-home .article-rich-text b{
    color:#19334f;
    font-weight:850;
}

@media (max-width:980px){
    .portal-home .main-nav{display:none}
    .portal-home .hero{background:
        linear-gradient(180deg,rgba(251,248,241,.98) 0%,rgba(251,248,241,.86) 58%,rgba(251,248,241,.98) 100%),
        url("../assets/hero-seniorenmaterial.png") right top/auto 58% no-repeat;
        min-height:540px;
    }
    .portal-home .hero-inner{align-items:flex-end;min-height:540px}
    .portal-home .category-grid{grid-template-columns:repeat(2,1fr)}
    .portal-home .content-panels{grid-template-columns:1fr}
    .portal-home .benefit-grid{grid-template-columns:repeat(2,1fr)}
    .portal-home .home-rubric-callout{align-items:flex-start;flex-direction:column}
}
@media (max-width:640px){
    .portal-home .site-shell{width:min(100% - 26px,1180px)}
    .portal-home .nav-bar{align-items:flex-start;flex-direction:column;padding:14px 0}
    .portal-home .nav-actions{width:100%;justify-content:space-between}
    .portal-home .hero{min-height:580px;background-size:auto 48%}
    .portal-home .hero-inner{min-height:580px}
    .portal-home .hero-copy{padding-bottom:32px}
    .portal-home .hero-search{max-width:none}
    .portal-home .hero-search button{padding:0 15px}
    .portal-home .category-grid{grid-template-columns:1fr}
    .portal-home .category-tile{min-height:auto}
    .portal-home .benefit-grid{grid-template-columns:1fr}
    .portal-home .section-heading{align-items:flex-start;flex-direction:column}
}

/* Gemeinsame Portal-Unterseiten: gleiche Navigation und Farben, ohne Startseiten-Banner */
body.portal-page{
    margin:0;
    background:#fbf8f1;
    color:#15283a;
    font-family:system-ui,Segoe UI,Arial,sans-serif;
}
body.portal-page.embedded-score-page .wrap{
    padding-top:22px;
}
body.portal-rubrics-page .access-panel,
body.portal-rubrics-page .player-panel{
    margin:0 0 18px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:16px;
}
body.portal-rubrics-page .player-panel{
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    padding:16px;
    align-items:center;
}
body.portal-rubrics-page .player-panel>div:first-child{
    display:flex;
    flex-direction:column;
    gap:4px;
}
body.portal-rubrics-page .player-panel span{
    color:#687887;
}
body.portal-rubrics-page .access-card{
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:12px;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
body.portal-rubrics-page .access-card span{
    color:#687887;
}
body.portal-rubrics-page .rubric-page-search{
    display:flex;
    gap:10px;
    margin:0 0 16px;
}
body.portal-rubrics-page .rubric-page-search input{
    flex:1;
    min-width:0;
}
body.portal-rubrics-page .rubric-filter{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:0 0 10px;
}
body.portal-rubrics-page .rubric-filter a{
    display:inline-flex;
    align-items:center;
    min-height:38px;
    padding:0 14px;
    border-radius:999px;
    color:#285983;
    background:#fff;
    border:1px solid rgba(76,91,106,.14);
    text-decoration:none;
    font-weight:700;
    box-shadow:0 6px 18px rgba(74,87,96,.05);
}
body.portal-rubrics-page .rubric-filter a.active{
    background:#557ca5;
    color:#fff;
    border-color:#557ca5;
}
body.portal-rubrics-page .module-sections{
    display:flex;
    flex-direction:column;
    gap:8px;
}
body.portal-rubrics-page .rubric-overview-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin:18px 0 26px;
}
body.portal-rubrics-page .rubric-overview-card{
    min-height:128px;
    border-radius:10px;
    border:1px solid rgba(77,92,106,.1);
    padding:20px;
    display:flex;
    gap:18px;
    align-items:flex-start;
    color:#15283a;
    text-decoration:none;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
body.portal-rubrics-page .rubric-overview-card h2{
    margin:0 0 7px;
    font-size:1.2rem;
    line-height:1.2;
}
body.portal-rubrics-page .rubric-overview-card p{
    margin:0 0 12px;
    color:#4f606b;
    font-size:.92rem;
    line-height:1.4;
}
body.portal-rubrics-page .rubric-overview-card span{
    color:#285983;
    font-weight:800;
    font-size:.92rem;
}
body.portal-rubrics-page .rubric-overview-card:hover{
    border-color:rgba(49,95,145,.32);
    box-shadow:0 12px 28px rgba(74,87,96,.1);
}
body.portal-rubrics-page .module-rubric{
    scroll-margin-top:90px;
}
body.portal-rubrics-page .rubric-heading{
    display:flex;
    align-items:center;
    gap:14px;
    margin:28px 0 4px;
}
body.portal-rubrics-page .rubric-heading h2{
    margin:0;
    font-size:1.35rem;
    color:#102638;
}
body.portal-rubrics-page .rubric-heading p{
    margin:3px 0 0;
    color:#61707d;
}
body.portal-rubrics-page .category-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin:22px 0;
}
body.portal-rubrics-page .category-tile{
    min-height:116px;
    border-radius:10px;
    border:1px solid rgba(77,92,106,.1);
    padding:20px;
    display:flex;
    gap:18px;
    align-items:flex-start;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
body.portal-rubrics-page .module-detail-tile{
    display:flex;
    flex-direction:column;
    padding:20px;
    overflow:hidden;
}
body.portal-rubrics-page .module-detail-head{
    display:grid;
    grid-template-columns:56px minmax(0,1fr);
    align-items:flex-start;
    gap:18px;
}
body.portal-rubrics-page .module-detail-head > div:not(.tile-icon){
    min-width:0;
}
body.portal-rubrics-page .module-detail-body{
    padding:0 0 0 74px;
}
body.portal-rubrics-page .category-tile h2{
    margin:0 0 7px;
    font-size:1.2rem;
    line-height:1.2;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
}
body.portal-rubrics-page .category-tile p{
    margin:0 0 12px;
    color:#4f606b;
    font-size:.92rem;
    line-height:1.4;
}
body.portal-rubrics-page .tile-icon{
    flex:0 0 56px;
    height:56px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.58);
    color:#3f6f8e;
    font-weight:800;
    box-shadow:inset 0 0 0 1px rgba(36,60,77,.1);
}
body.portal-rubrics-page .tile-icon img{
    display:block;
    width:70%;
    height:70%;
    object-fit:contain;
}
body.portal-rubrics-page .tile-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
body.portal-rubrics-page .tile-actions a{
    color:#285983;
    font-weight:700;
    text-decoration:none;
    font-size:.9rem;
}
body.portal-rubrics-page .tile-actions button{
    border:0;
    background:transparent;
    color:#285983;
    font:inherit;
    font-size:.9rem;
    font-weight:700;
    padding:0;
    cursor:pointer;
}
body.portal-rubrics-page .tone-1{background:#eaf2fb}
body.portal-rubrics-page .tone-2{background:#edf3e7}
body.portal-rubrics-page .tone-3{background:#fff0cf}
body.portal-rubrics-page .tone-4{background:#f0edf8}
body.portal-rubrics-page .tone-5{background:#f9ebe4}
body.portal-rubrics-page .tone-6{background:#e8f3f4}
body.portal-rubrics-page .tone-7{background:#f3efe4}
body.portal-rubrics-page .tone-8{background:#e7f2ed}
body.portal-rubrics-page .empty-state{
    background:#fff;
    border-radius:12px;
    padding:22px;
    color:#687887;
    border:1px solid rgba(76,91,106,.13);
}
.portal-page .site-shell{
    width:min(1180px,calc(100% - 40px));
    margin:0 auto;
}
.portal-page .site-header{
    position:sticky;
    top:0;
    z-index:5;
    background:rgba(255,255,255,.92);
    border-bottom:1px solid rgba(70,86,98,.16);
    backdrop-filter:blur(10px);
    padding:0;
    color:#142537;
}
.portal-page .nav-bar{
    min-height:68px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
}
.portal-page .brand{
    display:flex;
    align-items:baseline;
    gap:10px;
    color:#19334f;
    text-decoration:none;
    font-weight:700;
    white-space:nowrap;
}
.portal-page .brand-script{
    color:#4f78a4;
    font-size:1.65rem;
    font-family:"Segoe Script","Brush Script MT",cursive;
    font-weight:600;
}
.portal-page .main-nav{
    display:flex;
    gap:30px;
    align-items:center;
    font-size:.98rem;
}
.portal-page .main-nav a,
.portal-page .nav-link{
    color:#142537;
    text-decoration:none;
}
.portal-page .main-nav a{
    padding:25px 0 21px;
    border-bottom:2px solid transparent;
}
.portal-page .main-nav a.active,
.portal-page .nav-link.active{
    color:#315f91;
    border-color:#4f78a4;
}
.portal-page .nav-actions{
    display:flex;
    align-items:center;
    gap:12px;
}
.portal-page .user-pill{
    color:#526273;
    background:#f3f0e9;
    border:1px solid rgba(72,89,105,.12);
    border-radius:999px;
    padding:8px 12px;
    font-size:.9rem;
    white-space:nowrap;
}
.portal-page .wrap{
    max-width:1100px;
    margin:0 auto;
    padding:22px 20px;
}
.portal-page .page-intro{
    margin:0 0 18px;
}
.portal-page .page-intro h1{
    margin:0 0 6px;
    color:#102638;
    font-size:clamp(1.8rem,3vw,2.55rem);
    letter-spacing:0;
}
.portal-page .action-intro{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
}
.portal-page .card{
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
.portal-page table{
    width:100%;
    border-collapse:collapse;
}
.portal-page th,
.portal-page td{
    padding:10px;
    border-bottom:1px solid rgba(76,91,106,.12);
    text-align:left;
}
.portal-page th{
    color:#315f91;
    font-weight:800;
    background:#f7f2e9;
}
.portal-page .choice-grid{
    align-items:start;
}
.portal-page .auth-card{
    background:#fff;
}
.portal-page .notice{
    margin:0 0 16px;
}
.portal-page .danger-zone{
    border-color:#f3c0b9;
    background:#fff8f5;
}
.portal-page .admin-page{
    max-width:1180px;
}
.portal-page .admin-layout{
    display:grid;
    grid-template-columns:230px minmax(0,1fr);
    gap:18px;
    align-items:start;
}
.portal-page .admin-sidebar{
    position:sticky;
    top:86px;
    background:#fff;
    border:1px solid rgba(76,91,106,.13);
    border-radius:12px;
    padding:16px;
    box-shadow:0 8px 24px rgba(74,87,96,.06);
}
.portal-page .admin-sidebar-title{
    color:#102638;
    font-weight:900;
    font-size:1.1rem;
    margin:0 0 14px;
}
.portal-page .admin-nav-group{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin:0 0 18px;
}
.portal-page .admin-nav-heading{
    color:#687887;
    font-size:.78rem;
    font-weight:900;
    letter-spacing:0;
    text-transform:uppercase;
    margin:0 0 3px;
}
.portal-page .admin-nav-group a{
    display:flex;
    align-items:center;
    min-height:40px;
    padding:0 11px;
    border-radius:9px;
    color:#19334f;
    text-decoration:none;
    font-weight:700;
}
.portal-page .admin-nav-group a:hover,
.portal-page .admin-nav-group a.active{
    background:#edf3e7;
    color:#315f91;
}
.portal-page .admin-nav-subgroup{
    max-height:320px;
    overflow:auto;
    padding-right:4px;
}
.portal-page .admin-nav-subgroup a{
    min-height:34px;
    padding-left:18px;
    color:#526273;
    font-size:.92rem;
    font-weight:650;
}
.portal-page .admin-content{
    min-width:0;
}
.portal-page .admin-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin:0 0 18px;
}
.portal-page .admin-stats .card{
    display:flex;
    flex-direction:column;
    gap:3px;
}
.portal-page .admin-stats strong{
    font-size:2rem;
    color:#315f91;
    line-height:1;
}
.portal-page .admin-stats span{
    color:#687887;
}
.portal-page .admin-section{
    margin:0 0 18px;
    padding:16px;
}
.portal-page .admin-section h2{
    margin:0 0 12px;
    font-size:1.25rem;
}
.portal-page .admin-save-form{
    display:block;
}
.portal-page .admin-create-form{
    display:block;
}
.portal-page .admin-create-grid{
    display:grid;
    grid-template-columns:1.4fr 1fr .8fr .7fr;
    gap:14px;
    align-items:end;
}
.portal-page .admin-create-wide{
    grid-column:span 2;
}
.portal-page .admin-save-bar{
    position:sticky;
    top:69px;
    z-index:4;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin:0 0 18px;
    padding:12px 14px;
    background:#fff;
    border:1px solid rgba(76,91,106,.16);
    border-radius:12px;
    box-shadow:0 10px 24px rgba(74,87,96,.08);
}
.portal-page .admin-save-bar span{
    color:#526273;
    font-weight:700;
}
.portal-page .admin-dashboard-grid{
    display:grid;
    grid-template-columns:1fr 1.2fr;
    gap:18px;
}
.portal-page .admin-detail-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr auto;
    gap:14px;
    align-items:end;
}
.portal-page .admin-detail-wide{
    grid-column:1 / -1;
}
.portal-page .admin-detail-check{
    min-height:42px;
    align-items:center;
}
.portal-page .admin-detail-actions{
    margin-top:14px;
}
.portal-page .table-scroll{
    overflow-x:auto;
}
.portal-page .admin-inline-form{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.portal-page .admin-row-form{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:190px;
}
.portal-page .admin-drag-handle{
    width:38px;
    height:38px;
    border:1px solid rgba(76,91,106,.18);
    border-radius:9px;
    background:#f7f2e9;
    color:#315f91;
    cursor:grab;
    font-weight:900;
    letter-spacing:0;
}
.portal-page .admin-drag-handle:active{
    cursor:grabbing;
}
.portal-page tr.is-dragging{
    opacity:.55;
}
.portal-page .module-sort-label,
.portal-page .rubric-sort-label{
    display:block;
    margin-top:6px;
    text-align:center;
}
.portal-page .admin-label{
    display:block;
    margin:0 0 5px;
    color:#526273;
    font-size:.78rem;
    font-weight:800;
    text-transform:uppercase;
}
.portal-page .admin-check{
    display:flex;
    align-items:center;
    gap:7px;
    white-space:nowrap;
}
.portal-page .admin-page input,
.portal-page .admin-page select,
.portal-page .admin-page textarea{
    max-width:100%;
    box-sizing:border-box;
}

@media (max-width:980px){
    .portal-page .main-nav{display:none}
    body.portal-rubrics-page .category-grid{grid-template-columns:repeat(2,1fr)}
    body.portal-rubrics-page .rubric-overview-grid{grid-template-columns:repeat(2,1fr)}
    .portal-page .admin-layout{grid-template-columns:1fr}
    .portal-page .admin-sidebar{position:static}
    .portal-page .admin-nav-group{flex-direction:row;flex-wrap:wrap}
    .portal-page .admin-nav-heading{width:100%;margin-top:4px}
    .portal-page .admin-nav-subgroup{max-height:none}
    .portal-page .admin-stats{grid-template-columns:repeat(2,1fr)}
    .portal-page .admin-dashboard-grid{grid-template-columns:1fr}
    .portal-page .admin-detail-grid{grid-template-columns:1fr 1fr}
    .portal-page .admin-create-grid{grid-template-columns:1fr 1fr}
    .portal-page .admin-create-wide{grid-column:span 2}
}
@media (max-width:640px){
    .portal-page .site-shell{width:min(100% - 26px,1180px)}
    .portal-page .nav-bar{align-items:flex-start;flex-direction:column;padding:14px 0}
    .portal-page .nav-actions{width:100%;justify-content:space-between;flex-wrap:wrap}
    .portal-page .action-intro{flex-direction:column}
    .portal-page .admin-stats{grid-template-columns:1fr}
    .portal-page .admin-save-bar{position:static;align-items:stretch;flex-direction:column}
    .portal-page .admin-detail-grid{grid-template-columns:1fr}
    .portal-page .admin-create-grid{grid-template-columns:1fr}
    .portal-page .admin-create-wide{grid-column:auto}
    body.portal-rubrics-page .rubric-page-search{flex-direction:column}
    body.portal-rubrics-page .category-grid{grid-template-columns:1fr}
    body.portal-rubrics-page .rubric-overview-grid{grid-template-columns:1fr}
    body.portal-rubrics-page .category-tile{min-height:auto}
    body.portal-rubrics-page .module-detail-body{padding-left:0}
}
