/* KANZAKI / Blue Terminal — responsive light and night themes */
:root {
  color-scheme: dark;
  --bg: #081426;
  --panel: #0f1e35;
  --panel-hover: #172a47;
  --line: #263a58;
  --text: #f1f6ff;
  --muted: #adbed7;
  --accent: #60a5fa;
  --accent-dark: #2563eb;
  --red: #fda4af;
  --accent-gradient: linear-gradient(
    135deg,
    #2563eb 0%,
    #2563eb 50%,
    #1d4ed8 100%
  );
  --accent-glow: #3b82f644;
  --radius: 10px;
  --font: "M PLUS 1 Code", ui-monospace, monospace;
  --input-bg: #0b1930;
  --placeholder: #8294b0;
  --accent-focus: #60a5fa30;
  --accent-border: #60a5fa55;
  --primary-fg: #ffffff;
  --accent-hover: #93c5fd;
  --surface-raised: #152641;
  --border-strong: #344c6e;
  --text-soft: #c7d7ee;
  --surface-hover: #203654;
  --icon-hover: #8ba2d31a;
  --icon-muted: #90a3c0;
  --muted-soft: #8da0bd;
  --hero-glow: #1d4ed84d;
  --terminal-border: #304462;
  --terminal-bg: #0b1930e8;
  --shadow-color: #02081755;
  --surface-alt: #13233d;
  --faint: #7488a7;
  --accent-wash: #60a5fa12;
  --accent-border-wash: #60a5fa3a;
  --accent-soft-text: #9bc7ff;
  --sidebar-bg: #0a172c;
  --nav-hover: #172a47;
  --avatar-border: #426799;
  --avatar-bg: #17345c;
  --avatar-text: #bfdbfe;
  --accent-text: #60a5fa;
  --chip-bg: #1c3150;
  --weekend: #fda4af;
  --today-fg: #07172e;
  --warning-bg: #624a1a28;
  --warning-border: #b78a35;
  --warning-text: #f2d89e;
  --success-bg: #102e55;
  --success-border: #3b72b8;
  --success-text: #c1ddff;
  --error-bg: #422d3b;
  --error-border: #815268;
  --error-text: #f2b0c1;
  --backdrop: #061020db;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f6fc;
  --panel: #ffffff;
  --panel-hover: #f5f8fd;
  --line: #d8e2f0;
  --text: #14243c;
  --muted: #536782;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --red: #be123c;
  --accent-gradient: linear-gradient(
    135deg,
    #2563eb 0%,
    #2563eb 48%,
    #1d4ed8 100%
  );
  --accent-glow: #2563eb26;
  --input-bg: #f9fbff;
  --placeholder: #73839b;
  --accent-focus: #2563eb26;
  --accent-border: #2563eb55;
  --primary-fg: #ffffff;
  --accent-hover: #1d4ed8;
  --surface-raised: #edf3fb;
  --border-strong: #c4d3e7;
  --text-soft: #344b69;
  --surface-hover: #e8eff9;
  --icon-hover: #2563eb12;
  --icon-muted: #617796;
  --muted-soft: #637894;
  --hero-glow: #bfdbfe85;
  --terminal-border: #d0dceb;
  --terminal-bg: #f8fbffed;
  --shadow-color: #1e3a8a18;
  --surface-alt: #eaf1fa;
  --faint: #8091a9;
  --accent-wash: #2563eb0e;
  --accent-border-wash: #2563eb36;
  --accent-soft-text: #2c5ea6;
  --sidebar-bg: #e9f0fa;
  --nav-hover: #dce8f7;
  --avatar-border: #9bb8df;
  --avatar-bg: #dbeafe;
  --avatar-text: #1d4ed8;
  --accent-text: #2563eb;
  --chip-bg: #e7eef8;
  --weekend: #be123c;
  --today-fg: #ffffff;
  --warning-bg: #fff8e5;
  --warning-border: #e4c47c;
  --warning-text: #795a15;
  --success-bg: #e8f2ff;
  --success-border: #a4c6f4;
  --success-text: #164c96;
  --error-bg: #fff1f2;
  --error-border: #f1b9c4;
  --error-text: #9f1239;
  --backdrop: #0e1d345c;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  padding: 12px 14px;
  min-height: 46px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-focus);
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -1px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 500;
}
svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  stroke-width: 1.6;
}
button {
  border: 0;
  background: none;
}
button svg {
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.micro,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 500;
}
.eyebrow {
  color: var(--accent);
  display: flex;
  gap: 9px;
  align-items: center;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 600;
  line-height: 1.4;
}
.brand-mark {
  width: 39px;
  height: 40px;
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  letter-spacing: -6px;
  padding-right: 6px;
  line-height: 1;
  color: var(--accent);
  background: linear-gradient(145deg, var(--accent-wash), var(--surface-alt));
  box-shadow:
    inset 0 1px 0 #ffffff12,
    0 5px 16px var(--accent-glow);
}
.brand-mark span {
  font-size: 20px;
  align-self: flex-end;
  margin-bottom: 6px;
}
.brand-sub {
  display: block;
  letter-spacing: 1.6px;
  font-size: 8px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.button {
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 43px;
  transition:
    background 0.18s,
    transform 0.18s;
}
.button:hover {
  transform: translateY(-1px);
}
.primary {
  background: var(--accent-gradient);
  color: var(--primary-fg);
  border: 1px solid transparent;
  box-shadow: 0 7px 18px var(--accent-glow);
}
.primary:hover {
  background: var(--accent-gradient);
  filter: brightness(1.08);
}
.secondary {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
}
.secondary:hover {
  background: var(--surface-hover);
}
.danger {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}
.text-button {
  font-size: 11px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}
.text-button svg {
  width: 14px;
  height: 14px;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--icon-hover);
  color: var(--text);
}
.icon-button svg {
  width: 18px;
  height: 18px;
}
.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon > svg {
  position: absolute;
  left: 14px;
  color: var(--icon-muted);
  width: 17px;
  height: 17px;
}
.input-icon input {
  padding-left: 42px;
}
.input-icon input:has(+ button) {
  padding-right: 45px;
}
.input-icon > button {
  position: absolute;
  right: 6px;
}
.error-message {
  color: var(--red);
  font-size: 11px;
  min-height: 24px;
  margin-top: 10px;
  line-height: 1.5;
}
label {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin: 16px 0 8px;
}
label span {
  color: var(--muted-soft);
  font-size: 9px;
  letter-spacing: 1px;
  float: right;
}
.login-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 18% 44%, var(--hero-glow), transparent 58%),
    radial-gradient(ellipse at 88% 8%, var(--accent-wash), transparent 34%),
    linear-gradient(145deg, var(--bg), var(--panel));
}
.login-brand {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  width: 100%;
  padding: 0 6%;
  margin: auto;
}
.login-brand > .micro {
  color: var(--faint);
}
.login-layout {
  width: 100%;
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10%;
  padding: 45px 6% 60px;
}
.login-story {
  max-width: 560px;
  flex: 1;
}
.login-story h1 {
  font-size: clamp(32px, 3.25vw, 49px);
  line-height: 1.6;
  margin: 24px 0 20px;
  letter-spacing: -2px;
}
.login-story > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2.3;
}
.login-tools {
  display: flex;
  gap: 22px;
  margin: 27px 0 35px;
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: 0.9px;
}
.login-tools > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.login-tools svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.terminal-art {
  max-width: 430px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--terminal-bg), var(--terminal-bg)) padding-box,
    linear-gradient(
        135deg,
        var(--accent-border),
        var(--terminal-border),
        var(--accent-wash)
      )
      border-box;
  border-radius: 9px;
  overflow: hidden;
  transform: rotate(-1deg);
  box-shadow:
    0 22px 55px var(--shadow-color),
    0 0 38px var(--accent-wash);
}
.terminal-top {
  height: 36px;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}
