@charset "UTF-8";

:root {
  --ink: #14201e;
  --ink-soft: #384743;
  --forest-950: #0c1a18;
  --forest-900: #10221f;
  --forest-800: #18312d;
  --forest-700: #244a43;
  --paper: #f4f0e7;
  --paper-deep: #ebe5da;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --muted: #77817d;
  --muted-light: #9ba49f;
  --line: #e3ddd1;
  --line-strong: #d2cabd;
  --vermillion: #c64935;
  --vermillion-dark: #9f3526;
  --vermillion-soft: #f7e8e3;
  --jade: #24705f;
  --jade-soft: #e3f1eb;
  --amber: #a86c20;
  --amber-soft: #f7ecd9;
  --red: #b53e3b;
  --red-soft: #f9e7e5;
  --shadow-sm:
    0 1px 2px rgba(24, 32, 30, 0.05), 0 8px 24px rgba(24, 32, 30, 0.04);
  --shadow-md: 0 18px 50px rgba(22, 31, 29, 0.1);
  --shadow-lg: 0 30px 90px rgba(6, 17, 15, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --sidebar-width: 272px;
  --font-body:
    "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(20, 32, 30, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 30, 0.022) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font: 14px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.scroll-locked {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

input,
textarea,
select {
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #a9afa9;
}

::selection {
  color: #fff;
  background: var(--vermillion);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #b8b6ae;
  background-clip: padding-box;
}

.hidden {
  display: none !important;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.eyebrow {
  margin: 0;
  color: var(--vermillion);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #fff;
  background: var(--vermillion);
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.brand-mark::after {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  content: "";
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface);
  place-items: center;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--vermillion);
  background: #fff;
  transform: translateY(-1px);
}

/* Login */

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  background: var(--forest-950);
  grid-template-columns: minmax(480px, 1.08fr) minmax(420px, 0.92fr);
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(34px, 5vw, 72px);
  color: #edf2ec;
  background:
    radial-gradient(
      circle at 16% 14%,
      rgba(81, 132, 117, 0.42),
      transparent 24%
    ),
    radial-gradient(circle at 82% 74%, rgba(198, 73, 53, 0.2), transparent 28%),
    linear-gradient(145deg, #18332e 0%, #0c1a18 68%);
  flex-direction: column;
  justify-content: space-between;
}

.login-visual::before {
  position: absolute;
  top: 50%;
  left: 62%;
  width: min(36vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(241, 236, 222, 0.1);
  content: "";
  transform: translate(-50%, -50%) rotate(18deg);
  box-shadow:
    0 0 0 54px rgba(241, 236, 222, 0.025),
    0 0 0 108px rgba(241, 236, 222, 0.018);
}

.login-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.15;
}

.login-visual > * {
  position: relative;
  z-index: 1;
}

.login-visual-brand,
.aside-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-visual-brand div,
.aside-brand div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.login-visual-brand b {
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.login-visual-brand small {
  margin-top: 2px;
  color: rgba(237, 242, 236, 0.52);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-statement {
  width: min(630px, 100%);
  margin: auto 0;
  padding: clamp(60px, 11vh, 128px) 0;
}

.login-statement .eyebrow {
  color: #dd8877;
}

.login-statement h1 {
  margin: 22px 0 28px;
  color: #fbf8f1;
  font-family: var(--font-display);
  font-size: clamp(48px, 5.5vw, 78px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.18;
}

.login-statement > p:last-child {
  width: min(510px, 100%);
  margin: 0;
  color: rgba(237, 242, 236, 0.62);
  font-size: 15px;
  line-height: 2;
}

.login-trust {
  display: grid;
  width: min(580px, 100%);
  padding-top: 26px;
  border-top: 1px solid rgba(237, 242, 236, 0.14);
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.login-trust > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-trust svg {
  width: 23px;
  height: 23px;
  color: #d67a68;
}

.login-trust span {
  display: flex;
  flex-direction: column;
}

.login-trust b {
  color: #edf2ec;
  font-size: 12px;
  font-weight: 700;
}

.login-trust small {
  margin-top: 2px;
  color: rgba(237, 242, 236, 0.42);
  font-size: 10px;
}

.login-main {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 48px;
  background:
    linear-gradient(90deg, rgba(20, 32, 30, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(20, 32, 30, 0.025) 1px, transparent 1px), var(--paper);
  background-size: 24px 24px;
  place-items: center;
}

.login-main::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  border-bottom: 1px solid rgba(20, 32, 30, 0.09);
  border-left: 1px solid rgba(20, 32, 30, 0.09);
  content: "";
}

.login-panel {
  width: min(430px, 100%);
  animation: panel-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-mobile-brand {
  display: none;
}

.login-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--jade);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.login-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d9d79;
  box-shadow: 0 0 0 5px rgba(61, 157, 121, 0.11);
}

.login-panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.login-panel > p {
  margin: 8px 0 34px;
  color: var(--muted);
}

label {
  display: block;
  margin: 18px 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-label svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: inset 0 1px 0 rgba(20, 32, 30, 0.025);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input {
  min-height: 44px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #bdb4a5;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--jade);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 112, 95, 0.11);
}

.login-submit,
.primary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 17px;
  border: 1px solid var(--vermillion);
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--vermillion);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(198, 73, 53, 0.18);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.login-submit:hover,
.primary:hover {
  border-color: var(--vermillion-dark);
  background: var(--vermillion-dark);
  box-shadow: 0 11px 28px rgba(159, 53, 38, 0.23);
  transform: translateY(-1px);
}

.login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  justify-content: space-between;
  padding-inline: 20px;
}

.login-submit svg {
  width: 17px;
  transition: transform 0.2s ease;
}

.login-submit:hover svg {
  transform: translateX(3px);
}

.error {
  min-height: 22px;
  margin-top: 12px;
  color: var(--red);
  font-size: 12px;
  text-align: center;
}

.login-panel .login-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 24px 0 0;
  color: var(--muted-light);
  font-size: 10px;
}

.login-footnote svg {
  width: 13px;
  height: 13px;
}

/* App shell */

.layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  padding: 28px 20px 20px;
  color: #dce5df;
  background:
    radial-gradient(
      circle at 10% 2%,
      rgba(83, 133, 119, 0.23),
      transparent 28%
    ),
    linear-gradient(180deg, var(--forest-800), var(--forest-950));
  flex-direction: column;
  box-shadow: 12px 0 35px rgba(10, 26, 23, 0.1);
}

.sidebar::after {
  position: absolute;
  right: 0;
  bottom: 12%;
  width: 74px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-right: 0;
  content: "";
  transform: skewY(-13deg);
}

.aside-brand {
  position: relative;
  z-index: 1;
  padding: 0 8px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aside-brand .brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 21px;
}

.aside-brand b {
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aside-brand small {
  margin-top: 1px;
  color: rgba(220, 229, 223, 0.46);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

nav {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  overflow-y: auto;
  padding: 13px 4px;
  flex: 1;
  flex-direction: column;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

.nav-label {
  margin: 17px 12px 7px;
  color: rgba(220, 229, 223, 0.34);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

nav button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 0;
  border-radius: 8px;
  color: rgba(220, 229, 223, 0.66);
  background: transparent;
  text-align: left;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

nav button::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 3px;
  height: 0;
  border-radius: 4px;
  background: #e07460;
  content: "";
  transform: translateY(-50%);
  transition: height 0.2s ease;
}

nav button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: 0.78;
}

nav button span:not(.nav-signal) {
  flex: 1;
}

nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(2px);
}

nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.095);
  font-weight: 700;
}

nav button.active::before {
  height: 22px;
}

nav button.active svg {
  color: #e58875;
  opacity: 1;
}

.nav-signal {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #df7662;
  box-shadow: 0 0 0 4px rgba(223, 118, 98, 0.1);
}

.aside-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 6px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.admin-profile > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
}

