﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --bg: #1e1e1e;
    --panel: #1b1b1b;
    --panel-2: #171717;
    --border: #3a3a3a;
    --border-soft: #2a2a2a;
    --text: #f3f4f6;
    --muted: #a1a1aa;
    --muted-2: #7c7f86;
    --blue: #5b78ff;
    --green: #22c55e;
    --orange: #ff6a3d;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    --scrollbar-thumb: rgba(124, 127, 134, 0.45);
    --scrollbar-thumb-hover: rgba(124, 127, 134, 0.7);
}

* {
    box-sizing: border-box;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

body {
    font-family: "Inter";
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
    color: var(--text);
    display: block;
}

html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

[x-cloak] {
    display: none;
}

.app-bg {
    min-height: 100vh;
    width: 100%;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch;
    width: 100%;
}

.sidebar {
    width: 230px;
    background: #1b1b1b;
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 16px 24px;
    margin: 0;
    min-height: 100vh;
    padding-top: 0;
    flex-shrink: 0;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo-text {
    color: #e5e7eb;
}

.sidebar-nav,
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#yearNav,
#mobileYearNav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #c4c7cf;
    text-decoration: none;
    font-size: 11px;
}

.h-4 {
    height: 1em;
}

.w-4 {
    width: 1em;
}

.inline-block {
    display: inline-block;
}

.nav-form {
    margin: 0;
}

.nav-button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-item:hover {
    background: #2a2a2a;
    color: #e5e7eb;
}

.nav-item .nav-icon {
    width: 18px;
    display: inline-flex;
    justify-content: center;
}

.nav-item.active {
    background: #242424;
    color: #f3f4f6;
}

.badge-pro {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f59e0b;
    color: #111827;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 20px 40px;
    margin: 0;
}

.content-inner {
    width: 100%;
    max-width: 900px;
    padding-top: 0;
}

.page-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 0;
    margin-bottom: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.page-actions {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.primary-button {
    background: #1b1b1b;
    color: #f8fafc;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.button-icon {
    font-size: 16px;
    line-height: 1;
}

.dropdown {
    position: relative;
}

.dropdown-trigger {
    background: #1b1b1b;
    color: #e5e7eb;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    min-width: 70px;
    justify-content: space-between;
}

.dropdown-trigger.small {
    min-width: 120px;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 42px;
    background: #1d1d1d;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 6px 8px;
    min-width: 120px;
    font-size: 11px;
    color: var(--text);
    z-index: 20;
}

.dropdown-item {
    padding: 6px 8px;
    display: block;
    color: var(--text);
    text-decoration: none;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.modal.is-open {
    display: flex;
}

.modal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    width: min(420px, 90vw);
    box-shadow: var(--shadow);
    z-index: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 13px;
    font-weight: 600;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropzone {
    border: 1px dashed var(--border-soft);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    font-size: 11px;
    color: var(--muted-2);
    background: #141414;
}

.dropzone.active {
    border-color: var(--blue);
    color: var(--text);
}

.import-textarea {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 12px;
    min-height: 110px;
    resize: vertical;
}

.import-status {
    font-size: 11px;
}

.import-status.success {
    color: var(--green);
}

.import-status.error {
    color: #f87171;
}

.import-confirm {
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.import-confirm-actions {
    display: flex;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    min-height: 104px;
    box-shadow: var(--shadow);
}

.stat-title {
    font-size: 11px;
    color: #d1d5db;
    font-weight: 600;
    margin-bottom: 16px;
}

.stat-amount {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-amount.blue {
    color: var(--blue);
}

.stat-amount.green {
    color: var(--green);
}

.stat-amount.red {
    color: var(--orange);
}

.stat-subtitle {
    font-size: 11px;
    color: var(--muted-2);
}

.chart-card {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 11px;
    font-weight: 600;
}

.segmented {
    background: #1d1d1d;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 4px;
    display: inline-flex;
    gap: 6px;
}

.segmented-item {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
}

.segmented-item.active {
    background: #232323;
    color: #f9fafb;
}

.chart-body {
    position: relative;
    padding: 8px 0 46px 0;
}

.chart-grid {
    position: relative;
    border-left: 1px solid #2d2d2d;
    border-bottom: 1px solid #2d2d2d;
    height: 220px;
    padding-left: 40px;
    padding-bottom: 30px;
}

.chart-line {
    position: absolute;
    left: 40px;
    right: 0;
    height: 1px;
    border-top: 1px dashed #3b3b3b;
}

.chart-line:nth-child(1) {
    top: 10px;
}

.chart-line:nth-child(2) {
    top: 55px;
}

.chart-line:nth-child(3) {
    top: 100px;
}

.chart-line:nth-child(4) {
    top: 145px;
}

.chart-line:nth-child(5) {
    top: 190px;
}

.chart-axis {
    position: absolute;
    left: 6px;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 34px;
    font-size: 11px;
    color: #9aa0a9;
}

.chart-bar {
    position: absolute;
    left: 70px;
    bottom: 30px;
    width: 12px;
    height: 180px;
    background: #e5e7eb;
    border-radius: 6px 6px 0 0;
}

.chart-x {
    position: absolute;
    left: 40px;
    right: 0;
    bottom: 28px;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    font-size: 11px;
    color: #8c8f96;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 6px;
    font-size: 11px;
    color: #b5b8bf;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

.legend-dot.draft {
    background: #e5e7eb;
}

.legend-dot.paid {
    background: var(--green);
}

.legend-dot.sent {
    background: var(--blue);
}

.legend-dot.neutral-a {
    background: #cbd5e1;
}

.legend-dot.neutral-b {
    background: #94a3b8;
}

.legend-dot.neutral-c {
    background: #64748b;
}

.legend-button {
    border: 1px solid var(--border-soft);
    background: transparent;
    color: #d1d5db;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.legend-button.active {
    background: #232323;
    color: #f3f4f6;
}

.chart-tooltip {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    font-size: 11px;
    color: #e5e7eb;
    pointer-events: none;
    box-shadow: var(--shadow);
    min-width: 140px;
}

.table-section {
    margin-top: 10px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 7px 10px;
}

.search-input input {
    flex: 1;
    border: none;
    background: transparent;
    color: #d1d5db;
    font-size: 11px;
    outline: none;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: #161616;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.invoice-table th,
.invoice-table td {
    padding: 10px 12px;
    font-size: 11px;
    text-align: left;
    color: #d1d5db;
}

.invoice-table thead {
    background: #1d1d1d;
}

.invoice-table tbody tr {
    background: #161616;
}

.invoice-table tbody tr:hover {
    background: #202020;
}

.invoice-table tbody tr + tr {
    border-top: 1px solid #222;
}

.invoice-table .client {
    color: #e5e7eb;
    font-weight: 600;
}

.text-right {
    text-align: right;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: #1d1d1d;
    font-size: 11px;
    color: #b0b4bc;
}

.action-icons {
    display: inline-flex;
    gap: 10px;
}

.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-soft);
    background: #1b1b1b;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button {
    background: none;
    border: none;
    color: #e5e7eb;
    padding: 4px;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
}

.mobile-overlay-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.mobile-panel {
    position: relative;
    width: 260px;
    background: #1b1b1b;
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 14px 24px;
}

.mobile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-top: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}

.mobile-panel .sidebar-footer {
    margin-top: auto;
}

.page-subtitle {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.week-summary {
    margin-bottom: 20px;
}

.analysis-section {
    margin-bottom: 20px;
}

.analysis-output {
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 12px;
    color: var(--text);
}

.analysis-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.analysis-copy-button {
    font-size: 10px;
    padding: 5px 10px;
    color: var(--muted-2);
    border-color: rgba(255, 255, 255, 0.12);
}

.analysis-copy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.week-card,
.editor-card,
.schedule-card {
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.week-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.week-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.week-range {
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 4px;
}

.day-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.day-tab {
    background: #161616;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 11px;
    color: #b5b8bf;
    text-align: center;
    cursor: pointer;
}

.day-tab.active {
    background: #232323;
    color: #f3f4f6;
    border-color: #2a2a2a;
}

.entry-editor {
    margin-bottom: 20px;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.editor-title {
    font-size: 12px;
    font-weight: 600;
}

.editor-slot {
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 4px;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
}

.form-row input[type="text"] {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 12px;
    width: 100%;
}


.month-select {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 12px;
}

.slot-dropdown {
    position: relative;
    width: 100%;
}

.slot-dropdown-trigger {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.slot-dropdown-value {
    font-weight: 600;
}

.slot-dropdown-icon {
    color: var(--muted-2);
    font-size: 12px;
}

.slot-dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 40px;
    background: #1d1d1d;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 6px;
    z-index: 25;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.slot-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    background: #161616;
    border: 1px solid #222;
    border-radius: 10px;
    color: var(--text);
    font-size: 11px;
    text-align: left;
}

.slot-option + .slot-option {
    margin-top: 6px;
}

.slot-option:hover {
    background: #1f1f1f;
    border-color: #242424;
}

.slot-option.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px rgba(91, 120, 255, 0.35);
}

.slot-option-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
}

.slot-option-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: var(--muted-2);
}

.slot-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.slot-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2a2a2a;
    border: 1px solid #242424;
}

.slot-dot.blue {
    background: var(--blue);
    border-color: rgba(91, 120, 255, 0.6);
}

.slot-dot.green {
    background: var(--green);
    border-color: rgba(34, 197, 94, 0.6);
}

.slot-dot.orange {
    background: var(--orange);
    border-color: rgba(255, 106, 61, 0.6);
}

.score-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-grid-spaced {
    margin-top: 18px;
}

.editor-helper-text {
    margin-top: 16px;
}

.score-row {
    display: grid;
    grid-template-columns: 90px 1fr 30px;
    align-items: start;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
}

.score-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    padding-top: 4px;
}

.size-6 {
    width: 16px;
    height: 16px;
}

.info-button {
    background: none;
    border: none;
    color: var(--muted-2);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-button:hover {
    color: var(--text);
}

.info-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    width: 220px;
    border-radius: 8px;
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow);
    font-size: 10px;
    color: var(--text);
    z-index: 10;
    display: none;
    pointer-events: none;
}

.info-button:hover + .info-tooltip,
.info-button:focus + .info-tooltip,
.info-button:focus-visible + .info-tooltip {
    display: block;
}

.score-buttons {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 6px;
}

.score-button {
    width: 28px;
    height: 28px;
    background: #121212;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
    color: #d1d5db;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.score-button.active {
    background: #202020;
    color: #f8fafc;
    border-color: var(--score-color, var(--blue));
    box-shadow: 0 0 0 1px var(--score-color, var(--blue)), 0 0 0 3px #2a2a2a;
}

.score-value {
    font-size: 11px;
    color: var(--text);
    text-align: right;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ghost-button {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 600;
}

.ai-button {
    border-color: rgba(88, 176, 126, 0.6);
    box-shadow: 0 0 0 1px rgba(88, 176, 126, 0.22), 0 0 6px rgba(88, 176, 126, 0.12);
    animation: ai-pulse 3.6s ease-in-out infinite;
}

.ai-button:hover {
    background: rgba(88, 176, 126, 0.08);
    box-shadow: 0 0 0 1px rgba(88, 176, 126, 0.5), 0 0 10px 2px rgba(88, 176, 126, 0.28);
    animation: none;
}

@keyframes ai-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(88, 176, 126, 0.22), 0 0 6px rgba(88, 176, 126, 0.12);
    }
    50% {
        box-shadow: 0 0 0 1px rgba(88, 176, 126, 0.4), 0 0 12px 2px rgba(88, 176, 126, 0.28);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-button {
        animation: none;
    }
}

.week-link {
    padding: 4px 8px;
    font-size: 10px;
    text-decoration: none;
}

.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.schedule-title {
    font-size: 12px;
    font-weight: 600;
}

.schedule-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 16px;
    background: #161616;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}

.schedule-row.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px rgba(91, 120, 255, 0.4);
}

