:root {
    color-scheme: dark;
    --bg: #080f1c;
    --panel: #101c2d;
    --panel2: #14233a;
    --line: #233047;
    --text: #edf3ff;
    --muted: #99abc3;
    --blue: #4196ff;
    --cyan: #66d8ed;
    --green: #67d9a4;
    --red: #ff8e9a;
    --radius: 18px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

a {
    color: var(--blue);
    text-decoration: none
}

a:hover {
    color: #92c5ff
}

button,
input,
select,
textarea {
    font: inherit
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation
}

button {
    cursor: pointer
}

button:disabled {
    opacity: .55;
    cursor: default
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 4px
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.2;
    letter-spacing: -.045em;
    margin-bottom: 10px
}

h2 {
    font-size: 1.2rem;
    letter-spacing: -.025em;
    margin-bottom: 18px
}

h3 {
    font-size: 1rem;
    margin-bottom: 5px
}

p {
    margin-bottom: 16px
}

small,
.small {
    font-size: .875rem
}

.muted {
    color: var(--muted)
}

.symbols {
    position: absolute;
    width: 0;
    height: 0
}

.shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100vh
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--line);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    background: #0b1423
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-size: 21px;
    font-weight: 780;
    letter-spacing: -.6px;
    white-space: nowrap
}

.brand-light {
    font-weight: 500
}

.brand-mark {
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #59c7ff, #196dff);
    color: white;
    font-size: 25px;
    font-weight: 900;
    width: 37px;
    height: 39px;
    border-radius: 11px;
    box-shadow: 0 5px 25px #167bff24
}

.nav-caption {
    color: #8294ae;
    font-size: .75rem;
    letter-spacing: 1.8px;
    margin: 44px 12px 15px
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    margin: 5px 0;
    border-radius: 11px;
    font-size: .94rem;
    color: var(--muted)
}

.nav-link svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7
}

.nav-link.active {
    color: #7abaff;
    background: #1c3658;
    box-shadow: inset 3px 0 #4699ff
}

.nav-link:hover {
    background: var(--panel2);
    color: var(--text)
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 22px
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    margin-bottom: 17px
}

.profile-link small {
    display: block;
    color: var(--muted);
    font-size: .8rem
}

.profile-link strong {
    display: block;
    max-width: 133px;
    overflow: hidden;
    text-overflow: ellipsis
}

.avatar {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 12px;
    background: #243b58;
    color: #b6d8ff;
    font-weight: 700;
    flex-shrink: 0
}

.workspace {
    min-width: 0
}

.topbar {
    height: 72px;
    padding: 0 40px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: .875rem
}

.topbar-user {
    display: flex;
    gap: 12px;
    align-items: center
}

.online-dot {
    background: var(--green);
    width: 7px;
    height: 7px;
    border-radius: 50%
}

main#main {
    max-width: 1450px;
    margin: auto;
    padding: 36px 40px 50px
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 27px
}

.page-head p {
    margin: 0
}

.eyebrow {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 1.9px;
    color: var(--blue);
    margin-bottom: 9px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #354967;
    border-radius: 10px;
    background: #182b45;
    color: var(--text);
    font-weight: 600;
    font-size: .875rem;
    white-space: normal;
    text-align: center
}

.btn:hover {
    background: #244164;
    color: white
}

.btn.primary {
    background: #3389f5;
    border-color: #3389f5;
    color: white;
    box-shadow: 0 5px 20px #168aff1a
}

.btn.primary:hover {
    background: #529dff
}

.btn.small {
    min-height: 36px;
    padding: 6px 12px
}

.btn.danger {
    color: var(--red);
    background: #ff718b0d;
    border-color: #70404c
}

.btn.ghost {
    background: transparent
}

.text-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--blue);
    font-size: .875rem
}

.text-btn.muted {
    color: var(--muted)
}

.full {
    width: 100%;
    justify-content: space-between
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    min-width: 0
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px
}

.panel-heading h2 {
    margin: 0
}

