:root {
    color-scheme: light;
    --ink: #21312f;
    --muted: #788783;
    --paper: #f7f8f4;
    --surface: #fff;
    --line: #e8ece7;
    --dashboard-background: var(--brand-gradient);
    --green: #2d7968;
    --green-dark: #193d38;
    --green-soft: #e8f3ee;
    --brand-gradient: linear-gradient(140deg, #2d7968, #63a98b 55%, #284f47);
    --orange: #d78657;
    --gold: #d4a44e;
    --shadow: 0 12px 34px rgba(31, 57, 48, .055);
    font-family: "Segoe UI", system-ui, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e4ece8;
    --muted: #9baea6;
    --paper: #111b19;
    --surface: #1b2824;
    --line: #34443e;
    --dashboard-background: var(--brand-gradient);
    --green: #81c3a5;
    --green-dark: #14251f;
    --green-soft: #213b31;
    --shadow: 0 12px 34px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.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; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: -.04em; }
.brand strong { font-weight: 800; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: #fff; background: var(--brand-gradient); box-shadow: 0 6px 15px rgba(45, 121, 104, .25); font-size: 19px; font-weight: 750; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .15em; }

.auth-page { display: flex; min-height: 100vh; flex-direction: column; color: #fff; background: radial-gradient(ellipse at 15% 85%, rgba(81, 147, 114, .33), transparent 38%), linear-gradient(135deg, #193d38, #49675c); }
.auth-header { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 24px; padding: 12px max(28px, calc((100% - 1280px) / 2)); border-bottom: 1px solid rgba(255, 255, 255, .16); }
.auth-header .brand { color: #fff; }
.auth-header .brand-mark { width: 44px; height: 44px; }
.auth-navigation { display: flex; align-items: center; gap: 10px; }
.product-switcher { position: relative; }
.product-switcher summary { display: inline-flex; min-height: 40px; align-items: center; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.product-switcher summary::-webkit-details-marker { display: none; }
.product-switcher summary::after { margin-left: 8px; content: "⌄"; }
.product-switcher nav { position: absolute; z-index: 10; top: calc(100% + 7px); right: 0; display: grid; min-width: 190px; gap: 3px; padding: 7px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; background: #193d38; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.product-switcher nav a { padding: 9px 10px; border-radius: 5px; color: #fff; font-size: 12px; text-decoration: none; }
.product-switcher nav a:hover { background: rgba(255, 255, 255, .15); }
.app-topbar .product-switcher summary { min-height: 36px; border-color: rgba(255, 255, 255, .35); color: #fff; }
.app-topbar .product-switcher nav { border-color: var(--line); background: var(--surface); }
.app-topbar .product-switcher nav a { color: var(--ink); }
.app-topbar .product-switcher nav a:hover { background: var(--paper); }
.auth-nav-link { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; transition: background .16s ease; }
.auth-nav-link:hover, .auth-header .theme-toggle:hover { background: rgba(255, 255, 255, .14); }
.auth-layout { display: grid; flex: 1; width: 100%; place-items: center; padding: 44px 20px; }
.auth-main { width: min(510px, 100%); }
.auth-card { padding: 42px 46px; border: 1px solid rgba(23, 36, 59, .08); border-radius: 16px; color: #21312f; background: #fff; box-shadow: 0 18px 55px rgba(7, 24, 22, .2); }
:root[data-theme="dark"] .auth-card { border-color: var(--line); color: var(--ink); background: var(--surface); }
.auth-card .eyebrow { margin-bottom: 26px; color: #438b70; font-size: 11px; letter-spacing: .12em; }
.auth-card h1 { margin: 0; color: #1c3029; font-size: clamp(30px, 4vw, 39px); font-weight: 750; letter-spacing: -.05em; line-height: 1.16; }
:root[data-theme="dark"] .auth-card h1 { color: var(--ink); }
.auth-subtitle { margin: 15px 0 0; color: #66756f; font-size: 16px; line-height: 1.55; }
:root[data-theme="dark"] .auth-subtitle { color: var(--muted); }
.form-stack { display: grid; gap: 17px; margin-top: 28px; }
.form-stack label, .item-form label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.auth-card .form-stack label { color: #48655c; font-size: 13px; }
:root[data-theme="dark"] .auth-card .form-stack label { color: #a8cfba; }
.form-stack input, .item-form input, .item-form select, .item-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; outline-color: var(--green); color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 400; }
.auth-card .form-stack input { min-height: 49px; border-radius: 8px; font-size: 14px; }
.form-stack input:focus, .item-form input:focus, .item-form select:focus, .item-form textarea:focus, .search-box input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45, 121, 104, .11); outline: none; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 750; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-primary { color: #fff; background: var(--brand-gradient); box-shadow: 0 7px 17px rgba(45, 121, 104, .18); }
.button-primary:hover { background: linear-gradient(135deg, #286956, #38795f); }
.button-secondary { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button-full { width: 100%; min-height: 47px; margin-top: 3px; }
.auth-switch { margin: 19px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.auth-switch a { color: #348366; font-weight: 750; text-decoration: none; }
.trial-note { display: grid; gap: 6px; margin-top: 23px; padding: 16px; border: 1px solid #dcece1; border-radius: 10px; background: #f3f8f3; }
:root[data-theme="dark"] .trial-note { border-color: var(--line); background: var(--green-soft); }
.trial-note strong { color: #2c654f; font-size: 13px; }
:root[data-theme="dark"] .trial-note strong { color: #b3dfc5; }
.trial-note p { margin: 0; color: #6c7d72; font-size: 12px; line-height: 1.5; }
.signup-prompt { display: grid; gap: 12px; margin-top: 22px; padding: 15px; border: 1px solid #dcece1; border-radius: 10px; background: #f3f8f3; }
:root[data-theme="dark"] .signup-prompt { border-color: var(--line); background: var(--green-soft); }
.signup-prompt > div { display: grid; gap: 4px; }
.signup-prompt strong { color: #2c654f; font-size: 13px; }
:root[data-theme="dark"] .signup-prompt strong { color: #b3dfc5; }
.signup-prompt > div > span { color: #6c7d72; font-size: 11px; }
.signup-prompt .button { min-height: 43px; }
.signup-prompt-bottom { margin-top: 18px; }
.alert { padding: 12px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; line-height: 1.55; }
.alert-error { border-color: #f4cbc8; color: #a43d36; background: #fff3f1; }
.alert-success { border-color: #cce8d9; color: #24734f; background: #effaf4; }
.auth-card > .alert { margin-top: 17px; }
.site-footer { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 16px; padding: 13px max(28px, calc((100% - 1280px) / 2)); border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .77); font-size: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 15px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.icon-button { display: grid; width: 40px; min-width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: transparent; cursor: pointer; font-size: 19px; }
.auth-header .theme-toggle { border-color: rgba(255, 255, 255, .35); color: #fff; }

.app-page { min-height: 100vh; background: var(--dashboard-background); }
.app-topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; padding: 10px max(28px, calc((100% - 1260px) / 2)); border-bottom: 1px solid rgba(255, 255, 255, .18); background: var(--dashboard-background); }
.app-topbar .brand { color: #fff; }
.app-topbar .brand-mark { border: 1px solid rgba(255, 255, 255, .35); }
.app-topbar .icon-button { border-color: rgba(255, 255, 255, .35); color: #fff; }
.app-topbar .icon-button:hover { background: rgba(255, 255, 255, .14); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions form { margin: 0; }
.trial-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #d8eadf; border-radius: 99px; color: #34745a; background: #f0f8f2; font-size: 11px; font-weight: 750; }
:root[data-theme="dark"] .trial-badge { border-color: var(--line); color: #a6d7b7; background: var(--green-soft); }
.trial-dot { width: 7px; height: 7px; border-radius: 50%; background: #5cad78; box-shadow: 0 0 0 3px rgba(92, 173, 120, .15); }
.signout-button { min-height: 38px; }
.dashboard { width: min(1260px, calc(100% - 48px)); margin: 0 auto; }
.dashboard .eyebrow { color: #d9f0e4; }
.welcome-row h1, .collection-heading h2 { color: #fff; }
.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 40px 0 27px; }
.welcome-row .eyebrow { margin-bottom: 7px; }
.welcome-row h1 { margin: 0; font-size: clamp(27px, 3vw, 35px); font-weight: 750; letter-spacing: -.05em; }
.wave { color: var(--gold); font-size: .8em; }
.welcome-copy { margin: 9px 0 0; color: rgba(255, 255, 255, .78); font-size: 13px; }
.add-button { min-height: 43px; }
.add-button > span { font-size: 17px; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat-card { display: flex; min-height: 112px; align-items: flex-start; gap: 14px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.stat-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #45856c; background: #eaf4ed; font-size: 18px; }
.stat-book { color: #8764a0; background: #f3edf7; }
.stat-movie { color: #b7704e; background: #fbf0e8; }
.stat-series { color: #5878a2; background: #edf2f9; }
.stat-game { color: #5878a2; background: #edf2f9; }
:root[data-theme="dark"] .stat-icon { color: #a5d1b5; background: var(--green-soft); }
:root[data-theme="dark"] .stat-book { color: #cdb3df; background: #392d45; }
:root[data-theme="dark"] .stat-movie { color: #e8b69a; background: #433127; }
:root[data-theme="dark"] .stat-series { color: #b3c9ec; background: #29364a; }
:root[data-theme="dark"] .stat-game { color: #b3c9ec; background: #29364a; }
.stat-card > div { display: grid; gap: 3px; }
.stat-label { color: var(--muted); font-size: 11px; line-height: 1.3; }
.stat-card strong { color: var(--ink); font-size: 25px; letter-spacing: -.04em; line-height: 1.15; }
.stat-caption { color: var(--muted); font-size: 10px; }
.collection-section { padding: 39px 0 54px; }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.collection-heading .eyebrow { margin-bottom: 5px; }
.collection-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 23px; letter-spacing: -.04em; }
.collection-count { display: inline-grid; min-width: 25px; height: 23px; place-items: center; padding: 0 6px; border-radius: 20px; color: var(--green); background: var(--green-soft); font-size: 11px; letter-spacing: 0; }
.search-box { display: flex; width: min(300px, 100%); min-height: 40px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); }
.search-box > span { font-size: 20px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45, 121, 104, .11); }
.filter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 22px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { min-height: 33px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; color: rgba(255, 255, 255, .8); background: transparent; cursor: pointer; font-size: 11px; font-weight: 650; }
.filter-chip:hover { color: var(--ink); background: var(--surface); }
.filter-chip.is-active { border-color: #dcebe0; color: #2f7159; background: #edf6ef; }
:root[data-theme="dark"] .filter-chip.is-active { border-color: var(--line); color: #a6d7b7; background: var(--green-soft); }
.select-filters { display: flex; gap: 8px; }
.select-filters select { min-height: 35px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 11px; }
.collection-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 19px 15px; }
.media-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.media-card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(31, 57, 48, .12); }
.cover-wrap { position: relative; overflow: hidden; aspect-ratio: 2 / 2.75; background: linear-gradient(145deg, #e2eee5, #cadbd0); }
.media-card:nth-child(5n + 2) .cover-wrap { background: linear-gradient(145deg, #eee4d9, #dbbfaa); }
.media-card:nth-child(5n + 3) .cover-wrap { background: linear-gradient(145deg, #e6e3ef, #c8c5db); }
.media-card:nth-child(5n + 4) .cover-wrap { background: linear-gradient(145deg, #dce7ec, #b8ced2); }
.media-card:nth-child(5n + 5) .cover-wrap { background: linear-gradient(145deg, #f0e8d6, #dfd1ad); }
.cover-image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-image:not([src]), .cover-image[src=""] { display: none; }
.cover-fallback { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: rgba(35, 76, 60, .58); font-size: 47px; }
.cover-fallback small { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cover-image:not([src]) + .cover-fallback, .cover-image[src=""] + .cover-fallback { z-index: 1; }
.status-pill { position: absolute; z-index: 2; top: 9px; left: 8px; max-width: calc(100% - 16px); overflow: hidden; padding: 5px 7px; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; color: #274637; background: rgba(255,255,255,.87); font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(6px); }
.status-in_progress { color: #795522; background: rgba(255, 246, 220, .91); }
.status-completed { color: #236c4a; background: rgba(231, 249, 237, .92); }
.status-abandoned { color: #78534d; background: rgba(250, 235, 231, .92); }
.card-actions { display: flex; position: absolute; z-index: 3; top: 8px; right: 8px; gap: 5px; opacity: 0; transition: opacity .16s ease; }
.media-card:hover .card-actions, .media-card:focus-within .card-actions { opacity: 1; }
.card-actions button { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 7px; color: #243c32; background: rgba(255,255,255,.9); cursor: pointer; font-size: 15px; }
.card-actions button:hover { color: #fff; background: #38795f; }
.media-card-content { min-height: 105px; padding: 11px 11px 12px; }
.media-type { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.media-card h3 { overflow: hidden; margin: 5px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { overflow: hidden; min-height: 13px; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-rating { margin-top: 7px; }
.rating-stars { color: #d6a548; font-size: 11px; letter-spacing: 1px; }
.rating-stars > span { color: #d9dfd9; }
.hours-caption { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.empty-state, .loading-state { grid-column: 1 / -1; display: grid; min-height: 255px; place-content: center; justify-items: center; padding: 35px 20px; border: 1px dashed rgba(255, 255, 255, .4); border-radius: 13px; text-align: center; color: #fff; }
.empty-icon { display: grid; width: 49px; height: 49px; place-items: center; margin-bottom: 9px; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: 25px; }
.empty-state h3 { margin: 5px 0 4px; font-size: 16px; letter-spacing: -.02em; }
.empty-state p, .loading-state p { max-width: 380px; margin: 5px 0 14px; color: rgba(255, 255, 255, .78); font-size: 12px; line-height: 1.55; }
.error-state .empty-icon { color: #a43d36; background: #fff0ed; }
.loader { width: 27px; height: 27px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-footer { display: flex; justify-content: space-between; gap: 16px; padding: 17px max(28px, calc((100% - 1260px) / 2)); border-top: 1px solid rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .75); font-size: 10px; }
.footer-star { color: var(--gold); }

.item-dialog { width: min(650px, calc(100% - 28px)); max-height: min(90vh, 800px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 90px rgba(0, 0, 0, .3); }
.item-dialog::backdrop { background: rgba(13, 27, 22, .55); backdrop-filter: blur(3px); }
.item-form { padding: 25px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.dialog-close { border: 0; background: var(--paper); font-size: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field-wide { grid-column: 1 / -1; }
.item-form label { color: var(--muted); font-size: 11px; }
.item-form input, .item-form select, .item-form textarea { font-size: 12px; }
.item-form textarea { min-height: 90px; resize: vertical; }
.required { color: #c65d4d; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-error { margin: -7px 0 16px; padding: 10px 12px; border: 1px solid #f4cbc8; border-radius: 8px; color: #a43d36; background: #fff3f1; font-size: 12px; }
.expired-layout { display: grid; min-height: calc(100vh - 72px); place-items: center; padding: 30px 18px; }
.expired-card { width: min(540px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.expired-card h1 { margin: 0 0 14px; font-size: 30px; letter-spacing: -.04em; }
.expired-card p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.6; }
.logout-form { display: inline-block; margin-left: 8px; }

@media (max-width: 1050px) {
    .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .auth-header { min-height: 70px; padding: 10px 16px; }
    .auth-navigation { gap: 6px; }
    .auth-nav-link { min-height: 36px; padding: 0 9px; font-size: 10px; }
    .auth-navigation .product-switcher summary { min-height: 36px; padding: 0 9px; font-size: 10px; }
    .auth-card { padding: 30px 24px; }
    .auth-card h1 { font-size: 31px; }
    .signup-nav-link { display: none; }
    .site-footer { align-items: flex-start; flex-direction: column; padding: 15px 20px; }
    .app-topbar { min-height: 63px; padding: 9px 17px; }
    .app-topbar .product-switcher { display: none; }
    .topbar-actions { gap: 7px; }
    .trial-badge { padding: 7px 8px; font-size: 10px; }
    .dashboard { width: min(100% - 34px, 1260px); }
    .welcome-row { align-items: flex-start; flex-direction: column; padding: 29px 0 20px; }
    .welcome-row .add-button { align-self: stretch; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 97px; gap: 9px; padding: 13px 10px; }
    .stat-icon { width: 31px; height: 31px; border-radius: 9px; font-size: 15px; }
    .stat-label { font-size: 9px; }
    .stat-card strong { font-size: 22px; }
    .stat-caption { font-size: 9px; }
    .collection-section { padding-top: 30px; }
    .collection-heading { align-items: flex-start; flex-direction: column; }
    .search-box { width: 100%; }
    .filter-toolbar { align-items: flex-start; flex-direction: column; }
    .category-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .filter-chip { flex: 0 0 auto; }
    .select-filters { width: 100%; }
    .select-filters select { flex: 1; min-width: 0; }
    .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card-actions { opacity: 1; }
    .media-card-content { min-height: 98px; padding: 9px; }
    .media-card h3 { font-size: 12px; }
    .status-pill { top: 6px; left: 6px; padding: 4px 5px; font-size: 8px; }
    .card-actions { top: 6px; right: 6px; }
    .card-actions button { width: 25px; height: 25px; }
    .app-footer { flex-direction: column; padding: 15px 17px; }
}

@media (max-width: 420px) {
    .auth-header .product-switcher { display: none; }
    .auth-navigation .theme-toggle { width: 36px; min-width: 36px; height: 36px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { gap: 7px; }
    .dialog-actions { flex-direction: column-reverse; }
    .dialog-actions .button { width: 100%; }
    .item-form { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