.schedule-time {
    font-size: 11px;
    color: #c4c7cf;
}

.schedule-entry {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.entry-activity {
    font-size: 12px;
    color: var(--text);
    font-weight: 600;
}

.entry-meta {
    font-size: 11px;
    color: var(--muted-2);
}

.score-preview {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.score-preview .score-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    min-width: 0;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #cfd2d9;
    border-radius: 4px;
    cursor: default;
    pointer-events: none;
}

.score-preview .score-badge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: var(--score-color, var(--muted-2));
    opacity: 0.22;
}

.helper-text {
    font-size: 11px;
    color: var(--muted-2);
}

.auth-layout {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
}

.auth-card {
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 24px;
    width: min(420px, 92vw);
    box-shadow: var(--shadow);
}

.auth-header {
    margin-bottom: 16px;
}

.auth-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
}

.auth-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.auth-error {
    border: 1px solid #3a1c1c;
    background: #1b1414;
    color: #f87171;
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
}

.auth-field input {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 12px;
}

.auth-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.auth-links {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.auth-links a {
    color: var(--muted-2);
    text-decoration: none;
}

.landing {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 10px 0 40px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
    align-items: start;
}

.landing-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.landing-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted-2);
}

.landing-title {
    font-size: 30px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
    max-width: 520px;
}

