:root {
    --bg: #0c1117;
    --bg-soft: #101720;
    --panel: rgba(17, 24, 33, 0.96);
    --panel-strong: #161d26;
    --panel-tint: rgba(20, 29, 39, 0.98);
    --text: #edf3f9;
    --muted: #9aabba;
    --accent: #4b8fff;
    --accent-2: #35b39a;
    --accent-3: #f0ab4d;
    --accent-soft: rgba(75, 143, 255, 0.16);
    --border: rgba(143, 168, 196, 0.16);
    --shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
    --danger: #ef6b81;
    --success: #4dd2a1;
    --radius: 22px;
    --radius-sm: 16px;
    --content-width: 1320px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI Variable Display", "Bahnschrift", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(75, 143, 255, 0.13), transparent 24%),
        radial-gradient(circle at top right, rgba(53, 179, 154, 0.09), transparent 20%),
        linear-gradient(180deg, #0b1015 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

.shell {
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: min(var(--content-width), calc(100vw - 2rem));
    margin: 0 auto;
    padding: 1.15rem 1.5rem 0.9rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), #235fca);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 14px 30px rgba(20, 94, 168, 0.22);
}

.brand-copy {
    display: grid;
    gap: 0.1rem;
}

.brand-copy strong {
    font-size: 1.08rem;
}

.brand-copy small {
    color: var(--muted);
}

.userbar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.userchip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 29, 39, 0.92);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.userchip-role {
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.userchip-name {
    font-size: 0.95rem;
}

.navpanel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    width: min(var(--content-width), calc(100vw - 2rem));
    margin: 0 auto;
    padding: 0.9rem;
    border-radius: 24px;
    background: rgba(16, 23, 32, 0.92);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.navpanel a {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--muted);
    transition: 180ms ease;
}

.navpanel a:hover {
    color: var(--text);
    background: rgba(75, 143, 255, 0.1);
}

.navpanel a.active {
    color: var(--text);
    background: linear-gradient(180deg, rgba(75, 143, 255, 0.18), rgba(75, 143, 255, 0.08));
    box-shadow: inset 0 0 0 1px rgba(75, 143, 255, 0.14);
}

.page {
    width: min(var(--content-width), calc(100vw - 2rem));
    margin: 1.25rem auto 0;
    padding: 0 0 2rem;
}