.admin-profile > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.admin-profile b {
  overflow: hidden;
  color: #eff5f1;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile small {
  color: rgba(220, 229, 223, 0.38);
  font-size: 9px;
}

.aside-bottom .icon-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(220, 229, 223, 0.58);
  background: rgba(255, 255, 255, 0.04);
}

.aside-bottom .icon-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.sidebar-backdrop {
  position: fixed;
  z-index: 35;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(7, 17, 15, 0.56);
  backdrop-filter: blur(3px);
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 0 clamp(26px, 3.2vw, 54px) 52px;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  max-width: 1600px;
  min-height: 138px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 28px 0 26px;
  border-bottom: 1px solid var(--line-strong);
}

.topbar::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 74px;
  height: 2px;
  background: var(--vermillion);
  content: "";
}

.page-heading {
  min-width: 0;
}

.page-heading h2 {
  margin: 5px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.page-heading > p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.today {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-right: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
}

.today svg {
  width: 15px;
  height: 15px;
}

.refresh,
.ghost,
.danger,
.success-btn,
.toolbar button,
.panel-head button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(20, 32, 30, 0.025);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.refresh:hover,
.ghost:hover,
.toolbar button:hover {
  border-color: #bcb3a5;
  color: var(--ink);
  background: #fff;
  transform: translateY(-1px);
}

.refresh svg,
.toolbar button svg,
.panel-head button svg {
  width: 15px;
  height: 15px;
}

.refresh.loading svg {
  animation: spin 0.8s linear infinite;
}

.menu-toggle {
  display: none;
}

.content {
  max-width: 1600px;
  min-width: 0;
  margin: 0 auto;
  padding-top: 28px;
}

.content > * {
  animation: reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.content-loading,
.empty {
  display: grid;
  min-height: 240px;
  color: var(--muted);
  place-items: center;
  text-align: center;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loader {
  width: 17px;
  height: 17px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--vermillion);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* Dashboard */

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-sm);
}

.stat:last-child {
  color: #f4f6f2;
  border-color: var(--forest-800);
  background:
    radial-gradient(circle at 90% 15%, rgba(198, 73, 53, 0.3), transparent 33%),
    var(--forest-800);
}

.stat::after {
  position: absolute;
  right: -28px;
  bottom: -46px;
  width: 94px;
  height: 94px;
  border: 1px solid rgba(20, 32, 30, 0.06);
  border-radius: 50%;
  content: "";
}

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid #dcd6ca;
  border-radius: 50%;
  color: var(--jade);
  background: #f7f4ed;
  place-items: center;
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.stat small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stat b {
  display: block;
  margin-top: 17px;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 39px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted-light);
  font-size: 10px;
}