.narrow {
    max-width: 730px
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 24px
}

.metric {
    padding: 20px 22px
}

.metric-label {
    color: var(--muted);
    font-size: .875rem;
    margin-bottom: 15px
}

.metric-value {
    font-size: 1.95rem;
    letter-spacing: -1px;
    font-weight: 740
}

.metric-value small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--muted)
}

.metric-meta {
    display: flex;
    justify-content: space-between;
    margin: 11px 0 8px;
    color: var(--muted);
    font-size: .8rem
}

.bar {
    height: 5px;
    background: #25334b;
    border-radius: 99px;
    overflow: hidden
}

.bar>span {
    display: block;
    height: 100%;
    background: var(--blue);
    border-radius: 99px
}

.columns {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 22px
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 22px
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px
}

.empty {
    padding: 28px 10px;
    text-align: center;
    color: var(--muted)
}

.empty strong {
    display: block;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 8px
}

.empty p {
    font-size: .875rem;
    max-width: 380px;
    margin: 0 auto 16px
}

.habit-row {
    padding: 17px 0;
    border-top: 1px solid var(--line)
}

.habit-row:first-of-type {
    border-top: none;
    padding-top: 0
}

.habit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.habit-title {
    font-size: .95rem;
    font-weight: 600;
    overflow-wrap: anywhere
}

.badge {
    font-size: .75rem;
    display: inline-block;
    padding: 3px 8px;
    background: #203957;
    border: 1px solid #32506f;
    color: #b1d5ff;
    border-radius: 7px
}

.badge.green {
    background: #183c32;
    border-color: #295744;
    color: var(--green)
}

.badge.red {
    background: #442434;
    border-color: #70404c;
    color: var(--red)
}

.habit-meta {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 5px
}

.habit-value {
    display: flex;
    align-items: center;
    gap: 8px
}

.habit-value input {
    max-width: 90px;
    min-height: 38px
}

.days {
    display: flex;
    gap: 7px;
    margin-top: 14px
}

.day-dot {
    flex: 1;
    min-height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #0e1929;
    color: #8497b2;
    font-size: .75rem
}

.day-dot.done {
    background: #1e5043;
    border-color: #367b60;
    color: #9cecc2
}

.day-dot.missed {
    border-color: #694552;
    background: #392733;
    color: #dbaaaf
}

.day-dot.partial {
    background: #41372a;
    color: #e1bc85
}

.day-dot.off {
    opacity: .45
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    color: var(--text)
}

.activity-row:first-child {
    border-top: 0
}

.activity-row:hover {
    color: #a7d1ff
}

.activity-icon {
    width: 37px;
    height: 37px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #20334e;
    color: #7ebaff;
    flex-shrink: 0
}

.activity-icon.training {
    background: #28304d;
    color: #c1b5ff
}

.activity-icon.review,
.activity-icon.lesson {
    background: #1c3b38;
    color: #82dcc2
}

.activity-body {
    flex: 1;
    min-width: 0
}

.activity-body strong {
    display: block;
    font-size: .94rem;
    overflow-wrap: anywhere
}

.activity-body small {
    color: var(--muted)
}

.activity-arrow {
    color: var(--muted)
}

.level-strip {
    background: linear-gradient(110deg, #163352, #152339);
    border: 1px solid #315275;
    border-radius: 15px;
    padding: 20px
}

.level-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px
}

.level-number {
    font-size: 1.4rem;
    font-weight: 700
}

.level-strip .bar {
    background: #263f5d
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px
}

.calendar-day {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-size: .8rem
}

.calendar-day.used {
    background: #193955;
    color: #a5d1ff
}

.calendar-day.today {
    border-color: var(--blue)
}

.calendar-day.selected {
    background: #2e70b2;
    color: white
}

.calendar-day.outside {
    opacity: .35
}

.calendar-label {
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 6px
}

.field {
    margin-bottom: 19px
}

.field label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 7px
}

