:root {
  --bg: #ffffff;
  --bg-muted: #f3f2f1;
  --ink: #242424;
  --ink-soft: #424242;
  --muted: #616161;
  --line: #edebe9;
  --line-strong: #d1d1d1;
  --primary: #0078d4;
  --primary-hover: #106ebe;
  --primary-soft: #deecf9;
  --primary-ink: #ffffff;
  --warn: #d13438;
  --warn-bg: #fde7e9;
  --ok: #107c10;
  --ok-bg: #dff6dd;
  --sidebar: #f3f2f1;
  --sidebar-w: 260px;
  --card: #ffffff;
  --radius: 4px;
  --radius-sm: 4px;
  --font: "Segoe UI", "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  --owa-rail: 220px;
  --owa-list: 360px;
  --owa-selected: #c7e0f4;
  --owa-hover: #f5f5f5;
  --owa-topbar-h: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.atmosphere { display: none; }

/* —— Login (Microsoft-style) —— */
body.is-guest {
  background:
    radial-gradient(1200px 600px at 10% -10%, #cce4f7 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e8f3fc 0%, transparent 50%),
    #f3f2f1;
}

body.is-guest .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.ms-login {
  width: min(440px, calc(100% - 32px));
}

.ms-login-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 36px 40px 40px;
}

.ms-login-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.ms-login-card h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ms-login-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-hover);
}

.btn-block {
  width: 100%;
}

.btn-small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  background: var(--bg-muted);
}

.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn);
}

.success {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  color: var(--ok);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

/* ——— Authed shell ——— */
body.is-authed .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body.is-authed .topbar,
body.is-authed .site-foot,
body.is-authed > .shell > .main.reveal {
  /* admin uses its own layout; webmail keeps simple topbar */
}

body.is-authed:not(.is-admin) .shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

body.is-authed:not(.is-admin) .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

body.is-authed.is-admin .topbar,
body.is-authed.is-admin .site-foot {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav-email {
  color: var(--muted);
  font-size: 0.9rem;
}

.inline {
  display: inline;
  margin: 0;
}

.linkish {
  border: none;
  background: none;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.linkish.danger {
  color: var(--warn);
}

/* —— Mailbox Outlook shell —— */
body.is-mailbox {
  background: #fff;
  overflow: hidden;
  height: 100vh;
}

body.is-mailbox .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.is-admin .owa-topbar,
body.is-admin .owa-body {
  display: none;
}

.owa-topbar {
  height: var(--owa-topbar-h);
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: var(--owa-rail) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  z-index: 5;
}

.owa-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  padding-left: 8px;
  font-weight: 600;
  font-size: 1rem;
}
.owa-brand:hover { text-decoration: none; }
.owa-brand-icon { display: grid; place-items: center; }
.owa-brand-text { letter-spacing: -0.01em; }

.owa-search {
  position: relative;
  max-width: 560px;
  width: 100%;
  justify-self: center;
}
.owa-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.owa-search input {
  width: 100%;
  min-height: 34px;
  padding: 6px 12px 6px 36px;
  border: none;
  border-radius: 4px;
  background: #f3f2f1;
  font: inherit;
}
.owa-search input:focus {
  outline: 2px solid var(--primary);
  background: #fff;
}

.owa-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}
.owa-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.owa-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0078d4;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 0 0 auto;
}
.owa-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owa-ghost-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.owa-ghost-btn:hover {
  background: var(--owa-hover);
  text-decoration: none;
  color: var(--ink);
}

.owa-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--owa-rail) minmax(0, 1fr);
}

.owa-rail {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 12px 10px;
  overflow: auto;
}
.owa-compose {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0 6px 14px;
  border-radius: 20px;
  background: #c7e0f4;
  color: #004578;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.owa-compose.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}
.owa-compose-page {
  padding: 24px 28px 40px;
  max-width: 760px;
}
.owa-compose-page h1 {
  margin: 0 0 18px;
  font-size: 1.25rem;
  font-weight: 600;
}
.owa-compose-form {
  display: grid;
  gap: 14px;
}
.owa-compose-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}
.owa-compose-form input,
.owa-compose-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.owa-compose-form textarea { resize: vertical; min-height: 220px; }
.owa-compose-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.owa-send-btn {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.owa-send-btn:hover { background: var(--primary-hover); }
.owa-flash { margin: 0 0 14px; padding: 10px 12px; border-radius: 4px; }
.owa-flash-ok { background: var(--ok-bg); color: var(--ok); }
.owa-flash-err { background: var(--warn-bg); color: var(--warn); }
.owa-compose:hover { text-decoration: none; }

.owa-folders { display: flex; flex-direction: column; gap: 2px; }
.owa-folder {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}
.owa-folder:hover { background: #eaeaea; text-decoration: none; }
.owa-folder.is-active {
  background: #e0e0e0;
  font-weight: 600;
}
.owa-folder-icon { display: grid; place-items: center; color: var(--ink-soft); }
.owa-folder-count {
  min-width: 1.4em;
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 600;
}

.owa-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.owa-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--owa-list) minmax(0, 1fr);
}