.stat-note::before {
  width: 13px;
  height: 1px;
  background: currentColor;
  content: "";
}

.stat.accent .stat-icon {
  color: var(--vermillion);
  background: var(--vermillion-soft);
}

.stat.warning .stat-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.stat.dark small,
.stat.dark .stat-note {
  color: rgba(244, 246, 242, 0.58);
}

.stat.dark .stat-icon {
  border-color: rgba(255, 255, 255, 0.14);
  color: #ef9582;
  background: rgba(255, 255, 255, 0.07);
}

.stat.dark::after {
  border-color: rgba(255, 255, 255, 0.08);
}

.dashboard-grid {
  display: grid;
  margin-top: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 16px;
}

.command-panel,
.security-card {
  min-height: 240px;
}

.reminder-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recent-item {
  position: relative;
  min-width: 0;
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.recent-item:last-child {
  border-right: 0;
}

.recent-item .item-index {
  display: block;
  margin-bottom: 22px;
  color: var(--vermillion);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.recent-item b {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
}

.recent-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.security-card {
  position: relative;
  overflow: hidden;
  padding: 25px;
  color: #f0f4ef;
  border-radius: var(--radius-md);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(207, 105, 84, 0.24),
      transparent 32%
    ),
    var(--forest-800);
  box-shadow: var(--shadow-sm);
}

.security-card::after {
  position: absolute;
  right: -30px;
  bottom: -28px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  content: "";
  transform: rotate(22deg);
}

.security-card > svg {
  width: 31px;
  height: 31px;
  color: #e58a77;
}

.security-card h3 {
  margin: 28px 0 8px;
  font-family: var(--font-display);
  font-size: 21px;
}

.security-card p {
  margin: 0;
  color: rgba(240, 244, 239, 0.58);
  font-size: 11px;
  line-height: 1.9;
}

.security-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(240, 244, 239, 0.72);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.security-tag::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #61ae91;
  content: "";
}