.landing-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.landing-link {
    text-decoration: none;
}

.landing-trust {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 10px;
    color: var(--muted-2);
}

.landing-login {
    display: flex;
    justify-content: flex-end;
}

.landing-login .auth-card {
    width: min(420px, 100%);
}

.landing-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.landing-section-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.landing-section-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.landing-section-subtitle {
    font-size: 11px;
    color: var(--muted-2);
    margin: 0;
    max-width: 640px;
    line-height: 1.6;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.landing-card {
    background: #1b1b1b;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.landing-card-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 8px;
}

.landing-card-text {
    font-size: 11px;
    color: var(--muted-2);
    margin: 0;
    line-height: 1.6;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.landing-step {
    background: #161616;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.landing-step-number {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #232323;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.landing-step-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.landing-step-text {
    font-size: 11px;
    color: var(--muted-2);
    margin: 0;
    line-height: 1.5;
}

.register-card {
    background: #141414;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.register-title {
    font-size: 12px;
    font-weight: 600;
}

.register-date {
    font-size: 11px;
    color: var(--muted-2);
}

.register-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.register-table th,
.register-table td {
    padding: 8px 10px;
    text-align: left;
}

.register-table th {
    font-size: 10px;
    color: #aeb2bb;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #222;
}

.register-table tbody tr {
    border-bottom: 1px solid #1f1f1f;
}

.register-table tbody tr:last-child {
    border-bottom: none;
}

.register-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    font-size: 10px;
    font-weight: 600;
    color: #d1d5db;
}

.register-badge.blue {
    color: var(--blue);
    border-color: rgba(91, 120, 255, 0.4);
}

.register-badge.green {
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.4);
}

