:root {
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  color: #242923;
  background: #f6f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #376b52;
  --green-dark: #28523d;
  --muted: #8d958d;
  --line: #ecefea;
  --panel: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 35%, #fff 0%, #f6f7f4 70%); }
.auth-card { width: min(100%, 410px); padding: 34px; background: #fff; border: 1px solid #ecefea; border-radius: 15px; box-shadow: 0 15px 50px #2635250a; }
.auth-brand { margin: 0 0 34px; display: inline-flex; }
.auth-card h1 { font-size: 22px; line-height: 1.4; letter-spacing: -.7px; }
.auth-description { color: #929a92; font-size: 12px; line-height: 1.7; margin: 8px 0 22px; }
.auth-card .field-label { margin-top: 15px; }
.auth-submit { width: 100%; margin-top: 22px; }
.auth-switch { color: #929a92; text-align: center; font-size: 11px; margin: 19px 0 0; }
.auth-switch button { border: 0; background: transparent; padding: 0 2px; color: #426d50; font-size: 11px; font-weight: 700; }
.auth-message { color: #954d42; min-height: 0; margin: 13px 0 0; padding: 0; font-size: 11px; line-height: 1.65; }
.auth-message:not(:empty) { padding: 10px 12px; border: 1px solid #f0d9d3; border-radius: 7px; background: #fff7f4; }
.auth-message.success { color: #426d50; border-color: #dce9dc; background: #f3f8f2; }
.auth-card .form-input[aria-invalid="true"] { border-color: #d78a72; background: #fffaf8; }
.auth-card .form-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #f8e9e4; }
.auth-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.auth-config-warning { color: #727c72; }
.auth-config-warning h1 { margin-bottom: 12px; }
.auth-config-warning p { font-size: 12px; line-height: 1.8; }
.auth-config-warning code { color: #456a50; background: #f0f4ee; border-radius: 4px; padding: 2px 4px; font-size: 11px; }
.auth-config-warning .security-note { border-top: 1px solid #edf0eb; padding-top: 13px; margin-top: 17px; color: #8d958d; font-size: 10px; }
.auth-loading { color: #758075; font-size: 12px; text-align: center; padding: 22px 0; }
.sync-status { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: #7e8d7e; font-size: 10px; border: 0; background: transparent; padding: 5px 0; }
.sync-status:disabled { cursor: default; }
.sync-status.error { cursor: pointer; }
.sync-status > span { width: 6px; height: 6px; border-radius: 50%; background: #76a47b; }
.sync-status.error > span { background: #d78a72; }
.sidebar { width: 248px; position: fixed; inset: 0 auto 0 0; background: #fff; padding: 31px 19px 18px; border-right: 1px solid #eef0ec; display: flex; flex-direction: column; z-index: 3; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 0 56px 9px; color: #26372c; text-decoration: none; font-size: 23px; font-weight: 800; letter-spacing: -1.4px; }
.brand-dot { color: #e98d67; }
.brand-mark { width: 27px; height: 27px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-5deg); }
.brand-mark span { display: block; background: #527d62; border-radius: 4px; }
.brand-mark span:nth-child(2) { background: #e99572; border-radius: 4px 8px 4px 4px; }
.brand-mark span:nth-child(3) { background: #e8c579; border-radius: 4px 4px 4px 8px; }
.brand-mark span:nth-child(4) { background: #9ab59d; }
.side-label, .eyebrow { font-size: 10px; font-weight: 700; color: #9ca39b; letter-spacing: 1.2px; }
.side-label { margin: 0 0 13px 12px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { min-height: 45px; border: 0; border-radius: 9px; padding: 0 12px; color: #707970; background: transparent; display: flex; align-items: center; text-align: left; gap: 12px; font-size: 13px; font-weight: 500; transition: .18s ease; }
.nav-link:hover { background: #f7f8f6; color: #3a5543; }
.nav-link.active { background: #eff5f0; color: #356349; font-weight: 700; }
.nav-icon { width: 18px; font-size: 20px; line-height: 1; text-align: center; color: #8a968c; }
.active .nav-icon { color: #4a795b; }
.nav-count { margin-left: auto; font-size: 11px; color: #9aa198; }
.sidebar-bottom { margin-top: auto; }
.tip-card { position: relative; overflow: hidden; background: #f4f6ed; border: 1px solid #eff0e5; border-radius: 12px; padding: 17px 14px 14px; margin: 0 1px 18px; }
.tip-card::after { content: ""; position: absolute; width: 76px; height: 76px; border: 1px solid #e3e8d9; border-radius: 50%; right: -25px; top: -25px; box-shadow: 0 0 0 10px #f4f6ed, 0 0 0 11px #e3e8d9; }
.tip-spark { color: #729070; font-size: 19px; }
.tip-card p { color: #657160; font-size: 12px; line-height: 1.7; margin: 8px 0 10px; }
.tip-card p strong { color: #354c3c; }
.tip-caption { font-size: 10px; color: #999f8c; }
.profile { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f0f1ee; padding: 17px 3px 1px; }
.avatar { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; background: #e9eee5; color: #537359; font-size: 13px; font-weight: 700; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 12px; font-weight: 700; }
.profile small { color: #9ba19b; font-size: 10px; margin-top: 4px; }
.profile-user { min-width: 0; }
.profile-user strong { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-more { margin-left: auto; border: 0; background: transparent; padding: 5px 0 5px 4px; color: #8d958d; font-size: 9px; white-space: nowrap; }
.profile-more:hover { color: #426d50; }
.main-content { margin-left: 248px; padding: 0 51px 38px; max-width: 1600px; }
.topbar { height: 76px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e9ece7; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #9a9f99; font-size: 12px; }
.breadcrumb strong { color: #555e56; font-weight: 600; }
.crumb-divider { color: #d3d7d1; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.search-box { width: 258px; height: 37px; display: flex; align-items: center; gap: 8px; border: 1px solid #e7eae5; border-radius: 8px; background: #fff; padding: 0 10px; }
.search-icon { font-size: 23px; color: #939c93; transform: rotate(-20deg); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: #303832; font-size: 11px; background: transparent; }
.search-box input::placeholder { color: #a4aaa4; }
kbd { color: #a0a59f; font: 10px "DM Sans", sans-serif; padding: 2px 4px; border: 1px solid #eceeeb; border-radius: 4px; white-space: nowrap; }
.icon-button { border: 1px solid #e7eae5; border-radius: 50%; color: #7d867e; background: #fff; width: 29px; height: 29px; font-size: 12px; }
.mobile-add { display: none; border: 0; background: var(--green); color: #fff; width: 34px; height: 34px; border-radius: 9px; font-size: 21px; }
.view { display: none; animation: appear .2s ease; }
.view.active { display: block; }
@keyframes appear { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.welcome-row { padding: 38px 0 26px; display: flex; align-items: flex-end; justify-content: space-between; }
.eyebrow { margin: 0 0 10px; }
.welcome-row .eyebrow { display: flex; gap: 7px; align-items: center; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #75a481; box-shadow: 0 0 0 3px #e4eee5; }
h1, h2, p { margin-top: 0; }
h1 { margin: 0; color: #272d28; font-size: 27px; letter-spacing: -1.2px; font-weight: 700; }
.welcome-row h1 > span:first-child { color: #456a50; }
.wave { display: inline-block; color: #df9b6c; font-size: 20px; vertical-align: 2px; margin-left: 2px; }
.page-description { color: #949b94; font-size: 12px; margin: 9px 0 0; }
.primary-button { border: 0; min-height: 39px; padding: 0 16px; border-radius: 7px; background: var(--green); color: #fff; display: inline-flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; box-shadow: 0 3px 7px #376b5217; transition: background .16s, transform .16s; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button > span { font-size: 17px; font-weight: 400; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat-card { min-height: 138px; background: #fff; border: 1px solid #eef0ec; border-radius: 11px; padding: 17px 19px 14px; }
.stat-total { background: #f1f6f0; border-color: #eaf0e8; }
.stat-top, .stat-foot { display: flex; align-items: center; justify-content: space-between; }
.stat-top { color: #777f77; font-size: 11px; }
.stat-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; }
.mint { background: #e1ece0; color: #5e8064; }
.peach { background: #f7e9dd; color: #bd805c; }
.lilac { background: #eee8f5; color: #8d79a4; }
.stat-number { font-size: 29px; font-weight: 700; letter-spacing: -1px; margin: 5px 0 4px; color: #303831; }
.stat-number span { font-size: 13px; font-weight: 500; margin-left: 4px; color: #828b82; letter-spacing: 0; }
.stat-foot { color: #a1a79f; font-size: 10px; }
.stat-arrow { color: #91a293; font-size: 14px; }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 18px; }
.panel { background: #fff; border: 1px solid #eef0ec; border-radius: 11px; min-height: 260px; padding: 20px 20px 14px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-heading .eyebrow { font-size: 9px; margin-bottom: 5px; }
.panel-heading h2 { font-size: 15px; letter-spacing: -.5px; margin: 0; }
.text-button { color: #819282; background: transparent; border: 0; font-size: 10px; padding: 6px 0; }
.text-button span { font-size: 14px; margin-left: 3px; }
.round-arrow { border: 1px solid #e9ede8; color: #77877a; border-radius: 50%; background: #fff; width: 27px; height: 27px; }
.recent-list { display: grid; }
.recent-item { min-height: 55px; border-top: 1px solid #f1f2ef; display: flex; align-items: center; gap: 11px; }
.item-emoji { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: #f5f5ee; font-size: 17px; }
.recent-info { min-width: 0; flex: 1; }
.recent-info strong, .recent-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-info strong { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.recent-info span { color: #9ba19a; font-size: 10px; }
.mini-tag { color: #77887a; font-size: 9px; background: #f1f5ef; border-radius: 5px; padding: 4px 6px; white-space: nowrap; }
.location-list { display: grid; gap: 11px; }
.location-row { display: flex; align-items: center; gap: 10px; }
.room-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; color: #7e927f; background: #f0f4ee; font-size: 15px; }
.location-row:nth-child(3n+2) .room-icon { color: #bd896b; background: #f8f0e9; }
.location-row:nth-child(3n) .room-icon { color: #8b81a2; background: #f1eef5; }
.room-name { font-size: 10px; font-weight: 600; flex: 1; }
.room-meter { width: 74px; height: 4px; border-radius: 6px; background: #f0f2ee; overflow: hidden; }
.room-meter span { height: 100%; display: block; background: #a9bea7; border-radius: 6px; }
.room-count { color: #9ba19a; font-size: 9px; min-width: 29px; text-align: right; }
.empty-state { text-align: center; padding: 28px 14px; color: #979f97; }
.empty-illustration { width: 53px; height: 53px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 17px; color: #719074; background: #f0f4ed; font-size: 25px; }
.empty-state strong { display: block; color: #4c574d; font-size: 12px; margin-bottom: 5px; }
.empty-state p { font-size: 10px; margin: 0 0 12px; line-height: 1.6; }
.empty-state .primary-button { min-height: 33px; font-size: 10px; }
.recent-panel .empty-state, .location-panel .empty-state { padding-top: 15px; }
.footer-note { margin: 21px 0 0; text-align: center; color: #a3a99f; font-size: 10px; }
.footer-note span { color: #bdc59e; margin-right: 5px; }
.page-heading { padding: 38px 0 22px; display: flex; justify-content: space-between; align-items: flex-end; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.page-heading h1 { font-size: 25px; }
.heading-count { display: inline-flex; vertical-align: 3px; align-items: center; justify-content: center; min-width: 24px; height: 22px; margin-left: 5px; padding: 0 6px; color: #6d826f; background: #eaf0e8; border-radius: 7px; font-size: 11px; letter-spacing: 0; }
.toolbar { min-height: 49px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e9ece7; border-bottom: 1px solid #e9ece7; margin-bottom: 17px; }
.item-drop-panel { margin: 0 0 15px; padding: 11px 13px; border: 1px dashed #dfe7dd; border-radius: 9px; background: #f9fbf8; }
.item-drop-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.item-drop-heading strong { color: #536454; font-size: 10px; }
.item-drop-heading span { color: #a0a79e; font-size: 9px; }
.item-location-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.item-location-target { max-width: 100%; padding: 6px 9px; overflow: hidden; border: 1px solid #e7ece5; border-radius: 16px; background: #fff; color: #718273; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.item-location-target.drag-over { border-color: #6b9474; background: #eaf3e9; color: #355d40; box-shadow: 0 0 0 3px #dcebdc; }
.item-location-target.drag-invalid, .location-tree-row.drag-invalid, .location-root-drop.drag-invalid { border-color: #dfab9e; background: #fff4f1; color: #a45b4e; }
.item-location-empty { color: #9da49b; font-size: 10px; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill { border: 0; border-radius: 20px; background: transparent; color: #8b928b; font-size: 10px; padding: 6px 10px; }
.filter-pill.active { color: #44674e; background: #eaf1e9; font-weight: 600; }
.sort-select { display: flex; align-items: center; gap: 5px; color: #a0a59f; font-size: 10px; white-space: nowrap; }
.sort-select select { border: 0; outline: 0; background: transparent; color: #5d675e; font-size: 10px; cursor: pointer; }
.items-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.item-card { position: relative; background: #fff; border: 1px solid #ecefea; border-radius: 10px; padding: 14px; min-height: 172px; transition: transform .16s, box-shadow .16s, opacity .16s; cursor: grab; }
.item-card:active { cursor: grabbing; }
.item-card.dragging, .location-tree-row.dragging { opacity: .45; }
.item-card:hover { transform: translateY(-2px); box-shadow: 0 7px 19px #2635250a; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-emoji { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #f4f4ed; font-size: 20px; }
.drag-grip { margin-left: auto; color: #b2b9b1; font-size: 15px; cursor: grab; }
.favorite-button { border: 0; background: transparent; padding: 2px; color: #c2c7c1; font-size: 20px; line-height: 1; }
.favorite-button.selected { color: #dc9279; }
.item-card h3 { font-size: 13px; margin: 12px 0 7px; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card .card-location { color: #828c82; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-location span { color: #aab0a9; margin-right: 4px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f2ef; margin-top: 12px; padding-top: 9px; }
.category-tag { color: #839184; font-size: 9px; }
.card-quantity { color: #a1a79f; font-size: 9px; }
.card-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .16s; }
.item-card:hover .card-actions, .item-card:focus-within .card-actions { opacity: 1; }
.card-action { border: 0; color: #8b948b; background: transparent; font-size: 10px; padding: 3px; }
.card-action:hover { color: #3d684d; }
.location-toolbar { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 12px; color: #929a92; font-size: 10px; }
.location-toolbar button { border: 0; background: transparent; color: #718574; font-size: 10px; padding: 6px 8px; }
.location-toolbar button:hover { color: #376b52; }
.location-summary { display: grid; gap: 12px; }
.location-tree { display: grid; gap: 10px; }
.location-root-drop { min-height: 42px; margin-bottom: 10px; padding: 11px 14px; border: 1px dashed #dce4da; border-radius: 9px; color: #849184; background: #fafbf9; font-size: 10px; text-align: center; transition: .15s ease; }
.location-root-drop.drag-over { border-color: #6b9474; background: #eaf3e9; color: #355d40; box-shadow: 0 0 0 3px #dcebdc; }
.location-tree-node { min-width: 0; }
.location-tree-row { display: flex; align-items: center; gap: 9px; min-height: 60px; padding: 10px 12px; border: 1px solid #ecefea; border-radius: 10px; background: #fff; cursor: grab; transition: border-color .15s, background .15s, opacity .15s; }
.location-tree-row:active { cursor: grabbing; }
.location-tree-row.drag-over { border-color: #6b9474; background: #f0f7ef; box-shadow: 0 0 0 3px #e1eee0; }
.location-toggle { flex: 0 0 22px; width: 22px; height: 24px; padding: 0; border: 0; color: #8c978d; background: transparent; font-size: 15px; }
.location-toggle:disabled { cursor: default; opacity: .35; }
.location-tree-row > .room-icon { flex: 0 0 auto; }
.location-tree-name { min-width: 0; flex: 1; }
.location-tree-name strong { display: block; overflow: hidden; color: #39443b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.location-tree-name small { display: block; overflow: hidden; margin-top: 4px; color: #a0a69e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.location-tree-count { flex: 0 0 auto; color: #849184; font-size: 10px; white-space: nowrap; }
.location-tree-actions { display: flex; align-items: center; gap: 2px; }
.location-tree-action { border: 0; border-radius: 5px; background: transparent; color: #8b948b; font-size: 9px; padding: 6px; white-space: nowrap; }
.location-tree-action:hover:not(:disabled) { background: #f1f5ef; color: #426d50; }
.location-tree-action:disabled { color: #c2c7c1; cursor: not-allowed; }
.location-tree-children { display: grid; gap: 8px; margin: 8px 0 0 22px; padding-left: 13px; border-left: 1px solid #dfe7dd; }
.location-tree-items { display: grid; gap: 4px; margin: 5px 0 0 54px; }
.location-tree-item { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 5px 8px; border-bottom: 1px solid #eff1ee; cursor: grab; }
.location-tree-item:active { cursor: grabbing; }
.location-tree-item > span:first-child { flex: 1; min-width: 0; }
.location-tree-item .location-item-name { font-size: 10px; }
.location-tree-item .location-item-detail { font-size: 9px; }
.location-form-error { color: #a25448; font-size: 10px; line-height: 1.5; margin: 9px 0 0; }
.location-form-error:empty { display: none; }
.category-form-row { display: flex; align-items: center; gap: 7px; }
.category-form-row .form-input { flex: 1; min-width: 0; }
.category-form-row .primary-button, .category-form-row .secondary-button { min-height: 39px; }
.category-list-heading { display: flex; flex-direction: column; gap: 4px; margin: 22px 0 10px; }
.category-list-heading strong { color: #4b574c; font-size: 11px; }
.category-list-heading span { color: #9aa198; font-size: 9px; }
.category-list { display: grid; gap: 6px; max-height: 310px; overflow-y: auto; }
.category-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #eef0ec; border-radius: 8px; }
.category-row-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #f3f5ef; font-size: 15px; }
.category-row-name { min-width: 0; flex: 1; color: #4a544b; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.category-row-count { color: #99a198; font-size: 9px; white-space: nowrap; }
.category-row-actions { display: flex; gap: 3px; }
.category-row-actions button { padding: 5px; border: 0; background: transparent; color: #7e8d7f; font-size: 9px; }
.category-row-actions button:hover:not(:disabled) { color: #376b52; }
.category-row-actions button:disabled { color: #c3c8c1; cursor: not-allowed; }
.location-cascader { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 7px; }
.location-cascader-empty { color: #9aa198; font-size: 10px; }
.location-selection { min-height: 16px; margin: 7px 0 0; color: #768778; font-size: 10px; }
.location-selection.error { color: #a25448; }
.location-group { border: 1px solid #ecefea; background: #fff; border-radius: 11px; overflow: hidden; }
.location-group-header { width: 100%; border: 0; background: #fff; padding: 15px 18px; display: flex; align-items: center; gap: 12px; text-align: left; }
.location-group-header:hover { background: #fbfcfa; }
.location-group-header .room-icon { width: 36px; height: 36px; }
.location-group-header strong { font-size: 12px; }
.location-group-header small { display: block; color: #9ba29a; font-size: 10px; margin-top: 4px; }
.location-group-header .expand-mark { margin-left: auto; color: #9ba29a; }
.location-group-header { flex: 1; }
.location-group-title { display: flex; align-items: center; gap: 12px; }
.location-group-head { display: flex; align-items: center; padding-right: 14px; }
.location-delete { flex: 0 0 auto; border: 0; background: transparent; color: #a4aaa3; font-size: 10px; padding: 7px; }
.location-delete:hover { color: #b65c4d; }
.location-items { display: none; padding: 0 18px 12px 66px; }
.location-group.open .location-items { display: block; }
.location-empty { color: #9ba29a; font-size: 10px; padding: 9px 0 5px; }
.location-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid #f0f2ef; gap: 8px; }
.location-item-name { font-size: 11px; font-weight: 500; }
.location-item-detail { color: #9ba29a; font-size: 10px; margin-left: 7px; }
.location-item .card-actions { opacity: 1; }
.view-empty { background: #fff; border: 1px solid #ecefea; border-radius: 11px; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 15px; background: #293b2f; color: #fff; border-radius: 8px; font-size: 11px; transition: .2s; z-index: 10; box-shadow: 0 8px 20px #0002; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.item-dialog { width: min(440px, calc(100vw - 28px)); max-height: min(90vh, 760px); padding: 25px 27px 22px; border: 1px solid #e9ece7; border-radius: 14px; background: #fff; color: #242923; box-shadow: 0 22px 70px #22312226; overflow: auto; }
.item-dialog::backdrop { background: #20282066; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }
.dialog-heading .eyebrow { margin-bottom: 6px; }
.dialog-heading h2 { font-size: 18px; margin: 0; letter-spacing: -.5px; }
.close-button { border: 0; background: transparent; color: #939b93; font-size: 25px; line-height: 1; padding: 0 2px; }
.field-label { display: block; color: #505a51; font-size: 11px; font-weight: 600; margin: 14px 0 7px; }
.field-label > span:first-child { color: #d1816d; }
.field-label .optional { color: #a8aea7; font-size: 10px; font-weight: 400; }
.form-input { width: 100%; min-height: 39px; padding: 0 11px; outline: 0; border: 1px solid #e7eae5; border-radius: 7px; background: #fff; color: #303831; font-size: 11px; }
.form-input:focus { border-color: #87a58b; box-shadow: 0 0 0 3px #edf3ec; }
.form-input::placeholder { color: #b0b6af; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row > div { min-width: 0; }
.note-input { resize: vertical; padding: 10px 11px; min-height: 60px; }
.favorite-toggle { display: flex; align-items: center; gap: 7px; color: #747d74; font-size: 10px; margin-top: 14px; cursor: pointer; }
.favorite-toggle input { accent-color: #507456; }
.heart-check { color: #d88e78; font-size: 17px; margin-left: -3px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; }
.secondary-button { min-height: 38px; border: 1px solid #e7eae5; background: #fff; color: #747d74; border-radius: 7px; padding: 0 15px; font-size: 11px; }
.location-form-hint { color: #929a92; font-size: 10px; line-height: 1.6; margin: 8px 0 0; }

@media (min-width: 1450px) {
  .main-content { margin-left: 248px; padding-right: 75px; padding-left: 75px; }
  .stat-card { min-height: 150px; padding: 19px 22px; }
  .panel { min-height: 280px; padding: 23px; }
}
@media (max-width: 1050px) {
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; padding-right: 28px; padding-left: 28px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .auth-card { padding: 27px 22px; }
  .sidebar { width: 100%; height: 57px; inset: auto 0 0; padding: 0 7px; flex-direction: row; border-right: 0; border-top: 1px solid #ecefea; }
  .brand, .side-label, .sidebar-bottom { display: none; }
  .main-nav { display: grid; width: 100%; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .nav-link { height: 56px; padding: 4px 1px; justify-content: center; flex-direction: column; gap: 1px; border-radius: 7px; font-size: 9px; }
  .nav-icon { font-size: 18px; }
  .nav-count { display: none; }
  .main-content { margin-left: 0; padding: 0 18px 77px; }
  .topbar { height: 60px; }
  .sync-status { display: none; }
  .search-box { width: min(53vw, 230px); height: 34px; }
  .search-box kbd, .help-button { display: none; }
  .mobile-add { display: block; }
  .welcome-row { padding-top: 29px; align-items: flex-start; }
  .welcome-row h1 { font-size: 22px; }
  .welcome-row .page-description { max-width: 240px; line-height: 1.6; }
  .welcome-row > .primary-button { display: none; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 117px; padding: 12px 10px; }
  .stat-top { font-size: 9px; gap: 3px; }
  .stat-icon { width: 23px; height: 23px; font-size: 12px; }
  .stat-number { font-size: 25px; margin-top: 9px; }
  .stat-foot { font-size: 8px; }
  .stat-arrow { display: none; }
  .dashboard-grid { gap: 11px; margin-top: 12px; }
  .panel { padding: 16px 14px 12px; min-height: 0; }
  .page-heading { padding: 29px 0 17px; align-items: flex-start; }
  .page-heading h1 { font-size: 22px; }
  .page-heading .page-actions { gap: 5px; }
  .page-heading .page-actions .primary-button, .page-heading .page-actions .secondary-button { min-height: 34px; padding: 0 9px; font-size: 9px; }
  .toolbar { align-items: flex-start; gap: 8px; padding: 10px 0; }
  .filter-pills { gap: 2px; }
  .filter-pill { padding: 5px 7px; font-size: 9px; }
  .sort-select { font-size: 0; margin-top: 5px; }
  .sort-select select { font-size: 9px; max-width: 93px; }
  .items-grid { gap: 8px; }
  .item-card { padding: 11px; min-height: 165px; }
  .card-actions { opacity: 1; }
  .location-items { padding-left: 18px; }
  .location-tree-row { flex-wrap: wrap; gap: 6px; padding: 9px; }
  .location-tree-name { flex-basis: calc(100% - 112px); }
  .location-tree-count { margin-left: 31px; }
  .location-tree-actions { margin-left: auto; }
  .location-tree-action { padding: 5px 4px; font-size: 8px; }
  .location-tree-children { margin-left: 12px; padding-left: 9px; }
  .location-tree-items { margin-left: 30px; }
  .item-dialog { padding: 21px 19px; }
}
@media (max-width: 380px) {
  .main-content { padding-right: 12px; padding-left: 12px; }
  .stats-grid { gap: 5px; }
  .stat-card { padding-left: 8px; padding-right: 8px; }
  .stat-top { font-size: 8px; }
  .items-grid { grid-template-columns: 1fr 1fr; }
  .item-card h3 { font-size: 12px; }
}