.field input:not([type=checkbox]),
.field select,
.field textarea,
input[type=date],
.habit-value input,
.filters select {
    width: 100%;
    min-height: 45px;
    background: #0b1626;
    border: 1px solid #33455e;
    border-radius: 9px;
    padding: 10px 12px;
    color: var(--text);
    outline: 0
}

.field input:focus,
.field select:focus,
.field textarea:focus,
input[type=date]:focus,
.habit-value input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px #3589f51f
}

.field textarea {
    resize: vertical
}

.field input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
    vertical-align: middle;
    margin-right: 8px
}

.field div[id$=weekdays] {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.field div[id$=weekdays] label {
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px
}

.required {
    color: var(--blue)
}

.help {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 7px
}

.help ul {
    padding-left: 19px;
    margin: 7px 0
}

.field-error,
.form-errors {
    color: #ffabba;
    font-size: .875rem
}

.form-errors {
    padding: 12px;
    background: #502638;
    border: 1px solid #7e4055;
    border-radius: 9px;
    margin-bottom: 18px
}

.form-errors ul {
    padding-left: 18px;
    margin: 0
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 25px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 22px
}

.form-grid .field[data-field=title],
.form-grid .field[data-field=note],
.form-grid .form-errors,
.form-grid .field[data-field=weekdays] {
    grid-column: 1/-1
}

.field[hidden] {
    display: none
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 20px
}

.message {
    padding: 13px 17px;
    border: 1px solid #2b6752;
    border-radius: 10px;
    background: #15332e;
    color: #a2e5c8
}

.message.error {
    border-color: #74414d;
    background: #36202e;
    color: #ffc1ca
}

.filters {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.filters label {
    font-size: .8rem;
    color: var(--muted);
    display: block;
    margin-bottom: 5px
}

.filters select,
.filters input {
    width: auto;
    min-width: 140px
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .875rem
}

.detail-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 15px 0 22px
}

.detail-meta span {
    background: #1b2e46;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: .875rem
}

.note-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #ccd7e8
}

.note-card {
    border-top: 1px solid var(--line);
    padding: 18px 0
}

.note-card:first-child {
    border-top: 0
}

.note-footer {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--muted)
}

.chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    align-items: end;
    height: 220px;
    margin: 25px 0
}

.chart-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px
}

.chart-bars {
    height: 165px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
    justify-content: center
}

.chart-bar {
    width: 20px;
    min-height: 2px;
    background: var(--blue);
    border-radius: 5px 5px 0 0
}

.chart-bar.training {
    background: var(--cyan)
}

.chart-label {
    font-size: .8rem;
    color: var(--muted)
}

.chart-total {
    font-size: .75rem;
    color: var(--muted)
}

.legend {
    display: flex;
    gap: 20px;
    font-size: .8rem;
    color: var(--muted)
}

.legend span:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--blue);
    border-radius: 2px;
    margin-right: 7px
}

.legend span:last-child:before {
    background: var(--cyan)
}

.table-wrap {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    text-align: left
}

th {
    color: var(--muted);
    font-weight: 500
}

td,
th {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line)
}

.xp {
    color: var(--green);
    font-weight: 600
}

.xp.negative {
    color: var(--red)
}

footer {
    padding: 20px 40px;
    border-top: 1px solid var(--line);
    color: #8a9bb2;
    font-size: .75rem;
    display: flex;
    justify-content: space-between
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 20px;
    background: radial-gradient(ellipse at 15% 10%, #163a643d, transparent 50%), var(--bg);
    flex-direction: column
}

.auth-wrap {
    width: 100%;
    max-width: 465px
}

.auth-wrap>.brand {
    justify-content: center;
    margin-bottom: 35px
}

.auth-card {
    width: 100%;
    max-width: 465px;
    background: var(--panel);
    border: 1px solid #2a3b55;
    padding: 33px;
    border-radius: 23px;
    box-shadow: 0 20px 100px #0004
}

.auth-card h1 {
    margin-top: 15px
}

.auth-card form {
    margin-top: 25px
}

.auth-switch {
    margin: 25px 0 0;
    text-align: center;
    font-size: .875rem;
    color: var(--muted)
}

.auth-foot {
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    margin: 24px 0 0
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: .875rem
}

.section-space {
    margin-top: 22px
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px
}

.date-picker input {
    max-width: 170px
}

.schedule-info {
    font-size: .875rem;
    color: var(--muted);
    padding: 12px 0
}

.inline-form {
    display: inline
}

.two-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px
}