.register-badge.orange {
    color: var(--orange);
    border-color: rgba(255, 106, 61, 0.4);
}

.register-caption {
    font-size: 10px;
    color: var(--muted-2);
    margin: 10px 0 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(91, 120, 255, 0.7);
    outline-offset: 2px;
}

button:not(:disabled),
a[href]:not([aria-disabled="true"]),
[role="button"],
[onclick],
[data-action],
[x-on\\:click] {
    cursor: pointer;
}

.primary-button,
.ghost-button,
.dropdown-trigger,
.dropdown-item,
.nav-item,
.icon-button,
.legend-button,
.segmented-item,
.week-link,
.score-button,
.day-tab,
.schedule-row,
.auth-links a,
.landing-link {
    cursor: pointer;
}

html,
body,
body.app-bg {
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 1024px) {
    .content-inner {
        max-width: 760px;
    }

    .landing {
        max-width: 920px;
    }
}

@media (max-width: 900px) {
    .page-actions {
        align-items: flex-end;
        margin-top: 0;
    }

    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .landing-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .landing-login {
        justify-content: flex-start;
    }

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

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

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }

    .mobile-topbar {
        display: flex;
    }

    .page-header {
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: 18px;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        justify-content: flex-start;
        padding: 16px 16px 60px;
        width: 100%;
        margin: 0;
    }

    .content-inner {
        max-width: none;
        padding-top: 0;
    }

    .landing {
        gap: 28px;
    }

    .landing-hero {
        gap: 20px;
    }

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

    .landing-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .register-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-panel .sidebar-nav {
        margin-top: 12px;
    }

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

    .chart-grid {
        height: 260px;
    }

    .chart-x {
        grid-template-columns: repeat(8, 1fr);
    }

    .day-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .schedule-row {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
    }

    .schedule-row .ghost-button {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    .score-row {
        grid-template-columns: 70px 1fr 26px;
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-title {
        font-size: 22px;
    }

    .landing-title {
        font-size: 24px;
    }

    .landing-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .primary-button {
        padding: 8px 12px;
    }

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

    .week-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

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