:root {
    --bg: #050a11;
    --bg-2: #07111d;
    --panel: rgba(12, 23, 36, 0.88);
    --panel-2: rgba(15, 28, 43, 0.86);
    --panel-3: rgba(18, 33, 50, 0.92);
    --text: #f3f7ff;
    --muted: #8d9bad;
    --line: rgba(164, 190, 221, 0.16);
    --line-strong: rgba(164, 190, 221, 0.26);
    --blue: #2d8cff;
    --blue-2: #54a6ff;
    --work: #d83f3c;
    --work-dark: #a92826;
    --off: #36a852;
    --off-dark: #21783d;
    --travel: #2f83e8;
    --holiday: #e0a619;
    --vacation: #8a55e8;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 7px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% -12%, rgba(45, 140, 255, 0.18), transparent 34rem),
        radial-gradient(circle at 92% 4%, rgba(216, 63, 60, 0.10), transparent 30rem),
        linear-gradient(180deg, #060b13 0%, #040810 100%);
}

button,
select,
input {
    font: inherit;
}

button,
a,
select,
input {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(100% - 32px, 1720px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 0;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
}

.topbar {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: white;
}

.brand-mark svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(45, 140, 255, 0.24));
}

.brand-text {
    font-size: clamp(1.25rem, 1.5vw, 1.75rem);
    font-weight: 850;
    letter-spacing: -0.045em;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions button,
.share-button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text);
    background: transparent;
    font-size: 0.92rem;
    font-weight: 720;
}

.top-actions button:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.045);
}

.share-button {
    border-color: var(--line-strong) !important;
    background: linear-gradient(180deg, rgba(31, 48, 72, 0.92), rgba(17, 31, 48, 0.92)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.control-panel {
    display: grid;
    grid-template-columns: 1.55fr 1fr 1fr 1fr 0.7fr 1.15fr 1.2fr;
    gap: 10px;
    align-items: end;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(13, 25, 39, 0.92), rgba(9, 18, 30, 0.92));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.control-field,
.switch-field {
    min-width: 0;
}

.control-field {
    display: grid;
    gap: 7px;
}

.control-field span,
.switch-field > span:last-child {
    color: #d8e2ee;
    font-size: 0.82rem;
    font-weight: 760;
}

.control-field select,
.control-field input {
    width: 100%;
    min-height: 39px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text);
    background: rgba(5, 12, 22, 0.72);
    outline: none;
}

.control-field select:focus,
.control-field input:focus {
    border-color: rgba(84, 166, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.16);
}

.control-field select:disabled {
    color: #b4bfcc;
    opacity: 1;
}

.switch-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    min-height: 39px;
    padding-top: 22px;
}

.switch-field input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch {
    position: relative;
    width: 42px;
    height: 24px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dce6f3;
    transition: transform 0.16s ease, background 0.16s ease;
}

.switch-field input[type="checkbox"]:checked + .switch {
    border-color: rgba(45, 140, 255, 0.72);
    background: rgba(45, 140, 255, 0.42);
}

.switch-field input[type="checkbox"]:checked + .switch::after {
    background: white;
    transform: translateX(18px);
}

.calendar-panel {
    min-height: 0;
    padding: 12px 14px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(12, 24, 38, 0.94), rgba(8, 17, 29, 0.94));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    padding: 0 6px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
}

.year-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.year-switcher a,
.today-link {
    display: grid;
    min-width: 38px;
    min-height: 34px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
}

.year-switcher a {
    font-size: 1.5rem;
    line-height: 1;
}

.year-switcher strong {
    min-width: 82px;
    text-align: center;
    font-size: 1.55rem;
    letter-spacing: -0.045em;
}

.today-link {
    padding: 0 14px;
    font-size: 0.9rem;
    font-weight: 750;
}

.legend {
    display: flex;
    justify-content: center;
    flex: 1;
    flex-wrap: wrap;
    gap: 9px 18px;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d4ddea;
    font-size: 0.86rem;
    font-weight: 650;
    white-space: nowrap;
}

.dot,
.mini {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    display: inline-block;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 14px rgba(0, 0, 0, 0.24);
}