.subtle-rule {
    padding: 14px 17px;
    background: #0c1728;
    border-left: 3px solid #3e8cdd;
    color: var(--muted);
    font-size: .875rem;
    border-radius: 0 9px 9px 0
}

@media(max-width:1250px) {
    .shell {
        grid-template-columns: 210px minmax(0, 1fr)
    }

    .sidebar {
        padding: 26px 15px
    }

    main#main {
        padding: 28px 24px
    }

    .topbar {
        padding: 0 24px
    }

    .columns {
        grid-template-columns: minmax(0, 1fr) 280px
    }

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

    .metric {
        padding: 18px 20px
    }
}

@media(max-width:1000px) {

    .columns,
    .two-panels {
        grid-template-columns: 1fr
    }

    .sidebar {
        padding: 24px 12px
    }

    .shell {
        grid-template-columns: 190px minmax(0, 1fr)
    }

    .brand {
        font-size: 18px;
        gap: 8px
    }

    .brand-mark {
        width: 32px;
        height: 35px
    }

    .page-head {
        align-items: flex-start
    }

    .calendar-day {
        min-height: 40px
    }

    .stack.aside-stack {
        display: grid;
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:720px) {
    .shell {
        display: block
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 17px 16px 0;
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .sidebar>.brand {
        margin-bottom: 14px
    }

    .nav-caption,
    .sidebar-bottom,
    .topbar {
        display: none
    }

    .sidebar nav {
        display: flex;
        overflow: auto;
        gap: 5px;
        padding-bottom: 12px
    }

    .nav-link {
        white-space: nowrap;
        font-size: .875rem;
        padding: 9px 11px;
        margin: 0
    }

    .nav-link svg {
        width: 17px;
        height: 17px
    }

    .sidebar nav:after {
        content: '';
        min-width: 1px
    }

    .nav-link.active {
        box-shadow: none
    }

    .page-head {
        flex-wrap: wrap;
        gap: 14px
    }

    .page-head .btn {
        min-height: 42px
    }

    main#main {
        padding: 25px 16px
    }

    .panel {
        padding: 20px 17px;
        border-radius: 14px
    }

    .metrics {
        gap: 11px
    }

    .metric-value {
        font-size: 1.7rem
    }

    .metric {
        padding: 16px
    }

    .metric-label {
        margin-bottom: 8px
    }

    .columns {
        gap: 18px
    }

    .stack.aside-stack {
        display: flex
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .form-grid .field {
        grid-column: 1
    }

    .auth-card {
        padding: 26px 23px
    }

    .habit-top {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .habit-value {
        margin-left: auto
    }

    .chart {
        gap: 8px
    }

    .chart-bar {
        width: 14px
    }

    .filters>* {
        flex: 1
    }

    .filters select,
    .filters input {
        width: 100%;
        min-width: 0
    }

    footer {
        padding: 20px 16px
    }

    .quick-actions .btn {
        flex: 1;
        min-width: 130px
    }

    .date-picker {
        width: 100%
    }

    .date-picker input {
        max-width: none
    }

    .mobile-settings {
        display: block !important
    }

    .auth-wrap {
        max-width: 430px
    }
}

.mobile-settings {
    display: none
}

@media(prefers-reduced-motion:no-preference) {

    a,
    button {
        transition: background .15s, color .15s
    }

    .bar>span {
        transition: width .25s
    }
}

/* VIDEO LIBRARY */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.video-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card, #111e30);
    transition: transform .2s ease, border-color .2s ease;
}

.video-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent, #668cff);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050a12;
    overflow: hidden;
}

.video-player video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-card-content {
    padding: 20px;
}

.video-category {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--accent, #8ba9ff);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-card-content h2 {
    margin: 0 0 10px;
    font-size: 19px;
}

.video-card-content p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.empty-state {
    margin-top: 30px;
    padding: 55px 25px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 18px;
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* TOP NAVIGATION */


/* TOP NAVIGATION */
.top-shell {
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
    padding: 12px 28px;
    background: rgba(11, 20, 35, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.app-header .brand {
    flex-shrink: 0;
    text-decoration: none;
}

.app-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
}

.app-nav .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    margin: 0;
    border: 1px solid #30435e;
    border-radius: 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    font-size: 13px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: none;
    transition: .2s ease;
}

.app-nav .nav-link:hover {
    color: var(--text);
    background: #1b2b42;
    border-color: #526d91;
}

.app-nav .nav-link.active {
    color: #7abaff;
    background: #1c3658;
    border-color: #5279a5;
    box-shadow: none;
}

.app-account {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.app-account .profile-link {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    text-decoration: none;
}

.app-account form {
    margin: 0;
}

.app-account .text-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.top-shell .workspace {
    min-width: 0;
}

@media (max-width: 1100px) {
    .app-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .app-nav {
        order: 3;
        flex: 1 0 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 12px 16px;
    }

    .app-account .account-name {
        display: none;
    }

    .app-nav .nav-link {
        padding: 9px 10px;
        font-size: 12px;
    }
}

/* MARSLINE PLANNER DROPDOWN */
.app-nav .planner-menu {
    position: relative;
    flex-shrink: 0;
}

.app-nav .planner-menu > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.app-nav .planner-menu > summary::-webkit-details-marker {
    display: none;
}

.app-nav .planner-arrow {
    margin-left: 5px;
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.app-nav .planner-menu[open] .planner-arrow {
    transform: rotate(180deg);
}

.app-nav .planner-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 300;
    min-width: 205px;
    padding: 8px;
    background: #101e31;
    border: 1px solid #30435e;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

.app-nav .planner-dropdown a {
    display: block;
    padding: 11px 13px;
    color: var(--muted);
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.app-nav .planner-dropdown a:hover,
.app-nav .planner-dropdown a.active {
    color: #7abaff;
    background: #1c3658;
}

@media (max-width: 1100px) {
    .app-nav:has(.planner-menu[open]) {
        overflow: visible;
    }
}

@media (max-width: 600px) {
    .app-nav .planner-dropdown {
        min-width: 190px;
    }
}

/* MARSLINE PLANNER DROPDOWN FIX */
.app-header .app-nav {
    overflow: visible;
}

.app-header .planner-menu {
    position: relative;
}

.app-header .planner-menu .planner-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 210px;
    padding: 8px;
    background: #101e31;
    border: 1px solid #30435e;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

.app-header .planner-menu .planner-dropdown a {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border-radius: 8px;
    color: #a9bdd6;
    text-decoration: none;
    white-space: nowrap;
}

.app-header .planner-menu .planner-dropdown a:hover,
.app-header .planner-menu .planner-dropdown a.active {
    background: #1c3658;
    color: #7abaff;
}

/* MARSLINE NAVIGATION STYLE V1 */
@media (min-width: 1101px) {
    .app-header {
        justify-content: flex-start;
        gap: 18px;
    }

    .app-header .app-nav {
        margin-right: auto;
        justify-content: flex-start;
    }

    .app-header .app-account {
        margin-left: auto;
    }
}

.app-header .app-nav {
    gap: 10px;
}

.app-header .app-nav .nav-link {
    padding: 12px 17px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.1px;
    background: linear-gradient(145deg, #17273d, #111e31);
    border: 1px solid #344c69;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
    transition: background .2s ease, border-color .2s ease,
                box-shadow .2s ease, transform .2s ease;
}

.app-header .app-nav .nav-link:hover {
    color: #ffffff;
    background: linear-gradient(145deg, #263f60, #1a304c);
    border-color: #6392c5;
    box-shadow: 0 5px 16px rgba(36, 115, 210, 0.16);
    transform: translateY(-1px);
}

.app-header .app-nav .nav-link.active {
    color: #a6d2ff;
    background: linear-gradient(145deg, #23466f, #193451);
    border-color: #5789bb;
}

.app-header .planner-menu > summary {
    list-style: none;
}

.app-header .planner-menu > summary::marker {
    content: "";
}

.app-header .planner-menu > summary::-webkit-details-marker {
    display: none;
}

.app-header .planner-menu .planner-dropdown a {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .app-header .app-nav .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
}


/* MARSLINE NAVIGATION RIGHT V1 */
@media (min-width: 1101px) {
    .app-header {
        justify-content: space-between;
        gap: 20px;
    }

    .app-header .app-nav {
        margin-left: auto;
        margin-right: 0;
        justify-content: flex-end;
    }

    .app-header .app-account {
        margin-left: 0;
    }
}


/* MARSLINE MINIMAL ICONS V1 */
.app-header .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
    color: #91a9c6;
}

.app-header .app-nav .nav-link {
    gap: 9px;
}

.app-header .planner-dropdown a {
    display: flex !important;
    align-items: center;
    gap: 11px;
}

.app-header .planner-dropdown .nav-icon {
    width: 17px;
    height: 17px;
}

.app-header .nav-link:hover .nav-icon,
.app-header .nav-link.active .nav-icon,
.app-header .planner-dropdown a:hover .nav-icon,
.app-header .planner-dropdown a.active .nav-icon {
    color: #a6d2ff;
}


/* MARSLINE THEME TOGGLE V1 */
.app-header .theme-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #344c69;
    border-radius: 12px;
    color: #a6c3e6;
    background: #17273d;
    cursor: pointer;
}
.app-header .theme-toggle:hover {
    background: #263f60;
    border-color: #6392c5;
}
.theme-icon {
    width: 20px;
    height: 20px;
}
.theme-icon-sun {
    display: none;
}
html[data-theme="light"] .theme-icon-moon {
    display: none;
}
html[data-theme="light"] .theme-icon-sun {
    display: block;
}

/* MARSLINE LIGHT THEME V1 */

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f3f6fb;
    --panel: #ffffff;
    --panel2: #edf3fa;
    --line: #dce5ef;
    --text: #17243a;
    --muted: #64748b;
    --blue: #2878c7;
    --cyan: #167fa4;
    --green: #16865a;
    --red: #c33d53;
}

/* Main layout */
html[data-theme="light"] body {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--line);
}

html[data-theme="light"] .sidebar {
    background: #ffffff;
}

/* Navigation */
html[data-theme="light"] .app-header .app-nav .nav-link {
    color: #33465f;
    background: linear-gradient(145deg, #ffffff, #edf3fa);
    border-color: #d2deeb;
    box-shadow: 0 3px 10px rgba(32, 60, 90, 0.05);
}

html[data-theme="light"] .app-header .app-nav .nav-link:hover {
    color: #175c9d;
    background: #e5effa;
    border-color: #9bbbdc;
}

html[data-theme="light"] .app-header .app-nav .nav-link.active {
    color: #1766aa;
    background: #e3effc;
    border-color: #8fb6e0;
}

html[data-theme="light"] .app-header .planner-menu .planner-dropdown {
    background: #ffffff;
    border-color: #d2deeb;
    box-shadow: 0 16px 40px rgba(25, 55, 90, 0.14);
}

html[data-theme="light"] .app-header .planner-menu .planner-dropdown a {
    color: #40536d;
}

html[data-theme="light"] .app-header .planner-menu .planner-dropdown a:hover,
html[data-theme="light"] .app-header .planner-menu .planner-dropdown a.active {
    color: #1766aa;
    background: #e3effc;
}

/* Icons */
html[data-theme="light"] .app-header .nav-icon {
    color: #5b789b;
}

/* Theme toggle */
html[data-theme="light"] .app-header .theme-toggle {
    background: #edf3fa;
    border-color: #d2deeb;
    color: #315e91;
}

html[data-theme="light"] .app-header .theme-toggle:hover {
    background: #dceaf8;
    border-color: #9bbbdc;
}

/* Cards */
html[data-theme="light"] .panel,
html[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: #dce5ef;
    box-shadow: 0 6px 24px rgba(30, 60, 100, 0.04);
}

/* Buttons */
html[data-theme="light"] .btn:not(.primary):not(.danger) {
    background: #edf3fa;
    color: #263e59;
    border-color: #cbd9e9;
}

html[data-theme="light"] .btn:not(.primary):not(.danger):hover {
    background: #dceaf8;
    color: #175c9d;
}

html[data-theme="light"] .btn.primary {
    background: #2878c7;
    border-color: #2878c7;
    color: #ffffff;
}

/* Forms */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: #ffffff;
    color: #17243a;
    border-color: #cbd9e9;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #8292a6;
}

/* Additional blocks */
html[data-theme="light"] .bar {
    background: #dce5ef;
}

html[data-theme="light"] .subtle-rule {
    background: #eaf2fb;
    color: #526781;
}

html[data-theme="light"] .auth-main {
    background: var(--bg);
}



/* MARSLINE LIGHT XP CARD V1 */

html[data-theme="light"] .level-strip {
    background: linear-gradient(135deg, #ffffff, #f5f9ff);
    border: 1px solid #d5e2f0;
    color: #17243a;
    box-shadow: 0 6px 24px rgba(30, 60, 100, 0.05);
}

html[data-theme="light"] .level-strip .eyebrow {
    color: #2878c7;
}

html[data-theme="light"] .level-strip h2,
html[data-theme="light"] .level-strip .level-number {
    color: #17243a;
}

html[data-theme="light"] .level-strip .muted {
    color: #64748b;
}

html[data-theme="light"] .level-strip .badge {
    background: #e5f0ff;
    border-color: #c5dcf5;
    color: #1766aa;
}

html[data-theme="light"] .level-strip .bar {
    background: #e2eaf3;
}

html[data-theme="light"] .level-strip .bar > span {
    background: #2878c7;
}


/* MARSLINE LIGHT PDF CARD V1 */

html[data-theme="light"] .ml-course .course-pdf-card {
    background: #f8fbff !important;
    border: 1px solid #dce5ef !important;
    color: #17243a !important;
    box-shadow: 0 4px 18px rgba(30, 60, 100, 0.04);
}

html[data-theme="light"] .ml-course .course-pdf-card > div:first-child > div:first-child {
    background: #e5f0ff !important;
    color: #2878c7 !important;
}

html[data-theme="light"] .ml-course .course-pdf-card h3 {
    color: #17243a !important;
}

html[data-theme="light"] .ml-course .course-pdf-card p {
    color: #526781 !important;
    opacity: 1 !important;
}

html[data-theme="light"] .ml-course .course-pdf-card a:first-child {
    background: #2878c7 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .ml-course .course-pdf-card a:last-child {
    background: #edf3fa !important;
    border: 1px solid #cbd9e9 !important;
    color: #263e59 !important;
}

/* MARSLINE AUTH THEME TOGGLE V1 */

.auth-main {
    position: relative;
}

.auth-main .auth-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid #344c69;
    border-radius: 12px;
    color: #a6c3e6;
    background: #17273d;
    cursor: pointer;
    z-index: 100;
}

.auth-main .auth-theme-toggle:hover {
    background: #263f60;
    border-color: #6392c5;
}

html[data-theme="light"] .auth-main .auth-theme-toggle {
    background: #edf3fa;
    border-color: #d2deeb;
    color: #315e91;
}

html[data-theme="light"] .auth-main .auth-theme-toggle:hover {
    background: #dceaf8;
    border-color: #9bbbdc;
}

/* END MARSLINE AUTH THEME TOGGLE V1 */