.terminal-top > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.terminal-top > span:first-child {
  background: #c47c88;
}
.terminal-top > span:nth-child(2) {
  background: #c5ae72;
}
.terminal-top > span:nth-child(3) {
  background: #71ad9b;
}
.terminal-top b {
  font-weight: 400;
  color: var(--muted-soft);
  font-size: 9px;
  margin-left: 14px;
}
.terminal-body {
  padding: 21px 24px;
  font-size: 11px;
  line-height: 2.2;
}
.terminal-body p > span {
  color: var(--accent);
  padding-right: 9px;
}
.terminal-body p > svg {
  display: inline-block;
  vertical-align: -3px;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  color: var(--accent-soft-text);
}
.terminal-body .terminal-last {
  margin-top: 10px;
}
.cursor {
  animation: blink 1.2s step-end infinite;
}
.login-caption {
  display: block;
  font-size: 8px;
  color: var(--faint);
  letter-spacing: 2.4px;
  margin-top: 24px;
}
.login-card {
  width: 410px;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, var(--panel), var(--surface-alt)) padding-box,
    linear-gradient(
        135deg,
        var(--accent-border),
        var(--border-strong),
        var(--accent-wash)
      )
      border-box;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 34px;
  position: relative;
  box-shadow:
    0 24px 80px var(--shadow-color),
    0 0 52px var(--accent-wash);
}
.card-corner {
  position: absolute;
  top: 21px;
  right: 23px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #697b96;
}
.login-icon {
  width: 47px;
  height: 47px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent-wash), var(--surface-alt));
  border: 1px solid var(--accent-border);
  box-shadow:
    inset 0 1px 0 #ffffff14,
    0 6px 20px var(--accent-wash);
  color: var(--accent);
  margin-bottom: 24px;
}
.login-icon svg {
  width: 22px;
  height: 22px;
}
.login-card h2 {
  font-size: 19px;
  letter-spacing: -0.7px;
}
.login-card > p {
  font-size: 11px;
  margin-top: 9px;
  margin-bottom: 28px;
}
.login-card label {
  margin-top: 20px;
}
.login-card input {
  min-height: 49px;
  font-size: 12px;
}
.login-submit {
  width: 100%;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 0;
}
.login-security {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  color: var(--muted-soft);
  font-size: 9px;
  margin-top: 24px;
}
.login-security svg {
  width: 13px;
  height: 13px;
}
.prototype-info {
  font-size: 9px;
  color: var(--muted-soft);
  margin-top: 15px;
}
.prototype-info summary {
  cursor: pointer;
}
.prototype-info p {
  margin-top: 7px;
  line-height: 1.8;
}
.login-footer {
  margin-top: auto;
  padding: 20px 6%;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 1px;
  border-top: 1px solid var(--line);
}
.login-footer > span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-footer .status-dot {
  width: 4px;
  height: 4px;
}
.app-screen {
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 31px 23px 0;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--bg));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  font-size: 17px;
  gap: 10px;
}
.sidebar .brand-sub {
  font-size: 7px;
  letter-spacing: 1.3px;
}
.sidebar-label {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--faint);
  margin: 55px 13px 15px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