.owa-list-pane {
  min-height: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #fff;
}
.owa-list-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.owa-list-title h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}
.owa-list-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.owa-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  text-decoration: none;
}
.owa-icon-btn:hover { background: var(--owa-hover); text-decoration: none; color: var(--ink); }

.owa-mail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.owa-mail-item a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.owa-mail-item a:hover { background: var(--owa-hover); text-decoration: none; }
.owa-mail-item.is-selected a {
  background: var(--owa-selected);
}
.owa-mail-item.is-unread .owa-from,
.owa-mail-item.is-unread .owa-subject {
  font-weight: 700;
  color: #000;
}
.owa-mail-item.is-read .owa-from,
.owa-mail-item.is-read .owa-subject {
  font-weight: 400;
  color: var(--ink-soft);
}

.owa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #5c2d91;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 2px;
}
.owa-avatar.lg {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.owa-mail-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.owa-mail-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.owa-from {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}
.owa-time {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.owa-subject {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}
.owa-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex: 0 0 auto;
}
.owa-preview {
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owa-empty,
.owa-reading-placeholder {
  flex: 1;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  padding: 32px;
  color: var(--muted);
}
.owa-empty h2,
.owa-reading-placeholder h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
}
.owa-empty p,
.owa-reading-placeholder p { margin: 0; font-size: 0.9rem; }

.owa-reading-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.owa-reading-empty { background: #faf9f8; }
.owa-reading-toolbar {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.owa-message {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 24px 28px;
}
.owa-message-head h1 {
  margin: 12px 0 18px;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
}
.owa-message-meta {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}
.owa-message-from {
  font-weight: 600;
  font-size: 0.95rem;
}
.owa-message-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
  word-break: break-all;
}
.owa-message-time {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.owa-attachments {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #faf9f8;
}
.owa-attachments h2 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
.owa-attachments ul {
  margin: 0;
  padding-left: 18px;
}
.owa-message-body { min-height: 240px; }
.owa-html-frame {
  width: 100%;
  min-height: 55vh;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.owa-text-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.55;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #faf9f8;
}

body.is-authed.is-admin .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.main { padding: 0; }

@media (max-width: 1100px) {
  :root { --owa-list: 300px; --owa-rail: 190px; }
}
@media (max-width: 860px) {
  .owa-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .owa-body { grid-template-columns: 1fr; }
  .owa-rail { display: none; }
  .owa-stage { grid-template-columns: 1fr; }
  .owa-list-pane { max-height: 42vh; }
  .owa-user-email { display: none; }
}

/* ——— Admin app shell ——— */
.admin-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.admin-brand:hover {
  text-decoration: none;
}

.admin-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2b7fff, #60a5fa);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-brand small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

.side-section {
  margin-top: 8px;
  padding: 0 10px 6px;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: none;
}

.admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
}

.admin-side-nav a:hover {
  background: #f4f4f5;
  text-decoration: none;
}

.admin-side-nav a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.admin-side-foot {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
}

.admin-user {
  font-size: 0.9rem;
}

.admin-user strong {
  display: block;
}

.admin-main {
  min-width: 0;
  padding: 20px 28px 40px;
  background: #fff;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
}

.page-head p {
  margin: 6px 0 0;
}

.crumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.usage-bar {
  margin-top: 10px;
  height: 6px;
  border-radius: 99px;
  background: #f4f4f5;
  overflow: hidden;
}

.usage-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.usage-bar.is-full > span {
  background: #f59e0b;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
  margin-bottom: 16px;
}

.create-box,
.user-list-wrap,
.recent-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.create-box h2,
.user-list-wrap h2,
.recent-wrap h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.email-compose {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-compose input {
  flex: 1;
}

.email-compose select {
  width: auto;
  min-width: 160px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}

.filter-bar input,
.filter-bar select {
  width: auto;
  min-width: 160px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-weight: 500;
  background: #fafafa;
  font-size: 0.85rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr.unread-row td {
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge-admin {
  background: var(--primary-soft);
  color: var(--primary);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.tiny {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-list,
.recent-list,
.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.daily-list li,
.recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.recent-list li:last-child,
.daily-list li:last-child {
  border-bottom: none;
}

.recent-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recent-subject {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.time {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.pager {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 180px;
  padding-top: 8px;
}

.chart-bars .bar {
  flex: 1;
  min-width: 0;
  background: rgba(43, 127, 255, 0.75);
  border-radius: 3px 3px 0 0;
  position: relative;
}

.chart-bars .bar span {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}

.docs-block {
  margin-bottom: 22px;
}

.docs-block h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.docs-block pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #0b1220;
  color: #e5eefc;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .stat-grid,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .stat-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 16px;
  }
}