.hero,
.card {
    animation: fade-up 320ms ease both;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.72fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-main,
.hero-aside,
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-main {
    padding: 1.7rem 1.8rem;
    background:
        linear-gradient(135deg, rgba(75, 143, 255, 0.12), rgba(16, 23, 32, 0.98)),
        var(--panel);
}

.hero-aside {
    padding: 1rem;
}

.hero h1,
.page-head h1 {
    margin: 0.2rem 0 0.55rem;
    font-size: clamp(2.1rem, 3vw, 3.15rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.hero-text,
.muted {
    color: var(--muted);
    max-width: 68ch;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.15rem;
}

.hero-button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: auto;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--accent), #2b6ddd);
    color: white;
    box-shadow: 0 10px 24px rgba(20, 94, 168, 0.22);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: 180ms ease;
}

.hero-button:hover,
button:hover {
    transform: translateY(-1px);
}

.ghost-link,
.ghost-button {
    background: rgba(20, 29, 39, 0.96);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(19, 27, 37, 0.96);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.88rem;
}

.card {
    padding: 1.3rem 1.35rem;
}

.card-soft {
    background:
        linear-gradient(180deg, rgba(20, 29, 39, 0.96), rgba(16, 23, 32, 0.94)),
        var(--panel);
}

.dashboard-grid,
.group-detail-grid,
.grid {
    display: grid;
    gap: 1rem;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    margin-bottom: 1rem;
}

.group-detail-grid {
    grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.stack-col {
    display: grid;
    gap: 1rem;
}

.side-panel {
    display: grid;
    align-content: start;
    gap: 0.9rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head.compact {
    margin-bottom: 0.75rem;
}

.section-head h1,
.section-head h2,
.card h3 {
    margin: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.metric-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.2rem;
    border-radius: calc(var(--radius) - 8px);
    background: linear-gradient(180deg, #1769c2, #114e90);
    color: white;
}

.feature-metric {
    min-height: 240px;
}

.metric-label {
    opacity: 0.85;
    font-size: 0.92rem;
}

.metric-value {
    font-size: clamp(2.6rem, 4vw, 4.2rem);
    line-height: 1;
}

.metric-footnote {
    opacity: 0.82;
    font-size: 0.9rem;
}

.metric-inline {
    display: grid;
    gap: 0.15rem;
    padding: 1rem;
    border-radius: 18px;
    background: var(--panel-tint);
    border: 1px solid var(--border);
}

.metric-inline strong {
    font-size: 2rem;
    line-height: 1;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
}

.action-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.action-tile,
.hub-link {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(18, 26, 35, 0.98);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: 180ms ease;
}

.action-tile:hover,
.hub-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.action-tile strong {
    font-size: 1rem;
}

.action-tile span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.accent-a {
    background: linear-gradient(180deg, rgba(75, 143, 255, 0.14), rgba(18, 26, 35, 0.98));
}

.accent-b {
    background: linear-gradient(180deg, rgba(53, 179, 154, 0.14), rgba(18, 26, 35, 0.98));
}

.accent-c {
    background: linear-gradient(180deg, rgba(240, 171, 77, 0.14), rgba(18, 26, 35, 0.98));
}

.accent-d {
    background: linear-gradient(180deg, rgba(119, 99, 255, 0.14), rgba(18, 26, 35, 0.98));
}

.course-grid,
.lesson-grid,
.link-grid,
.hub-list {
    display: grid;
    gap: 1rem;
}

.course-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.lesson-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.link-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hub-list {
    grid-template-columns: 1fr;
}

.hub-link-active {
    background: linear-gradient(180deg, rgba(75, 143, 255, 0.14), rgba(18, 26, 35, 0.98));
    box-shadow: inset 0 0 0 1px rgba(75, 143, 255, 0.14);
}

.course-tile,
.lesson-spotlight {
    background:
        linear-gradient(180deg, rgba(75, 143, 255, 0.12), rgba(17, 24, 33, 0.98)),
        var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.course-tile {
    display: grid;
    gap: 0.8rem;
    padding: 1.4rem;
    border-radius: 24px;
    text-decoration: none;
    color: var(--text);
    transition: 180ms ease;
}

.course-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.course-tile h2 {
    margin: 0;
    font-size: 1.35rem;
}

.course-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.course-count,
.course-cta {
    display: inline-flex;
    width: fit-content;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
}

.course-count {
    background: rgba(75, 143, 255, 0.15);
    color: var(--accent);
    font-size: 0.82rem;
}

.course-cta {
    background: rgba(53, 179, 154, 0.16);
    color: var(--accent-2);
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(16, 23, 32, 0.92);
}

.elevated-table {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.88rem 0.95rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(20, 29, 39, 0.98);
}

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

.schedule-table-wrap {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(16, 23, 32, 0.92);
}

.schedule-table tbody tr td,
.schedule-table tbody tr th {
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    vertical-align: top;
}

.schedule-day {
    width: 180px;
    font-weight: 700;
    background: rgba(20, 29, 39, 0.98);
}

.schedule-lane {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.85rem;
}

.schedule-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(75, 143, 255, 0.09), rgba(18, 26, 35, 0.99));
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: 180ms ease;
}

.schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.schedule-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.schedule-card h3,
.schedule-card p {
    margin: 0;
}

.schedule-card p {
    color: var(--muted);
}

.schedule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.schedule-submeta {
    display: grid;
    gap: 0.25rem;
    color: var(--muted);
    font-size: 0.82rem;
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(57, 76, 96, 0.12);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(75, 143, 255, 0.15);
    color: var(--accent);
}

.status-success,
.status-sent {
    background: rgba(77, 210, 161, 0.16);
    color: var(--success);
}

.status-content_error,
.status-execution_error {
    background: rgba(239, 107, 129, 0.16);
    color: var(--danger);
}

.stack-form {
    display: grid;
    gap: 0.9rem;
}

.form-grid {
    display: grid;
    gap: 0.9rem;
}

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

.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 0.42rem;
    font-size: 0.94rem;
    color: var(--muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.82rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(57, 76, 96, 0.18);
    background: rgba(12, 17, 23, 0.98);
    color: var(--text);
    font: inherit;
    transition: 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(75, 143, 255, 0.18);
    border-color: rgba(75, 143, 255, 0.38);
    box-shadow: 0 0 0 5px rgba(75, 143, 255, 0.08);
}

button.danger {
    background: linear-gradient(135deg, var(--danger), #a93346);
}

.primary-button {
    width: auto;
}

.wide-button {
    width: 100%;
}

.prominent-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 0.95rem;
    border-radius: 14px;
    background: rgba(75, 143, 255, 0.12);
    border: 1px solid rgba(75, 143, 255, 0.16);
    text-decoration: none;
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.divider {
    height: 1px;
    margin: 1.15rem 0;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.flash {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(20, 29, 39, 0.94);
    margin-bottom: 1rem;
}

.flash-success {
    color: var(--success);
    background: rgba(77, 210, 161, 0.1);
}

.flash-error,
.error {
    color: var(--danger);
}

.hidden-panel {
    display: none;
}

.form-drawer {
    border-style: dashed;
}

.checkbox-line {
    display: grid;
    gap: 0.5rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

.info-list {
    display: grid;
    gap: 0.75rem;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.mini-stat {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem;
    border-radius: 18px;
    background: var(--panel-tint);
    border: 1px solid var(--border);
}

.mini-stat strong {
    font-size: 1.5rem;
    line-height: 1;
}

.mini-stat span {
    color: var(--muted);
    font-size: 0.9rem;
}

.notification-list {
    display: grid;
    gap: 0.8rem;
}

.notification-item {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(19, 27, 37, 0.98);
}

.notification-item strong,
.notification-item p,
.notification-item small {
    display: block;
}

.notification-item p {
    margin: 0.35rem 0 0.45rem;
    color: var(--muted);
}

.notification-item small {
    color: var(--muted);
}

.week-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.week-toolbar {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.week-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.week-shift {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(95, 118, 145, 0.26);
    background: rgba(18, 26, 35, 0.98);
    color: var(--text);
    text-decoration: none;
    transition: 180ms ease;
}

.week-shift:hover {
    border-color: rgba(75, 143, 255, 0.34);
    transform: translateY(-1px);
}

.week-shift-current {
    background: rgba(75, 143, 255, 0.14);
    border-color: rgba(75, 143, 255, 0.3);
}

.week-shift-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.section-note {
    margin: 0;
    color: var(--muted);
}

.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(95, 118, 145, 0.24);
    background: rgba(20, 28, 38, 0.98);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: 180ms ease;
}

.copy-button:hover {
    border-color: rgba(75, 143, 255, 0.34);
    background: rgba(26, 35, 47, 0.98);
}

.copy-button-success {
    border-color: rgba(77, 210, 161, 0.36);
    color: var(--success);
}

.copy-button-error {
    border-color: rgba(239, 107, 129, 0.4);
    color: var(--danger);
}

.week-chip {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    text-decoration: none;
    background: rgba(18, 26, 35, 0.98);
    transition: 180ms ease;
}

.week-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.week-chip strong {
    font-size: 1rem;
}

.week-chip span,
.week-chip small {
    color: var(--muted);
}

.week-chip-active {
    box-shadow: inset 0 0 0 1px rgba(75, 143, 255, 0.34);
    background: linear-gradient(180deg, rgba(75, 143, 255, 0.16), rgba(18, 26, 35, 0.98));
}

.week-state-ready {
    border-color: rgba(77, 210, 161, 0.28);
}

.week-state-future {
    border-color: rgba(75, 143, 255, 0.22);
}

.week-state-error {
    border-color: rgba(239, 107, 129, 0.3);
}

.week-state-disabled {
    opacity: 0.6;
}

.notification-success {
    background: rgba(77, 210, 161, 0.1);
}

.notification-error {
    background: rgba(239, 107, 129, 0.1);
}

.empty-state,
.empty-cell {
    color: var(--muted);
}

.empty-cell {
    text-align: center;
}

.prewrap,
.logpane {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.output-pane,
.logpane {
    padding: 1rem;
    border-radius: 18px;
    background: #0f151d;
    border: 1px solid var(--border);
}

.output-pane {
    max-height: 560px;
    overflow: auto;
}

.logpane {
    max-height: 340px;
    overflow: auto;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.87rem;
    line-height: 1.5;
}

.simple-list {
    margin: 0;
    padding-left: 1.2rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-shell {
    width: min(1080px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 1rem;
    align-items: stretch;
}

.login-side,
.login-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-side {
    padding: 2rem;
    background:
        linear-gradient(135deg, rgba(75, 143, 255, 0.16), rgba(16, 23, 32, 0.98)),
        var(--panel);
}

.login-side h1 {
    margin: 0.2rem 0 0.7rem;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 0.98;
}

.login-side p {
    color: var(--muted);
    max-width: 40ch;
    line-height: 1.6;
}

.login-card {
    background:
        linear-gradient(180deg, rgba(75, 143, 255, 0.1), rgba(16, 23, 32, 0.96)),
        var(--panel);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .hero,
    .dashboard-grid,
    .group-detail-grid,
    .login-shell {
        grid-template-columns: 1fr;
    }

    .three-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .topbar,
    .userbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar,
    .navpanel {
        width: min(var(--content-width), calc(100vw - 1rem));
    }

    .page {
        width: min(100vw - 1rem, var(--content-width));
    }

    .two-cols,
    .stat-strip {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-main,
    .hero-aside,
    .card,
    .login-side {
        padding: 1rem;
    }
}

/* Editorial dark refresh inspired by algoritmika.org structure */

:root {
    --bg: #0f1218;
    --bg-soft: #131925;
    --panel: #171d28;
    --panel-strong: #1d2433;
    --panel-tint: #212b3d;
    --text: #f5f7fb;
    --muted: #b2bfd1;
    --accent: #8f63ff;
    --accent-2: #b794ff;
    --accent-3: #ff7cc8;
    --accent-4: #6d5dfc;
    --accent-soft: rgba(143, 99, 255, 0.16);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
    --danger: #ff6d7d;
    --success: #4de1a8;
    --radius: 28px;
    --radius-sm: 18px;
    --content-width: 1240px;
}

body {
    color: var(--text);
    font-family: "Manrope", "Segoe UI Variable Text", sans-serif;
    background:
        radial-gradient(circle at 12% 0%, rgba(143, 99, 255, 0.16), transparent 24%),
        radial-gradient(circle at 88% 8%, rgba(255, 124, 200, 0.12), transparent 26%),
        linear-gradient(180deg, #0e1117 0%, #111622 52%, #0e1218 100%);
}

h1,
h2,
h3,
h4,
.brand-copy strong,
.metric-value {
    font-family: "Rubik", "Manrope", sans-serif;
}

.shell {
    padding-bottom: 2rem;
}

.topbar {
    padding: 1.5rem 0 1rem;
}

.brand {
    gap: 1rem;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), #6d46f4);
    color: #fdfdff;
    font-family: "Rubik", "Manrope", sans-serif;
    font-size: 1.25rem;
    box-shadow: none;
}

.brand-copy strong {
    font-size: 1.14rem;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: rgba(245, 247, 251, 0.62);
}

.userchip {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    backdrop-filter: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.userchip-role {
    background: rgba(143, 99, 255, 0.16);
    color: var(--accent);
}

.navpanel {
    gap: 0.45rem;
    padding: 0.55rem;
    border-radius: 26px;
    background: var(--panel);
    box-shadow: none;
    backdrop-filter: none;
}

.navpanel a {
    padding: 0.8rem 1.05rem;
    border-radius: 16px;
    font-weight: 700;
}

.navpanel a:hover {
    color: var(--text);
    background: rgba(143, 99, 255, 0.08);
}

.navpanel a.active {
    color: #fdfdff;
    background: linear-gradient(135deg, var(--accent), #7349fa);
    box-shadow: none;
}

.page {
    margin-top: 1rem;
}

.hero,
.card {
    animation-duration: 240ms;
}

.hero {
    grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.62fr);
    gap: 1.1rem;
}

.hero-main,
.hero-aside,
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: none;
}

.hero-main {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(143, 99, 255, 0.16) 0%, rgba(183, 148, 255, 0.08) 46%, rgba(23, 29, 40, 1) 100%);
}

.hero-dashboard .hero-main {
    background: linear-gradient(135deg, rgba(143, 99, 255, 0.2) 0%, rgba(255, 124, 200, 0.08) 52%, rgba(23, 29, 40, 1) 100%);
}

.hero-courses .hero-main {
    background: linear-gradient(135deg, rgba(183, 148, 255, 0.18) 0%, rgba(255, 124, 200, 0.1) 54%, rgba(23, 29, 40, 1) 100%);
}

.hero-schedule .hero-main,
.hero-group .hero-main {
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.2) 0%, rgba(143, 99, 255, 0.1) 54%, rgba(23, 29, 40, 1) 100%);
}

.hero-hub .hero-main,
.hero-preview .hero-main {
    background: linear-gradient(135deg, rgba(255, 124, 200, 0.16) 0%, rgba(183, 148, 255, 0.08) 50%, rgba(23, 29, 40, 1) 100%);
}

.hero-main::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 160px;
    height: 160px;
    border-radius: 42px;
    background: linear-gradient(135deg, rgba(183, 148, 255, 0.24), rgba(255, 255, 255, 0.02));
    transform: rotate(16deg);
}

.hero-main > *,
.hero-aside > * {
    position: relative;
    z-index: 1;
}

.hero-aside {
    padding: 1.1rem;
    background: linear-gradient(180deg, #1d2433, #171d28);
}

.hero h1,
.page-head h1 {
    margin: 0.25rem 0 0.65rem;
    font-size: clamp(2.35rem, 3vw, 3.85rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-text,
.muted {
    color: var(--muted);
    max-width: 58ch;
    line-height: 1.55;
}

.eyebrow {
    margin-bottom: 0.45rem;
    color: var(--accent);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
}

.hero-actions {
    margin-top: 1.35rem;
    gap: 0.75rem;
}

.hero-button,
button {
    padding: 0.95rem 1.15rem;
    border-radius: 18px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), #7349fa);
    color: #fdfdff;
    box-shadow: none;
    font-weight: 800;
}

.hero-button:hover,
button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.ghost-link,
.ghost-button,
.copy-button,
.week-shift {
    background: var(--panel-strong);
    color: var(--text);
    border: 1px solid var(--border);
}

.ghost-link:hover,
.ghost-button:hover,
.copy-button:hover,
.week-shift:hover {
    background: #242d3f;
    border-color: rgba(255, 255, 255, 0.14);
}

button.danger {
    background: var(--danger);
    color: #11151d;
}

.hero-badges {
    gap: 0.65rem;
    margin-top: 1.1rem;
}

.hero-badge {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(12, 17, 24, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
}

.card {
    padding: 1.4rem;
}

.card-soft {
    background: linear-gradient(180deg, #1b2231, #171d28);
}

.section-head {
    align-items: center;
}

.section-head h2,
.card h3 {
    letter-spacing: -0.03em;
}

.metric-card {
    padding: 1.25rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #9b74ff, #7449ff);
    color: #fdfdff;
    box-shadow: none;
}

.feature-metric {
    min-height: 220px;
}

.metric-label,
.metric-footnote {
    color: rgba(245, 247, 251, 0.78);
    font-weight: 700;
}

.metric-inline,
.mini-stat {
    border-radius: 22px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
}

.action-grid {
    gap: 1rem;
}

.action-tile,
.hub-link {
    gap: 0.5rem;
    min-height: 160px;
    padding: 1.15rem;
    border-radius: 24px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-top-width: 6px;
    box-shadow: none;
}

.action-tile:hover,
.hub-link:hover,
.course-tile:hover,
.schedule-card:hover,
.week-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.accent-a {
    border-top-color: var(--accent);
    background: linear-gradient(180deg, rgba(143, 99, 255, 0.1), #1d2433 28%);
}

.accent-b {
    border-top-color: var(--accent-2);
    background: linear-gradient(180deg, rgba(183, 148, 255, 0.1), #1d2433 28%);
}

.accent-c {
    border-top-color: var(--accent-3);
    background: linear-gradient(180deg, rgba(255, 124, 200, 0.1), #1d2433 28%);
}

.accent-d {
    border-top-color: var(--accent-4);
    background: linear-gradient(180deg, rgba(109, 93, 252, 0.12), #1d2433 28%);
}

.accent-e {
    border-top-color: #8b9bff;
    background: linear-gradient(180deg, rgba(139, 155, 255, 0.1), #1d2433 28%);
}

.action-tile strong {
    font-size: 1.1rem;
}

.action-tile span {
    font-size: 0.94rem;
    color: var(--muted);
}

.hub-link-active {
    border-top-color: var(--accent);
    background: linear-gradient(180deg, rgba(143, 99, 255, 0.1), #1d2433 28%);
    box-shadow: none;
}

.course-grid {
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.course-tile,
.lesson-spotlight {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: none;
}

.course-tile {
    min-height: 240px;
    gap: 0.9rem;
    padding: 1.45rem;
    border-radius: 28px;
    border-top: 6px solid var(--accent);
}

.course-tile h2 {
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.course-tile p {
    color: var(--muted);
}

.course-count {
    background: rgba(143, 99, 255, 0.16);
    color: var(--accent);
    font-weight: 700;
}

.course-cta {
    margin-top: auto;
    padding: 0;
    background: transparent;
    color: var(--accent-2);
    font-weight: 800;
}

.course-cta::after {
    content: " →";
}

.table-wrap,
.schedule-table {
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--panel);
}

th {
    background: var(--panel-strong);
    color: rgba(245, 247, 251, 0.72);
}

td,
th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.schedule-table {
    border-spacing: 0;
}

.schedule-day {
    width: 160px;
    background: var(--panel-strong);
    font-family: "Rubik", "Manrope", sans-serif;
    font-weight: 700;
}

.schedule-lane {
    gap: 1rem;
}

.schedule-card {
    gap: 0.6rem;
    padding: 1rem;
    border-radius: 22px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    box-shadow: none;
}

.schedule-card p,
.schedule-meta,
.schedule-submeta {
    color: var(--muted);
}

.status-pill {
    background: rgba(143, 99, 255, 0.16);
    color: var(--accent-2);
    font-weight: 700;
}

.status-success,
.status-sent {
    background: rgba(77, 225, 168, 0.16);
    color: var(--success);
}

.status-content_error,
.status-execution_error {
    background: rgba(255, 109, 125, 0.16);
    color: var(--danger);
}

label {
    color: var(--muted);
    font-weight: 600;
}

input,
select,
textarea {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111722;
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(143, 99, 255, 0.56);
    box-shadow: 0 0 0 4px rgba(143, 99, 255, 0.12);
}

.prominent-link {
    background: rgba(143, 99, 255, 0.14);
    border: 1px solid rgba(143, 99, 255, 0.22);
    color: var(--accent-2);
}

.text-link {
    color: var(--accent);
}

.flash {
    border-radius: 20px;
    background: var(--panel-strong);
    box-shadow: none;
}

.form-drawer {
    border-style: solid;
    background: linear-gradient(180deg, rgba(143, 99, 255, 0.05), rgba(23, 29, 40, 1));
}

.notification-item {
    padding: 1rem;
    border-radius: 20px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
}

.notification-success {
    border-left-color: var(--success);
}

.notification-error {
    border-left-color: var(--danger);
}

.week-shift-current {
    background: rgba(143, 99, 255, 0.14);
    border-color: rgba(143, 99, 255, 0.28);
    color: var(--accent-2);
}

.week-chip {
    padding: 0.95rem;
    border-radius: 20px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-top-width: 5px;
}

.week-chip-active {
    background: linear-gradient(180deg, rgba(143, 99, 255, 0.1), #1d2433 32%);
    box-shadow: none;
}

.week-state-ready {
    border-top-color: var(--success);
}

.week-state-future {
    border-top-color: var(--accent);
}

.week-state-error {
    border-top-color: var(--danger);
}

.week-state-disabled {
    border-top-color: rgba(255, 255, 255, 0.14);
}

.copy-button {
    min-height: 42px;
    border-radius: 999px;
}

.output-pane-wrap {
    position: relative;
}

.copy-button-inline {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
}

.inline-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    min-width: 260px;
}

.inline-password-form input {
    min-width: 0;
}

.output-pane,
.logpane {
    background: #111722;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.output-pane {
    padding-bottom: 4.5rem;
}

.login-side {
    background: linear-gradient(135deg, rgba(143, 99, 255, 0.18), rgba(255, 124, 200, 0.08) 50%, rgba(23, 29, 40, 1) 100%);
}

.login-card {
    background: linear-gradient(180deg, #1b2231, #171d28);
}

@media (max-width: 1024px) {
    .hero,
    .dashboard-grid,
    .group-detail-grid,
    .login-shell {
        grid-template-columns: 1fr;
    }

    .action-tile,
    .course-tile {
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .navpanel a {
        text-align: center;
    }

    .hero-main,
    .hero-aside,
    .card,
    .login-side,
    .login-card {
        padding: 1.1rem;
    }

    .hero h1,
    .page-head h1 {
        font-size: clamp(1.95rem, 8vw, 2.6rem);
    }
}
