:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --line: #e7e9ed;
  --line-strong: #d2d5dc;
  --text: #25272b;
  --muted: #686c75;
  --subtle: #9296a0;
  --teal: #575b66;
  --teal-dark: #363940;
  --teal-soft: #eff0f2;
  --amber: #bc6b16;
  --amber-soft: #fff4e4;
  --red: #bd4c4c;
  --red-soft: #fceded;
  --blue: #3c6f9c;
  --blue-soft: #ebf3fb;
  --shadow-sm: 0 1px 2px rgb(30 45 38 / 5%);
  --shadow-md: 0 10px 30px rgb(24 52 42 / 10%);
  --radius: 8px;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "DM Sans", var(--font-sans);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 14px; line-height: 1.55; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgb(20 125 112 / 22%); outline-offset: 1px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.is-hidden { display: none !important; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex: 0 0 244px; display: flex; flex-direction: column; padding: 26px 16px 20px; border-right: 1px solid var(--line); background: #fbfcfb; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; border-radius: 9px; background: var(--teal); box-shadow: 0 4px 10px rgb(20 125 112 / 24%); }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2.2; }
.brand strong { display: block; font-family: var(--font-display); font-size: 16px; line-height: 1.2; letter-spacing: .1px; }
.brand span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.main-nav { display: grid; gap: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 0 11px; border: 0; border-radius: 7px; color: #64736c; background: transparent; text-align: left; transition: color .18s, background .18s; }
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.9; }
.nav-item:hover { color: var(--text); background: #f0f5f2; }
.nav-item.is-active { color: var(--teal-dark); background: var(--teal-soft); font-weight: 600; }
.nav-count { margin-left: auto; min-width: 23px; padding: 1px 6px; border-radius: 10px; color: var(--teal-dark); background: rgb(20 125 112 / 12%); font-family: var(--font-display); font-size: 11px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding: 14px 6px 0; }
.connection-card { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.connection-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--subtle); }
.connection-card.is-online .connection-dot { background: #2caa7d; box-shadow: 0 0 0 3px rgb(44 170 125 / 12%); }
.connection-card.is-offline .connection-dot { background: var(--red); }
.connection-card strong, .connection-card span:not(.connection-dot) { display: block; }
.connection-card strong { font-size: 12px; font-weight: 600; }
.connection-card div span { color: var(--muted); font-size: 10px; }
.sidebar-footnote { margin: 13px 10px 0; color: var(--subtle); font-size: 10px; }

.main-content { min-width: 0; flex: 1; }
.topbar { display: flex; align-items: center; height: 65px; padding: 0 clamp(24px, 4vw, 60px); border-bottom: 1px solid var(--line); background: rgb(251 252 251 / 82%); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--subtle); font-size: 12px; }
.breadcrumb strong { color: var(--text); font-size: 12px; font-weight: 600; }
.breadcrumb-separator { color: #c0cbc5; }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; transition: background .18s, color .18s, border-color .18s; }
.icon-button:hover { color: var(--text); border-color: var(--line); background: var(--surface); }
.icon-button svg { width: 17px; height: 17px; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #6d4930; background: #f2d6ba; font-family: var(--font-display); font-size: 12px; font-weight: 700; }
.mobile-menu { display: none; margin-right: 8px; }
.content-wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 72px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.compact-heading { align-items: flex-start; }
.eyebrow { margin: 0 0 5px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-family: var(--font-display), var(--font-sans); font-size: 32px; line-height: 1.14; letter-spacing: 0; }
.heading-subtitle { margin: 0; color: var(--muted); font-size: 13px; }

.primary-button, .secondary-button, .danger-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 0 14px; border-radius: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; transition: transform .16s, box-shadow .16s, background .16s, color .16s; }
.primary-button { border: 1px solid var(--teal); color: #fff; background: var(--teal); box-shadow: 0 3px 8px rgb(20 125 112 / 17%); }
.primary-button:hover { border-color: var(--teal-dark); background: var(--teal-dark); box-shadow: 0 5px 12px rgb(20 125 112 / 22%); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line-strong); color: #4d5d55; background: var(--surface); }
.secondary-button:hover { border-color: #aebeb5; color: var(--text); background: #f9fbfa; }
.danger-button { border: 1px solid var(--red); color: #fff; background: var(--red); }
.danger-button:hover { background: #a93c3c; }
.text-button { min-height: 30px; padding: 0 5px; border: 0; color: var(--teal); background: transparent; }
.text-button:hover { color: var(--teal-dark); text-decoration: underline; }
.primary-button svg, .secondary-button svg, .danger-button svg, .text-button svg { width: 15px; height: 15px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 27px; }
.summary-card { min-height: 76px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 11px; width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s, background .18s; }
.summary-card:hover { border-color: var(--line-strong); box-shadow: 0 5px 15px rgb(28 32 40 / 8%); transform: translateY(-1px); }
.summary-card:focus-visible { outline: 3px solid rgb(87 91 102 / 22%); outline-offset: 2px; }
.summary-card.is-selected { border-color: #9297a1; background: #fbfbfc; box-shadow: 0 0 0 2px rgb(87 91 102 / 10%); }
.summary-icon { z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.summary-icon svg { width: 17px; height: 17px; }
.summary-total .summary-icon { color: var(--teal); background: var(--teal-soft); }
.summary-active .summary-icon { color: #248158; background: #e7f6ed; }
.summary-soon .summary-icon { color: var(--amber); background: var(--amber-soft); }
.summary-expired .summary-icon { color: var(--red); background: var(--red-soft); }
.summary-card-main { z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.summary-card-main span { color: var(--muted); font-size: 11px; }
.summary-card strong { font-family: var(--font-display); font-size: 24px; line-height: 1; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.search-field { position: relative; display: flex; align-items: center; width: min(340px, 100%); }
.search-field svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--subtle); pointer-events: none; }
.search-field input, .select-field select, .field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface); transition: border-color .16s, box-shadow .16s; }
.search-field input { height: 36px; padding: 0 11px 0 34px; font-size: 12px; }
.search-field input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #a8b4ad; }
.search-field input:hover, .select-field select:hover, .field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.search-field input:focus, .select-field select:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(20 125 112 / 10%); outline: 0; }
.toolbar-controls { display: flex; gap: 8px; }
.select-field select { height: 36px; min-width: 118px; padding: 0 28px 0 10px; font-size: 12px; }

.inline-error { display: flex; align-items: center; gap: 8px; min-height: 42px; margin: 10px 0; padding: 9px 12px; border: 1px solid #f0cccc; border-radius: 6px; color: #913f3f; background: var(--red-soft); font-size: 12px; }
.inline-error > svg { width: 16px; height: 16px; flex: 0 0 16px; }
.inline-error .text-button { margin-left: auto; color: #963f3f; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 230px; color: var(--muted); font-size: 12px; }
.spinner { width: 17px; height: 17px; border: 2px solid #d8e5e0; border-top-color: var(--teal); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; padding: 36px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgb(255 255 255 / 52%); text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 15px; border-radius: 14px; color: var(--teal); background: var(--teal-soft); }
.empty-illustration.soft { color: var(--blue); background: var(--blue-soft); }
.empty-illustration svg { width: 24px; height: 24px; stroke-width: 1.5; }
.empty-state h2 { margin-bottom: 4px; font-size: 16px; }
.empty-state p { max-width: 360px; margin-bottom: 19px; color: var(--muted); font-size: 12px; }

.memo-list { display: grid; gap: 8px; }
.memo-item { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.1fr) 140px 100px auto; align-items: center; gap: 17px; min-height: 88px; padding: 13px 15px 13px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s, transform .18s; }
.memo-item:hover { border-color: #bfcec6; box-shadow: 0 5px 15px rgb(24 52 42 / 8%); transform: translateY(-1px); }
.memo-item.is-disabled { background: #fbfcfc; }
.memo-main { min-width: 0; }
.memo-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.memo-title h3 { min-width: 0; overflow: hidden; margin: 0; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.memo-category { display: inline-flex; align-items: center; flex: 0 0 auto; max-width: 100px; padding: 2px 6px; border-radius: 4px; color: var(--muted); background: #f1f4f2; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-note { max-width: 300px; margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.memo-date-label { display: block; margin-bottom: 2px; color: var(--subtle); font-size: 10px; }
.memo-date { font-family: var(--font-display), var(--font-sans); font-size: 13px; font-weight: 600; }
.memo-remaining { color: var(--muted); font-size: 11px; }
.memo-status { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; }
.memo-status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-active { color: #267955; background: #e8f6ed; }
.status-soon { color: var(--amber); background: var(--amber-soft); }
.status-expired { color: var(--red); background: var(--red-soft); }
.status-disabled { color: #7f8c85; background: #eef1ef; }
.memo-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-icon-button { display: inline-grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 6px; color: #8a9991; background: transparent; }
.row-icon-button:hover { color: var(--teal); background: var(--teal-soft); }
.row-icon-button.delete:hover { color: var(--red); background: var(--red-soft); }
.row-icon-button svg { width: 15px; height: 15px; }
.switch { position: relative; display: inline-flex; align-items: center; width: 37px; height: 21px; flex: 0 0 37px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { display: block; width: 37px; height: 21px; padding: 2px; border-radius: 12px; background: #cbd5d0; transition: background .18s; }
.switch-track > span { display: block; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(20 42 34 / 25%); transition: transform .18s; }
.switch input:checked + .switch-track { background: var(--teal); }
.switch input:checked + .switch-track > span { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgb(20 125 112 / 22%); outline-offset: 2px; }

.notification-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 38px; margin-bottom: 11px; border-bottom: 1px solid var(--line); }
.result-count { color: var(--muted); font-size: 12px; }
.notification-list { display: grid; gap: 7px; }
.notification-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.notification-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.notification-icon svg { width: 16px; height: 16px; }
.notification-success .notification-icon { color: #267955; background: #e8f6ed; }
.notification-failed .notification-icon { color: var(--red); background: var(--red-soft); }
.notification-skipped .notification-icon { color: #7d7566; background: #f4f0e8; }
.notification-pending .notification-icon { color: var(--amber); background: var(--amber-soft); }
.notification-title { margin: 0 0 2px; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.notification-status { margin-left: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.notification-message { margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.notification-time { color: var(--subtle); font-family: var(--font-display), var(--font-sans); font-size: 11px; white-space: nowrap; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); gap: 14px; align-items: start; }
.settings-panel, .settings-help { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-panel { padding: 23px 24px 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
.panel-heading h2, .settings-help h2 { margin-bottom: 4px; font-size: 16px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-status { min-height: 20px; color: var(--teal); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 15px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { color: #47564e; font-size: 12px; font-weight: 600; }
.field b { color: var(--red); font-weight: 600; }
.field input, .field select { height: 38px; padding: 0 11px; font-size: 12px; }
.field textarea { min-height: 88px; padding: 9px 11px; resize: vertical; font-size: 12px; line-height: 1.55; }
.field small { color: var(--subtle); font-size: 10px; }
.field-error { min-height: 15px; color: var(--red) !important; }
.full-field { grid-column: 1 / -1; }
.input-with-suffix { position: relative; }
.input-with-suffix input { padding-right: 34px; }
.input-with-suffix em { position: absolute; top: 50%; right: 11px; color: var(--muted); font-size: 11px; font-style: normal; transform: translateY(-50%); pointer-events: none; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.setting-toggle strong { display: block; font-size: 12px; font-weight: 600; }
.setting-toggle p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.settings-help { padding: 23px 22px 20px; background: #f7fbf9; }
.help-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 17px; border-radius: 8px; color: var(--teal); background: var(--teal-soft); }
.help-icon svg { width: 18px; height: 18px; }
.settings-help ol { display: grid; gap: 16px; padding: 0; margin: 19px 0 0; list-style: none; }
.settings-help li { display: grid; grid-template-columns: 27px 1fr; gap: 8px; align-items: start; }
.settings-help li > span { color: var(--teal); font-family: var(--font-display); font-size: 11px; font-weight: 700; }
.settings-help li p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(26 43 36 / 38%); animation: fade-in .15s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(510px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow: auto; padding: 23px 24px 20px; border: 1px solid rgb(255 255 255 / 70%); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-md); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 23px; }
.modal-header h2 { margin: 0; font-size: 19px; }
.modal form { display: grid; gap: 16px; }
.modal-grid { gap: 12px; }
.modal-toggle { margin-top: 1px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.confirm-modal { width: min(390px, 100%); text-align: center; }
.confirm-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 2px auto 15px; border-radius: 11px; color: var(--red); background: var(--red-soft); }
.confirm-icon svg { width: 20px; height: 20px; }
.auth-modal { width: min(390px, 100%); text-align: center; }
.auth-modal .auth-icon { color: var(--teal); background: var(--teal-soft); }
.auth-modal form { text-align: left; }
.auth-modal .modal-actions { margin-top: 3px; }
.confirm-modal h2 { margin-bottom: 6px; font-size: 17px; }
.confirm-modal p { margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.confirm-modal .modal-actions { justify-content: center; border-top: 0; padding-top: 0; }
.toast-region { position: fixed; z-index: 50; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(340px, calc(100% - 40px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); box-shadow: var(--shadow-md); font-size: 12px; animation: toast-in .2s ease-out; pointer-events: auto; }
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.toast.success { border-color: #bce4d4; }
.toast.success svg { color: #267955; }
.toast.error { border-color: #f0cccc; }
.toast.error svg { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.mobile-nav-backdrop { display: none; }

/* Lydia follows the compact, centered navigation and neutral page frame of MeowVPS. */
.app-shell { display: block; min-height: 100vh; }
.main-content { width: 100%; }
.topbar { position: sticky; z-index: 10; top: 0; height: 65px; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1200px) / 2)); border-bottom-color: var(--line); background: rgb(255 255 255 / 94%); backdrop-filter: blur(12px); }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; padding: 0; color: #24262a; font-family: var(--font-display), var(--font-sans); font-size: 19px; font-weight: 700; text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 5px; margin: 0 auto 0 42px; }
.nav-item { width: auto; min-height: 36px; gap: 7px; padding: 0 11px; border-radius: 5px; color: #555963; font-size: 12px; }
.nav-item.is-active { color: #22242a; background: #f0f1f3; }
.nav-item svg { width: 15px; height: 15px; }
.nav-count { min-width: 20px; border-radius: 4px; color: #5f636d; background: #e5e6e9; }
.topbar-actions { gap: 11px; margin-left: 20px; }
.topbar-new-button { min-height: 34px; padding: 0 12px; border-radius: 5px; }
.avatar { width: 34px; height: 34px; border: 1px solid var(--line); color: #4d515a; background: #f4f5f6; }
.avatar svg { width: 17px; height: 17px; }
.account-menu { position: relative; }
.account-dropdown { position: absolute; z-index: 12; top: calc(100% + 9px); right: 0; width: 176px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 10px 30px rgb(28 32 40 / 12%); }
.account-dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 4px; color: var(--text); background: transparent; text-align: left; font-size: 12px; }
.account-dropdown button:hover { background: #f3f4f5; }
.account-dropdown svg { width: 15px; height: 15px; color: var(--muted); }
.content-wrap { width: min(1120px, calc(100% - 48px)); padding-top: 45px; }
.page-heading { margin-bottom: 25px; }
.eyebrow { color: #777b84; letter-spacing: 0; }
.summary-card, .memo-item, .notification-item, .settings-panel, .settings-help, .empty-state { border-radius: 5px; box-shadow: none; }
.summary-icon, .empty-illustration, .confirm-icon, .help-icon { border-radius: 5px; }
.primary-button { border-color: #363940; background: #363940; box-shadow: none; }
.primary-button:hover { border-color: #1f2126; background: #1f2126; box-shadow: none; }
.modal { border-radius: 7px; }
.field-error { color: var(--red) !important; }

@media (max-width: 1000px) {
  .content-wrap { width: min(100% - 36px, 900px); padding-top: 32px; }
  .memo-item { grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) 115px 92px auto; gap: 11px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-help { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 60px; flex-wrap: wrap; gap: 0 12px; padding: 10px 16px 8px; }
  .brand { font-size: 18px; }
  .main-nav { order: 3; width: 100%; gap: 2px; margin: 8px 0 0; overflow-x: auto; }
  .nav-item { flex: 0 0 auto; min-height: 33px; padding: 0 8px; }
  .topbar-actions { gap: 8px; }
  .topbar-new-button { min-height: 33px; padding: 0 9px; }
  .topbar-new-button svg { width: 14px; height: 14px; }
  .content-wrap { width: calc(100% - 30px); padding: 27px 0 56px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 21px; }
  .page-heading .primary-button { align-self: stretch; }
  h1 { font-size: 28px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 19px; }
  .summary-card { min-height: 72px; padding: 10px 12px; }
  .summary-icon { width: 30px; height: 30px; }
  .summary-icon svg { width: 15px; height: 15px; }
  .summary-card strong { font-size: 22px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .toolbar-controls { width: 100%; }
  .select-field { flex: 1; }
  .select-field select { width: 100%; }
  .memo-item { grid-template-columns: 1fr auto; gap: 9px 13px; padding: 14px; }
  .memo-main { grid-column: 1 / -1; }
  .memo-date-block { grid-column: 1; }
  .memo-status { grid-column: 2; grid-row: 2; align-self: center; justify-self: end; }
  .memo-toggle { grid-column: 1; grid-row: 3; }
  .memo-actions { grid-column: 2; grid-row: 3; }
  .memo-note { max-width: 100%; }
  .settings-panel { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .full-field { grid-column: 1; }
  .panel-actions { flex-direction: column; }
  .panel-actions button { width: 100%; }
  .modal { padding: 20px 17px 17px; }
  .notification-item { grid-template-columns: 32px minmax(0, 1fr); }
  .notification-time { grid-column: 2; }
}
@media (max-width: 390px) {
  .nav-item { gap: 5px; font-size: 11px; }
  .content-wrap { width: calc(100% - 22px); }
  .summary-card-main { flex-direction: column; gap: 2px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}