.dot-work { background: linear-gradient(180deg, #ee504b, var(--work)); }
.dot-off { background: linear-gradient(180deg, #45c363, var(--off)); }
.dot-travel { background: linear-gradient(180deg, #54a6ff, var(--travel)); }
.dot-holiday { background: linear-gradient(180deg, #ffc63a, var(--holiday)); border-radius: 50%; }
.dot-departure { background: linear-gradient(135deg, var(--off) 0 49.5%, var(--work) 50% 100%); }
.dot-homecoming { background: linear-gradient(45deg, var(--work) 0 49.5%, var(--off) 50% 100%); }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.month-card {
    min-width: 0;
    padding: 10px 12px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18, 33, 49, 0.64), rgba(12, 24, 36, 0.56));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.month-card h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 820;
    letter-spacing: -0.035em;
}

.weekdays,
.days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.weekdays {
    margin-bottom: 6px;
}

.weekdays span {
    color: #aeb9c8;
    font-size: 0.67rem;
    font-weight: 820;
    text-align: center;
}

.day {
    position: relative;
    display: grid;
    width: 100%;
    height: clamp(19px, 2.58vh, 31px);
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.025);
    border-radius: 5px;
    color: #dfe7f2;
    background: rgba(255, 255, 255, 0.045);
    font-size: clamp(0.66rem, 1.25vh, 0.86rem);
    font-weight: 830;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.day span {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
}

.day-empty {
    pointer-events: none;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.day-work {
    color: white;
    background: linear-gradient(180deg, #e34a46, #b72d2a);
    border-color: rgba(255, 99, 96, 0.22);
}

.day-off {
    color: white;
    background: linear-gradient(180deg, #43b95f, #287d41);
    border-color: rgba(91, 214, 117, 0.18);
}

.day-travel {
    color: white;
    background: linear-gradient(180deg, #4d9bf3, #256dca);
    border-color: rgba(95, 170, 255, 0.24);
}

.day-work:hover,
.day-off:hover,
.day-travel:hover,
.is-departure:hover,
.is-homecoming:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.is-departure {
    color: white;
    background: linear-gradient(135deg, #39ad58 0 49.5%, #d53e3a 50% 100%);
    border-color: rgba(255, 255, 255, 0.10);
}

.is-homecoming {
    color: white;
    background: linear-gradient(45deg, #d53e3a 0 49.5%, #39ad58 50% 100%);
    border-color: rgba(255, 255, 255, 0.10);
}

.is-holiday {
    outline: 1px solid rgba(224, 166, 25, 0.65);
    outline-offset: -1px;
}

.is-holiday::before {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffc22e;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 194, 46, 0.55);
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 0.82fr 0.52fr;
    gap: 10px;
    min-height: 90px;
}

.info-card {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(14, 27, 42, 0.92), rgba(9, 19, 31, 0.92));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.info-card h2 {
    margin: 0 0 10px;
    font-size: 1rem;
    letter-spacing: -0.025em;
}

.summary-list,
.period-list,
.tool-buttons {
    display: grid;
    gap: 8px;
}

.summary-list {
    grid-template-columns: repeat(4, 1fr);
}

.summary-list span {
    display: grid;
    gap: 2px;
}

.summary-list b {
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.summary-list small,
.period-list small,
.tip-card p {
    color: #c8d2df;
    font-size: 0.78rem;
}

.period-list {
    grid-template-columns: repeat(3, 1fr);
}

.period-list span {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 2px 9px;
    align-items: center;
}

.period-list i {
    grid-row: span 2;
}

.period-list b {
    font-size: 0.84rem;
}

.period-list small {
    display: block;
}

.mini.home {
    background: linear-gradient(180deg, #43b95f, #287d41);
}

.split-out {
    background: linear-gradient(135deg, #39ad58 0 49.5%, #d53e3a 50% 100%);
}

.split-home {
    background: linear-gradient(45deg, #d53e3a 0 49.5%, #39ad58 50% 100%);
}

.tool-buttons {
    grid-template-columns: repeat(3, 1fr);
}

.tool-buttons button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 760;
    background: rgba(45, 140, 255, 0.08);
}

.tool-buttons button:hover {
    background: rgba(45, 140, 255, 0.16);
}

.tip-card p {
    margin: 0;
    line-height: 1.38;
}

.error-card {
    padding: 20px;
    border: 1px solid rgba(216, 63, 60, 0.35);
    border-radius: var(--radius-lg);
    color: white;
    background: rgba(92, 20, 25, 0.8);
}

.day-dialog {
    width: min(410px, calc(100% - 28px));
    padding: 22px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    color: var(--text);
    background: #0d1826;
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.50);
}

.day-dialog::backdrop {
    background: rgba(1, 5, 12, 0.68);
    backdrop-filter: blur(5px);
}

.day-dialog h2 {
    margin: 0;
    padding-right: 42px;
    font-size: 1.28rem;
    letter-spacing: -0.04em;
}

.day-dialog p {
    margin: 8px 0 0;
    color: #c8d2df;
    font-weight: 820;
}

.day-dialog ul {
    margin: 14px 0 0;
    padding-left: 19px;
}

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.3rem;
    line-height: 1;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%) translateY(80px);
    z-index: 20;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    background: rgba(10, 20, 32, 0.94);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
    box-shadow: var(--shadow);
}

.toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (min-width: 1100px) and (min-height: 680px) {
    body {
        overflow: hidden;
    }
}

@media (max-width: 1380px) {
    .app-shell {
        width: min(100% - 20px, 1500px);
        padding: 10px 0;
        gap: 8px;
    }

    .topbar {
        min-height: 42px;
    }

    .control-panel {
        grid-template-columns: 1.35fr 0.72fr 0.86fr 0.86fr 0.58fr 0.95fr 1fr;
        gap: 8px;
        min-height: 66px;
        padding: 10px 12px;
    }

    .control-field select,
    .control-field input {
        min-height: 35px;
    }

    .control-field span,
    .switch-field > span:last-child {
        font-size: 0.76rem;
    }

    .switch-field {
        padding-top: 20px;
        gap: 8px;
    }

    .calendar-panel {
        padding: 10px 12px 12px;
    }

    .calendar-header {
        min-height: 38px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .month-card {
        padding: 8px 10px 9px;
    }

    .month-card h2 {
        margin-bottom: 6px;
        font-size: 0.95rem;
    }

    .weekdays,
    .days {
        gap: 3px;
    }

    .bottom-grid {
        min-height: 78px;
    }

    .info-card {
        padding: 10px 12px;
    }

    .info-card h2 {
        margin-bottom: 8px;
        font-size: 0.92rem;
    }

    .summary-list b {
        font-size: 1.35rem;
    }
}

@media (max-width: 1120px) {
    body {
        overflow: auto;
    }

    .app-shell {
        display: block;
        min-height: auto;
        width: min(100% - 20px, 900px);
        padding: 12px 0 28px;
    }

    .topbar,
    .control-panel,
    .calendar-panel,
    .bottom-grid {
        margin-bottom: 10px;
    }

    .top-actions {
        display: none;
    }

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

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

    .bottom-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .brand-text {
        font-size: 1.25rem;
    }

    .control-panel,
    .calendar-grid,
    .bottom-grid,
    .summary-list,
    .period-list {
        grid-template-columns: 1fr;
    }

    .calendar-header {
        display: grid;
    }

    .legend {
        justify-content: flex-start;
    }

    .day {
        height: 34px;
        font-size: 0.88rem;
    }

    .switch-field {
        padding-top: 0;
    }
}

/* Dashboard layout v2 */
.app-shell--dashboard {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 9px;
}

.control-panel--dashboard {
    grid-template-columns: 1.45fr 0.82fr 0.9fr 0.9fr 0.62fr 1fr 1.1fr 1.18fr;
}

.control-field--team {
    min-width: 150px;
}

.overview-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.78fr) 2.8fr;
    gap: 14px;
    align-items: stretch;
    min-height: 92px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(13, 25, 39, 0.94), rgba(8, 17, 29, 0.94));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.035);
}

.overview-title {
    display: grid;
    align-content: center;
    gap: 6px;
}

.overview-title h1 {
    margin: 0;
    font-size: clamp(1.05rem, 1.35vw, 1.45rem);
    letter-spacing: -0.045em;
}

.overview-title span {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 680;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.overview-stat {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 2px 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.045);
}

.overview-stat i {
    grid-row: span 2;
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
}

.overview-stat b {
    font-size: clamp(1.55rem, 2vw, 2.05rem);
    line-height: 1;
    letter-spacing: -.055em;
}

.overview-stat span {
    color: #c7d1df;
    font-size: .77rem;
    font-weight: 680;
}

.overview-stat--work i { background: linear-gradient(180deg, #ee504b, #b72d2a); }
.overview-stat--off i { background: linear-gradient(180deg, #43b95f, #287d41); }
.overview-stat--travel i { background: linear-gradient(180deg, #54a6ff, #256dca); }
.overview-stat--holiday-work i { background: linear-gradient(180deg, #ffc63a, #b67b05); }
.overview-stat--holiday-off i { background: linear-gradient(180deg, #43b95f, #287d41); box-shadow: 0 0 0 2px rgba(255,198,58,.45) inset; }

.calendar-panel--main {
    padding-top: 10px;
}

.dot-festival { background: linear-gradient(180deg, #9a68ff, #6737c7); border-radius: 50%; }
.dot-major { background: linear-gradient(180deg, #67d9ff, #2299d2); border-radius: 50%; }
.dot-football { background: linear-gradient(180deg, #43e982, #1ca64f); border-radius: 50%; }

.is-festival::after,
.is-major-event::after,
.is-football::after {
    content: "";
    position: absolute;
    left: 4px;
    bottom: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    z-index: 4;
    box-shadow: 0 0 7px rgba(0,0,0,.25);
}

.is-festival::after { background: #9a68ff; }
.is-major-event::after { background: #67d9ff; left: 11px; }
.is-football::after { background: #43e982; left: 18px; }

.bottom-grid--reference {
    grid-template-columns: minmax(300px, .92fr) minmax(420px, 1.15fr) minmax(360px, .98fr);
    min-height: 178px;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.card-title-row h2 {
    margin: 0;
}

.card-title-row button {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255,255,255,.045);
    font-size: .78rem;
    font-weight: 760;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(84,166,255,.28);
    border-radius: 999px;
    color: #dbeaff;
    background: rgba(84,166,255,.10);
    font-size: .72rem;
    font-weight: 820;
}

.holiday-columns {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 10px;
}

.holiday-columns h3,
.next-match-block h3,
.events-card h3 {
    margin: 0 0 6px;
    font-size: .78rem;
    color: #e7eef8;
}

.holiday-columns p {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0;
    color: #c9d4e2;
    font-size: .78rem;
}

.mini-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}
.mini-dot--work { background: var(--work); }
.mini-dot--off { background: var(--off); }

.football-score-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 9px;
}

.football-score {
    display: grid;
    gap: 2px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.045);
}

.football-score strong {
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -.06em;
}

.football-score span {
    color: #c9d4e2;
    font-size: .68rem;
    line-height: 1.12;
}

.football-score--can {
    border-color: rgba(54,168,82,.32);
    background: rgba(31,130,70,.16);
}

.football-score--miss {
    border-color: rgba(216,63,60,.32);
    background: rgba(130,31,42,.13);
}

.next-match-block--compact {
    display: grid;
    gap: 5px;
}

.match-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid rgba(54,168,82,.30);
    border-radius: 8px;
    background: rgba(31,130,70,.16);
}

.match-row b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .78rem;
}

.match-row small {
    color: #c9d4e2;
    font-size: .69rem;
    white-space: nowrap;
}

.event-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.event-tabs button {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d9e5f3;
    background: rgba(255,255,255,.045);
    font-size: .73rem;
    font-weight: 800;
}

.event-tabs button.is-active {
    border-color: rgba(84,166,255,.52);
    background: rgba(45,140,255,.20);
}

.event-panel {
    display: none;
}

.event-panel.is-active {
    display: block;
}

.event-mini-list {
    display: grid;
    gap: 6px;
}

.event-mini-list--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-mini {
    min-width: 0;
    display: grid;
    gap: 1px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.045);
}

.event-mini b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .78rem;
}

.event-mini small {
    color: #c9d4e2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .68rem;
}

.event-mini--can {
    border-color: rgba(54,168,82,.32);
    background: rgba(31,130,70,.16);
}
.event-mini--partial {
    border-color: rgba(224,166,25,.36);
    background: rgba(150,105,8,.18);
}
.event-mini--miss {
    border-color: rgba(216,63,60,.32);
    background: rgba(130,31,42,.14);
}

.empty-note {
    margin: 0;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.35;
}

@media (max-width: 1380px) {
    .control-panel--dashboard {
        grid-template-columns: 1.2fr .66fr .82fr .82fr .52fr .9fr 1fr 1.04fr;
    }

    .overview-panel {
        min-height: 80px;
        padding: 12px 14px;
    }

    .overview-stat {
        padding: 9px 11px;
        grid-template-columns: 32px 1fr;
    }

    .overview-stat i {
        width: 27px;
        height: 27px;
        border-radius: 8px;
    }

    .overview-stat b {
        font-size: 1.46rem;
    }

    .bottom-grid--reference {
        min-height: 150px;
    }
}

@media (max-width: 1120px) {
    .overview-panel,
    .overview-stats,
    .bottom-grid--reference,
    .holiday-columns,
    .football-score-grid,
    .event-mini-list--split {
        grid-template-columns: 1fr;
    }
}

/* Synlig oppsummering rett under kontrollraden */
.summary-hero {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(380px, 1.35fr) minmax(420px, 1.45fr) minmax(290px, .95fr);
    gap: 10px;
    align-items: stretch;
}

.summary-card {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(14, 27, 42, 0.95), rgba(8, 17, 29, 0.95));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.035);
}

.card-title-row--tight {
    min-height: 28px;
    margin-bottom: 8px;
}

.card-title-row--tight h2 {
    font-size: .98rem;
}

.card-title-row--tight > span:not(.score-badge) {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 720;
    white-space: nowrap;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.quick-stat {
    position: relative;
    min-height: 54px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 8px 9px 8px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    overflow: hidden;
}

.quick-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255,255,255,.20);
}

.quick-stat--work::before { background: var(--work); }
.quick-stat--off::before { background: var(--off); }
.quick-stat--travel::before { background: var(--travel); }
.quick-stat--holiday::before { background: var(--holiday); }

.quick-stat b {
    font-size: 1.7rem;
    line-height: .9;
    letter-spacing: -.06em;
}

.quick-stat small {
    color: #c9d4e2;
    font-size: .69rem;
    font-weight: 720;
}

.summary-event-columns {
    display: grid;
    grid-template-columns: 1.45fr .9fr;
    gap: 8px;
}

.summary-event-columns h3,
.summary-card--period h3,
.summary-card--football h3 {
    margin: 0 0 5px;
    color: #e7eef8;
    font-size: .76rem;
}

.summary-card--events .event-mini-list,
.summary-card--football .next-match-block--hero {
    gap: 5px;
}

.football-score-grid--hero {
    gap: 6px;
    margin-bottom: 7px;
}

.football-score-grid--hero .football-score {
    min-height: 48px;
    padding: 7px 8px;
}

.football-score-grid--hero .football-score strong {
    font-size: 1.35rem;
}

.football-score-grid--hero .football-score span {
    font-size: .63rem;
}

.next-match-block--hero .match-row {
    min-height: 22px;
    padding: 3px 7px;
}

.next-match-block--hero .match-row b {
    font-size: .72rem;
}

.next-match-block--hero .match-row small {
    font-size: .64rem;
}

.period-list--hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.period-list--hero span {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 1px 8px;
    align-items: center;
}

.period-list--hero i {
    grid-row: span 2;
}

.period-list--hero b {
    font-size: .82rem;
}

.period-list--hero small {
    color: #c9d4e2;
    font-size: .72rem;
}

@media (max-width: 1500px) {
    .summary-hero {
        grid-template-columns: minmax(240px, .9fr) minmax(330px, 1.25fr) minmax(360px, 1.3fr) minmax(260px, .9fr);
    }

    .summary-card {
        padding: 10px 12px;
    }

    .quick-stat {
        min-height: 46px;
    }

    .quick-stat b {
        font-size: 1.38rem;
    }
}

@media (max-width: 1180px) {
    .summary-hero {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .summary-hero,
    .summary-event-columns,
    .quick-stats {
        grid-template-columns: 1fr;
    }
}

/* Appearance refresh, closer to premium reference */
:root {
    --bg: #030912;
    --bg-2: #071120;
    --panel-premium: linear-gradient(180deg, rgba(10, 21, 35, 0.96), rgba(7, 15, 26, 0.96));
    --panel-soft: linear-gradient(180deg, rgba(15, 29, 46, 0.92), rgba(9, 19, 31, 0.92));
    --outline-soft: rgba(157, 188, 223, 0.12);
    --outline-strong: rgba(157, 188, 223, 0.20);
    --blue: #3478ff;
    --blue-2: #60a5ff;
    --glow-blue: 0 0 0 1px rgba(67, 130, 255, 0.12), 0 18px 60px rgba(4, 10, 20, 0.46), inset 0 1px 0 rgba(255,255,255,0.04);
    --text-soft: #d3dfef;
}

body {
    background:
        radial-gradient(circle at 10% -8%, rgba(63, 122, 255, 0.22), transparent 34rem),
        radial-gradient(circle at 96% 8%, rgba(48, 94, 174, 0.18), transparent 28rem),
        linear-gradient(180deg, #03070f 0%, #040b15 100%);
}

.app-shell--dashboard {
    width: min(100% - 24px, 1730px);
    min-height: calc(100vh - 16px);
    margin: 8px auto;
    padding: 12px 14px 16px;
    border: 1px solid rgba(149, 182, 221, 0.12);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 0%, rgba(44, 104, 255, 0.08), transparent 28rem),
        linear-gradient(180deg, rgba(6, 13, 24, 0.96), rgba(5, 11, 20, 0.98));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.topbar {
    min-height: 62px;
    padding: 0 6px 12px;
    border-bottom: 1px solid rgba(155, 187, 223, 0.12);
}

.brand {
    gap: 14px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(92, 145, 255, 0.24);
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(43, 105, 255, 0.22), rgba(16, 41, 90, 0.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 36px rgba(0,0,0,0.24);
}

.brand-mark svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.1;
}

.brand-text {
    letter-spacing: -0.05em;
}

.top-actions {
    gap: 10px;
}

.top-actions button,
.share-button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #eef4ff;
    background: rgba(255, 255, 255, 0.025);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.top-actions button:hover,
.top-actions button:focus-visible {
    border-color: rgba(151, 184, 223, 0.14);
    background: rgba(255, 255, 255, 0.055);
    transform: translateY(-1px);
}

.share-button {
    border-color: rgba(105, 155, 255, 0.26) !important;
    background: linear-gradient(180deg, rgba(33, 58, 98, 0.92), rgba(20, 39, 65, 0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.20);
}

.control-panel--dashboard,
.summary-card,
.calendar-panel,
.info-card {
    backdrop-filter: blur(12px);
}

.control-panel--dashboard {
    gap: 12px;
    min-height: 84px;
    padding: 15px 16px;
    border: 1px solid var(--outline-soft);
    border-radius: 20px;
    background:
        radial-gradient(circle at 15% 0%, rgba(51, 114, 255, 0.06), transparent 16rem),
        var(--panel-premium);
    box-shadow: var(--glow-blue);
}

.control-field {
    gap: 8px;
}

.control-field span,
.switch-field > span:last-child {
    color: #d8e4f4;
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0.01em;
}

.control-field select,
.control-field input {
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(158, 189, 223, 0.16);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(7, 14, 24, 0.82), rgba(10, 18, 31, 0.9));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.control-field select:hover,
.control-field input:hover {
    border-color: rgba(158, 189, 223, 0.26);
}

.control-field select:focus,
.control-field input:focus {
    border-color: rgba(91, 158, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(52, 120, 255, 0.16), inset 0 1px 0 rgba(255,255,255,0.06);
}

.switch-field {
    min-height: 42px;
    padding-top: 22px;
}

.switch {
    width: 44px;
    height: 25px;
    border-color: rgba(158, 189, 223, 0.18);
    background: rgba(255,255,255,0.08);
}

.switch::after {
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
}

.switch-field input[type="checkbox"]:checked + .switch::after {
    transform: translateX(19px);
}

.summary-hero {
    gap: 12px;
}

.summary-card {
    padding: 14px 15px;
    border: 1px solid var(--outline-soft);
    border-radius: 20px;
    background:
        radial-gradient(circle at 10% 0%, rgba(51, 114, 255, 0.04), transparent 12rem),
        var(--panel-soft);
    box-shadow: var(--glow-blue);
}

.card-title-row--tight {
    margin-bottom: 10px;
}

.card-title-row--tight h2 {
    font-size: 1.08rem;
    letter-spacing: -0.035em;
}

.card-title-row--tight > span:not(.score-badge) {
    color: #8ea3c1;
    font-size: 0.74rem;
    font-weight: 700;
}

.score-badge {
    border-color: rgba(89, 146, 255, 0.22);
    background: rgba(52, 120, 255, 0.12);
    color: #e5efff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.quick-stats {
    gap: 9px;
}

.quick-stat {
    min-height: 66px;
    padding: 10px 12px 10px 15px;
    border: 1px solid rgba(158, 189, 223, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(20, 34, 51, 0.84), rgba(10, 20, 31, 0.88));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.quick-stat b {
    font-size: 2rem;
}

.quick-stat small {
    color: var(--text-soft);
    font-size: 0.72rem;
}

.summary-event-columns {
    gap: 10px;
}

.summary-event-columns h3,
.summary-card--football h3,
.summary-card--period h3 {
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: #eef4fe;
}

.event-mini,
.match-row,
.football-score {
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.event-mini {
    padding: 9px 10px;
}

.event-mini b {
    font-size: 0.8rem;
}

.event-mini small {
    color: var(--text-soft);
}

.football-score-grid--hero {
    gap: 8px;
    margin-bottom: 10px;
}

.football-score-grid--hero .football-score {
    min-height: 58px;
    padding: 9px 10px;
}

.football-score-grid--hero .football-score strong {
    font-size: 1.55rem;
}

.football-score-grid--hero .football-score span {
    color: var(--text-soft);
    font-size: 0.66rem;
}

.next-match-block--hero .match-row {
    min-height: 28px;
    padding: 5px 9px;
}

.next-match-block--hero .match-row b {
    font-size: 0.76rem;
}

.next-match-block--hero .match-row small {
    color: var(--text-soft);
}

.period-list--hero {
    gap: 10px;
}

.period-list--hero b {
    font-size: 0.9rem;
}

.period-list--hero small {
    color: var(--text-soft);
    font-size: 0.76rem;
}

.calendar-panel--main {
    padding: 14px 16px 16px;
    border-radius: 22px;
    border: 1px solid var(--outline-soft);
    background:
        radial-gradient(circle at 14% 0%, rgba(51, 114, 255, 0.05), transparent 18rem),
        var(--panel-premium);
    box-shadow: var(--glow-blue);
}

.calendar-header {
    min-height: 48px;
    padding: 0 4px 12px;
    margin-bottom: 14px;
    border-bottom-color: rgba(156, 188, 223, 0.10);
}

.year-switcher a,
.today-link {
    border-color: rgba(158, 189, 223, 0.16);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(18, 33, 48, 0.82), rgba(9, 19, 31, 0.88));
}

.year-switcher strong {
    font-size: 1.65rem;
    letter-spacing: -0.055em;
}

.legend {
    gap: 10px 16px;
}

.legend span {
    color: #dce8f8;
    font-size: 0.82rem;
    font-weight: 700;
}

.calendar-grid {
    gap: 12px;
}

.month-card {
    padding: 13px 14px 12px;
    border: 1px solid rgba(156, 188, 223, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(18, 31, 47, 0.88), rgba(11, 21, 33, 0.82));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.month-card h2 {
    margin-bottom: 10px;
    font-size: 1.06rem;
    letter-spacing: -0.04em;
}

.weekdays,
.days {
    gap: 5px;
}

.weekdays {
    margin-bottom: 8px;
}

.weekdays span {
    color: #93a8c4;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.day {
    height: clamp(21px, 2.52vh, 31px);
    border: 1px solid rgba(255,255,255,0.02);
    border-radius: 8px;
    font-size: clamp(0.68rem, 1.1vh, 0.86rem);
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.day-work,
.day-off,
.day-travel,
.is-departure,
.is-homecoming {
    border-color: rgba(255,255,255,0.08);
}

.day-work {
    background: linear-gradient(180deg, #e24d48, #b02b28);
}

.day-off {
    background: linear-gradient(180deg, #46b861, #2b7d43);
}

.day-travel {
    background: linear-gradient(180deg, #4e9ef6, #286dcb);
}

.is-departure {
    background: linear-gradient(135deg, #41b55e 0 49.5%, #d84542 50% 100%);
}

.is-homecoming {
    background: linear-gradient(45deg, #d84542 0 49.5%, #41b55e 50% 100%);
}

.day-work:hover,
.day-off:hover,
.day-travel:hover,
.is-departure:hover,
.is-homecoming:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 10px 22px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.10);
}

.is-holiday::before {
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
}

.bottom-grid--reference {
    gap: 12px;
}

.info-card {
    padding: 14px 15px;
    border: 1px solid var(--outline-soft);
    border-radius: 20px;
    background:
        radial-gradient(circle at 10% 0%, rgba(51, 114, 255, 0.04), transparent 12rem),
        var(--panel-soft);
    box-shadow: var(--glow-blue);
}

.info-card h2 {
    font-size: 1.02rem;
}

.holiday-columns p,
.match-row small,
.event-mini small,
.period-list small,
.summary-list small,
.tip-card p {
    color: var(--text-soft);
}

.card-title-row button,
.event-tabs button,
.tool-buttons button {
    border-color: rgba(158, 189, 223, 0.14);
    background: rgba(255,255,255,0.04);
}

.card-title-row button:hover,
.event-tabs button:hover,
.tool-buttons button:hover {
    background: rgba(52, 120, 255, 0.12);
    border-color: rgba(91, 158, 255, 0.28);
}

@media (max-width: 1500px) {
    .app-shell--dashboard {
        width: min(100% - 18px, 1600px);
        padding: 10px 12px 14px;
    }

    .control-panel--dashboard {
        gap: 10px;
        padding: 13px 14px;
    }

    .summary-card,
    .info-card {
        padding: 12px 13px;
    }

    .month-card {
        padding: 11px 12px 10px;
    }
}

@media (max-width: 1380px) {
    .topbar {
        min-height: 54px;
        padding-bottom: 10px;
    }

    .control-field select,
    .control-field input {
        min-height: 38px;
    }

    .quick-stat {
        min-height: 58px;
    }

    .quick-stat b {
        font-size: 1.7rem;
    }

    .month-card {
        border-radius: 16px;
    }

    .day {
        height: clamp(19px, 2.35vh, 28px);
        border-radius: 7px;
    }
}

@media (max-width: 1120px) {
    .app-shell--dashboard {
        min-height: auto;
        overflow: visible;
        border-radius: 20px;
    }
}


/* Oppsummeringsrad v3, I dag + framtidige hendelser */
.summary-card--today {
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    gap: 10px;
}

.today-status {
    position: relative;
    display: grid;
    gap: 3px;
    min-height: 78px;
    align-content: center;
    padding: 13px 14px 13px 18px;
    border: 1px solid rgba(158, 189, 223, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(20, 34, 51, 0.84), rgba(10, 20, 31, 0.88));
    overflow: hidden;
}

.today-status::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: rgba(255,255,255,0.18);
}

.today-status strong {
    font-size: 1.82rem;
    line-height: 1;
    letter-spacing: -0.06em;
}

.today-status span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 720;
}

.today-status--work::before { background: var(--work); }
.today-status--off::before { background: var(--off); }
.today-status--travel::before { background: var(--travel); }
.today-status--departure::before { background: linear-gradient(180deg, var(--off), var(--work)); }
.today-status--homecoming::before { background: linear-gradient(180deg, var(--work), var(--off)); }

.today-status--work {
    border-color: rgba(216,63,60,0.24);
    background: linear-gradient(180deg, rgba(88, 27, 34, 0.34), rgba(14, 23, 36, 0.9));
}

.today-status--off {
    border-color: rgba(54,168,82,0.24);
    background: linear-gradient(180deg, rgba(28, 92, 55, 0.28), rgba(14, 23, 36, 0.9));
}

.today-status--departure,
.today-status--homecoming {
    border-color: rgba(255,255,255,0.14);
}

.today-events {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.today-events span,
.summary-filter-chips span,
.event-more {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(158, 189, 223, 0.14);
    border-radius: 999px;
    color: #dfeaff;
    background: rgba(255,255,255,0.045);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.today-next {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid rgba(158, 189, 223, 0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
}

.today-next b {
    font-size: 0.76rem;
}

.today-next span {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 680;
}

.today-year-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.today-year-mini span {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(158, 189, 223, 0.11);
    border-radius: 10px;
    color: var(--text-soft);
    background: rgba(255,255,255,0.032);
    font-size: 0.68rem;
    font-weight: 730;
}

.today-year-mini b {
    color: var(--text);
    font-size: 1rem;
    letter-spacing: -0.04em;
}

.summary-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -2px 0 9px;
}

.summary-filter-chips span {
    border-color: rgba(91, 158, 255, 0.20);
    background: rgba(52, 120, 255, 0.10);
}

.summary-event-columns--balanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-event-columns--balanced .event-mini {
    min-height: 48px;
}

.event-more {
    justify-content: center;
    min-height: 30px;
    border-color: rgba(54,168,82,0.22);
    color: #dfffea;
    background: rgba(31,130,70,0.12);
}

.event-more--miss {
    border-color: rgba(216,63,60,0.22);
    color: #ffe1e0;
    background: rgba(130,31,42,0.12);
}

@media (max-width: 1500px) {
    .today-status {
        min-height: 68px;
    }

    .today-status strong {
        font-size: 1.58rem;
    }

    .today-year-mini span {
        padding: 6px 7px;
    }
}

@media (max-width: 760px) {
    .summary-event-columns--balanced,
    .today-year-mini {
        grid-template-columns: 1fr;
    }
}

/* Polish v4, fjernet hjemreisedag-felt og roligere statusfarger */
:root {
    --work: #bf3b37;
    --work-dark: #8f2826;
    --off: #319154;
    --off-dark: #226c3f;
    --travel: #3d86d8;
    --holiday: #d6a72e;
    --vacation: #7b58d9;
    --line: rgba(154, 184, 219, 0.12);
    --line-strong: rgba(154, 184, 219, 0.18);
}

.control-panel--dashboard {
    grid-template-columns: minmax(250px, 1.55fr) minmax(130px, .78fr) minmax(150px, .9fr) minmax(110px, .58fr) minmax(170px, 1fr) minmax(165px, .96fr) minmax(185px, 1.08fr);
}

.day-work {
    background: linear-gradient(180deg, #c84a45, #99302d);
    border-color: rgba(215, 93, 88, 0.14);
}

.day-off {
    background: linear-gradient(180deg, #3fa05d, #277144);
    border-color: rgba(82, 178, 111, 0.14);
}

.day-travel {
    background: linear-gradient(180deg, #438bdc, #2867af);
    border-color: rgba(91, 151, 219, 0.16);
}

.is-departure {
    background: linear-gradient(135deg, #3fa05d 0 49.5%, #c84a45 50% 100%);
}

.is-homecoming {
    background: linear-gradient(45deg, #c84a45 0 49.5%, #3fa05d 50% 100%);
}

.dot-work { background: linear-gradient(180deg, #c84a45, #99302d); }
.dot-off { background: linear-gradient(180deg, #3fa05d, #277144); }
.dot-travel { background: linear-gradient(180deg, #438bdc, #2867af); }
.dot-holiday { background: linear-gradient(180deg, #e1b640, #b48619); }
.dot-departure { background: linear-gradient(135deg, #3fa05d 0 49.5%, #c84a45 50% 100%); }
.dot-homecoming { background: linear-gradient(45deg, #c84a45 0 49.5%, #3fa05d 50% 100%); }
.dot-festival { background: linear-gradient(180deg, #8465df, #5c3ab8); }
.dot-major { background: linear-gradient(180deg, #55c3ea, #258cb5); }
.dot-football { background: linear-gradient(180deg, #3ebf70, #228a4e); }

.today-status {
    min-height: 60px;
    padding: 11px 13px 11px 17px;
    border-radius: 14px;
}

.today-status strong {
    font-size: 1.48rem;
}

.today-status--work {
    border-color: rgba(191, 59, 55, 0.18);
    background: linear-gradient(180deg, rgba(92, 34, 39, 0.24), rgba(14, 23, 36, 0.90));
}

.today-status--off {
    border-color: rgba(49, 145, 84, 0.18);
    background: linear-gradient(180deg, rgba(28, 82, 54, 0.22), rgba(14, 23, 36, 0.90));
}

.event-mini--can,
.football-score--can,
.match-row {
    border-color: rgba(49, 145, 84, 0.22);
    background: rgba(36, 118, 74, 0.13);
}

.event-mini--partial {
    border-color: rgba(214, 167, 46, 0.26);
    background: rgba(128, 93, 23, 0.15);
}

.event-mini--miss,
.football-score--miss {
    border-color: rgba(191, 59, 55, 0.22);
    background: rgba(105, 34, 40, 0.13);
}

.event-more {
    border-color: rgba(49, 145, 84, 0.18);
    background: rgba(36, 118, 74, 0.10);
}

.event-more--miss {
    border-color: rgba(191, 59, 55, 0.18);
    background: rgba(105, 34, 40, 0.10);
}

.summary-card,
.calendar-panel--main,
.info-card,
.control-panel--dashboard {
    border-color: rgba(154, 184, 219, 0.10);
}

@media (max-width: 1380px) {
    .control-panel--dashboard {
        grid-template-columns: minmax(220px, 1.35fr) minmax(110px, .66fr) minmax(130px, .82fr) minmax(92px, .52fr) minmax(150px, .9fr) minmax(150px, .9fr) minmax(170px, 1fr);
    }
}

/* Polish v5, reell visuell demping og mer premium statusbruk */
:root {
    --work: #a94b46;
    --work-dark: #783635;
    --off: #4c9666;
    --off-dark: #2f6849;
    --travel: #3f7fc1;
    --holiday: #d3a43a;
    --vacation: #7757c8;
    --panel-quiet: rgba(12, 24, 38, 0.86);
}

.app-shell--dashboard {
    background:
        radial-gradient(circle at 16% 0%, rgba(53, 105, 210, 0.07), transparent 30rem),
        linear-gradient(180deg, rgba(5, 12, 22, 0.98), rgba(4, 10, 18, 0.99));
}

.summary-card,
.calendar-panel--main,
.info-card,
.control-panel--dashboard {
    border-color: rgba(148, 178, 214, 0.075);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.025);
}

.summary-card {
    background: linear-gradient(180deg, rgba(13, 26, 42, 0.92), rgba(7, 16, 28, 0.94));
}

.calendar-panel--main {
    background: linear-gradient(180deg, rgba(12, 25, 40, 0.94), rgba(7, 16, 28, 0.96));
}

.month-card {
    border-color: rgba(148, 178, 214, 0.08);
    background: linear-gradient(180deg, rgba(17, 31, 47, 0.80), rgba(10, 21, 34, 0.78));
}

.day-work {
    background: linear-gradient(180deg, #b45852, #7d3736);
    border-color: rgba(185, 93, 88, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.day-off {
    background: linear-gradient(180deg, #559a6b, #326a49);
    border-color: rgba(91, 156, 110, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.day-travel {
    background: linear-gradient(180deg, #477fbd, #2c5c96);
    border-color: rgba(82, 135, 190, 0.11);
}

.is-departure {
    background: linear-gradient(135deg, #559a6b 0 49.5%, #b45852 50% 100%);
}

.is-homecoming {
    background: linear-gradient(45deg, #b45852 0 49.5%, #559a6b 50% 100%);
}

.day span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.36);
}

.day-work:hover,
.day-off:hover,
.day-travel:hover,
.is-departure:hover,
.is-homecoming:hover {
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 8px 18px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}

.dot-work { background: linear-gradient(180deg, #b45852, #7d3736); }
.dot-off { background: linear-gradient(180deg, #559a6b, #326a49); }
.dot-travel { background: linear-gradient(180deg, #477fbd, #2c5c96); }
.dot-holiday { background: linear-gradient(180deg, #d6aa3e, #9d7922); }
.dot-departure { background: linear-gradient(135deg, #559a6b 0 49.5%, #b45852 50% 100%); }
.dot-homecoming { background: linear-gradient(45deg, #b45852 0 49.5%, #559a6b 50% 100%); }
.dot-festival { background: linear-gradient(180deg, #8064ce, #59429e); }
.dot-major { background: linear-gradient(180deg, #52b8dc, #2a7fa2); }
.dot-football { background: linear-gradient(180deg, #4aa66b, #2d764b); }

.today-status {
    min-height: 50px;
    padding: 10px 13px 10px 17px;
    border-color: rgba(148, 178, 214, 0.10);
    background: linear-gradient(180deg, rgba(18, 31, 48, 0.78), rgba(10, 20, 33, 0.88));
}

.today-status::before {
    width: 4px;
    opacity: .9;
}

.today-status strong {
    font-size: 1.28rem;
    letter-spacing: -0.045em;
}

.today-status span {
    color: #c4d0df;
}

.today-status--work,
.today-status--off,
.today-status--travel,
.today-status--departure,
.today-status--homecoming {
    background: linear-gradient(180deg, rgba(18, 31, 48, 0.78), rgba(10, 20, 33, 0.88));
}

.today-status--work {
    border-color: rgba(169, 75, 70, 0.16);
}

.today-status--off {
    border-color: rgba(76, 150, 102, 0.16);
}

.today-year-mini span,
.today-next,
.today-events span,
.event-mini,
.football-score,
.match-row {
    background: linear-gradient(180deg, rgba(18, 32, 49, 0.72), rgba(10, 20, 33, 0.82));
    border-color: rgba(148, 178, 214, 0.09);
}

.event-mini,
.football-score {
    position: relative;
    overflow: hidden;
}

.event-mini::before,
.football-score::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    opacity: .95;
}

.event-mini--can::before,
.football-score--can::before,
.match-row::before {
    background: var(--off);
}

.event-mini--partial::before {
    background: var(--holiday);
}

.event-mini--miss::before,
.football-score--miss::before {
    background: var(--work);
}

.event-mini--can,
.football-score--can,
.match-row {
    border-color: rgba(76, 150, 102, 0.14);
    background: linear-gradient(180deg, rgba(18, 32, 49, 0.72), rgba(10, 20, 33, 0.82));
}

.event-mini--partial {
    border-color: rgba(211, 164, 58, 0.15);
    background: linear-gradient(180deg, rgba(18, 32, 49, 0.72), rgba(10, 20, 33, 0.82));
}

.event-mini--miss,
.football-score--miss {
    border-color: rgba(169, 75, 70, 0.14);
    background: linear-gradient(180deg, rgba(18, 32, 49, 0.72), rgba(10, 20, 33, 0.82));
}

.event-more,
.event-more--miss {
    border-color: rgba(148, 178, 214, 0.10);
    background: rgba(255,255,255,0.035);
}

.match-row {
    position: relative;
    overflow: hidden;
    padding-left: 11px;
}

.match-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    opacity: .95;
}

.summary-filter-chips span,
.score-badge,
.top-actions button,
.share-button {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.legend span {
    color: #c8d5e6;
}
