:root {
    color-scheme: light;
    font: 15px/1.55 "Segoe UI", system-ui, sans-serif;
    color: #252b39;
    background: #f5f6f9;
}

* { box-sizing: border-box; }
body { margin: 0; }
header { background: #fff; color: #252b39; border-bottom: 1px solid #e7eaf0; }
nav, main { width: min(1120px, 100% - 2rem); margin-inline: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; padding-block: 1rem; }
nav a { color: #5d6576; text-decoration: none; font-weight: 600; }
nav a:hover { color: #434bc4; }
.brand { color: #272e4a; font-size: 1rem; font-weight: 750; letter-spacing: -.02em; text-decoration: none; margin-right: 1.25rem; }
.identity { margin-left: auto; color: #686f7f; }
main { padding-block: 2.5rem 5rem; }
h1 { margin: 0 0 1.6rem; font-size: clamp(1.65rem, 4vw, 2.15rem); letter-spacing: -.035em; line-height: 1.15; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
a { color: #4c54bb; text-underline-offset: .18em; }
.meta { color: #747b8a; }
.card, .table { background: #fff; border: 1px solid #e7e9ef; border-radius: 12px; box-shadow: 0 3px 14px #24325008; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; }
th, td { padding: .9rem 1.1rem; border-bottom: 1px solid #f0f1f5; vertical-align: top; }
th { background: #fafbfc; color: #7b8291; font-size: .78rem; letter-spacing: .025em; white-space: nowrap; }
td { overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9f9fe; }
.pagination { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; }
.platforms { display: flex; gap: .5rem; }
.platform { padding: .55rem 1.1rem; border-radius: 8px; background: #eaebf2; color: #62697a; text-decoration: none; font-weight: 600; }
.platform.active { background: #4e56bc; color: white; }
.filters { max-width: none; margin-bottom: 1rem; }
.filter-options { display: flex; gap: 1rem; flex-wrap: wrap; }
.card { padding: 1.5rem; margin-top: 1rem; max-width: 48rem; }
.login { max-width: 26rem; }
label { display: block; font-weight: 600; margin-bottom: 1rem; }
input, textarea, select {
    display: block;
    width: 100%;
    padding: .65rem .75rem;
    margin-top: .35rem;
    border: 1px solid #d8dce5;
    border-radius: 6px;
    color: inherit;
    font: inherit;
}
.grow { flex: 1; }
.button-link { display: inline-block; border-radius: 7px; background: #4e56bc; color: white; padding: .55rem .9rem; text-decoration: none; font-weight: 600; }
.button-link.secondary { background: #eeeff8; color: #4e56a6; }
.account-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.account-form { max-width: none; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .4rem 1.2rem; }
.field-label { color: #858c9b; font-size: .85rem; }
.sort-controls { display: flex; flex-wrap: wrap; gap: 1rem; }
.sort-controls label { flex: 1; min-width: 180px; }
.danger { background: #913d3d; }
.platforms { flex-wrap: wrap; align-items: center; }
.account-sections { margin-top: 1rem; }
.purpose { border: 1px solid #d8dce5; border-radius: 8px; margin: 0 0 1rem; padding: .7rem 1rem; }
textarea { resize: vertical; }
.check { display: flex; align-items: baseline; gap: .45rem; font-weight: 400; margin-bottom: .35rem; }
.check input { width: auto; margin: 0; }
button {
    border: 1px solid transparent;
    border-radius: 6px;
    background: #4e56bc;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: .45rem .9rem;
}
button:hover { background: #3c449e; }
.quiet, .secondary-button { background: #f0f1f7; border-color: transparent; color: #535b70; }
.danger { background: #ab5158; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.25rem; }
summary { cursor: pointer; font-weight: 650; color: #434a61; }
.inner-form { margin-top: 1.2rem; }
details > form.card { box-shadow: none; border: 0; padding: 1.25rem 0 0; margin: 0; }
[role="alert"] { color: #9b3028; }
:focus-visible { outline: 3px solid #a05d13; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
    nav { gap: .75rem; }
    .brand { width: 100%; }
    th, td { padding: .6rem .7rem; }
}

/* Workspace navigation */
body:has(header) { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
body:has(header) > header { position: sticky; top: 0; height: 100vh; border-right: 1px solid #e5e9f1; border-bottom: 0; }
body:has(header) > main { width: min(1160px, calc(100% - 4rem)); padding-block: 3rem 5rem; }
nav { width: auto; height: 100%; padding: 1.5rem .9rem 1rem; display: flex; flex-direction: column; align-items: stretch; gap: .2rem; }
nav a:not(.brand) { display: block; padding: .65rem .8rem; border-radius: 8px; }
nav a.nav-active { background: #f0f1ff; color: #4c54b7; }
nav a:not(.brand):hover { background: #f5f6fa; }
.brand { display: flex; align-items: center; gap: .65rem; margin: 0 0 2rem; padding: .2rem .55rem; line-height: 1.2; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: #5159bc; color: #fff; font-size: 1.05rem; }
.nav-label { padding: 0 .8rem .45rem; color: #9b9fae; font-size: .68rem; font-weight: 700; letter-spacing: .09em; }
.nav-footer { margin-top: auto; padding: 1rem .4rem 0; border-top: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.identity { margin: 0; overflow-wrap: anywhere; }
.nav-footer button { font-size: .84rem; }
progress { display: block; width: 100%; height: 6px; margin-top: .55rem; border: 0; border-radius: 10px; overflow: hidden; accent-color: #626ad2; }
progress::-webkit-progress-bar { background: #eceef6; }
progress::-webkit-progress-value { background: #626ad2; border-radius: 10px; }
input, select, textarea { background: #fff; }
input:hover, select:hover, textarea:hover { border-color: #a7aec0; }
button, .button-link { transition: background-color .15s ease, color .15s ease; }
.actions { align-items: center; }
.table a { font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.card, .table { box-shadow: 0 12px 30px #2334550d, 0 2px 5px #2334550d; }
.table { border-color: #e2e7f0; }
.table tbody tr { transition: background-color .16s ease; }
.table tbody tr:hover { background: #f4f6ff; }
.account-link { display: inline-flex; align-items: center; gap: .6rem; color: #303b85; }
.account-link::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #858fe2; box-shadow: 0 0 0 4px #eef0ff; }
.status-badge { display: inline-block; padding: .28rem .65rem; border: 1px solid #e0e4ed; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: #f4f5f8; color: #62697a; }
.status-badge.warmup { background: #fff4df; border-color: #f1dfb9; color: #8b5a0e; }
.status-badge.ready { background: #e8f6ed; border-color: #cae8d3; color: #267548; }
.status-badge.worked { background: #ecedfa; border-color: #d9dcf2; color: #535a9d; }
.platform.active, .button-link:not(.secondary), button:not(.secondary-button):not(.quiet):not(.danger):not(.small-button) { box-shadow: 0 4px 12px #4e56bc30; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 1rem; margin-top: 1.25rem; }
.choice-card { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.4rem; background: #fff; border: 1px solid #e1e5f0; border-radius: 14px; color: #303a64; text-decoration: none; box-shadow: 0 12px 25px #27345b0d; transition: transform .15s ease, box-shadow .15s ease; }
.choice-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px #27345b1c; }
.choice-card span { color: #6873b5; font-size: .9rem; }
.month-navigation, .plan-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.month-navigation h2, .plan-header h2, .profile-card h2 { margin: 0; }
.month-navigation { margin-bottom: 1rem; }
.calendar table { table-layout: fixed; min-width: 600px; }
.calendar td { height: 100px; width: 14.28%; }
.calendar-outside { background: #f8f9fc; }
.dayoff-name { display: block; margin-top: .3rem; padding: .15rem .4rem; border-radius: 5px; background: #f0f1ff; color: #4e56a5; font-size: .8rem; overflow-wrap: anywhere; }
.small-button { margin-top: .35rem; padding: .2rem .4rem; font-size: .75rem; background: #f0f1f7; color: #535b70; }
.compact-form { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; }
.compact-form label { margin: 0; flex: 1; min-width: 180px; }
.compact-form button { min-height: 42px; }
.profile-card { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #eeefff; color: #4e56bc; font-weight: 700; font-size: 1.3rem; }
.personal-plan { max-width: none; }
.plan-header { margin-bottom: 1.5rem; }
.plan-header strong { display: block; font-size: 1.2rem; }
.personal-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 1.5rem; }
.personal-metric span { display: block; margin-bottom: .4rem; color: #747b8a; }
.personal-metric strong { display: block; font-weight: 600; }
.personal-metric small { display: block; margin-top: .35rem; color: #747b8a; }
.plan-alert, .notice { padding: 1rem 1.2rem; margin-bottom: 1.25rem; border-radius: 10px; background: #fff7e6; border: 1px solid #f2dfb2; color: #6c4d19; }
.plan-alert p { margin: .35rem 0; }
.table td small { display: block; margin-top: .8rem; color: #747b8a; min-width: 130px; }
body:not(:has(header)) main { max-width: 460px; padding-top: max(10vh, 3rem); }
body:not(:has(header)) .login { max-width: none; padding: 2rem; }

@media (max-width: 760px) {
    body:has(header) { display: block; }
    body:has(header) > header { position: static; height: auto; border-right: 0; border-bottom: 1px solid #e5e9f1; }
    body:has(header) > main { width: calc(100% - 2rem); padding-top: 2rem; }
    nav { flex-direction: row; flex-wrap: wrap; height: auto; padding: .8rem 1rem; gap: .2rem; }
    .brand { width: 100%; margin: 0 0 .5rem; }
    .brand br, .nav-label { display: none; }
    nav a:not(.brand) { padding: .45rem .6rem; }
    .nav-footer { width: 100%; margin-top: .5rem; padding: .5rem 0 0; }
}