nav > a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  border: 1px solid transparent;
  padding: 11px 11px;
  color: var(--text-soft);
  border-radius: 6px;
  transition: background 0.15s;
}
nav > a:hover {
  background: var(--nav-hover);
}
nav > a.active {
  background: linear-gradient(95deg, var(--accent-wash), transparent 92%);
  border-color: var(--accent-border-wash);
  color: var(--accent);
}
nav > a.active:before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--accent);
  position: absolute;
  left: 0;
  border-radius: 0 3px 3px 0;
}
nav svg {
  width: 17px;
  height: 17px;
}
.nav-index {
  margin-left: auto;
  font-size: 9px;
  color: var(--faint);
}
.sidebar-bottom {
  margin-top: auto;
}
.local-indicator {
  border-top: 1px solid var(--line);
  padding: 23px 2px 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 8px;
  color: var(--text-soft);
  letter-spacing: 1px;
}
.local-indicator svg {
  width: 11px;
  height: 11px;
  margin-left: auto;
  color: var(--accent-soft-text);
}
.sidebar-bottom > p {
  font-size: 9px;
  color: var(--muted-soft);
  margin: 10px 0 20px;
  line-height: 2;
}
.sidebar-settings {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  width: 100%;
  font-size: 10px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}
.sidebar-settings svg {
  width: 15px;
  height: 15px;
}
.sidebar-settings svg:last-child {
  margin-left: auto;
  width: 12px;
}
.profile {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 19px 0;
}
.avatar {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--avatar-border);
  background: linear-gradient(145deg, var(--avatar-bg), var(--surface-alt));
  color: var(--avatar-text);
  border-radius: 9px;
  font-size: 14px;
}
.avatar.small {
  width: 30px;
  height: 30px;
  font-size: 11px;
  border-radius: 7px;
}
.profile strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.profile small {
  display: block;
  font-size: 8px;
  color: var(--muted-soft);
}
.profile > .icon-button {
  margin-left: auto;
  width: 30px;
}
.workspace {
  margin-left: 236px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  min-height: 77px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--bg), var(--panel));
  gap: 15px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 10px;
  color: var(--muted);
}
.breadcrumb svg {
  width: 11px;
  height: 11px;
}
.breadcrumb strong {
  font-weight: 400;
  color: var(--text-soft);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-date {
  font-size: 9px;
  color: var(--muted-soft);
}
.connection-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--text-soft);
}
.mobile-logout {
  display: none;
}
main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 36px 38px 35px;
  flex: 1;
  outline: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 29px;
}
.page-heading .eyebrow {
  margin-bottom: 7px;
  color: var(--muted-soft);
  font-size: 9px;
}
.page-heading h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
}
.page-heading p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 9px;
}
.page-heading .button {
  font-size: 11px;
}
.today-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 10px;
}
.today-tag svg {
  width: 15px;
  height: 15px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin-bottom: 30px;
}
.stat-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel), var(--surface-alt));
  border-radius: var(--radius);
  padding: 21px 22px;
  position: relative;
  text-align: left;
  width: 100%;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px var(--shadow-color);
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-top > span {
  font-size: 11px;
  color: var(--text-soft);
}
.stat-icon {
  padding: 9px;
  background: linear-gradient(145deg, var(--accent-wash), var(--surface-alt));
  border-radius: 7px;
  color: var(--accent);
}
.stat-icon svg {
  width: 18px;
  height: 18px;
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 3px 0;
}
.stat-value strong {
  font-size: 35px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -1px;
}
.stat-value span {
  font-size: 10px;
  color: var(--muted-soft);
}
.stat-bottom {
  font-size: 9px;
  color: var(--muted-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-bottom svg {
  width: 14px;
  height: 14px;
}
.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 24px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel), var(--surface-alt));
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.panel-head h2 svg {
  width: 16px;
  height: 16px;
  color: var(--text-soft);
}
.panel-sub {
  font-size: 8px;
  color: var(--muted-soft);
  letter-spacing: 1px;
  margin-left: 6px;
}
.panel-body {
  padding: 21px;
}
.dashboard-bottom {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 24px;
  padding: 16px 21px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--accent-wash);
}
.dashboard-bottom > svg {
  width: 23px;
  height: 23px;
  color: var(--accent-soft-text);
}
.dashboard-bottom strong {
  font-size: 11px;
  font-weight: 500;
}
.dashboard-bottom p {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.dashboard-bottom button {
  margin-left: auto;
  flex-shrink: 0;
}
.empty-state {
  text-align: center;
  padding: 38px 20px;
}
.empty-state .empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  margin: 0 auto 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--muted-soft);
  background: var(--surface-raised);
}
.empty-state h3 {
  font-size: 12px;
}
.empty-state p {
  font-size: 10px;
  color: var(--muted-soft);
  margin: 7px 0 17px;
}
.empty-state .button {
  font-size: 10px;
  padding: 7px 12px;
  min-height: 35px;
}
.empty-state.compact {
  padding: 26px 15px;
}
.empty-state.compact .empty-icon {
  display: none;
}
.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 38px;
  padding: 19px 0 23px;
  border-top: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--muted-soft);
}
.workspace-footer .version {
  color: var(--faint);
  margin-left: 6px;
}
#save-status {
  display: flex;
  gap: 6px;
  align-items: center;
  letter-spacing: 0;
  font-size: 9px;
}
#save-status .status-dot {
  width: 4px;
  height: 4px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 23px;
}
.search-box {
  position: relative;
  max-width: 340px;
  width: 100%;
}
.search-box svg {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 16px;
  height: 16px;
  color: var(--muted-soft);
}
.search-box input {
  padding: 10px 13px 10px 39px;
  min-height: 42px;
  font-size: 11px;
  background: var(--input-bg);
}
.filter-tabs {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.filter-tabs button {
  font-size: 10px;
  padding: 7px 12px;
  color: var(--text-soft);
  border: 1px solid transparent;
  border-radius: 5px;
}
.filter-tabs button.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-wash);
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.note-card {
  background: linear-gradient(150deg, var(--panel), var(--surface-alt));
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 215px;
  position: relative;
  overflow: hidden;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.note-card:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px var(--shadow-color);
}
.note-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--note-color, var(--accent));
  opacity: 0.65;
}
.note-card h3 {
  font-size: 13px;
  overflow-wrap: anywhere;
  padding-right: 20px;
}
.note-card .note-preview {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8px;
  color: var(--muted-soft);
}
.note-actions {
  display: flex;
  gap: 2px;
}
.note-actions .icon-button {
  width: 26px;
  height: 26px;
}
.note-actions svg {
  width: 13px;
  height: 13px;
}
.note-card .pin-marker {
  position: absolute;
  right: 19px;
  top: 21px;
  color: var(--accent);
}
.pin-marker svg {
  width: 13px;
  height: 13px;
}
.note-title-button {
  width: 100%;
  text-align: left;
  padding: 0;
}
.recent-note {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
}
.recent-note:first-child {
  padding-top: 0;
}
.recent-note:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.recent-note > span:first-child {
  width: 4px;
  height: 30px;
  border-radius: 3px;
  flex-shrink: 0;
}
.recent-note h3 {
  font-size: 12px;
}
.recent-note p {
  font-size: 9px;
  color: var(--muted-soft);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.recent-note > span:last-child {
  margin-left: auto;
  color: var(--muted-soft);
  font-size: 8px;
  flex-shrink: 0;
}
.security-notice {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  border-radius: 7px;
  padding: 12px 15px;
  margin-bottom: 22px;
  font-size: 10px;
  color: var(--warning-text);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.security-notice svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.vault-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}
.vault-table th {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted-soft);
  letter-spacing: 0.6px;
  padding: 15px 20px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
.vault-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  overflow-wrap: anywhere;
}
.vault-table tr:last-child td {
  border-bottom: 0;
}
.service-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 120px;
}
.service-avatar {
  width: 33px;
  height: 33px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--avatar-bg);
  color: var(--accent-soft-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.service-cell strong {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  display: block;
}
.service-cell small {
  display: block;
  color: var(--muted-soft);
  font-size: 8px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.password-cell {
  display: flex;
  align-items: center;
  gap: 5px;
}
.password-value {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 2px;
}
.password-value.revealed {
  letter-spacing: 0;
}
.table-actions {
  display: flex;
  justify-content: flex-end;
}
.table-actions .icon-button,
.password-cell .icon-button {
  width: 28px;
  height: 28px;
}
.table-actions svg,
.password-cell svg {
  width: 14px;
  height: 14px;
}
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.calendar-head h2 {
  font-size: 17px;
}
.calendar-head h2 span {
  font-size: 11px;
  color: var(--muted-soft);
  margin-left: 9px;
}
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}
.calendar-controls .button {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 10px;
}
.weekday-row,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.weekday-row {
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}
.weekday-row > span {
  text-align: center;
  font-size: 9px;
  color: var(--muted-soft);
  padding: 13px 0;
}
.weekday-row > span:first-child {
  color: var(--weekend);
}
.weekday-row > span:last-child {
  color: var(--accent-soft-text);
}
.calendar-days {
  padding: 0 10px 10px;
}
.calendar-day {
  min-height: 94px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px 5px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  border-radius: 0;
  overflow: hidden;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day:hover {
  background: var(--surface-hover);
}
.calendar-day.selected {
  background: var(--accent-wash);
  box-shadow:
    inset 0 0 0 1px var(--accent-border-wash),
    0 6px 18px var(--accent-wash);
}
.calendar-day.other-month {
  opacity: 0.3;
}
.calendar-day .day-number {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  color: var(--text-soft);
  border-radius: 6px;
}
.calendar-day.today .day-number {
  background: var(--accent);
  color: var(--today-fg);
  font-weight: 700;
}
.calendar-day:nth-child(7n + 1) .day-number {
  color: var(--weekend);
}
.calendar-day.today .day-number {
  color: var(--today-fg);
}
.calendar-event {
  font-size: 8px;
  background: var(--accent-wash);
  color: var(--accent-soft-text);
  display: block;
  max-width: 100%;
  padding: 1px 4px;
  border-radius: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-more {
  font-size: 8px;
  color: var(--muted-soft);
}
.agenda-heading {
  font-size: 13px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.agenda-heading span {
  font-size: 10px;
  color: var(--muted-soft);
}
.agenda-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.agenda-item:last-child {
  border: 0;
}
.agenda-item .event-bar {
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  flex-shrink: 0;
}
.agenda-item .event-content {
  flex: 1;
  min-width: 0;
}
.agenda-item h3 {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.agenda-item p {
  font-size: 9px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agenda-item .event-time {
  color: var(--accent-soft-text);
  font-size: 9px;
  display: block;
  margin-bottom: 4px;
}
.agenda-item .icon-button {
  width: 24px;
  height: 24px;
}
.agenda-item .icon-button svg {
  width: 13px;
  height: 13px;
}
.agenda-add {
  width: 100%;
  margin-top: 15px;
  font-size: 10px;
}
.mini-calendar {
  padding: 17px 18px;
}
.mini-calendar .calendar-head {
  padding: 0 0 15px;
  border: 0;
}
.mini-calendar .calendar-head h2 {
  font-size: 12px;
}
.mini-calendar .calendar-head h2 span {
  font-size: 9px;
}
.mini-calendar .calendar-controls {
  gap: 0;
}
.mini-calendar .weekday-row {
  padding: 0;
  border: 0;
}
.mini-calendar .weekday-row > span {
  padding: 4px 0;
  font-size: 8px;
}
.mini-calendar .calendar-days {
  padding: 0;
}
.mini-calendar .calendar-day {
  min-height: 30px;
  padding: 2px;
  border: 0;
  align-items: center;
  gap: 0;
}
.mini-calendar .day-number {
  width: 25px;
  height: 25px;
  font-size: 9px;
}
.mini-calendar .calendar-day.has-events:after {
  content: "";
  position: absolute;
  bottom: 1px;
  background: var(--accent);
  height: 3px;
  width: 3px;
  border-radius: 50%;
}
.mini-calendar .calendar-event,
.mini-calendar .event-more {
  display: none;
}
.mini-agenda {
  border-top: 1px solid var(--line);
  padding: 15px 20px;
}
.mini-agenda > .micro {
  font-size: 8px;
  color: var(--muted-soft);
}
.mini-agenda .agenda-item {
  padding: 11px 0;
}
.count-badge {
  font-size: 9px;
  background: var(--chip-bg);
  color: var(--muted-soft);
  padding: 1px 6px;
  border-radius: 4px;
}
.results-count {
  font-size: 10px;
  color: var(--muted-soft);
  white-space: nowrap;
}
dialog {
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  width: min(540px, calc(100% - 30px));
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 30px 120px var(--backdrop);
}
dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(5px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 19px;
}
.dialog-heading .eyebrow {
  font-size: 8px;
  color: var(--muted-soft);
  margin-bottom: 6px;
}
.dialog-heading > .icon-button {
  align-self: flex-start;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.dialog-actions .delete-button {
  margin-right: auto;
  color: var(--red);
}
.form-row {
  display: flex;
  gap: 15px;
}
.form-row > div {
  flex: 1;
  min-width: 0;
}
.form-note {
  font-size: 10px;
  color: var(--muted-soft);
  margin-top: 8px;
}
.color-options {
  display: flex;
  gap: 10px;
  align-items: center;
}
.color-option {
  width: 28px;
  height: 28px;
  border: 3px solid var(--panel);
  outline: 1px solid transparent;
  border-radius: 50%;
  background: var(--color);
  padding: 0;
}
.color-option.selected {
  outline-color: var(--color);
}
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}
.checkbox-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  margin: 0;
}
.checkbox-label input {
  width: 15px;
  min-height: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.password-editor {
  display: flex;
  gap: 6px;
}
.password-editor input {
  min-width: 0;
}
.password-editor button {
  min-height: 46px;
}
.password-meter {
  height: 3px;
  background: var(--border-strong);
  border-radius: 3px;
  margin-top: 9px;
  overflow: hidden;
}
.password-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s;
}
.settings-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.settings-section h3 {
  font-size: 12px;
  margin-bottom: 8px;
}
.settings-section p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.settings-section .button {
  margin-top: 14px;
  font-size: 10px;
}
.settings-section:last-child {
  border: 0;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  border-radius: 8px;
  padding: 12px 19px;
  font-size: 12px;
  box-shadow: 0 10px 30px var(--shadow-color);
  z-index: 100;
  max-width: calc(100% - 30px);
  animation: toast-in 0.2s ease-out;
}
.toast.error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}
.toast svg {
  width: 16px;
  height: 16px;
}
.no-results {
  grid-column: 1/-1;
}
.page-enter {
  animation: enter 0.25s ease-out;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    bottom: 20px;
  }
  to {
    opacity: 1;
    bottom: 30px;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@media (min-width: 1600px) {
  main {
    padding-top: 45px;
  }
  .sidebar {
    width: 255px;
    padding-left: 30px;
    padding-right: 30px;
  }
  .workspace {
    margin-left: 255px;
  }
  .dashboard-columns {
    grid-template-columns: 1.65fr 1fr;
  }
  .calendar-day {
    min-height: 115px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 215px;
    padding-left: 17px;
    padding-right: 17px;
  }
  .workspace {
    margin-left: 215px;
  }
  .topbar {
    padding: 0 26px;
  }
  main {
    padding: 30px 26px;
  }
  .workspace-footer {
    margin: 0 26px;
  }
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-columns {
    grid-template-columns: 1.15fr 1fr;
    gap: 18px;
  }
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
  }
  .calendar-day {
    min-height: 80px;
  }
  .vault-table td,
  .vault-table th {
    padding: 16px 12px;
  }
  .topbar-date {
    display: none;
  }
  .login-layout {
    gap: 6%;
    padding-left: 5%;
    padding-right: 5%;
  }
  .login-card {
    width: 375px;
    padding: 29px;
  }
  .login-tools {
    gap: 15px;
  }
  .login-story h1 {
    font-size: 38px;
  }
}
@media (max-width: 1000px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .calendar-agenda .panel-body {
    display: block;
  }
  .calendar-day {
    min-height: 95px;
  }
  .vault-table .updated-column {
    display: none;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-top > span {
    font-size: 10px;
  }
  .stat-icon {
    padding: 6px;
  }
  .stat-value strong {
    font-size: 30px;
  }
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
  .topbar-right {
    gap: 13px;
  }
  .dashboard-bottom {
    gap: 10px;
  }
  .dashboard-bottom p {
    max-width: 400px;
  }
  .login-tools {
    gap: 12px;
    font-size: 8px;
  }
  .login-story h1 {
    font-size: 33px;
  }
  .login-story > p {
    font-size: 11px;
  }
  .login-card {
    width: 350px;
    padding: 26px;
  }
  .login-card h2 {
    font-size: 17px;
  }
  .login-brand {
    height: 100px;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 13px;
  }
  .login-screen {
    background:
      radial-gradient(ellipse at 50% 20%, var(--hero-glow), transparent 70%),
      var(--bg);
  }
  .login-brand {
    height: 88px;
    padding: 0 24px;
  }
  .login-brand > .micro {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .login-brand .brand {
    font-size: 16px;
  }
  .login-layout {
    padding: 15px 24px 40px;
    display: block;
    max-width: 480px;
  }
  .login-story {
    margin-bottom: 30px;
  }
  .login-story > .eyebrow {
    font-size: 8px;
  }
  .login-story h1 {
    font-size: 29px;
    line-height: 1.55;
    margin: 15px 0 12px;
    letter-spacing: -1px;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story > p {
    font-size: 10px;
  }
  .login-tools,
  .terminal-art,
  .login-caption {
    display: none;
  }
  .login-card {
    width: 100%;
    padding: 27px;
  }
  .login-card > p {
    margin-bottom: 20px;
  }
  .login-icon {
    width: 39px;
    height: 39px;
    margin-bottom: 20px;
  }
  .login-card input {
    font-size: 16px;
  }
  .login-footer {
    padding: 18px 24px;
    flex-direction: column;
    gap: 7px;
    font-size: 7px;
  }
  .sidebar {
    inset: auto 0 0 0;
    width: 100%;
    height: calc(65px + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--border-strong);
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px);
  }
  .sidebar > .brand,
  .sidebar-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    height: 65px;
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
  }
  nav > a {
    flex: 1;
    padding: 8px 1px 7px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 0;
    font-size: 9px;
  }
  nav > a.active {
    background: var(--accent-wash);
  }
  nav > a.active:before {
    width: 27px;
    height: 2px;
    left: auto;
    top: 0;
    border-radius: 0 0 2px 2px;
  }
  nav svg {
    width: 19px;
    height: 19px;
  }
  .nav-index {
    display: none;
  }
  .workspace {
    margin-left: 0;
    padding-bottom: calc(65px + env(safe-area-inset-bottom));
  }
  .topbar {
    min-height: 63px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    backdrop-filter: blur(10px);
  }
  .breadcrumb {
    gap: 8px;
    font-size: 9px;
  }
  .topbar-right {
    gap: 8px;
  }
  .topbar-right .connection-label {
    font-size: 8px;
  }
  .topbar-right .small {
    display: none;
  }
  .mobile-logout {
    display: flex;
    width: 28px;
    height: 30px;
  }
  .mobile-logout svg {
    width: 16px;
    height: 16px;
  }
  main {
    padding: 26px 20px;
  }
  .page-heading {
    margin-bottom: 23px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
    margin-bottom: 5px;
  }
  .page-heading p {
    font-size: 10px;
    line-height: 1.9;
    margin-top: 7px;
  }
  .page-heading .button {
    padding: 9px 11px;
    font-size: 10px;
    min-height: 37px;
    margin-top: 20px;
  }
  .page-heading .button svg {
    width: 15px;
    height: 15px;
  }
  .today-tag {
    font-size: 8px;
    margin-top: 28px;
  }
  .today-tag svg {
    display: none;
  }
  .stats-row {
    gap: 8px;
    margin-bottom: 22px;
  }
  .stat-card {
    padding: 13px 11px;
    border-radius: 8px;
  }
  .stat-top > span {
    font-size: 9px;
  }
  .stat-icon {
    background: none;
    padding: 0;
  }
  .stat-icon svg {
    width: 14px;
    height: 14px;
  }
  .stat-value {
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 4px;
  }
  .stat-value strong {
    font-size: 29px;
  }
  .stat-value span {
    font-size: 8px;
  }
  .stat-bottom {
    font-size: 7px;
    letter-spacing: -0.2px;
  }
  .stat-bottom svg {
    width: 11px;
    height: 11px;
  }
  .dashboard-columns {
    gap: 20px;
  }
  .panel-head {
    padding: 16px;
  }
  .panel-head h2 {
    font-size: 12px;
    gap: 7px;
  }
  .panel-sub {
    font-size: 7px;
    margin-left: 0;
  }
  .panel-head .text-button {
    font-size: 9px;
  }
  .panel-body {
    padding: 18px;
  }
  .dashboard-bottom {
    padding: 14px;
    align-items: flex-start;
    position: relative;
  }
  .dashboard-bottom > svg {
    width: 17px;
    height: 17px;
    margin-top: 3px;
  }
  .dashboard-bottom strong {
    font-size: 10px;
  }
  .dashboard-bottom p {
    font-size: 8px;
    margin-right: 28px;
  }
  .dashboard-bottom button {
    font-size: 0;
    position: absolute;
    right: 15px;
    top: 14px;
  }
  .dashboard-bottom button svg {
    width: 16px;
    height: 16px;
  }
  .workspace-footer {
    margin: 0 20px;
    padding: 17px 0;
    font-size: 7px;
    gap: 10px;
  }
  #save-status {
    font-size: 7px;
  }
  .workspace-footer .version {
    display: none;
  }
  .toolbar {
    gap: 10px;
    align-items: center;
  }
  .search-box {
    max-width: none;
  }
  .search-box input {
    font-size: 16px;
    min-height: 43px;
    padding-right: 10px;
  }
  .search-box input::placeholder {
    font-size: 11px;
  }
  .filter-tabs {
    gap: 0;
  }
  .filter-tabs button {
    padding: 7px 8px;
    font-size: 9px;
  }
  .results-count {
    font-size: 9px;
  }
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .note-card {
    padding: 15px;
    min-height: 195px;
  }
  .note-card h3 {
    font-size: 12px;
    padding-right: 12px;
  }
  .note-card .pin-marker {
    right: 12px;
    top: 18px;
  }
  .note-card .note-preview {
    font-size: 10px;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    line-height: 1.9;
  }
  .note-meta {
    font-size: 7px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .note-actions {
    margin-left: auto;
  }
  .note-actions .icon-button {
    width: 25px;
    height: 25px;
  }
  .security-notice {
    font-size: 9px;
    padding: 11px;
    gap: 8px;
  }
  .vault-table,
  .vault-table tbody {
    display: block;
  }
  .vault-table thead {
    display: none;
  }
  .vault-table tr {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    gap: 8px;
  }
  .vault-table td {
    padding: 0;
    border: 0;
  }
  .vault-table td:first-child {
    width: 100%;
    padding-right: 70px;
  }
  .vault-table td:nth-child(2) {
    font-size: 10px;
    margin-left: 45px;
    max-width: calc(100% - 45px);
    width: 100%;
    color: var(--muted-soft);
  }
  .vault-table td:nth-child(3) {
    margin-left: 45px;
    max-width: calc(100% - 45px);
  }
  .vault-table td:last-child {
    position: absolute;
    top: 17px;
    right: 12px;
  }
  .password-value {
    max-width: 180px;
    font-size: 11px;
  }
  .service-cell {
    gap: 12px;
  }
  .service-cell small {
    max-width: 210px;
  }
  .table-actions .icon-button {
    width: 29px;
    height: 29px;
  }
  .calendar-head {
    padding: 17px 14px;
  }
  .calendar-head h2 {
    font-size: 16px;
  }
  .calendar-head h2 span {
    font-size: 10px;
    margin-left: 5px;
  }
  .calendar-controls {
    gap: 3px;
  }
  .calendar-days {
    padding: 0 5px 5px;
  }
  .weekday-row {
    padding: 0 5px;
  }
  .calendar-day {
    min-height: 76px;
    padding: 7px 2px;
    gap: 3px;
  }
  .calendar-day .day-number {
    font-size: 10px;
    width: 23px;
    height: 23px;
  }
  .calendar-event {
    font-size: 7px;
    padding: 1px 2px;
    letter-spacing: -0.5px;
    line-height: 1.6;
  }
  .event-more {
    font-size: 7px;
  }
  .calendar-layout {
    gap: 18px;
  }
  .agenda-heading {
    font-size: 12px;
  }
  .mini-calendar {
    padding: 17px 20px;
  }
  .mini-calendar .calendar-day {
    min-height: 33px;
  }
  .mini-calendar .day-number {
    font-size: 10px;
  }
  .mini-calendar .calendar-head h2 {
    font-size: 13px;
  }
  .mini-agenda {
    padding: 15px 19px;
  }
  .recent-note p {
    max-width: 215px;
  }
  .recent-note > span:last-child {
    font-size: 7px;
  }
  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom));
    font-size: 11px;
    width: max-content;
    max-width: calc(100% - 35px);
    animation: none;
  }
  dialog {
    padding: 22px;
    max-height: 85dvh;
  }
  .dialog-heading h2 {
    font-size: 18px;
  }
  dialog input,
  dialog textarea,
  dialog select {
    font-size: 16px;
  }
  dialog label {
    font-size: 11px;
  }
  .dialog-actions {
    gap: 8px;
  }
  .dialog-actions .button {
    font-size: 11px;
    padding: 9px 12px;
  }
  .settings-section p {
    font-size: 10px;
  }
  .form-row {
    gap: 10px;
  }
  .password-editor {
    flex-wrap: wrap;
  }
  .password-editor input {
    width: calc(100% - 43px);
    flex: 1;
  }
  .password-editor #generate-password {
    width: 100%;
    font-size: 11px;
    min-height: 35px;
  }
  .form-note {
    font-size: 9px;
  }
}
@media (max-width: 360px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .topbar-right .connection-label {
    display: none;
  }
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .today-tag {
    display: none;
  }
  .stat-card {
    padding: 12px 9px;
  }
  .stat-top > span {
    font-size: 8px;
  }
  .stat-bottom {
    font-size: 6px;
  }
  .page-heading h1 {
    font-size: 21px;
  }
  .login-layout {
    padding-left: 18px;
    padding-right: 18px;
  }
  .login-brand {
    padding: 0 18px;
  }
  .login-brand > .micro {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.filter-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.filter-tabs button svg {
  width: 12px;
  height: 12px;
}
.settings-section h3 {
  display: flex;
  align-items: center;
  gap: 7px;
}
.settings-section h3 svg {
  width: 15px;
  height: 15px;
}

/* Clear, consistent blue accents and accessible light mode surfaces. */
:root[data-theme="light"] body {
  background: var(--bg);
}
:root[data-theme="light"] .login-screen {
  background:
    radial-gradient(ellipse at 20% 52%, var(--hero-glow), transparent 62%),
    radial-gradient(ellipse at 90% 8%, var(--accent-wash), transparent 35%),
    linear-gradient(145deg, var(--bg), var(--panel));
}
:root[data-theme="light"] .terminal-art,
:root[data-theme="light"] .login-card,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .note-card,
:root[data-theme="light"] dialog {
  box-shadow: 0 12px 36px #24487512;
}
:root[data-theme="light"] .terminal-top,
:root[data-theme="light"] .vault-table th {
  background: var(--surface-alt);
}
:root[data-theme="light"] .login-footer,
:root[data-theme="light"] .calendar-day {
  border-color: var(--line);
}
:root[data-theme="light"] .login-security {
  color: var(--muted);
}
:root[data-theme="light"] .login-card {
  border-color: transparent;
}
:root[data-theme="light"] .note-card .note-preview,
:root[data-theme="light"] .vault-table td,
:root[data-theme="light"] .recent-note p,
:root[data-theme="light"] .agenda-item p {
  color: var(--muted);
}
:root[data-theme="light"] .security-notice {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}
:root[data-theme="light"] .calendar-day.other-month {
  opacity: 0.48;
}
:root[data-theme="light"] .dialog-actions {
  border-color: var(--line);
}
.login-brand-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.theme-toggle {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel), var(--surface-alt));
  color: var(--accent);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-color);
}
.theme-toggle:hover {
  background: var(--accent-gradient);
  color: var(--primary-fg);
  box-shadow: 0 7px 18px var(--accent-glow);
  border-color: var(--accent-border);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.topbar-right .theme-toggle {
  width: 34px;
  height: 34px;
}
@media (max-width: 760px) {
  .login-brand-right {
    gap: 9px;
  }
  .login-brand-right .theme-toggle {
    width: 34px;
    height: 34px;
  }
  .topbar-right .theme-toggle {
    width: 30px;
    height: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