/* Panels, tables, forms */

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.panel + .panel,
.hint + .panel {
  margin-top: 16px;
}

.panel-head {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  min-width: 0;
}

.panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.panel-head button,
.toolbar button {
  border-color: var(--forest-800);
  color: #fff;
  background: var(--forest-800);
}

.panel-head button:hover,
.toolbar button:hover {
  border-color: var(--forest-950);
  color: #fff;
  background: var(--forest-950);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.48);
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 180px;
  margin: 0;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: rgba(244, 240, 231, 0.52);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

td {
  color: var(--ink-soft);
  font-size: 12px;
}

td:first-child,
th:first-child {
  padding-left: 22px;
}

td:last-child,
th:last-child {
  padding-right: 22px;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: rgba(244, 240, 231, 0.54);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td small {
  color: var(--muted-light);
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid #e2d5bd;
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.badge.green {
  color: var(--jade);
  border-color: #cbe0d6;
  background: var(--jade-soft);
}

.badge.red {
  color: var(--red);
  border-color: #eccbc7;
  background: var(--red-soft);
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.actions button,
.section-editor > button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.actions button:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.actions .danger,
.danger {
  color: var(--red);
}

.actions .danger:hover,
.danger:hover {
  border-color: #dfb4af;
  background: var(--red-soft);
}

.actions .success-btn,
.success-btn {
  color: var(--jade);
}

.actions .success-btn:hover,
.success-btn:hover {
  border-color: #afd0c3;
  background: var(--jade-soft);
}

.empty {
  min-height: 210px;
  padding: 44px 20px !important;
  color: var(--muted-light);
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-state svg {
  width: 16px;
  height: 16px;
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #d9d2c5;
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  color: #645844;
  background: #f8f1e3;
  font-size: 11px;
  line-height: 1.8;
}

.hint svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 1px;
  color: var(--amber);
}

.setting-grid {
  display: grid;
  padding: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.setting-grid .full,
.form-grid .full {
  grid-column: 1 / -1;
}

.setting-grid .form-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 2px;
  padding: 16px 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
}

.setting-grid .form-section::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.setting-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.setting-actions .primary {
  width: auto;
  min-width: 142px;
}

/* Modal */

.modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 32px 20px;
  background: rgba(7, 17, 15, 0.66);
  backdrop-filter: blur(6px);
  place-items: center;
}

.modal-box {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(20, 32, 30, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 30, 0.018) 1px, transparent 1px),
    var(--surface);
  background-size: 24px 24px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-box h3 {
  margin: 0 44px 22px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.3;
}

.modal-box > p {
  color: var(--ink-soft);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.modal-actions button {
  width: auto;
  min-width: 92px;
}

.section-editor {
  position: relative;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(244, 240, 231, 0.44);
}

.section-editor::before {
  position: absolute;
  top: 0;
  left: 16px;
  width: 30px;
  height: 2px;
  background: var(--vermillion);
  content: "";
}

.section-editor textarea {
  min-height: 92px;
}

.attachment-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.attachment-view img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-deep);
}

.detail-grid {
  display: grid;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-grid > div:nth-child(2n) {
  border-right: 0;
}

.detail-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-grid small,
.detail-grid b {
  display: block;
}

.detail-grid small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.detail-grid b {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  max-width: min(380px, calc(100vw - 32px));
  align-items: center;
  gap: 9px;
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f2f6f2;
  background: var(--forest-800);
  box-shadow: 0 18px 45px rgba(7, 17, 15, 0.24);
  font-size: 11px;
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #6fc39f;
  content: "";
}

/* Motion */

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@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;
  }
}

/* Responsive */

