:root {
  color-scheme: dark;
  --bg: #07080a;
  --panel: rgba(17, 18, 22, .72);
  --panel-solid: #111216;
  --panel-hover: rgba(25, 26, 31, .82);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .15);
  --text: #f3f4f6;
  --muted: #8d9099;
  --faint: #5e616a;
  --violet: #9b87f5;
  --violet-rgb: 155, 135, 245;
  --cyan: #61d6d2;
  --amber: #e7b567;
  --rose: #e9839c;
  --lime: #a7d57a;
  --danger: #f06c78;
  --radius-lg: 24px;
  --radius-md: 17px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
input, textarea, select { appearance: none; -webkit-appearance: none; color: var(--text); caret-color: var(--violet); }
input::placeholder, textarea::placeholder { color: #555861; opacity: 1; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 1000px #111218 inset; transition: background-color 9999s ease-out; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid rgba(var(--violet-rgb), .85); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

[hidden] { display: none !important; }
.ambient { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .15; z-index: 0; }
.ambient-one { width: 550px; height: 550px; top: -260px; right: -80px; background: #7f69f1; }
.ambient-two { width: 420px; height: 420px; bottom: -220px; left: 15%; background: #2eb5b0; opacity: .08; }
.noise { position: fixed; inset: 0; z-index: 0; opacity: .025; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }

.glass-card, .glass-panel { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: .16em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #d6ccff; background: rgba(var(--violet-rgb), .14); border: 1px solid rgba(var(--violet-rgb), .25); box-shadow: inset 0 0 16px rgba(var(--violet-rgb), .07); }
.brand-mark svg { width: 19px; fill: currentColor; stroke: none; }
.eyebrow { margin: 0 0 12px; color: var(--violet); font-size: 10px; font-weight: 750; letter-spacing: .22em; }
.muted { color: var(--muted); }

.lock-screen { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 42px; }
.lock-shell { width: min(1060px, 100%); min-height: 620px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: stretch; border: 1px solid rgba(255,255,255,.07); border-radius: 30px; background: rgba(10,11,14,.48); box-shadow: 0 40px 120px rgba(0,0,0,.55); overflow: hidden; }
.lock-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; border-right: 1px solid var(--line); background: radial-gradient(circle at 15% 80%, rgba(var(--violet-rgb), .16), transparent 46%); }
.lock-aside::after { content: ""; position: absolute; inset: 70px 0 70px 35%; opacity: .14; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(90deg, transparent, #000); }
.lock-copy { position: relative; z-index: 1; max-width: 460px; }
.lock-copy h1 { margin: 0; font-size: clamp(44px, 5vw, 72px); line-height: 1.06; letter-spacing: -.055em; font-weight: 580; }
.lock-copy h1 span { color: #aaa4c2; }
.lock-copy > p:last-child { max-width: 390px; margin: 28px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.lock-footnote { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 11px; letter-spacing: .07em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(167,213,122,.7); }
.lock-card { align-self: center; margin: 52px; padding: 36px; border-radius: var(--radius-lg); }
.lock-card h2 { margin: 0 0 10px; font-size: 28px; letter-spacing: -.035em; }
.lock-card > .muted { margin: 0 0 32px; font-size: 13px; line-height: 1.65; }
.lock-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 28px; color: #d9d2ff; border-radius: 16px; background: rgba(var(--violet-rgb), .12); border: 1px solid rgba(var(--violet-rgb), .22); }
.lock-icon svg { width: 22px; }
.auth-form { display: grid; }
.form-label { display: block; margin: 0 0 9px; color: #aeb0b7; font-size: 10px; font-weight: 650; letter-spacing: .05em; }
.input-control { position: relative; width: 100%; min-height: 53px; display: flex; align-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: linear-gradient(180deg, rgba(24,25,31,.82), rgba(11,12,16,.82)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 24px rgba(0,0,0,.13); transition: border-color .2s, box-shadow .2s, background .2s; }
.input-control:hover { border-color: rgba(255,255,255,.16); background: linear-gradient(180deg, rgba(28,29,35,.88), rgba(13,14,18,.88)); }
.input-control:focus-within { border-color: rgba(var(--violet-rgb), .62); box-shadow: 0 0 0 4px rgba(var(--violet-rgb), .09), inset 0 1px 0 rgba(255,255,255,.05), 0 12px 32px rgba(0,0,0,.2); }
.control-icon { width: 46px; height: 100%; display: grid; place-items: center; flex: 0 0 46px; color: #686b75; border-right: 1px solid rgba(255,255,255,.065); transition: color .2s; }
.control-icon svg { width: 17px; }
.input-control:focus-within .control-icon { color: #b2a4f6; }
.password-field input, .stacked-fields input { width: 100%; height: 51px; min-width: 0; padding: 0 49px 0 14px; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 12px; }
.password-field .icon-button { position: absolute; right: 7px; top: 8px; }
.reveal-button .eye-closed { display: none; }
.reveal-button.showing .eye-open { display: none; }
.reveal-button.showing .eye-closed { display: block; }
.default-tip { margin: 22px 0 0; color: var(--faint); font-size: 11px; text-align: center; }
.default-tip strong { color: #bfc1c7; font-weight: 600; letter-spacing: .08em; }

.primary-button, .secondary-button, .danger-button, .text-button, .icon-button, .view-button, .nav-item { border: 0; cursor: pointer; }
.primary-button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border-radius: 13px; color: #0d0c11; background: #e6e1ff; font-size: 13px; font-weight: 700; box-shadow: 0 8px 25px rgba(var(--violet-rgb), .17); transition: transform .2s, background .2s, box-shadow .2s; }
.primary-button:hover { background: #f0edff; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(var(--violet-rgb), .24); }
.primary-button:active { transform: translateY(0); }
.primary-button svg { width: 17px; }
.full-button { width: 100%; margin-top: 8px; }
.secondary-button { min-height: 42px; padding: 0 18px; color: #d8d9dd; background: rgba(255,255,255,.065); border: 1px solid var(--line); border-radius: 12px; }
.text-button { min-height: 42px; padding: 0 16px; background: transparent; color: var(--muted); }
.danger-button { min-height: 42px; padding: 0 18px; border-radius: 12px; color: #20070b; background: #ed8190; font-weight: 700; }
.icon-button, .view-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 10px; color: var(--muted); background: transparent; transition: color .2s, background .2s; }
.icon-button:hover, .view-button:hover, .view-button.active { color: var(--text); background: rgba(255,255,255,.07); }
.form-error { min-height: 18px; margin: 8px 0 0; color: #ef8995; font-size: 11px; line-height: 1.55; }
.form-error:not(:empty) { padding: 7px 10px; border: 1px solid rgba(240,108,120,.16); border-radius: 9px; background: rgba(240,108,120,.065); }

.app-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; padding: 14px; gap: 14px; }
.sidebar { position: sticky; top: 14px; height: calc(100vh - 28px); display: flex; flex-direction: column; padding: 25px 16px 17px; border-radius: 22px; box-shadow: 0 14px 55px rgba(0,0,0,.28); }
.sidebar-brand { padding: 0 10px 22px; }
.nav-section { display: grid; gap: 5px; margin-top: 21px; }
.nav-label { margin: 0 12px 8px; color: #535660; font-size: 9px; font-weight: 750; letter-spacing: .18em; }
.nav-item { width: 100%; min-height: 42px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 0 11px; border-radius: 11px; color: #858892; background: transparent; font-size: 12px; text-align: left; transition: background .2s, color .2s; }
.nav-item svg { width: 17px; }
.nav-item b { min-width: 19px; font-size: 10px; font-weight: 600; text-align: right; color: #62656d; }
.nav-item:hover { color: #d7d8dc; background: rgba(255,255,255,.035); }
.nav-item.active { color: #f0eff6; background: rgba(var(--violet-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--violet-rgb), .11); }
.category-dot { width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.violet { color: var(--violet); background-color: var(--violet); }
.cyan { color: var(--cyan); background-color: var(--cyan); }
.amber { color: var(--amber); background-color: var(--amber); }
.rose { color: var(--rose); background-color: var(--rose); }
.lime { color: var(--lime); background-color: var(--lime); }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.profile-row { display: grid; grid-template-columns: 35px 1fr 36px; align-items: center; gap: 10px; margin-top: 13px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #ddd6ff; background: rgba(var(--violet-rgb), .13); border: 1px solid rgba(var(--violet-rgb), .2); font-size: 12px; font-weight: 700; }
.profile-row strong, .profile-row small { display: block; }
.profile-row strong { color: #cacbd0; font-size: 11px; }
.profile-row small { margin-top: 3px; color: #60636b; font-size: 9px; }

.workspace { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 8px 0 24px; }
.mobile-brand, .mobile-actions { display: none; }
.search-box { width: min(320px, 35vw); height: 43px; display: flex; align-items: center; gap: 10px; padding: 0 9px 0 13px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(180deg, rgba(23,24,29,.7), rgba(13,14,18,.62)); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); backdrop-filter: blur(16px); transition: width .24s, border-color .2s, box-shadow .2s; }
.search-box:hover { border-color: rgba(255,255,255,.14); }
.search-box:focus-within { width: min(355px, 38vw); border-color: rgba(var(--violet-rgb), .48); box-shadow: 0 0 0 4px rgba(var(--violet-rgb), .07), 0 10px 28px rgba(0,0,0,.16); }
.search-box > svg { width: 16px; color: #656872; }
.search-box input { min-width: 0; flex: 1; height: 100%; padding: 0; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 12px; }
.search-box:focus-within > svg { color: #a99aed; }
.search-clear { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; padding: 0; color: #71747d; background: rgba(255,255,255,.045); border: 0; border-radius: 7px; cursor: pointer; }
.search-clear:hover { color: #d2d3d7; background: rgba(255,255,255,.08); }
.search-clear svg { width: 12px; }
kbd { padding: 3px 6px; color: #5e6169; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 5px; font-family: inherit; font-size: 9px; }
.workspace-content { padding: 25px clamp(20px, 3.5vw, 56px) 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 18px 0 36px; }
.page-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); font-weight: 570; letter-spacing: -.045em; }
.page-heading .muted { margin: 11px 0 0; font-size: 13px; }
.heading-meta { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 11px; }
.heading-meta strong { color: #c8c9cd; font-size: 14px; }
.divider { width: 1px; height: 24px; margin: 0 5px; background: var(--line); }

.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.notes-grid.list-view { grid-template-columns: 1fr; }
.note-card { --accent: var(--violet); position: relative; min-width: 0; min-height: 230px; display: flex; flex-direction: column; padding: 21px; overflow: hidden; border-radius: var(--radius-md); background: rgba(18,19,23,.68); border: 1px solid var(--line); box-shadow: 0 16px 38px rgba(0,0,0,.2); backdrop-filter: blur(20px); cursor: pointer; transition: transform .23s ease, border-color .23s ease, background .23s ease; animation: card-in .35s both; }
.note-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent 7%, var(--accent), transparent 78%); opacity: .7; }
.note-card::after { content: ""; position: absolute; width: 110px; height: 110px; top: -68px; right: -34px; background: var(--accent); filter: blur(50px); opacity: .07; pointer-events: none; }
.note-card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: rgba(23,24,29,.82); }
.note-card[data-accent="cyan"] { --accent: var(--cyan); }
.note-card[data-accent="amber"] { --accent: var(--amber); }
.note-card[data-accent="rose"] { --accent: var(--rose); }
.note-card[data-accent="lime"] { --accent: var(--lime); }
.note-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-category { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .09em; }
.note-category::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pin-button { position: relative; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; color: #5d6069; background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.pin-button:hover { color: #b5b7be; background: rgba(255,255,255,.05); }
.pin-button.active { color: var(--accent); }
.pin-button svg { width: 15px; }
.note-card h2 { margin: 19px 0 11px; color: #e6e7ea; font-size: 17px; line-height: 1.4; letter-spacing: -.018em; font-weight: 610; overflow-wrap: anywhere; }
.note-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; margin: 0; color: #858892; font-size: 12px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.note-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; color: #575a63; font-size: 9px; }
.note-actions { display: flex; gap: 2px; opacity: 0; transform: translateX(5px); transition: opacity .2s, transform .2s; }
.note-card:hover .note-actions, .note-actions:focus-within { opacity: 1; transform: none; }
.card-action { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #777a83; background: transparent; cursor: pointer; }
.card-action:hover { color: #d4d5d9; background: rgba(255,255,255,.055); }
.card-action.delete:hover { color: var(--danger); }
.card-action svg { width: 14px; }
.notes-grid.list-view .note-card { min-height: 126px; display: grid; grid-template-columns: 105px minmax(160px, .8fr) 1.8fr auto; align-items: center; column-gap: 22px; }
.notes-grid.list-view .note-card-head { grid-column: 1; }
.notes-grid.list-view .note-card h2 { grid-column: 2; margin: 0; }
.notes-grid.list-view .note-preview { grid-column: 3; -webkit-line-clamp: 2; }
.notes-grid.list-view .note-card-footer { grid-column: 4; margin: 0; padding: 0; }

.empty-state { max-width: 380px; margin: 11vh auto 0; text-align: center; }
.empty-visual { width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 23px; border-radius: 25px; color: #777183; background: rgba(255,255,255,.025); border: 1px solid var(--line); transform: rotate(-3deg); }
.empty-visual svg { width: 38px; height: 38px; }
.empty-state h2 { margin: 0; font-size: 20px; }
.empty-state p { margin: 10px 0 22px; color: var(--muted); font-size: 12px; }

.modal { max-width: none; max-height: none; width: 100%; height: 100%; padding: 24px; border: 0; background: transparent; color: var(--text); }
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: rgba(2,3,5,.73); backdrop-filter: blur(9px); }
.modal-card { width: min(680px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 29px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: rgba(15,16,20,.96); box-shadow: 0 30px 100px rgba(0,0,0,.65); animation: modal-in .22s both; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.modal-header h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.editor-fields { display: grid; gap: 14px; margin-top: 25px; }
.editor-field { display: grid; gap: 8px; cursor: text; }
.editor-field-head { display: flex; align-items: center; justify-content: space-between; padding: 0 3px; color: #7f828b; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.editor-field-head small { color: #4e5159; font-size: 9px; font-weight: 500; letter-spacing: .02em; text-transform: none; }
.editor-control { position: relative; display: flex; align-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.095); border-radius: 14px; background: linear-gradient(145deg, rgba(26,27,33,.72), rgba(11,12,16,.75)); box-shadow: inset 0 1px 0 rgba(255,255,255,.027), 0 12px 30px rgba(0,0,0,.1); transition: border-color .2s, box-shadow .2s, background .2s; }
.editor-control:hover { border-color: rgba(255,255,255,.15); background: linear-gradient(145deg, rgba(29,30,36,.76), rgba(13,14,18,.79)); }
.editor-control:focus-within { border-color: rgba(var(--violet-rgb), .53); box-shadow: 0 0 0 4px rgba(var(--violet-rgb), .075), inset 0 1px 0 rgba(255,255,255,.04), 0 14px 36px rgba(0,0,0,.18); }
.editor-control-icon { width: 48px; align-self: stretch; display: grid; place-items: center; flex: 0 0 48px; color: #555862; border-right: 1px solid rgba(255,255,255,.06); transition: color .2s, background .2s; }
.editor-control-icon svg { width: 17px; }
.editor-control:focus-within .editor-control-icon { color: #a698e9; background: rgba(var(--violet-rgb), .035); }
.title-input { width: 100%; height: 62px; min-width: 0; padding: 0 17px; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 19px; font-weight: 580; letter-spacing: -.02em; }
.textarea-control { align-items: flex-start; }
.textarea-control .editor-control-icon { min-height: 230px; align-content: start; padding-top: 20px; }
.editor-fields textarea { width: 100%; min-height: 230px; resize: none; padding: 17px 18px; color: #c9cbd0; background: transparent; border: 0; outline: 0; font-size: 13px; line-height: 1.9; scrollbar-width: thin; scrollbar-color: #343640 transparent; }
.editor-fields textarea::-webkit-scrollbar { width: 7px; }
.editor-fields textarea::-webkit-scrollbar-thumb { background: #343640; border-radius: 8px; }
.editor-options { position: relative; min-height: 67px; display: flex; align-items: center; gap: 24px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(9,10,13,.42); }
.option-group { display: flex; align-items: center; gap: 9px; }
.option-label { color: #6e717a; font-size: 9px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.category-control { position: relative; }
.custom-select { position: relative; }
.select-trigger { min-width: 104px; height: 38px; display: grid; grid-template-columns: 8px 1fr 14px; align-items: center; gap: 8px; padding: 0 10px; color: #c9cad0; background: linear-gradient(180deg, rgba(31,32,39,.92), rgba(20,21,26,.92)); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; cursor: pointer; font-size: 11px; text-align: left; transition: border-color .2s, background .2s, box-shadow .2s; }
.select-trigger:hover, .custom-select.open .select-trigger { border-color: rgba(var(--violet-rgb), .43); background: linear-gradient(180deg, rgba(36,37,44,.96), rgba(23,24,29,.96)); }
.custom-select.open .select-trigger { box-shadow: 0 0 0 3px rgba(var(--violet-rgb), .07); }
.select-dot { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron { width: 13px; color: #666973; transition: transform .2s; }
.custom-select.open .select-chevron { transform: rotate(180deg); }
.select-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 15; width: 145px; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(22,23,29,.98); box-shadow: 0 18px 48px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(24px); animation: menu-in .16s both; }
.select-option { width: 100%; height: 36px; display: grid; grid-template-columns: 8px 1fr 15px; align-items: center; gap: 9px; padding: 0 9px; color: #8f929b; background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 11px; text-align: left; }
.select-option:hover, .select-option.selected { color: #e4e5e8; background: rgba(255,255,255,.055); }
.select-option > svg { width: 13px; opacity: 0; color: #b8aaff; }
.select-option.selected > svg { opacity: 1; }
.accent-picker { display: flex; align-items: center; gap: 9px; margin: 0; padding: 0; border: 0; }
.accent-picker legend { float: left; margin: 0 2px 0 0; }
.accent-picker label { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; cursor: pointer; transition: background .2s; }
.accent-picker label:hover { background: rgba(255,255,255,.05); }
.accent-picker input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { display: block; width: 15px; height: 15px; border: 3px solid #17181d; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 9px currentColor; transition: transform .18s, box-shadow .18s; }
.accent-picker input:checked + .swatch { transform: scale(1.15); box-shadow: 0 0 0 2px #777382, 0 0 12px currentColor; }
.pin-check { display: flex; align-items: center; gap: 9px; margin-left: auto; cursor: pointer; }
.pin-check input { position: absolute; opacity: 0; }
.switch-track { position: relative; width: 36px; height: 20px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: #25262d; box-shadow: inset 0 2px 5px rgba(0,0,0,.25); transition: background .2s, border-color .2s; }
.switch-track i { position: absolute; width: 14px; height: 14px; top: 2px; left: 2px; border-radius: 50%; background: #747780; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .2s, background .2s, box-shadow .2s; }
.pin-check input:checked + .switch-track { border-color: rgba(var(--violet-rgb), .38); background: rgba(var(--violet-rgb), .24); }
.pin-check input:checked + .switch-track i { transform: translateX(16px); background: #d8d0ff; box-shadow: 0 0 10px rgba(var(--violet-rgb), .45); }
.pin-check input:focus-visible + .switch-track { outline: 2px solid rgba(var(--violet-rgb), .8); outline-offset: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.settings-card { width: min(470px, 100%); }
.settings-card > .muted { margin: 14px 0 24px; font-size: 12px; line-height: 1.7; }
.stacked-fields { display: grid; gap: 16px; }
.stacked-fields > label { display: grid; }
.stacked-fields .form-label { margin-left: 2px; }
.confirm-card { width: min(400px, 100%); text-align: center; }
.confirm-card h2 { margin: 18px 0 8px; font-size: 22px; }
.confirm-card > p { margin: 0; font-size: 12px; }
.danger-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto; border-radius: 17px; color: #ee8792; background: rgba(240,108,120,.09); border: 1px solid rgba(240,108,120,.16); }
.confirm-card .centered { justify-content: center; margin-top: 25px; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 11px; border: 1px solid var(--line-strong); border-radius: 13px; color: #d8d9dd; background: rgba(20,21,25,.94); box-shadow: 0 16px 45px rgba(0,0,0,.45); backdrop-filter: blur(20px); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error .toast-icon { color: var(--danger); background: rgba(240,108,120,.1); }
.toast-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--lime); background: rgba(167,213,122,.09); }
.toast-icon svg { width: 14px; }

@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: scale(.975) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lock-card { margin: 32px; }
  .lock-aside { padding: 38px; }
}

@media (max-width: 820px) {
  .lock-screen { padding: 20px; }
  .lock-shell { width: min(500px, 100%); min-height: 0; grid-template-columns: 1fr; }
  .lock-aside { min-height: 250px; padding: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .lock-copy h1 { font-size: 42px; }
  .lock-copy > p:last-child, .lock-footnote { display: none; }
  .lock-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: rgba(14,15,18,.7); }
  .app-shell { display: block; padding: 0; }
  .sidebar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 15; width: auto; height: 66px; display: block; padding: 7px 12px max(7px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .sidebar-brand, .nav-label, .category-nav, .sidebar-bottom { display: none; }
  .nav-section { grid-template-columns: 1fr 1fr; margin: 0; gap: 8px; }
  .nav-item { min-height: 50px; grid-template-columns: 22px auto auto; justify-content: center; }
  .workspace { padding-bottom: 70px; }
  .topbar { height: auto; min-height: 68px; padding: 12px 18px; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .12em; }
  .mobile-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .search-box { order: 3; width: 100%; }
  .workspace-content { padding: 22px 18px 40px; }
  .page-heading { margin: 10px 0 28px; align-items: flex-end; }
  .heading-meta span:first-child, .heading-meta .divider { display: none; }
  .notes-grid.list-view .note-card { display: flex; min-height: 210px; }
  .note-actions { opacity: 1; transform: none; }
}

@media (max-width: 590px) {
  .lock-screen { padding: 0; }
  .lock-shell { min-height: 100vh; border: 0; border-radius: 0; }
  .lock-aside { min-height: 230px; }
  .lock-card { padding: 30px 25px 36px; }
  .notes-grid { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 34px; }
  .topbar > .primary-button { width: 42px; padding: 0; }
  .topbar .primary-button span { display: none; }
  .editor-options { align-items: flex-start; flex-wrap: wrap; gap: 14px 20px; }
  .pin-check { margin-left: 0; }
  .modal { padding: 12px; }
  .modal-card { max-height: calc(100vh - 24px); padding: 22px; border-radius: 20px; }
  .editor-fields textarea { min-height: 190px; }
  .textarea-control .editor-control-icon { min-height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
