@charset "UTF-8";

:root {
    color-scheme: light;
    --page: var(--color-base-100);
    --surface: var(--color-base-50);
    --ink: var(--color-base-900);
    --muted: var(--color-base-600);
    --line: var(--color-base-200);
    --accent: var(--color-primary-600);
    --accent-hover: var(--color-primary-700);
    --soft: var(--color-primary-100);
    --danger: var(--color-error-600);
    --danger-soft: var(--color-error-50);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { min-width: 300px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Tahoma, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.85; }
button, input { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(27px, 3.3vw, 38px); line-height: 1.55; letter-spacing: -.7px; font-weight: 700; }
h2 { font-size: 19px; line-height: 1.6; }
h3 { font-size: 14px; }
input { min-width: 0; width: 100%; padding: 11px 13px; border: 1px solid var(--color-base-200); border-radius: 10px; background: var(--color-base-50); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--color-base-600); font-size: 13px; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--color-base-200); }
input[type="number"] { text-align: start; }
input[dir="ltr"] { font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
input:user-invalid { border-color: var(--danger); }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.9; }
:focus-visible { outline: 3px solid var(--color-base-200); outline-offset: 4px; }
input:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -70px; right: 16px; padding: 10px 18px; background: var(--ink); color: var(--color-base-50); border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { max-width: 1180px; margin: auto; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--ink); font-size: 17px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: 0 0 34px; height: 34px; position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; background: var(--accent); border-radius: 10px; transform: rotate(-5deg); }
.brand-mark span { width: 4px; border-radius: 3px; background: var(--color-base-50); transform: rotate(5deg); }
.brand-mark span:nth-child(1) { height: 11px; }
.brand-mark span:nth-child(2) { height: 19px; }
.brand-mark span:nth-child(3) { height: 14px; }
.header-note { color: var(--muted); font-size: 12px; }
.logout-form { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.account-name { color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1.6; text-align: center; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--accent); color: var(--color-base-50); }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.button-secondary:hover { background: var(--soft); border-color: var(--color-base-200); }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover { background: var(--soft); color: var(--ink); }
.button-small { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.button-wide { width: 100%; }
.button-danger { background: var(--surface); color: var(--danger); border-color: var(--color-error-200); }
.button-danger:hover { background: var(--danger-soft); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.eyebrow { display: block; color: var(--accent); font-size: 11px; font-weight: 700; margin-bottom: 9px; }
.auth-layout { max-width: 1080px; margin: 64px auto 40px; padding: 0 32px; display: grid; grid-template-columns: 1fr 1.06fr; gap: 76px; align-items: center; min-height: calc(100vh - 250px); }
.welcome { padding-block: 12px; }
.welcome h1 { margin-bottom: 17px; }
.welcome > p { max-width: 345px; color: var(--muted); line-height: 2.1; font-size: 14px; }
.welcome-footnote { color: var(--muted); font-size: 11px; }
.auth-panel { padding: 34px; }
.panel-heading { margin-bottom: 24px; }
.panel-heading h2 { margin-bottom: 9px; }
.panel-heading p { font-size: 12px; line-height: 2; color: var(--muted); }
.stack-form { display: grid; gap: 18px; }
.stack-form > .button { margin-top: 6px; }
.muted { color: var(--muted); margin-top: 12px; }
.welcome-art { position: relative; height: 206px; max-width: 340px; margin-block: 24px; }
.art-circle { width: 174px; height: 174px; border-radius: 50%; background: var(--color-base-200); position: absolute; inset-inline-start: 16px; top: 17px; }
.art-card { position: absolute; top: 16px; inset-inline-start: 40px; width: 214px; height: 152px; border: 1px solid var(--color-base-200); border-radius: 18px; background: var(--color-base-50); box-shadow: 0 16px 24px var(--color-base-200); transform: rotate(-7deg); padding: 21px; }
.art-dot { display: block; height: 22px; width: 22px; background: var(--color-base-200); border-radius: 7px; float: right; margin-inline-end: 11px; }
.art-line { display: block; width: 92px; height: 7px; background: var(--color-base-200); border-radius: 8px; margin-top: 4px; margin-right: 33px; }
.art-line-short { width: 63px; }
.art-bars { display: flex; align-items: end; gap: 10px; height: 66px; margin-top: 15px; }
.art-bars i { display: block; background: var(--color-base-200); border-radius: 5px 5px 2px 2px; width: 24px; height: 24px; }
.art-bars i:nth-child(2) { height: 40px; }
.art-bars i:nth-child(3) { height: 31px; }
.art-bars i:nth-child(4) { height: 51px; background: var(--color-base-200); }
.art-bars i:nth-child(5) { height: 64px; background: var(--accent); }
.art-chip { width: 49px; height: 49px; position: absolute; top: 129px; inset-inline-start: 217px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--color-base-50); border: 5px solid var(--page); border-radius: 15px; font-size: 25px; transform: rotate(7deg); }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid; border-radius: 12px; margin-bottom: 22px; font-size: 12px; overflow-wrap: anywhere; }
.notice > span { flex: 0 0 20px; height: 20px; margin-top: 2px; border: 1px solid; border-radius: 50%; text-align: center; line-height: 18px; font-size: 12px; font-weight: 700; }
.notice-success { background: var(--color-primary-50); border-color: var(--color-primary-200); color: var(--color-primary-800); }
.notice-error { background: var(--danger-soft); border-color: var(--color-error-200); color: var(--color-error-700); }
.status-symbol { display: flex; align-items: center; justify-content: center; height: 46px; width: 46px; border-radius: 13px; background: var(--color-warning-50); color: var(--color-warning-700); font-size: 24px; margin-bottom: 24px; }
.error-message { color: var(--muted); margin: 14px 0 26px; overflow-wrap: anywhere; }
.dashboard { max-width: 1180px; margin: 0 auto; padding: 42px 32px 50px; min-height: calc(100vh - 160px); }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.dashboard-heading .eyebrow { margin-bottom: 5px; }
.dashboard-heading h1 { font-size: 30px; margin-bottom: 7px; }
.dashboard-heading p { color: var(--muted); font-size: 13px; }
.workspace-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 24px; align-items: start; }
.create-panel { padding: 25px; }
.section-icon { display: flex; align-items: center; justify-content: center; height: 35px; width: 35px; font-family: Arial, sans-serif; font-size: 25px; color: var(--accent); background: var(--soft); border-radius: 10px; margin-bottom: 17px; }
.panel-footnote { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.list-panel { padding: 25px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.count-badge { background: var(--soft); color: var(--accent); border-radius: 7px; padding: 3px 10px; font-size: 11px; white-space: nowrap; }
.search-form { display: flex; gap: 9px; align-items: center; margin-bottom: 20px; }
.search-form .field { flex: 1; min-width: 0; }
.search-form input { background: var(--color-base-50); }
.search-form .button { padding-inline: 14px; }
.clear-search { font-size: 11px; white-space: nowrap; padding: 8px 0; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item { padding: 18px 0 13px; border-top: 1px solid var(--line); }
.item-overview { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.item-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.item-name h3 { overflow-wrap: anywhere; }
.item-marker { flex: 0 0 8px; height: 8px; background: var(--color-base-200); border-radius: 3px; }
.item-date { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.item-date time { display: inline-block; }
.quantity-badge { font-family: Tahoma, sans-serif; font-size: 14px; color: var(--ink); flex-shrink: 0; }
.quantity-badge span { color: var(--muted); font-size: 10px; }
.item-editor { margin-top: 9px; }
.item-editor > summary { display: flex; align-items: center; gap: 7px; width: fit-content; padding: 6px 0; cursor: pointer; color: var(--accent); font-size: 11px; list-style: none; }
.item-editor > summary::-webkit-details-marker { display: none; }
.summary-arrow { line-height: 1; font-size: 17px; }
.item-editor[open] .summary-arrow { transform: rotate(180deg); }
.editor-body { background: var(--color-base-100); padding: 17px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.edit-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .5fr); gap: 14px; }
.edit-form .button { grid-column: 1 / -1; justify-self: start; }
.delete-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.delete-form > span { font-size: 10px; color: var(--muted); }
.empty-state { min-height: 260px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 32px 16px; border-top: 1px solid var(--line); }
.empty-symbol { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; color: var(--accent); background: var(--soft); border-radius: 18px; font-size: 33px; margin-bottom: 18px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 12px; max-width: 310px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); margin-top: 10px; }
.pagination > span { color: var(--muted); font-size: 11px; text-align: center; }
.pagination .button { justify-self: start; }
.pagination .button:last-child { justify-self: end; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 20px 24px 25px; font-size: 10px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
    .auth-layout { gap: 35px; margin-top: 44px; }
    .auth-panel { padding: 26px; }
    .workspace-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 18px; }
    .create-panel, .list-panel { padding: 21px; }
    .search-form { flex-wrap: wrap; }
    .clear-search { width: 100%; padding: 0; }
    .delete-form { flex-wrap: wrap; }
}

@media (max-width: 700px) {
    .header-inner { padding: 17px 20px; min-height: 76px; }
    .brand { font-size: 15px; gap: 10px; }
    .brand-mark { flex-basis: 31px; height: 31px; }
    .header-note, .account-name { display: none; }
    .auth-layout { display: block; margin-top: 25px; padding: 0 20px; min-height: calc(100vh - 240px); }
    .welcome { max-width: 470px; margin: 0 auto 24px; }
    .welcome h1 { font-size: 28px; margin-bottom: 11px; }
    .welcome > p { max-width: none; font-size: 13px; }
    .welcome-art, .welcome-footnote { display: none; }
    .auth-panel { max-width: 470px; margin-inline: auto; padding: 25px; }
    .dashboard { padding: 27px 20px; }
    .dashboard-heading { margin-bottom: 24px; gap: 16px; }
    .dashboard-heading h1 { font-size: 26px; }
    .dashboard-heading p { font-size: 12px; }
    .dashboard-heading > .button { font-size: 11px; padding: 9px 11px; }
    .workspace-grid { grid-template-columns: minmax(0, 1fr); }
    .create-panel .section-icon { display: none; }
    .create-panel .panel-heading { margin-bottom: 17px; }
    .create-panel .stack-form { grid-template-columns: minmax(0, 1fr) 100px; gap: 14px; }
    .create-panel .stack-form > .button { grid-column: 1 / -1; margin-top: 0; }
    .panel-footnote { margin-top: 17px; padding-top: 13px; }
    .list-panel, .create-panel { border-radius: 16px; }
    .list-heading { margin-bottom: 17px; }
    .list-heading h2 { font-size: 17px; }
    .empty-state { min-height: 220px; }
}

@media (max-width: 400px) {
    .header-inner { padding-inline: 15px; gap: 10px; }
    .brand { font-size: 13px; }
    .logout-form .button { font-size: 10px; padding-inline: 5px; }
    .auth-layout, .dashboard { padding-inline: 14px; }
    .auth-panel, .create-panel, .list-panel { padding: 19px; }
    .dashboard-heading { align-items: start; flex-direction: column; }
    .create-panel .stack-form { grid-template-columns: minmax(0, 1fr) 82px; }
    .count-badge { font-size: 10px; padding-inline: 7px; }
    .edit-form { grid-template-columns: minmax(0, 1fr); }
    .pagination { gap: 7px; }
    .pagination .button { padding-inline: 8px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