@media (max-width: 1220px) {
  :root {
    --sidebar-width: 246px;
  }

  .workspace {
    padding-inline: 28px;
  }

  .stat {
    grid-column: auto;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat:last-child {
    grid-column: span 2;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .security-card {
    min-height: auto;
  }
}

@media (max-width: 960px) {
  body.scroll-locked-mobile {
    overflow: hidden;
  }

  .login-screen {
    grid-template-columns: minmax(340px, 0.82fr) minmax(390px, 1.18fr);
  }

  .login-visual {
    padding: 34px;
  }

  .login-statement h1 {
    font-size: clamp(40px, 5vw, 58px);
  }

  .login-trust {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .login-trust > div:last-child {
    display: none;
  }

  .login-main {
    padding: 34px;
  }

  .sidebar {
    width: min(286px, 84vw);
    transform: translateX(-102%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .workspace {
    margin-left: 0;
    padding-inline: 24px;
  }

  .topbar {
    min-height: 120px;
    padding-left: 54px;
  }

  .menu-toggle {
    position: absolute;
    top: 39px;
    left: 0;
    display: inline-grid;
  }

  .today {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    background-size: 22px 22px;
  }

  .login-screen {
    display: block;
    background: var(--paper);
  }

  .login-visual {
    display: none;
  }

  .login-main {
    min-height: 100svh;
    padding: 30px 22px;
  }

  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 52px;
  }

  .login-mobile-brand .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 20px;
  }

  .login-mobile-brand b {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 0.08em;
  }

  .login-status {
    margin-bottom: 18px;
  }

  .login-panel h2 {
    font-size: 34px;
  }

  .workspace {
    padding: 0 16px 36px;
  }

  .topbar {
    min-height: 112px;
    gap: 12px;
    padding: 21px 0 20px 48px;
  }

  .menu-toggle {
    top: 28px;
  }

  .page-heading h2 {
    font-size: 28px;
  }

  .page-heading > p:last-child {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-heading .eyebrow {
    display: none;
  }

  .header-actions {
    align-self: flex-start;
    padding-top: 7px;
  }

  .refresh {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
  }

  .refresh span {
    display: none;
  }

  .content {
    padding-top: 18px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat,
  .stat:first-child,
  .stat:nth-child(2),
  .stat:nth-child(3),
  .stat:nth-child(4),
  .stat:last-child {
    min-height: 136px;
    padding: 17px;
    grid-column: span 1;
  }

  .stat:last-child {
    grid-column: 1 / -1;
  }

  .stat b {
    margin-top: 14px;
    font-size: 27px;
  }

  .stat-note {
    overflow: hidden;
    margin-top: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-grid {
    margin-top: 10px;
    gap: 10px;
  }

  .reminder-list {
    grid-template-columns: 1fr;
  }

  .recent-item {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .recent-item:last-child {
    border-bottom: 0;
  }

  .recent-item .item-index {
    margin-bottom: 11px;
  }

  .panel + .panel,
  .hint + .panel {
    margin-top: 10px;
  }

  .panel-head {
    min-height: 64px;
    padding: 14px 15px;
  }

  .panel-head p {
    display: none;
  }

  .toolbar {
    overflow-x: auto;
    padding: 11px 14px;
  }

  th,
  td {
    padding: 13px 14px;
  }

  td:first-child,
  th:first-child {
    padding-left: 16px;
  }

  td:last-child,
  th:last-child {
    padding-right: 16px;
  }

  .setting-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .setting-grid {
    padding: 16px;
  }

  .setting-grid .full,
  .form-grid .full {
    grid-column: auto;
  }

  .setting-actions {
    justify-content: stretch;
  }

  .setting-actions .primary {
    width: 100%;
  }

  .modal {
    align-items: end;
    padding: 16px 0 0;
  }

  .modal-box {
    width: 100%;
    max-height: calc(100svh - 16px);
    padding: 24px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }

  .modal-close {
    top: 16px;
    right: 16px;
  }

  .attachment-view,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid > div,
  .detail-grid > div:nth-child(2n),
  .detail-grid > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-grid > div:last-child {
    border-bottom: 0;
  }

  .toast {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
  }
}

@media (max-width: 390px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .stat,
  .stat:first-child,
  .stat:nth-child(2),
  .stat:nth-child(3),
  .stat:nth-child(4),
  .stat:last-child {
    min-height: 124px;
    grid-column: 1;
  }

  .page-heading > p:last-child {
    max-width: 175px;
  }
}
