:root {

 --brand: #6b9080;
 --brand-hover: #4f7669;
 --brand-soft: rgba(107, 144, 128, 0.12);
 --brand-soft-2: rgba(107, 144, 128, 0.06);

 --accent: #6b9080;
 --success: #6b9080;
 --warning: #b78168;
 --danger: #c47558;
 --info: #6f94b8;

 --bg: #f6f1e7;
 --bg-elevated: #fffdf7;
 --bg-sidebar: #eef4ef;
 --bg-hover: #e8eee6;
 --bg-active: var(--brand-soft);
 --bg-input: #fffdf7;
 --bg-code: #eef4ef;

 --text: #30312d;
 --text-secondary: #697065;
 --text-muted: #9a9e94;
 --text-on-brand: #fffdf7;

 --border: rgba(108, 120, 98, 0.18);
 --border-light: rgba(108, 120, 98, 0.10);
 --border-strong: rgba(107, 144, 128, 0.36);

 --shadow-sm: 0 1px 2px rgba(60, 70, 50, 0.04);
 --shadow: 0 1px 3px rgba(60, 70, 50, 0.06);
 --shadow-md: 0 2px 8px rgba(60, 70, 50, 0.08);
 --shadow-lg: 0 6px 20px rgba(60, 70, 50, 0.10);

 --radius-sm: 8px;
 --radius: 10px;
 --radius-lg: 14px;
 --radius-xl: 18px;

 --sidebar-w: 248px;
 --sidebar-w-collapsed: 72px;
 --header-h: 60px;

 --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
 "Microsoft YaHei", "Helvetica Neue", sans-serif;
 --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

 --serif: "Noto Serif SC", Georgia, "Times New Roman", serif;

 --ink: var(--text);
 --ink-soft: var(--text-secondary);
 --ink-muted: var(--text-muted);

 --line: var(--border-light);
 --line-strong: var(--border-strong);

 --sage-soft: var(--brand-soft);

 --pb-echo: #5a7a52;
 --pb-echo-soft: rgba(90, 122, 82, 0.10);
 --pb-lit: #c89a4a;
 --pb-lit-soft: rgba(200, 154, 74, 0.12);
 --pb-fold: #4a647a;
 --pb-fold-soft: rgba(74, 100, 122, 0.10);
 --pb-burn: #b65a45;
 --pb-burn-soft: rgba(182, 90, 69, 0.12);

 --pb-state-on: #5a7a52;
 --pb-state-pause: #9a9e94;
 --pb-state-off: #b65a45;

 --pb-paper: #fdfaf2;
 --pb-paper-2: #f7f1e2;
 --pb-paper-3: #f0e8d2;
 --pb-paper-4: #e9dfc4;
 --pb-folding: rgba(108, 120, 98, 0.16);
 --pb-folding-2: rgba(108, 120, 98, 0.08);
}

[data-theme="dark"], body.dark-mode {
 color-scheme: dark;
 --brand: #8db9a3;
 --brand-hover: #9fc9b3;
 --brand-soft: rgba(141, 185, 163, 0.15);
 --brand-soft-2: rgba(141, 185, 163, 0.08);

 --accent: #8db9a3;
 --success: #8db9a3;
 --warning: #c4956a;
 --danger: #c47558;
 --info: #6f94b8;

 --bg: #1a1c19;
 --bg-elevated: #232622;
 --bg-sidebar: #1d1f1c;
 --bg-hover: #2b2e28;
 --bg-active: var(--brand-soft);
 --bg-input: #232622;
 --bg-code: #2b2e28;

 --text: #e0ddd5;
 --text-secondary: #a8aaa3;
 --text-muted: #8a8d83;
 --text-on-brand: #1a1c19;

 --border: rgba(108, 120, 98, 0.22);
 --border-light: rgba(108, 120, 98, 0.12);
 --border-strong: rgba(141, 185, 163, 0.35);

 --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.20);
 --shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
 --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.28);
 --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.32);
}

:root { color-scheme: light; }

[data-theme="dark"] body,
body.dark-mode {
 background-image:
 radial-gradient(circle at 20% 30%, rgba(141, 185, 163, 0.05) 0%, transparent 50%),
 radial-gradient(circle at 80% 70%, rgba(196, 149, 106, 0.04) 0%, transparent 50%);
}

*, *::before, *::after { box-sizing: border-box; }

html {
 margin: 0;
 padding: 0;
 font-size: 15px;
 -webkit-font-smoothing: antialiased;
 -moz-osx-font-smoothing: grayscale;
}

body {
 margin: 0;
 padding: 0;
 background: var(--bg);
 background-image:
 radial-gradient(circle at 20% 30%, rgba(107, 144, 128, 0.03) 0%, transparent 50%),
 radial-gradient(circle at 80% 70%, rgba(183, 129, 104, 0.02) 0%, transparent 50%);
 color: var(--text);
 font-family: var(--font);
 line-height: 1.65;
 min-height: 100vh;
 transition: background 0.3s ease, color 0.3s ease;
 letter-spacing: 0.01em;
}

a { color: var(--brand); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-hover); }

button, input, textarea, select {
 font-family: inherit;
 font-size: inherit;
 color: inherit;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
 background: rgba(107, 144, 128, 0.28);
 border-radius: 3px;
 transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(107, 144, 128, 0.45); }

* {
 scrollbar-width: thin;
 scrollbar-color: rgba(107, 144, 128, 0.28) transparent;
}

.app-shell {
 display: grid;
 grid-template-columns: var(--sidebar-w) 1fr;
 grid-template-rows: var(--header-h) 1fr;
 grid-template-areas:
 "sidebar header"
 "sidebar main";
 min-height: 100vh;
 transition: grid-template-columns 0.25s ease;
}

.app-shell.sidebar-collapsed {
 grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}

.sidebar {
 grid-area: sidebar;
 background: var(--bg-sidebar);
 border-right: 1px solid var(--border);
 display: flex;
 flex-direction: column;
 position: sticky;
 top: 0;
 height: 100vh;
 overflow-y: auto;
 overflow-x: hidden;
 transition: transform 0.25s ease, width 0.25s ease, box-shadow 0.25s ease;
 z-index: 40;
}

.sidebar-brand {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 18px 20px;
 border-bottom: 1px solid var(--border-light);
 height: var(--header-h);
 flex-shrink: 0;
}

.sidebar-brand-icon {
 width: 32px;
 height: 32px;
 border-radius: 7px;
 background: var(--brand);
 display: flex;
 align-items: center;
 justify-content: center;
 color: var(--text-on-brand);
 font-weight: 700;
 font-size: 15px;
 flex-shrink: 0;
 box-shadow: 0 1px 2px rgba(120, 100, 80, 0.12);
}

.sidebar-brand-text {
 font-weight: 600;
 font-size: 15px;
 color: var(--text);
 white-space: nowrap;
 overflow: hidden;
}

.sidebar-brand-text small {
 display: block;
 font-size: 11px;
 font-weight: 400;
 color: var(--text-muted);
 margin-top: 1px;
}

.sidebar-nav {
 flex: 1;
 padding: 12px 10px;
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.sidebar-section {
 font-size: 11px;
 font-weight: 600;
 color: var(--text-muted);
 text-transform: uppercase;
 letter-spacing: 0.1em;
 padding: 14px 12px 6px;
 white-space: nowrap;
 overflow: hidden;
}

.sidebar-item {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 9px 12px;
 border-radius: var(--radius-sm);
 color: var(--text-secondary);
 cursor: pointer;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 white-space: nowrap;
 border: none;
 background: transparent;
 width: 100%;
 text-align: left;
 font-size: 14px;
}

.sidebar-item:hover {
 background: var(--bg-hover);
 color: var(--text);
}

.sidebar-item.active {
 background: var(--bg-active);
 color: var(--brand);
 font-weight: 500;
 position: relative;
}

.sidebar-item.active::before {
 content: '';
 position: absolute;
 left: 0;
 top: 50%;
 transform: translateY(-50%);
 width: 3px;
 height: 60%;
 background: var(--brand);
 border-radius: 0 2px 2px 0;
}

.sidebar-item-icon {
 width: 18px;
 height: 18px;
 flex-shrink: 0;
 display: flex;
 align-items: center;
 justify-content: center;
}

.sidebar-item-icon svg {
 width: 18px;
 height: 18px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.8;
}

.sidebar-item-label {
 flex: 1;
 overflow: hidden;
 text-overflow: ellipsis;
}

.sidebar-item-badge {
 background: var(--danger);
 color: #fff;
 font-size: 10px;
 font-weight: 600;
 padding: 1px 6px;
 border-radius: 10px;
 min-width: 18px;
 text-align: center;
}

.sidebar-footer {
 padding: 12px 10px;
 border-top: 1px solid var(--border-light);
 flex-shrink: 0;
}

.sidebar-user {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 8px 12px;
 border-radius: var(--radius-sm);
 cursor: pointer;
 transition: background 0.15s;
}

.sidebar-user:hover { background: var(--bg-hover); }

.sidebar-user-avatar {
 width: 30px;
 height: 30px;
 border-radius: 50%;
 background: var(--brand);
 color: var(--text-on-brand);
 display: flex;
 align-items: center;
 justify-content: center;
 font-weight: 600;
 font-size: 13px;
 flex-shrink: 0;
}

.sidebar-user-info {
 flex: 1;
 overflow: hidden;
}

.sidebar-user-name {
 font-size: 13px;
 font-weight: 500;
 color: var(--text);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.sidebar-user-role {
 font-size: 11px;
 color: var(--text-muted);
}

.sidebar-collapsed .sidebar-brand-text,
.sidebar-collapsed .sidebar-item-label,
.sidebar-collapsed .sidebar-item-badge,
.sidebar-collapsed .sidebar-section,
.sidebar-collapsed .sidebar-user-info {
 opacity: 0;
 width: 0;
 visibility: hidden;
}

.sidebar-collapsed .sidebar-item {
 justify-content: center;
 padding: 9px;
}

.sidebar-collapsed .sidebar-user {
 justify-content: center;
}

.header {
 grid-area: header;
 background: var(--bg-elevated);
 border-bottom: 1px solid var(--border);
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 0 24px;
 position: sticky;
 top: 0;
 z-index: 30;
}

.header-left {
 display: flex;
 align-items: center;
 gap: 14px;
}

.header-toggle {
 width: 34px;
 height: 34px;
 border-radius: var(--radius-sm);
 border: 1px solid var(--border);
 background: var(--bg-elevated);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 color: var(--text-secondary);
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-toggle:hover {
 background: var(--bg-hover);
 color: var(--text);
}

.header-toggle svg {
 width: 18px;
 height: 18px;
 stroke: currentColor;
 fill: none;
 stroke-width: 2;
}

.header-breadcrumb {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: 14px;
 color: var(--text-secondary);
}

.header-breadcrumb-current {
 color: var(--text);
 font-weight: 500;
}

.header-right {
 display: flex;
 align-items: center;
 gap: 8px;
}

.header-action {
 width: 34px;
 height: 34px;
 border-radius: var(--radius-sm);
 border: 1px solid var(--border);
 background: var(--bg-elevated);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 color: var(--text-secondary);
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 position: relative;
}

.header-action:hover {
 background: var(--bg-hover);
 color: var(--text);
 border-color: var(--border-strong);
}

.header-action svg {
 width: 18px;
 height: 18px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.8;
}

.header-action-badge {
 position: absolute;
 top: -2px;
 right: -2px;
 background: var(--danger);
 color: #fff;
 font-size: 10px;
 font-weight: 600;
 padding: 1px 5px;
 border-radius: 10px;
 min-width: 16px;
 text-align: center;
 border: 2px solid var(--bg-elevated);
}

.theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

.mode-toggle {
 font-size: 0.75rem;
 letter-spacing: 1px;
 color: #2c332e;
 cursor: pointer;
 padding: 8px 20px;
 background: rgba(255, 255, 255, 0.4);
 backdrop-filter: blur(10px);
 -webkit-backdrop-filter: blur(10px);
 border: 1px solid rgba(44, 51, 46, 0.06);
 border-radius: 30px;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
 transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
 user-select: none;
 white-space: nowrap;
}
.mode-toggle:hover {
 transform: translateY(-2px);
 border-color: #2c332e;
}
[data-theme="dark"] .mode-toggle,
.dark-mode .mode-toggle {
 color: #d1d9d4;
 background: rgba(255, 255, 255, 0.03);
 border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .mode-toggle:hover,
.dark-mode .mode-toggle:hover {
 border-color: #d1d9d4;
}
@media (max-width: 640px) {
 .mode-toggle { padding: 6px 16px; font-size: 0.7rem; }
}

.main {
 grid-area: main;
 padding: 18px 24px 36px;
 overflow-x: auto;
 min-width: 0;
}

.page {
 display: none;
 animation: fadeIn 0.25s ease;
}

.page.active { display: block; }

body.admin-pre-auth .app-shell { visibility: hidden; }

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

.page-header {
 margin-bottom: 24px;
}

.page-title {
 font-size: 22px;
 font-weight: 600;
 color: var(--text);
 margin: 0 0 4px;
 letter-spacing: -0.01em;
}

.page-subtitle {
 font-size: 14px;
 color: var(--text-muted);
 margin: 0;
}

.page-body { min-height: 200px; }

.card {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 20px;
 box-shadow: var(--shadow-sm);
 transition: box-shadow 0.25s ease, border-color 0.25s ease;
 position: relative;
}

.card:hover {
 box-shadow: var(--shadow);
 border-color: var(--border-strong);
}

.card-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 16px;
 padding-bottom: 14px;
 border-bottom: 1px solid var(--border-light);
}

.card-title {
 font-size: 16px;
 font-weight: 600;
 color: var(--text);
 margin: 0;
}

.card-subtitle {
 font-size: 13px;
 color: var(--text-muted);
 margin: 2px 0 0;
}

.card-body { padding: 0; }
.card-footer {
 margin-top: 16px;
 padding-top: 14px;
 border-top: 1px solid var(--border-light);
 display: flex;
 justify-content: flex-end;
 gap: 8px;
}

.stat-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
 gap: 16px;
 margin-bottom: 24px;
}

.stat-card {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 18px 20px 16px;
 position: relative;
 overflow: hidden;
 transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
 border-color: var(--border-strong);
 box-shadow: var(--shadow);
}

.stat-card::before {
 content: '';
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 height: 2px;
 background: var(--brand);
 opacity: 0;
 transition: opacity 0.2s;
}

.stat-card:hover::before { opacity: 1; }

.stat-card-label {
 font-size: 12.5px;
 color: var(--text-muted);
 margin-bottom: 8px;
 display: flex;
 align-items: center;
 gap: 6px;
 letter-spacing: 0.02em;
}

.stat-card-value {
 font-size: 26px;
 font-weight: 500;
 color: var(--text);
 letter-spacing: -0.01em;
 line-height: 1.2;
 font-family: var(--font-mono);
 font-variant-numeric: tabular-nums;
}

.stat-card-value small {
 font-size: 14px;
 font-weight: 400;
 color: var(--text-muted);
 margin-left: 4px;
 font-family: var(--font);
 font-variant-numeric: normal;
}

.stat-card-trend {
 font-size: 12px;
 margin-top: 6px;
 display: flex;
 align-items: center;
 gap: 4px;
}

.stat-card-trend.up { color: var(--success); }
.stat-card-trend.down { color: var(--danger); }
.stat-card-trend.neutral { color: var(--text-muted); }

.stat-card-value-text {
 font-family: var(--font);
 font-size: 15px;
 font-weight: 500;
 letter-spacing: 0;
 line-height: 1.4;
 font-variant-numeric: normal;
}

.trend-bar {
 width: 100%;
 height: 6px;
 margin-top: 6px;
 border-radius: 3px;
 background: var(--bg-secondary, rgba(0, 0, 0, 0.06));
 overflow: hidden;
}

.trend-bar-fill {
 height: 100%;
 border-radius: 3px;
 background: var(--brand, #4f6d7a);
 transition: width 0.6s ease;
}

.stat-card-icon {
 position: absolute;
 top: 16px;
 right: 16px;
 width: 36px;
 height: 36px;
 border-radius: var(--radius-sm);
 background: var(--brand-soft);
 color: var(--brand);
 display: flex;
 align-items: center;
 justify-content: center;
}

.stat-card-icon svg {
 width: 20px;
 height: 20px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.8;
}

.btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 padding: 8px 16px;
 border-radius: var(--radius-sm);
 border: 1px solid transparent;
 background: var(--brand);
 color: var(--text-on-brand);
 font-size: 14px;
 font-weight: 500;
 cursor: pointer;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 white-space: nowrap;
 line-height: 1.4;
 position: relative;
 overflow: hidden;
 box-shadow: 0 1px 2px rgba(120, 100, 80, 0.08);
}

.btn:hover {
 background: var(--brand-hover);
 border-color: var(--brand-hover);
}

.btn:active { transform: translateY(1px) scale(0.98); }

.btn:disabled {
 opacity: 0.5;
 cursor: not-allowed;
 transform: none;
}

.btn svg {
 width: 16px;
 height: 16px;
 stroke: currentColor;
 fill: none;
 stroke-width: 2;
}

.btn-secondary {
 background: var(--bg-elevated);
 color: var(--text);
 border-color: var(--border);
}

.btn-secondary:hover {
 background: var(--bg-hover);
 border-color: var(--border-strong);
}

.btn-ghost {
 background: transparent;
 color: var(--text-secondary);
 border-color: transparent;
 box-shadow: none;
}

.btn-ghost:hover {
 background: var(--bg-hover);
 color: var(--text);
}

.btn-ghost.is-danger {
 color: var(--danger);
 border-color: var(--danger);
 background: transparent;
}
.btn-ghost.is-danger:hover {
 background: var(--danger);
 border-color: var(--danger);
 color: #fffdf7;
}

.btn-success {
 background: var(--success);
 color: #fff;
}

.btn-success:hover {
 background: #6a7a4d;
}

.btn-sm {
 padding: 5px 10px;
 font-size: 13px;
}

.btn-lg {
 padding: 11px 22px;
 font-size: 15px;
}

.btn-icon {
 width: 32px;
 height: 32px;
 padding: 0;
}

.btn-block { width: 100%; }

.form-group {
 margin-bottom: 16px;
}

.form-label {
 display: block;
 font-size: 13px;
 font-weight: 500;
 color: var(--text);
 margin-bottom: 6px;
}

.form-label .form-em {
 display: block;
 margin-top: 2px;
 font-style: normal;
 color: var(--text-muted, #888);
 font-size: 11.5px;
 font-weight: 400;
 letter-spacing: 0.02em;
 line-height: 1.5;
}

.form-label .required {
 color: var(--danger);
 margin-left: 2px;
}

.form-hint {
 font-size: 12px;
 color: var(--text-muted);
 margin-top: 4px;
}

.form-input,
.form-textarea,
.form-select {
 width: 100%;
 padding: 9px 12px;
 border: 1px solid var(--border);
 border-radius: var(--radius-sm);
 background: var(--bg-input);
 color: var(--text);
 font-size: 14px;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
 border-color: var(--brand);
 box-shadow: 0 0 0 3px var(--brand-soft-2);
}

.form-input::placeholder,
.form-textarea::placeholder {
 color: var(--text-muted);
}

.form-textarea {
 resize: vertical;
 min-height: 80px;
 font-family: inherit;
}

.form-select {
 appearance: none;
 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a89a8e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
 background-repeat: no-repeat;
 background-position: right 12px center;
 padding-right: 32px;
}

.form-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
 gap: 14px;
}

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

.form-row {
 display: flex;
 gap: 12px;
 align-items: flex-end;
}

.table-wrap {
 overflow-x: auto;
 border-radius: var(--radius);
 border: 1px solid var(--border);
 background: var(--bg-elevated);
}

.table,
.data-table {
 width: 100%;
 border-collapse: collapse;
 font-size: 14px;
}

.data-table,
.table th {
 text-align: left;
 padding: 12px 14px;
 background: var(--brand-soft);
 color: var(--text-secondary);
 font-weight: 600;
 font-size: 12px;
 letter-spacing: 0.04em;
 border-bottom: 1px solid var(--border);
 white-space: nowrap;
}

.data-table td,
.table td {
 padding: 11px 14px;
 border-bottom: 1px solid var(--border-light);
 color: var(--text);
 vertical-align: top;
}

.table tr:last-child td,
.data-table tr:last-child td { border-bottom: none; }

.table tr:nth-child(even) td,
.data-table tr:nth-child(even) td { background: var(--bg-sidebar); }
.table tr:nth-child(even):hover td,
.data-table tr:nth-child(even):hover td { background: var(--bg-hover); }

.table tr:hover td,
.data-table tr:hover td { background: var(--bg-hover); cursor: default; }

.data-table tr.is-clickable { cursor: pointer; }

.badge {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 2px 8px;
 border-radius: 10px;
 font-size: 12px;
 font-weight: 500;
 background: var(--brand-soft);
 color: var(--brand);
}

.badge-success { background: rgba(122, 140, 90, 0.12); color: var(--success); }
.badge-warning { background: rgba(184, 146, 74, 0.12); color: var(--warning); }
.badge-danger { background: rgba(168, 101, 74, 0.12); color: var(--danger); }
.badge-neutral { background: var(--bg-hover); color: var(--text-secondary); }
.badge-info { background: rgba(111, 148, 184, 0.12); color: var(--accent, #6f94b8); }

.badge-dot {
 width: 6px;
 height: 6px;
 border-radius: 50%;
 background: currentColor;
}

.toast-container {
 position: fixed;
 top: 20px;
 right: 20px;
 z-index: 9999;
 display: flex;
 flex-direction: column;
 gap: 8px;
 pointer-events: none;
}

.toast {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 12px 16px;
 box-shadow: var(--shadow-lg);
 display: flex;
 align-items: center;
 gap: 10px;
 min-width: 280px;
 max-width: 400px;
 pointer-events: auto;
 animation: toastIn 0.25s ease;
 font-size: 14px;
 position: relative;
 overflow: hidden;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }

.toast-icon {
 width: 18px;
 height: 18px;
 flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

@keyframes toastIn {
 from { opacity: 0; transform: translateX(20px); }
 to { opacity: 1; transform: translateX(0); }
}

.toast.hide {
 animation: toastOut 0.2s ease forwards;
}

@keyframes toastOut {
 to { opacity: 0; transform: translateX(20px); }
}

.spinner {
 width: 18px;
 height: 18px;
 border: 2px solid var(--border);
 border-top-color: var(--brand);
 border-radius: 50%;
 animation: spin 0.7s linear infinite;
 display: inline-block;
}

.spinner-lg {
 width: 32px;
 height: 32px;
 border-width: 3px;
}

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

.loading-state {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 48px;
 gap: 12px;
 color: var(--text-muted);
 font-size: 14px;
}

.empty-state {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 48px 24px;
 gap: 8px;
 color: var(--text-muted);
 text-align: center;
}

.empty-state-icon {
 width: 48px;
 height: 48px;
 color: var(--border-strong);
 margin-bottom: 4px;
}

.empty-state-icon svg {
 width: 48px;
 height: 48px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.5;
}

.empty-state-title {
 font-size: 15px;
 font-weight: 500;
 color: var(--text-secondary);
}

.empty-state-desc {
 font-size: 13px;
 color: var(--text-muted);
}

.toolbar {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 margin-bottom: 16px;
 flex-wrap: wrap;
}

.toolbar-left {
 display: flex;
 align-items: center;
 gap: 12px;
 flex-wrap: wrap;
}

.toolbar-right {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}

.search-box {
 position: relative;
 display: flex;
 align-items: center;
}

.search-box svg {
 position: absolute;
 left: 10px;
 width: 16px;
 height: 16px;
 color: var(--text-muted);
 stroke: currentColor;
 fill: none;
 stroke-width: 2;
 pointer-events: none;
}

.search-box input {
 padding: 8px 12px 8px 34px;
 border: 1px solid var(--border);
 border-radius: var(--radius-sm);
 background: var(--bg-input);
 color: var(--text);
 font-size: 14px;
 width: 240px;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 outline: none;
}

.search-box input:focus {
 border-color: var(--brand);
 box-shadow: 0 0 0 3px var(--brand-soft-2);
 width: 280px;
}

.grid {
 display: grid;
 gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
 .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
 .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.list-item {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 12px 16px;
 border: 1px solid var(--border);
 border-radius: var(--radius);
 background: var(--bg-elevated);
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 margin-bottom: 8px;
}

.list-item:hover {
 border-color: var(--border-strong);
 box-shadow: var(--shadow-sm);
}

.list-item-thumb {
 width: 48px;
 height: 48px;
 border-radius: var(--radius-sm);
 object-fit: cover;
 flex-shrink: 0;
 background: var(--bg-hover);
}

.list-item-body {
 flex: 1;
 min-width: 0;
}

.list-item-title {
 font-size: 14px;
 font-weight: 500;
 color: var(--text);
 margin: 0 0 2px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.list-item-desc {
 font-size: 13px;
 color: var(--text-muted);
 margin: 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.list-item-actions {
 display: flex;
 gap: 4px;
 flex-shrink: 0;
}

.wc-preview {
 margin-top: 8px;
 font-size: 0.8rem;
 color: var(--text-muted);
}

.wc-preview-time {
 display: inline-block;
 padding: 2px 10px;
 border-radius: 12px;
 font-variant-numeric: tabular-nums;
}

.wc-preview-time.is-day {
 background: rgba(255, 200, 80, 0.12);
 color: #b08a4a;
}

.wc-preview-time.is-night {
 background: rgba(80, 120, 200, 0.12);
 color: #5a7bb0;
}

.wc-stats-card .card-body {
 padding: 16px 20px;
}

.wc-stats-body {
 display: flex;
 flex-wrap: wrap;
 gap: 28px;
 align-items: center;
}

.wc-stat {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 2px;
 min-width: 64px;
}

.wc-stat-num {
 font-size: 1.5rem;
 font-weight: 600;
 font-variant-numeric: tabular-nums;
 color: var(--ink);
 line-height: 1.2;
}

.wc-stat-num.is-day {
 color: #b08a4a;
}

.wc-stat-num.is-night {
 color: #5a7bb0;
}

.wc-stat-num.is-invalid {
 color: var(--danger, #b03a3a);
}

.wc-stat-num.wc-local-time {
 font-size: 1.4rem;
 letter-spacing: 0.02em;
}

.wc-stat-label {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
}

.wc-cities-list {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.wc-city-row {
 display: grid;
 grid-template-columns: 36px 1fr 110px 92px;
 align-items: center;
 gap: 14px;
 padding: 12px 14px;
 border: 1px solid var(--border-light, rgba(0,0,0,0.06));
 border-radius: 10px;
 background: var(--light, #f6f6f3);
 transition: border-color 0.2s, background 0.2s;
}

.wc-city-row:hover {
 border-color: rgba(108, 120, 108, 0.28);
}

.wc-city-row.is-invalid {
 border-color: rgba(176, 58, 58, 0.35);
 background: rgba(176, 58, 58, 0.04);
}

.wc-city-index {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
}

.wc-city-num {
 font-size: 0.9rem;
 font-weight: 600;
 color: var(--muted, #5e6760);
 font-variant-numeric: tabular-nums;
}

.wc-city-dot {
 width: 8px;
 height: 8px;
 border-radius: 50%;
 background: var(--muted, #5e6760);
}

.wc-city-dot.is-day {
 background: #d39a3a;
 box-shadow: 0 0 0 2px rgba(211, 154, 58, 0.18);
}

.wc-city-dot.is-night {
 background: #5a7bb0;
 box-shadow: 0 0 0 2px rgba(90, 123, 176, 0.18);
}

.wc-city-dot.is-invalid {
 background: var(--danger, #b03a3a);
}

.wc-city-fields {
 display: grid;
 grid-template-columns: 1fr 1.4fr 1fr;
 gap: 10px;
}

.wc-city-fields .form-group {
 margin: 0;
}

.wc-city-fields .form-label {
 font-size: 0.7rem;
 color: var(--muted, #5e6760);
 margin-bottom: 2px;
 letter-spacing: 0.04em;
}

.wc-city-fields .form-input {
 padding: 6px 10px;
 font-size: 0.88rem;
}

.wc-city-preview {
 text-align: right;
 font-variant-numeric: tabular-nums;
}

.wc-city-time {
 font-size: 1.05rem;
 font-weight: 500;
 color: var(--ink, #2f322e);
 letter-spacing: 0.02em;
}

.wc-city-time.is-invalid {
 color: var(--danger, #b03a3a);
 font-size: 0.82rem;
 font-weight: 400;
}

.wc-city-offset {
 font-size: 0.72rem;
 color: var(--muted, #5e6760);
 margin-top: 2px;
}

.wc-city-actions {
 display: flex;
 gap: 4px;
 justify-content: flex-end;
 align-items: center;
}

.wc-city-actions .btn-icon {
 padding: 6px;
 border-radius: 6px;
 color: var(--muted, #5e6760);
 background: transparent;
 border: 1px solid transparent;
 cursor: pointer;
 transition: background 0.15s, color 0.15s, border-color 0.15s;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.wc-city-actions .btn-icon:hover {
 background: rgba(0, 0, 0, 0.04);
 color: var(--ink, #2f322e);
 border-color: rgba(0, 0, 0, 0.08);
}

.wc-city-actions .wc-del-btn:hover {
 background: rgba(176, 58, 58, 0.08);
 color: var(--danger, #b03a3a);
 border-color: rgba(176, 58, 58, 0.2);
}

.wc-tz-presets {
 display: flex;
 flex-direction: column;
 gap: 14px;
}

.wc-tz-group {
 display: grid;
 grid-template-columns: 56px 1fr;
 align-items: start;
 gap: 12px;
}

.wc-tz-group-label {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 padding-top: 6px;
 letter-spacing: 0.06em;
}

.wc-tz-group-items {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}

.wc-tz-chip {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 5px 10px;
 border-radius: 16px;
 border: 1px solid rgba(108, 120, 108, 0.18);
 background: var(--light, #f6f6f3);
 color: var(--ink, #2f322e);
 font-size: 0.82rem;
 cursor: pointer;
 transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.wc-tz-chip:hover:not(:disabled) {
 border-color: rgba(108, 120, 108, 0.4);
 background: rgba(111, 148, 184, 0.08);
}

.wc-tz-chip:active:not(:disabled) {
 transform: scale(0.97);
}

.wc-tz-chip.is-added,
.wc-tz-chip:disabled {
 opacity: 0.45;
 cursor: not-allowed;
 background: transparent;
}

.wc-tz-chip-name {
 font-weight: 500;
}

.wc-tz-chip-tz {
 font-size: 0.68rem;
 color: var(--muted, #5e6760);
 font-variant-numeric: tabular-nums;
}

.dark-mode .wc-city-row {
 background: rgba(255, 255, 255, 0.03);
 border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .wc-city-row:hover {
 border-color: rgba(255, 255, 255, 0.18);
}

.dark-mode .wc-city-row.is-invalid {
 border-color: rgba(220, 80, 80, 0.4);
 background: rgba(220, 80, 80, 0.06);
}

.dark-mode .wc-city-actions .btn-icon:hover {
 background: rgba(255, 255, 255, 0.08);
 color: #e0ddd5;
}

.dark-mode .wc-tz-chip {
 background: rgba(255, 255, 255, 0.04);
 border-color: rgba(255, 255, 255, 0.12);
 color: #e0ddd5;
}

.dark-mode .wc-tz-chip:hover:not(:disabled) {
 border-color: rgba(111, 148, 184, 0.4);
 background: rgba(111, 148, 184, 0.12);
}

@media (max-width: 768px) {
 .wc-city-row {
 grid-template-columns: 28px 1fr;
 grid-template-areas:
 "index fields"
 "index preview"
 "index actions";
 gap: 8px 10px;
 }
 .wc-city-index { grid-area: index; }
 .wc-city-fields {
 grid-area: fields;
 grid-template-columns: 1fr;
 gap: 6px;
 }
 .wc-city-preview {
 grid-area: preview;
 text-align: left;
 }
 .wc-city-actions {
 grid-area: actions;
 justify-content: flex-start;
 }
 .wc-tz-group {
 grid-template-columns: 1fr;
 gap: 6px;
 }
 .wc-tz-group-label {
 padding-top: 0;
 }
}

.wishes-stats-card .card-body {
 padding: 16px 20px;
}

.wishes-stats-body {
 display: flex;
 flex-wrap: wrap;
 gap: 28px;
 align-items: center;
}

.wishes-stat {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 2px;
 min-width: 64px;
}

.wishes-stat-num {
 font-size: 1.5rem;
 font-weight: 600;
 font-variant-numeric: tabular-nums;
 color: var(--ink);
 line-height: 1.2;
}

.wishes-stat-num.is-pinned {
 color: #6b8e5a;
}

.wishes-stat-num.is-showcase {
 color: #5a7bb0;
}

.wishes-stat-label {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
}

.wishes-toolbar {
 flex-wrap: wrap;
 gap: 12px;
}

.wishes-filter-bar {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}

.wishes-filter-chip {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 5px 12px;
 border-radius: 16px;
 border: 1px solid rgba(108, 120, 108, 0.18);
 background: var(--light, #f6f6f3);
 color: var(--ink, #2f322e);
 font-size: 0.82rem;
 cursor: pointer;
 transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.wishes-filter-chip:hover:not(.is-active):not(:disabled) {
 border-color: rgba(108, 120, 108, 0.4);
}

.wishes-filter-chip.is-active {
 background: var(--accent, #6f94b8);
 border-color: var(--accent, #6f94b8);
 color: #fff;
}

.wishes-filter-count {
 display: inline-block;
 min-width: 18px;
 padding: 0 5px;
 border-radius: 9px;
 background: rgba(0, 0, 0, 0.06);
 font-size: 0.7rem;
 font-variant-numeric: tabular-nums;
 text-align: center;
}

.wishes-filter-chip.is-active .wishes-filter-count {
 background: rgba(255, 255, 255, 0.25);
}

.wishes-search-wrap {
 position: relative;
 display: inline-flex;
 align-items: center;
}

.wishes-search-input {
 width: 220px;
 padding-right: 30px;
 font-size: 0.86rem;
}

.wishes-search-clear {
 position: absolute;
 right: 6px;
 top: 50%;
 transform: translateY(-50%);
 width: 20px;
 height: 20px;
 border-radius: 50%;
 border: none;
 background: rgba(0, 0, 0, 0.08);
 color: var(--muted, #5e6760);
 cursor: pointer;
 font-size: 14px;
 line-height: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.15s, color 0.15s;
}

.wishes-search-clear:hover {
 background: rgba(176, 58, 58, 0.15);
 color: var(--danger, #b03a3a);
}

.wishes-wall {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
 gap: 14px;
 align-items: start;
}

.wish-card {
 display: flex;
 flex-direction: column;
 gap: 10px;
 padding: 16px 18px;
 border: 1px solid var(--border-light, rgba(0,0,0,0.06));
 border-radius: 10px;
 background: var(--light, #f6f6f3);
 transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.wish-card:hover {
 border-color: rgba(108, 120, 108, 0.28);
 transform: translateY(-1px);
}

.wish-card.is-pinned {
 border-left: 3px solid #6b8e5a;
 background: rgba(107, 142, 90, 0.04);
}

.wish-card.is-showcase {
 border-left: 3px solid #5a7bb0;
}

.wish-card.is-pinned.is-showcase {
 border-left: 3px solid #6b8e5a;
}

.wish-card-top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
}

.wish-card-badges {
 display: flex;
 flex-wrap: wrap;
 gap: 4px;
}

.wish-card-id {
 font-size: 0.72rem;
 color: var(--muted, #5e6760);
 font-variant-numeric: tabular-nums;
 flex-shrink: 0;
}

.wish-card-content {
 font-size: 0.92rem;
 line-height: 1.65;
 color: var(--ink, #2f322e);
 word-break: break-word;
 white-space: pre-wrap;
 flex: 1;
}

.wish-card-foot {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 padding-top: 8px;
 border-top: 1px dashed rgba(0, 0, 0, 0.06);
 font-size: 0.78rem;
}

.wish-card-author {
 display: flex;
 flex-direction: column;
 gap: 1px;
 min-width: 0;
}

.wish-card-name {
 color: var(--ink, #2f322e);
 font-weight: 500;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.wish-card-email {
 color: var(--muted, #5e6760);
 font-size: 0.7rem;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.wish-card-time {
 color: var(--muted, #5e6760);
 font-variant-numeric: tabular-nums;
 flex-shrink: 0;
}

.wish-card-actions {
 display: flex;
 gap: 4px;
 flex-wrap: wrap;
}

.wish-card-actions .btn-icon {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 5px 10px;
 border-radius: 6px;
 color: var(--muted, #5e6760);
 background: transparent;
 border: 1px solid transparent;
 cursor: pointer;
 font-size: 0.78rem;
 transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wish-card-actions .btn-icon:hover:not(:disabled) {
 background: rgba(0, 0, 0, 0.04);
 color: var(--ink, #2f322e);
 border-color: rgba(0, 0, 0, 0.08);
}

.wish-card-actions .btn-icon.is-active,
.wish-card-actions .wish-pin-btn.is-active {
 color: #6b8e5a;
}

.wish-card-actions .wish-showcase-btn.is-active {
 color: #5a7bb0;
}

.wish-card-actions .wish-del-btn:hover:not(:disabled) {
 background: rgba(176, 58, 58, 0.08);
 color: var(--danger, #b03a3a);
 border-color: rgba(176, 58, 58, 0.2);
}

.wish-card-actions .btn-icon:disabled,
.wish-card-actions .btn-icon.is-loading {
 opacity: 0.5;
 cursor: not-allowed;
}

.dark-mode .wish-card {
 background: rgba(255, 255, 255, 0.03);
 border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .wish-card:hover {
 border-color: rgba(255, 255, 255, 0.18);
}

.dark-mode .wish-card.is-pinned {
 background: rgba(107, 142, 90, 0.08);
 border-left-color: #6b8e5a;
}

.dark-mode .wish-card.is-showcase {
 border-left-color: #5a7bb0;
}

.dark-mode .wish-card-foot {
 border-top-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .wishes-filter-chip {
 background: rgba(255, 255, 255, 0.04);
 border-color: rgba(255, 255, 255, 0.12);
 color: #e0ddd5;
}

.dark-mode .wishes-filter-chip.is-active {
 background: var(--accent, #6f94b8);
 border-color: var(--accent, #6f94b8);
 color: #fff;
}

.dark-mode .wishes-filter-count {
 background: rgba(255, 255, 255, 0.08);
}

.dark-mode .wishes-search-clear {
 background: rgba(255, 255, 255, 0.08);
 color: #9a948a;
}

.dark-mode .wish-card-actions .btn-icon:hover:not(:disabled) {
 background: rgba(255, 255, 255, 0.08);
 color: #e0ddd5;
}

@media (max-width: 768px) {
 .wishes-toolbar {
 flex-direction: column;
 align-items: stretch;
 }
 .wishes-search-input {
 width: 100%;
 }
 .wishes-wall {
 grid-template-columns: 1fr;
 }
}

.capsules-encrypt-banner {
 display: flex;
 align-items: flex-start;
 gap: 12px;
 padding: 12px 16px;
 margin-bottom: 16px;
 border: 1px solid rgba(111, 148, 184, 0.22);
 border-left: 3px solid var(--accent, #6f94b8);
 border-radius: 8px;
 background: rgba(111, 148, 184, 0.06);
}

.capsules-encrypt-icon {
 width: 20px;
 height: 20px;
 flex-shrink: 0;
 margin-top: 2px;
 color: var(--accent, #6f94b8);
}

.capsules-encrypt-text {
 display: flex;
 flex-direction: column;
 gap: 2px;
 min-width: 0;
}

.capsules-encrypt-title {
 font-size: 0.88rem;
 font-weight: 500;
 color: var(--ink, #2f322e);
 letter-spacing: 0.04em;
}

.capsules-encrypt-desc {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 line-height: 1.55;
}

.capsules-stats-card .card-body {
 padding: 16px 20px;
}

.capsules-stats-body {
 display: flex;
 flex-wrap: wrap;
 gap: 28px;
 align-items: center;
}

.capsules-stat {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 2px;
 min-width: 64px;
}

.capsules-stat-num {
 font-size: 1.5rem;
 font-weight: 600;
 font-variant-numeric: tabular-nums;
 color: var(--ink);
 line-height: 1.2;
}

.capsules-stat-num.is-locked {
 color: #6b8e5a;
}

.capsules-stat-num.is-pending {
 color: #b08948;
}

.capsules-stat-num.is-notified {
 color: #5a7bb0;
}

.capsules-stat-label {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
}

.capsules-toolbar {
 flex-wrap: wrap;
 gap: 12px;
}

.capsules-filter-bar {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}

.capsules-filter-chip {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 5px 12px;
 border-radius: 16px;
 border: 1px solid rgba(108, 120, 108, 0.18);
 background: var(--light, #f6f6f3);
 color: var(--ink, #2f322e);
 font-size: 0.82rem;
 cursor: pointer;
 transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.capsules-filter-chip:hover:not(.is-active):not(:disabled) {
 border-color: rgba(108, 120, 108, 0.4);
}

.capsules-filter-chip.is-active {
 background: var(--accent, #6f94b8);
 border-color: var(--accent, #6f94b8);
 color: #fff;
}

.capsules-filter-count {
 display: inline-block;
 min-width: 18px;
 padding: 0 5px;
 border-radius: 9px;
 background: rgba(0, 0, 0, 0.06);
 font-size: 0.7rem;
 font-variant-numeric: tabular-nums;
 text-align: center;
}

.capsules-filter-chip.is-active .capsules-filter-count {
 background: rgba(255, 255, 255, 0.25);
}

.capsules-search-wrap {
 position: relative;
 display: inline-flex;
 align-items: center;
}

.capsules-search-input {
 width: 220px;
 padding-right: 30px;
 font-size: 0.86rem;
}

.capsules-search-clear {
 position: absolute;
 right: 6px;
 top: 50%;
 transform: translateY(-50%);
 width: 20px;
 height: 20px;
 border-radius: 50%;
 border: none;
 background: rgba(0, 0, 0, 0.08);
 color: var(--muted, #5e6760);
 cursor: pointer;
 font-size: 14px;
 line-height: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.15s, color 0.15s;
}

.capsules-search-clear:hover {
 background: rgba(176, 58, 58, 0.15);
 color: var(--danger, #b03a3a);
}

.caps-id {
 font-variant-numeric: tabular-nums;
 color: var(--muted, #5e6760);
 font-size: 0.82rem;
}

.caps-title {
 font-size: 0.9rem;
 color: var(--ink, #2f322e);
 line-height: 1.4;
 word-break: break-word;
}

.caps-remaining {
 margin-top: 2px;
 font-size: 0.72rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.02em;
}

.caps-del-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 28px;
 height: 28px;
 border-radius: 6px;
 border: 1px solid transparent;
 background: transparent;
 color: var(--muted, #5e6760);
 cursor: pointer;
 transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.caps-del-btn:hover:not(:disabled) {
 background: rgba(176, 58, 58, 0.08);
 color: var(--danger, #b03a3a);
 border-color: rgba(176, 58, 58, 0.22);
}

.dark-mode .capsules-encrypt-banner {
 background: rgba(111, 148, 184, 0.1);
 border-color: rgba(111, 148, 184, 0.3);
 border-left-color: var(--accent, #6f94b8);
}

.dark-mode .capsules-encrypt-title {
 color: #e0ddd5;
}

.dark-mode .capsules-encrypt-desc {
 color: #9a948a;
}

.dark-mode .capsules-filter-chip {
 background: rgba(255, 255, 255, 0.04);
 border-color: rgba(255, 255, 255, 0.12);
 color: #e0ddd5;
}

.dark-mode .capsules-filter-chip.is-active {
 background: var(--accent, #6f94b8);
 border-color: var(--accent, #6f94b8);
 color: #fff;
}

.dark-mode .capsules-filter-count {
 background: rgba(255, 255, 255, 0.08);
}

.dark-mode .capsules-search-clear {
 background: rgba(255, 255, 255, 0.08);
 color: #9a948a;
}

.dark-mode .caps-title {
 color: #e0ddd5;
}

.dark-mode .caps-del-btn:hover:not(:disabled) {
 background: rgba(176, 58, 58, 0.15);
 color: var(--danger, #b03a3a);
 border-color: rgba(176, 58, 58, 0.3);
}

@media (max-width: 768px) {
 .capsules-toolbar {
 flex-direction: column;
 align-items: stretch;
 }
 .capsules-search-input {
 width: 100%;
 }
 .capsules-encrypt-banner {
 flex-direction: row;
 }
}

.audit-stats-card .card-body {
 padding: 16px 20px;
}

.audit-stats-body {
 display: flex;
 flex-wrap: wrap;
 gap: 28px;
 align-items: center;
}

.audit-stat {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 2px;
 min-width: 64px;
}

.audit-stat-num {
 font-size: 1.5rem;
 font-weight: 600;
 font-variant-numeric: tabular-nums;
 color: var(--ink);
 line-height: 1.2;
}

.audit-stat-num.is-success {
 color: #6b8e5a;
}

.audit-stat-num.is-failed {
 color: #b03a3a;
}

.audit-stat-num.is-blocked {
 color: #b08948;
}

.audit-stat-label {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
}

.audit-toolbar {
 flex-wrap: wrap;
 gap: 12px;
}

.audit-filter-bar {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}

.audit-filter-chip {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 5px 12px;
 border-radius: 16px;
 border: 1px solid rgba(108, 120, 108, 0.18);
 background: var(--light, #f6f6f3);
 color: var(--ink, #2f322e);
 font-size: 0.82rem;
 cursor: pointer;
 transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.audit-filter-chip:hover:not(.is-active):not(:disabled) {
 border-color: rgba(108, 120, 108, 0.4);
}

.audit-filter-chip.is-active {
 background: var(--accent, #6f94b8);
 border-color: var(--accent, #6f94b8);
 color: #fff;
}

.audit-filter-count {
 display: inline-block;
 min-width: 18px;
 padding: 0 5px;
 border-radius: 9px;
 background: rgba(0, 0, 0, 0.06);
 font-size: 0.7rem;
 font-variant-numeric: tabular-nums;
 text-align: center;
}

.audit-filter-chip.is-active .audit-filter-count {
 background: rgba(255, 255, 255, 0.25);
}

.audit-search-wrap {
 position: relative;
 display: inline-flex;
 align-items: center;
}

.audit-search-input {
 width: 240px;
 padding-right: 30px;
 font-size: 0.86rem;
}

.audit-search-clear {
 position: absolute;
 right: 6px;
 top: 50%;
 transform: translateY(-50%);
 width: 20px;
 height: 20px;
 border-radius: 50%;
 border: none;
 background: rgba(0, 0, 0, 0.08);
 color: var(--muted, #5e6760);
 cursor: pointer;
 font-size: 14px;
 line-height: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.15s, color 0.15s;
}

.audit-search-clear:hover {
 background: rgba(176, 58, 58, 0.15);
 color: var(--danger, #b03a3a);
}

.audit-time {
 font-variant-numeric: tabular-nums;
 font-size: 0.82rem;
 color: var(--muted, #5e6760);
 white-space: nowrap;
}

.audit-user {
 font-size: 0.88rem;
 color: var(--ink, #2f322e);
}

.audit-ip {
 font-size: 0.82rem;
 color: var(--muted, #5e6760);
}

.audit-detail {
 font-size: 0.82rem;
 color: var(--muted, #5e6760);
 max-width: 320px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.dark-mode .audit-filter-chip {
 background: rgba(255, 255, 255, 0.04);
 border-color: rgba(255, 255, 255, 0.12);
 color: #e0ddd5;
}

.dark-mode .audit-filter-chip.is-active {
 background: var(--accent, #6f94b8);
 border-color: var(--accent, #6f94b8);
 color: #fff;
}

.dark-mode .audit-filter-count {
 background: rgba(255, 255, 255, 0.08);
}

.dark-mode .audit-search-clear {
 background: rgba(255, 255, 255, 0.08);
 color: #9a948a;
}

.dark-mode .audit-user {
 color: #e0ddd5;
}

@media (max-width: 768px) {
 .audit-toolbar {
 flex-direction: column;
 align-items: stretch;
 }
 .audit-search-input {
 width: 100%;
 }
 .audit-detail {
 max-width: none;
 white-space: normal;
 }
}

.photo-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
 gap: 12px;
}

.photo-item {
 position: relative;
 aspect-ratio: 1;
 border-radius: var(--radius);
 overflow: hidden;
 background: var(--bg-hover);
 cursor: pointer;
 border: 1px solid var(--border);
 transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.photo-item:hover {
 transform: translateY(-2px);
 box-shadow: var(--shadow-md);
 border-color: var(--border-strong);
}

.photo-item img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 transition: transform 0.3s;
}

.photo-item:hover img { transform: scale(1.05); }

.photo-item-overlay {
 position: absolute;
 inset: 0;
 background: rgba(40, 30, 20, 0.5);
 display: flex;
 flex-direction: column;
 justify-content: flex-end;
 padding: 10px;
 opacity: 0;
 transition: opacity 0.2s;
}

.photo-item:hover .photo-item-overlay { opacity: 1; }

.photo-item-title {
 color: #fff;
 font-size: 13px;
 font-weight: 500;
 margin: 0;
 text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.photo-item-meta {
 color: rgba(255,255,255,0.85);
 font-size: 11px;
 margin-top: 2px;
}

.photo-item-actions {
 position: absolute;
 top: 8px;
 right: 8px;
 display: flex;
 gap: 4px;
 opacity: 0;
 transition: opacity 0.2s;
}

.photo-item:hover .photo-item-actions { opacity: 1; }

.photo-item-action {
 width: 28px;
 height: 28px;
 border-radius: 6px;
 background: rgba(40, 30, 20, 0.65);
 color: #fff;
 border: none;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.15s;
}

.photo-item-action:hover { background: rgba(40, 30, 20, 0.85); }

.photo-item-action svg {
 width: 14px;
 height: 14px;
 stroke: currentColor;
 fill: none;
 stroke-width: 2;
}

.upload-zone {
 border: 2px dashed var(--border-strong);
 border-radius: var(--radius-lg);
 padding: 32px 20px;
 text-align: center;
 cursor: pointer;
 transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
 background: var(--bg-elevated);
}

.upload-zone:hover,
.upload-zone.dragover {
 border-color: var(--brand);
 background: var(--brand-soft-2);
}

.upload-zone-icon {
 width: 40px;
 height: 40px;
 margin: 0 auto 8px;
 color: var(--text-muted);
}

.upload-zone-icon svg {
 width: 40px;
 height: 40px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.5;
}

.upload-zone-text {
 font-size: 14px;
 color: var(--text);
 margin: 0;
}

.upload-zone-hint {
 font-size: 12px;
 color: var(--text-muted);
 margin: 4px 0 0;
}

.modal-overlay {
 position: fixed;
 inset: 0;
 background: rgba(0, 0, 0, 0);
 z-index: 100;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 20px;
 opacity: 0;
 visibility: hidden;
 transition: opacity 0.25s ease, background 0.25s ease, visibility 0s 0.25s;
}

.modal-overlay.show {
 background: rgba(60, 50, 40, 0.4);
 opacity: 1;
 visibility: visible;
 transition: opacity 0.25s ease, background 0.25s ease, visibility 0s 0s;
}

.modal {
 background: var(--bg-elevated);
 border-radius: var(--radius-xl);
 box-shadow: var(--shadow-lg);
 max-width: 600px;
 width: 100%;
 max-height: 90vh;
 overflow: hidden;
 display: flex;
 flex-direction: column;
 animation: modalIn 0.25s ease;
}

.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1180px; }

.modal-split {
 max-width: 1180px;
 width: calc(100% - 2rem);
}
.modal-body-split {
 display: grid;
 grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
 gap: 0;
 padding: 0;
 flex: 1;
 min-height: 0;
 overflow: hidden;
}
.modal-body-split > form {
 padding: 1.4rem 1.6rem 1.2rem;
 overflow-y: auto;
 border-right: 1px solid var(--border);
}
.modal-body-split > .cloud-panel {
 padding: 1.2rem 1.4rem;
 overflow: hidden;
 display: flex;
 flex-direction: column;
 background: rgba(0, 0, 0, 0.015);
}
@media (max-width: 880px) {
 .modal-body-split {
 grid-template-columns: 1fr;
 }
 .modal-body-split > form {
 border-right: none;
 border-bottom: 1px solid var(--border);
 max-height: 60vh;
 }
 .modal-body-split > .cloud-panel {
 max-height: 50vh;
 }
}

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

.modal-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 18px 24px;
 border-bottom: 1px solid var(--border);
}

.modal-title {
 font-size: 17px;
 font-weight: 600;
 color: var(--text);
 margin: 0;
}

.modal-subtitle {
 margin: 3px 0 0;
 font-size: 12.5px;
 color: var(--text-muted);
 letter-spacing: 0.02em;
 line-height: 1.4;
}

.modal-close {
 width: 30px;
 height: 30px;
 border-radius: var(--radius-sm);
 border: none;
 background: transparent;
 color: var(--text-muted);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-close:hover {
 background: var(--bg-hover);
 color: var(--text);
}

.modal-close svg {
 width: 18px;
 height: 18px;
 stroke: currentColor;
 fill: none;
 stroke-width: 2;
}

.modal-body {
 padding: 24px;
 overflow-y: auto;
 flex: 1;
}

.modal-footer {
 padding: 16px 24px;
 border-top: 1px solid var(--border);
 display: flex;
 justify-content: flex-end;
 gap: 8px;
}

.tag-list {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}

.tag {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 3px 10px;
 border-radius: 12px;
 font-size: 12px;
 background: var(--bg-hover);
 color: var(--text-secondary);
 border: 1px solid var(--border);
}

.tag-removable {
 cursor: default;
}

.tag-remove {
 width: 14px;
 height: 14px;
 border-radius: 50%;
 background: var(--text-muted);
 color: #fff;
 border: none;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 10px;
 padding: 0;
}

.tag-remove:hover { background: var(--danger); }

.progress {
 height: 6px;
 background: var(--bg-hover);
 border-radius: 3px;
 overflow: hidden;
}

.progress-bar {
 height: 100%;
 background: var(--brand);
 border-radius: 3px;
 transition: width 0.3s ease;
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

.preview-panel {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius-lg);
 padding: 20px;
 position: sticky;
 top: 84px;
}

.preview-title {
 font-size: 14px;
 font-weight: 600;
 color: var(--text);
 margin: 0 0 12px;
 padding-bottom: 10px;
 border-bottom: 1px solid var(--border-light);
}

.history-diff {
 font-family: var(--font-mono);
 font-size: 12px;
 background: var(--bg-code);
 border-radius: var(--radius-sm);
 padding: 12px;
 overflow-x: auto;
 line-height: 1.6;
}

.history-diff-add { color: var(--success); background: rgba(122, 140, 90, 0.12); }
.history-diff-del { color: var(--danger); background: rgba(168, 101, 74, 0.12); text-decoration: line-through; }

@media (max-width: 1024px) {
 .app-shell {
 grid-template-columns: 0 1fr;
 }

 .sidebar {
 position: fixed;
 left: 0;
 top: 0;
 width: var(--sidebar-w);
 transform: translateX(-100%);
 box-shadow: var(--shadow-lg);
 }

 .app-shell.mobile-sidebar-open .sidebar {
 transform: translateX(0);
 }

 .sidebar-overlay {
 position: fixed;
 inset: 0;
 background: rgba(60, 50, 40, 0.4);
 z-index: 35;
 opacity: 0;
 visibility: hidden;
 transition: opacity 0.25s ease, visibility 0s 0.25s;
 }

 .sidebar-overlay.show {
 opacity: 1;
 visibility: visible;
 transition: opacity 0.25s ease, visibility 0s 0s;
 }

 [data-theme="dark"] .sidebar-overlay,
 body.dark-mode .sidebar-overlay {
 background: rgba(0, 0, 0, 0.55);
 }

 .main { padding: 16px 20px 32px; }
}

@media (max-width: 640px) {
 .header { padding: 0 16px; }
 .main { padding: 12px 16px 24px; }
 .page-title { font-size: 19px; }
 .stat-grid { grid-template-columns: 1fr; }
 .toolbar { flex-direction: column; align-items: stretch; }
 .toolbar-left, .toolbar-right { width: 100%; }
 .search-box input { width: 100%; }
 .search-box input:focus { width: 100%; }
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-mono { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

.animate-in {
 animation: animateIn 0.25s ease both;
}

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

.sidebar-version {
 padding: 8px 12px 4px;
 font-size: 11px;
 color: var(--text-muted);
 text-align: center;
 letter-spacing: 0.04em;
 font-variant-numeric: tabular-nums;
}

.header-time {
 font-size: 13px;
 color: var(--text-secondary);
 font-variant-numeric: tabular-nums;
 font-family: var(--font-mono);
 padding: 6px 10px;
 border-radius: var(--radius-sm);
 background: var(--bg-hover);
 letter-spacing: 0.02em;
 white-space: nowrap;
}

@media (max-width: 640px) {
 .header-time { display: none; }
}

.status-dot {
 width: 8px;
 height: 8px;
 border-radius: 50%;
 flex-shrink: 0;
 background: var(--text-muted);
 position: relative;
}

.status-dot.online {
 background: var(--success);
}

.status-dot.online::after {
 content: '';
 position: absolute;
 inset: 0;
 border-radius: 50%;
 background: var(--success);
 animation: statusPulse 1.8s ease-out infinite;
}

@keyframes statusPulse {
 0% { transform: scale(1); opacity: 0.7; }
 100% { transform: scale(2.6); opacity: 0; }
}

.list-item.with-status { gap: 12px; }

.ripple {
 position: absolute;
 border-radius: 50%;
 background: rgba(255, 253, 248, 0.35);
 transform: scale(0);
 animation: rippleEffect 0.6s ease-out;
 pointer-events: none;
}

.btn-secondary .ripple,
.btn-ghost .ripple {
 background: rgba(141, 123, 107, 0.18);
}

[data-theme="dark"] .ripple,
body.dark-mode .ripple { background: rgba(26, 28, 25, 0.35); }
[data-theme="dark"] .btn-secondary .ripple,
body.dark-mode .btn-ghost .ripple,
body.dark-mode .btn-secondary .ripple { background: rgba(224, 221, 213, 0.16); }

@keyframes rippleEffect {
 to { transform: scale(2.4); opacity: 0; }
}

.toast-progress {
 position: absolute;
 bottom: 0;
 left: 0;
 height: 2px;
 width: 100%;
 background: var(--brand);
 opacity: 0.55;
 transform-origin: left center;
}

.toast.success .toast-progress { background: var(--success); }
.toast.error .toast-progress { background: var(--danger); }
.toast.warning .toast-progress { background: var(--warning); }
.toast.info .toast-progress { background: var(--info); }

.home-section {
 margin-bottom: 24px;
}

.home-section-card {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 overflow: hidden;
}

.home-section-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 14px 18px;
 background: var(--bg-sidebar);
 border-bottom: 1px solid var(--border);
 cursor: pointer;
 transition: background 0.15s;
}

.home-section-head:hover { background: var(--bg-hover); }

.home-section-title {
 font-size: 15px;
 font-weight: 600;
 color: var(--text);
 margin: 0;
 display: flex;
 align-items: center;
 gap: 8px;
}

.home-section-title-num {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 22px;
 height: 22px;
 border-radius: 50%;
 background: var(--brand-soft);
 color: var(--brand);
 font-size: 12px;
 font-weight: 600;
 font-family: var(--font-mono);
}

.home-section-toggle {
 color: var(--text-muted);
 transition: transform 0.2s;
}

.home-section.collapsed .home-section-toggle { transform: rotate(-90deg); }

.home-section-body {
 padding: 18px;
}

.home-section.collapsed .home-section-body { display: none; }

.home-list-item {
 border: 1px solid var(--border);
 border-radius: var(--radius-sm);
 padding: 12px 14px;
 margin-bottom: 10px;
 background: var(--bg-input);
}

.home-list-item-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 8px;
}

.home-list-item-index {
 font-size: 12px;
 color: var(--text-muted);
 font-family: var(--font-mono);
}

.home-list-item-remove {
 background: none;
 border: none;
 color: var(--text-muted);
 cursor: pointer;
 padding: 2px 6px;
 border-radius: 4px;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-list-item-remove:hover {
 color: var(--danger);
 background: rgba(168, 101, 74, 0.08);
}

.home-add-btn {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 width: 100%;
 padding: 8px;
 border: 1px dashed var(--border-strong);
 border-radius: var(--radius-sm);
 background: transparent;
 color: var(--text-muted);
 cursor: pointer;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 font-size: 13px;
}

.home-add-btn:hover {
 border-color: var(--brand);
 color: var(--brand);
 background: var(--brand-soft-2);
}

.audit-filters {
 display: flex;
 gap: 8px;
 flex-wrap: wrap;
 margin-bottom: 16px;
}

.audit-filter-chip {
 padding: 5px 12px;
 border-radius: 14px;
 border: 1px solid var(--border);
 background: var(--bg-elevated);
 color: var(--text-secondary);
 font-size: 12px;
 cursor: pointer;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.audit-filter-chip:hover {
 border-color: var(--border-strong);
 color: var(--text);
}

.audit-filter-chip.active {
 background: var(--brand);
 color: var(--text-on-brand);
 border-color: var(--brand);
}

.audit-log-row {
 display: grid;
 grid-template-columns: 140px 120px 1fr;
 gap: 12px;
 padding: 10px 14px;
 border-bottom: 1px solid var(--border-light);
 font-size: 13px;
 align-items: center;
}

.audit-log-row:hover { background: var(--bg-hover); }

.audit-log-time {
 font-family: var(--font-mono);
 color: var(--text-secondary);
 font-size: 12px;
}

.audit-log-event {
 font-weight: 500;
}

.audit-log-event.login_success { color: var(--success); }
.audit-log-event.login_failed_password,
.audit-log-event.login_failed_captcha,
.audit-log-event.login_blocked_account_lock,
.audit-log-event.login_blocked_ip_rate { color: var(--danger); }
.audit-log-event.logout { color: var(--text-muted); }

.audit-log-detail {
 color: var(--text-muted);
 font-size: 12px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

@media (max-width: 640px) {
 .audit-log-row {
 grid-template-columns: 1fr;
 gap: 4px;
 }
}

.pagination {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 margin-top: 20px;
}

.pagination-btn {
 min-width: 32px;
 height: 32px;
 padding: 0 10px;
 border-radius: var(--radius-sm);
 border: 1px solid var(--border);
 background: var(--bg-elevated);
 color: var(--text-secondary);
 cursor: pointer;
 font-size: 13px;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
 border-color: var(--border-strong);
 color: var(--text);
}

.pagination-btn.active {
 background: var(--brand);
 color: var(--text-on-brand);
 border-color: var(--brand);
}

.pagination-btn:disabled {
 opacity: 0.4;
 cursor: not-allowed;
}

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

.insights-card {
 display: flex;
 flex-direction: column;
}

.insights-card-wide {
 grid-column: 1 / -1;
}

.insights-card .card-header {
 margin-bottom: 12px;
}

.insights-chart-wrap {
 flex: 1;
 min-height: 240px;
 display: flex;
 align-items: center;
 justify-content: center;
 position: relative;
}

.insights-chart-wrap .empty-state {
 width: 100%;
}

.insights-canvas {
 display: block;
 width: 100%;
}

.insights-svg {
 display: block;
}

.insights-legend {
 display: flex;
 gap: 12px;
 align-items: center;
}

.insights-legend-item {
 display: flex;
 align-items: center;
 gap: 6px;
 font-size: 12px;
 color: var(--text-secondary);
}

.insights-legend-dot {
 display: inline-block;
 width: 10px;
 height: 10px;
 border-radius: 2px;
 flex-shrink: 0;
}

.insights-pie-wrap {
 display: flex;
 align-items: center;
 gap: 20px;
 flex-wrap: wrap;
 justify-content: center;
}

.insights-pie-legend {
 display: flex;
 flex-direction: column;
 gap: 10px;
 min-width: 120px;
}

.insights-pie-legend-item {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: 13px;
}

.insights-pie-label {
 color: var(--text);
 flex: 1;
}

.insights-pie-value {
 color: var(--text-muted);
 font-size: 12px;
 font-family: var(--font-mono);
 font-variant-numeric: tabular-nums;
}

.insights-gauge-wrap {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 12px;
}

.insights-gauge-detail {
 display: flex;
 gap: 24px;
 justify-content: center;
}

.insights-gauge-stat {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 2px;
}

.insights-gauge-stat-value {
 font-size: 20px;
 font-weight: 500;
 color: var(--text);
 font-family: var(--font-mono);
 font-variant-numeric: tabular-nums;
}

.insights-gauge-stat-label {
 font-size: 12px;
 color: var(--text-muted);
}

.heatmap-grid {
 display: grid;
 grid-template-columns: 24px 1fr;
 grid-template-rows: auto auto auto;
 gap: 4px 8px;
 width: 100%;
 max-width: 720px;
}

.heatmap-week-labels {
 display: grid;
 grid-template-rows: repeat(7, 14px);
 gap: 3px;
 font-size: 10px;
 color: var(--text-muted);
 align-items: center;
 padding-top: 0;
}

.heatmap-week-label {
 line-height: 14px;
 text-align: right;
 padding-right: 2px;
}

.heatmap-cells {
 display: grid;
 grid-template-columns: repeat(30, 1fr);
 grid-template-rows: repeat(7, 14px);
 grid-auto-flow: column;
 gap: 3px;
}

.heatmap-cell {
 width: 100%;
 height: 14px;
 border-radius: 2px;
 min-width: 12px;
}

.heatmap-l0 { background: var(--border-light); }
.heatmap-l1 { background: rgba(107, 144, 128, 0.25); }
.heatmap-l2 { background: rgba(107, 144, 128, 0.45); }
.heatmap-l3 { background: rgba(107, 144, 128, 0.7); }
.heatmap-l4 { background: var(--brand); }

[data-theme="dark"] .heatmap-l1 { background: rgba(141, 185, 163, 0.25); }
[data-theme="dark"] .heatmap-l2 { background: rgba(141, 185, 163, 0.45); }
[data-theme="dark"] .heatmap-l3 { background: rgba(141, 185, 163, 0.7); }
[data-theme="dark"] .heatmap-l4 { background: var(--brand); }

.heatmap-month-labels {
 display: grid;
 grid-template-columns: repeat(30, 1fr);
 gap: 3px;
 font-size: 10px;
 color: var(--text-muted);
 grid-column: 2;
}

.heatmap-month-label {
 text-align: left;
 white-space: nowrap;
}

.heatmap-summary {
 grid-column: 1 / -1;
 text-align: center;
 margin-top: 8px;
}

.insights-heatmap-legend {
 display: flex;
 align-items: center;
 gap: 4px;
}

.insights-heatmap-legend .heatmap-cell {
 width: 12px;
 height: 12px;
}

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

@media (max-width: 640px) {
 .insights-pie-wrap {
 flex-direction: column;
 }
 .insights-pie-legend {
 min-width: 100%;
 }
 .heatmap-cells {
 grid-template-columns: repeat(15, 1fr);
 grid-template-rows: repeat(14, 14px);
 }
 .heatmap-month-labels {
 grid-template-columns: repeat(15, 1fr);
 }
}

:focus-visible {
 outline: 2px solid var(--brand);
 outline-offset: 2px;
 border-radius: var(--radius-sm);
}

[data-theme="dark"] :focus-visible,
body.dark-mode :focus-visible {
 outline-color: var(--brand);
 outline-offset: 2px;
}

.form-input:focus-visible,
.form-textarea:focus-visible,
.form-select:focus-visible,
.search-box input:focus-visible {
 outline: none;
}

@media (max-width: 768px) {
 .btn,
 .btn-sm,
 .header-action,
 .header-toggle,
 .sidebar-item,
 .modal-close,
 .pagination-btn,
 .photo-item-action,
 .range-btn,
 .insights-refresh,
 .insights-fullscreen,
 .insights-detail-close {
 min-height: 44px;
 min-width: 44px;
 touch-action: manipulation;
 }

 .btn-sm {
 padding: 8px 14px;
 }
}

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

 .form-row {
 flex-direction: column;
 align-items: stretch;
 }

 .workspace-grid {
 grid-template-columns: 1fr !important;
 }
}

.insight-stats {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 14px;
 margin-bottom: 16px;
}

.insight-stat {
 display: flex;
 flex-direction: column;
 gap: 6px;
 padding: 16px 18px;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.insight-stat:hover {
 transform: translateY(-1px);
 box-shadow: 0 4px 14px rgba(108, 120, 98, 0.08);
}

.insight-stat-num {
 font-family: var(--font-mono);
 font-variant-numeric: tabular-nums;
 font-size: 26px;
 font-weight: 600;
 line-height: 1.15;
 color: var(--brand);
 letter-spacing: 0.5px;
}

.insight-stat-lbl {
 font-size: 12.5px;
 color: var(--text-secondary);
 letter-spacing: 0.3px;
}

.insights-toolbar {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 margin-bottom: 16px;
 padding: 12px 16px;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 flex-wrap: wrap;
}

.insights-toolbar-right {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}

.insights-update-time {
 font-family: var(--font-mono);
 font-variant-numeric: tabular-nums;
 margin-right: 4px;
}

.range-filter {
 display: inline-flex;
 background: var(--bg-hover);
 border: 1px solid var(--border);
 border-radius: var(--radius-sm);
 padding: 3px;
 gap: 2px;
}

.range-btn {
 border: none;
 background: transparent;
 color: var(--text-secondary);
 padding: 6px 14px;
 border-radius: 6px;
 font-size: 13px;
 font-weight: 500;
 cursor: pointer;
 transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
 white-space: nowrap;
}

.range-btn:hover {
 color: var(--text);
}

.range-btn.active {
 background: var(--brand);
 color: var(--text-on-brand);
 box-shadow: 0 1px 2px rgba(120, 100, 80, 0.12);
}

.range-custom {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 0 8px;
 margin-left: 6px;
 border-left: 1px solid var(--border);
 color: var(--text-secondary);
 font-size: 13px;
}
.range-custom input[type="date"] {
 border: 1px solid var(--border);
 border-radius: 6px;
 padding: 4px 8px;
 font-size: 13px;
 color: var(--text);
 background: var(--bg);
 font-family: inherit;
}
.range-custom input[type="date"]:focus-visible {
 outline: 2px solid var(--brand);
 outline-offset: 1px;
 border-color: var(--brand);
}

.insights-body {
 display: grid;
 grid-template-columns: 1fr 0;
 gap: 16px;
 transition: grid-template-columns 0.25s ease;
}

.insights-body.detail-open {
 grid-template-columns: 1fr 320px;
}

.insights-body.fullscreen {
 position: fixed;
 inset: 0;
 z-index: 200;
 background: var(--bg);
 padding: 24px;
 overflow-y: auto;
 grid-template-columns: 1fr 0;
}

.insights-body.fullscreen.detail-open {
 grid-template-columns: 1fr 360px;
}

.insights-detail {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 18px;
 position: sticky;
 top: 84px;
 align-self: start;
 max-height: calc(100vh - 100px);
 overflow-y: auto;
 animation: detailIn 0.25s ease;
}

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

.insights-detail[hidden] {
 display: none;
}

.insights-detail-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 14px;
 padding-bottom: 12px;
 border-bottom: 1px solid var(--border-light);
}

.insights-detail-title {
 font-size: 15px;
 font-weight: 600;
 color: var(--text);
 margin: 0;
}

.insights-detail-close {
 width: 30px;
 height: 30px;
 border-radius: var(--radius-sm);
 border: none;
 background: transparent;
 color: var(--text-muted);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.insights-detail-close:hover {
 background: var(--bg-hover);
 color: var(--text);
}

.insights-detail-close svg {
 width: 16px;
 height: 16px;
 stroke: currentColor;
 fill: none;
 stroke-width: 2;
}

.insights-detail-body {
 font-size: 13px;
 color: var(--text-secondary);
 line-height: 1.7;
}

.insights-detail-body h4 {
 font-size: 13px;
 color: var(--text);
 font-weight: 600;
 margin: 12px 0 6px;
}

.insights-detail-body h4:first-child {
 margin-top: 0;
}

.insights-detail-body .detail-row {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 6px 0;
 border-bottom: 1px dashed var(--border-light);
}

.insights-detail-body .detail-row:last-child {
 border-bottom: none;
}

.insights-detail-body .detail-label {
 color: var(--text-muted);
}

.insights-detail-body .detail-value {
 color: var(--text);
 font-family: var(--font-mono);
 font-variant-numeric: tabular-nums;
 font-weight: 500;
}

.insights-detail-body .detail-list {
 list-style: none;
 padding: 0;
 margin: 8px 0 0;
}

.insights-detail-body .detail-list li {
 padding: 6px 8px;
 border-radius: 6px;
 background: var(--bg-hover);
 margin-bottom: 4px;
 display: flex;
 justify-content: space-between;
 align-items: center;
 font-size: 12px;
}

@media (max-width: 1024px) {
 .insights-body,
 .insights-body.detail-open,
 .insights-body.fullscreen,
 .insights-body.fullscreen.detail-open {
 grid-template-columns: 1fr;
 }

 .insights-detail {
 position: static;
 max-height: none;
 }

 .insights-toolbar {
 flex-direction: column;
 align-items: stretch;
 }

 .insights-toolbar-right {
 justify-content: space-between;
 }

 .insight-stats {
 grid-template-columns: repeat(2, 1fr);
 }
}

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

#page-paperbin.active,
#page-videos.active {
 display: flex;
 flex-direction: column;
 gap: 1.25rem;
}
#page-paperbin .stat-grid,
#page-videos .stat-grid {
 margin-bottom: 0;
}

#videoTable .v-title-block { display: flex; flex-direction: column; gap: 2px; }
#videoTable .v-no { font-size: 0.74rem; color: var(--clay, #b78168); letter-spacing: 0.18em; }
#videoTable .v-title { font-weight: 500; color: var(--ink, #30312d); }
#videoTable .v-sub { color: var(--muted, #697065); font-size: 0.84rem; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#videoTable .v-status-pill.is-active { color: #6b9080; }
#videoTable .v-status-pill.is-hidden { color: #9c8870; }

.video-modal .upload-row {
 display: flex;
 flex-wrap: wrap;
 gap: 0.6rem;
 align-items: center;
}
.video-modal .upload-row input[type="text"] {
 flex: 1 1 280px;
 min-width: 0;
}
.video-modal .upload-row input[type="file"] {
 flex: 1 1 240px;
 font-size: 0.84rem;
}
.video-modal .upload-preview {
 width: 100%;
 margin-top: 0.4rem;
}
.video-modal .upload-preview img {
 max-width: 200px;
 max-height: 120px;
 border-radius: 4px;
 border: 1px solid var(--line, rgba(108, 120, 98, 0.18));
 display: block;
}
.video-modal .upload-progress {
 width: 100%;
 display: flex;
 align-items: center;
 gap: 0.6rem;
 margin-top: 0.4rem;
}
.video-modal .upload-progress-bar {
 flex: 1;
 height: 6px;
 background: rgba(108, 120, 98, 0.16);
 border-radius: 3px;
 overflow: hidden;
 position: relative;
}
.video-modal .upload-progress-bar::after {
 content: "";
 display: block;
 width: var(--p, 0%);
 height: 100%;
 background: linear-gradient(90deg, #6b9080, #8db4a0);
 transition: width 0.18s ease;
}
.video-modal .upload-progress-text {
 font-size: 0.78rem;
 color: var(--muted, #697065);
 letter-spacing: 0.04em;
 min-width: 4em;
 text-align: right;
}
.video-modal .form-hint code {
 font-size: 0.84em;
 background: rgba(108, 120, 98, 0.08);
 padding: 1px 6px;
 border-radius: 3px;
}

.form-fieldset {
 border: 1px dashed var(--line, rgba(108, 120, 98, 0.22));
 border-radius: 6px;
 padding: 0.8rem 1rem 1rem;
 margin: 0;
}
.form-fieldset legend {
 padding: 0 0.4em;
 font-size: 0.86rem;
 color: var(--ink, #30312d);
 letter-spacing: 0.04em;
}
.form-fieldset .form-em { font-style: normal; color: var(--muted, #697065); font-size: 0.78rem; }

.edit-media-list {
 display: flex;
 flex-direction: column;
 gap: 0.6rem;
}

.edit-media-row {
 display: flex;
 align-items: stretch;
 gap: 0.75rem;
 padding: 0.6rem;
 background: var(--bg-muted, var(--bg-elevated));
 border: 1px solid var(--border);
 border-radius: var(--radius);
 transition: border-color 0.15s ease;
}
.edit-media-row:hover {
 border-color: var(--brand);
}
.edit-media-row:focus-within {
 border-color: var(--brand);
 box-shadow: 0 0 0 3px var(--brand-soft-2, rgba(0, 0, 0, 0.04));
}

.edit-media-thumb {
 flex-shrink: 0;
 width: 80px;
 height: 80px;
 border-radius: var(--radius-sm);
 background-color: var(--bg);
 background-size: cover;
 background-position: center;
 background-repeat: no-repeat;
 border: 1px solid var(--border-light, var(--border));
}
.edit-media-thumb-video {
 display: flex;
 align-items: center;
 justify-content: center;
 background: linear-gradient(135deg, #2a2826 0%, #1a1816 100%);
 color: #fff;
}
.edit-media-thumb-video .icon {
 width: 28px;
 height: 28px;
 fill: rgba(255, 255, 255, 0.85);
}

.edit-media-fields {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
 justify-content: center;
}

@media (max-width: 480px) {
 .edit-media-row {
 flex-direction: column;
 }
 .edit-media-thumb {
 width: 100%;
 height: 120px;
 }
}

.picker-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
 gap: 0.75rem;
}
.picker-item {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 padding: 0;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 cursor: pointer;
 overflow: hidden;
 transition: border-color 0.15s ease, transform 0.15s ease;
 text-align: left;
}
.picker-item:hover {
 border-color: var(--brand);
 transform: translateY(-1px);
}
.picker-item-thumb {
 width: 100%;
 height: 100px;
 background-color: var(--bg-muted, #f0ece4);
 background-size: cover;
 background-position: center;
 background-repeat: no-repeat;
}
.picker-item-title {
 padding: 0.4rem 0.6rem;
 font-size: 0.78rem;
 color: var(--text);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.paperbin-dist {
 margin: 0.8rem 0 1.2rem;
 padding: 0.9rem 1rem 0.95rem;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius-lg);
 display: grid;
 grid-template-columns: 1.4fr 1fr 0.8fr;
 gap: 0.9rem 1.1rem;
}
.paperbin-dist .arch-dist-title:first-child { margin-top: 0; }
.paperbin-dist .arch-dist-list { gap: 0.4rem; }
.paperbin-dist .arch-dist-row { font-size: 0.85rem; grid-template-columns: 5.5rem 1fr 2.4rem; }
.paperbin-dist .arch-dist-bar { height: 5px; }
.paperbin-dist-summary {
 display: flex;
 flex-direction: column;
 justify-content: center;
 gap: 0.5rem;
 padding: 0.2rem 0.4rem 0.2rem 0;
 border-right: 1px dashed var(--border-light);
}
.paperbin-dist-summary-num {
 font-family: var(--font);
 font-size: 1.7rem;
 line-height: 1;
 color: var(--text);
 letter-spacing: 0.02em;
}
.paperbin-dist-summary-label {
 font-size: 0.78rem;
 color: var(--text-muted);
 letter-spacing: 0.06em;
}
@media (max-width: 880px) {
 .paperbin-dist { grid-template-columns: 1fr 1fr; }
 .paperbin-dist-summary { grid-column: 1 / -1; border-right: none; border-bottom: 1px dashed var(--border-light); padding: 0 0 0.6rem; flex-direction: row; align-items: baseline; gap: 0.6rem; }
}
@media (max-width: 540px) {
 .paperbin-dist { grid-template-columns: 1fr; }
 .paperbin-dist-summary { border-bottom: 1px dashed var(--border-light); }
}
.arch-dist-title {
 margin: 0 0 0.8rem;
 font-size: 0.95rem;
 font-weight: 600;
 letter-spacing: 0.06em;
 color: var(--text);
}
.arch-dist-list { display: flex; flex-direction: column; gap: 0.5rem; }
.arch-dist-row {
 display: grid;
 grid-template-columns: 6.5rem 1fr 3rem;
 align-items: center;
 gap: 0.6rem;
 font-size: 0.85rem;
}
.arch-dist-name { color: var(--text); letter-spacing: 0.04em; }
.arch-dist-c { color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.arch-dist-bar {
 height: 6px;
 background: var(--bg-hover);
 border-radius: 3px;
 overflow: hidden;
}
.arch-dist-bar i {
 display: block;
 height: 100%;
 background: linear-gradient(90deg, var(--brand), var(--accent, #b78168));
 border-radius: 3px;
}

.modal-card {
 padding: 0;
 gap: 0;
 max-height: 90vh;
 overflow: hidden;
}
.modal-card-wide { max-width: 720px; }
.modal-card .modal-header { flex-shrink: 0; }
.modal-card .modal-body {
 flex: 1;
 overflow-y: auto;
 padding: 1.2rem 1.6rem;
}
.modal-card .modal-actions {
 flex-shrink: 0;
 padding: 0 1.6rem 1.2rem;
 margin-top: 0;
}
.modal-title {
 margin: 0;
 font-size: 1.05rem;
 font-weight: 600;
 letter-spacing: 0.06em;
 color: var(--text);
}
.modal-actions {
 display: flex;
 gap: 0.6rem;
 justify-content: flex-end;
}

.form-grid-full { grid-column: 1 / -1; }
.toolbar-meta { color: var(--text-muted); font-size: 0.85rem; }

.badge-on { background: rgba(122, 140, 90, 0.12); color: var(--success); }
.badge-off { background: rgba(120, 120, 120, 0.14); color: var(--text-muted); }

.btn-mini { padding: 3px 10px; font-size: 0.78rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover, #a04534); }

.pagination { display: flex; gap: 0.4rem; align-items: center; padding: 0.8rem 0; flex-wrap: wrap; }
.pagination-info { color: var(--text-muted); font-size: 0.85rem; padding: 0 0.4rem; }

.modal-overlay.show .modal {

 outline: none;
}

.modal-overlay.show .modal:focus-within {
 box-shadow: var(--shadow-lg), 0 0 0 2px var(--brand-soft);
}

.pb-table-wrap {
 border: 1px solid var(--pb-folding);
 border-radius: 12px;
 overflow-x: auto;
 overflow-y: hidden;
 -webkit-overflow-scrolling: touch;
 background: var(--pb-paper);
 box-shadow: 0 1px 0 rgba(108, 120, 98, 0.04) inset, 0 1px 2px rgba(60, 70, 50, 0.03);
}

.pb-toggle-reply {
 display: inline-flex;
 align-items: center;
 gap: 0.3rem;
 padding: 0.42rem 0.85rem;
 font-size: 0.82rem;
 letter-spacing: 0.06em;
 border: 1px solid var(--pb-folding);
 border-radius: 8px;
 background: var(--pb-paper);
 color: var(--pb-ink-soft);
 cursor: pointer;
 transition: all 0.2s ease;
 white-space: nowrap;
}
.pb-toggle-reply:hover {
 border-color: var(--pb-sage);
 color: var(--pb-sage);
}
.pb-toggle-reply.is-active {
 background: var(--pb-sage);
 border-color: var(--pb-sage);
 color: #fffdf7;
}
.pb-toggle-icon { font-size: 0.9rem; line-height: 1; }

.pb-replies-list {
 display: flex;
 flex-direction: column;
 gap: 16px;
 padding: 4px 0;
}
.pb-replies-empty {
 padding: 56px 24px;
 text-align: center;
 font-family: var(--font);
 font-size: 0.92rem;
 color: var(--ink-muted);
 line-height: 1.9;
 letter-spacing: 0.04em;
}

.pb-reply-card {
 position: relative;
 background: var(--pb-paper);
 border: 1px solid var(--pb-folding);
 border-left: 3px solid var(--pb-sage);
 border-radius: 4px 10px 10px 4px;
 padding: 18px 22px 14px;
 box-shadow: 0 1px 2px rgba(60, 70, 50, 0.04);
 transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.pb-reply-card:hover {
 box-shadow: 0 3px 10px rgba(60, 70, 50, 0.08);
 border-left-color: var(--brand);
}
.pb-reply-card[data-status="deleted"] {
 opacity: 0.55;
 border-left-style: dashed;
}
.pb-reply-card[data-status="hidden"] {
 border-left-color: var(--pb-state-pause);
 background: var(--pb-paper-2);
}

.pb-reply-head {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 flex-wrap: wrap;
 margin-bottom: 12px;
 font-size: 0.78rem;
 color: var(--ink-muted);
 letter-spacing: 0.04em;
}
.pb-reply-id {
 font-family: var(--font);
 font-variant-numeric: tabular-nums;
 font-weight: 600;
 color: var(--ink-soft);
 font-size: 0.92rem;
}
.pb-reply-alias {
 color: var(--ink-soft);
 font-size: 0.84rem;
 font-style: italic;
}
.pb-reply-alias::before {
 content: "·";
 color: var(--ink-muted);
 opacity: 0.5;
 margin-right: 0.3rem;
}
.pb-reply-status {
 display: inline-flex;
 align-items: center;
 padding: 0.1rem 0.55rem;
 border-radius: 4px;
 font-size: 0.7rem;
 letter-spacing: 0.08em;
 border: 1px solid transparent;
 white-space: nowrap;
 font-family: var(--font);
}
.pb-reply-status.is-active {
 color: var(--pb-echo);
 background: var(--pb-echo-soft);
 border-color: rgba(90, 122, 82, 0.18);
}
.pb-reply-status.is-hidden {
 color: var(--ink-muted);
 background: var(--pb-paper-3);
}
.pb-reply-status.is-deleted {
 color: var(--pb-state-off);
 background: rgba(184, 84, 80, 0.08);
 border-color: rgba(184, 84, 80, 0.18);
}
.pb-reply-status::before {
 content: "";
 width: 5px; height: 5px;
 border-radius: 50%;
 background: currentColor;
 margin-right: 0.4rem;
 opacity: 0.7;
}
.pb-reply-time {
 margin-left: auto;
 font-size: 0.74rem;
 font-family: ui-monospace, "SF Mono", Consolas, monospace;
 color: var(--ink-muted);
 letter-spacing: 0;
}

.pb-reply-content {
 font-family: var(--font);
 font-size: 1.0rem;
 line-height: 1.75;
 color: var(--ink);
 letter-spacing: 0.01em;
 word-break: break-word;
 margin: 0 0 12px;
 padding: 0;
}

.pb-reply-ctx {
 margin: 8px 0 14px;
 padding: 12px 16px;
 background: var(--pb-paper-3);
 border-left: 2px dashed var(--pb-folding);
 border-radius: 0 6px 6px 0;
}
.pb-reply-ctx-head {
 display: flex;
 align-items: center;
 gap: 0.4rem;
 font-size: 0.74rem;
 color: var(--ink-muted);
 letter-spacing: 0.08em;
 margin-bottom: 6px;
 flex-wrap: wrap;
}
.pb-reply-ctx-arrow {
 font-size: 0.9rem;
 color: var(--pb-fold);
 line-height: 1;
}
.pb-reply-ctx-id {
 font-family: var(--font);
 font-weight: 600;
 color: var(--pb-fold);
 font-variant-numeric: tabular-nums;
}
.pb-reply-ctx-alias {
 color: var(--ink-muted);
 font-style: italic;
}
.pb-reply-ctx-content {
 font-family: var(--font);
 font-size: 0.88rem;
 line-height: 1.7;
 color: var(--ink-soft);
 letter-spacing: 0.01em;
 font-style: italic;
 word-break: break-word;
}

.pb-reply-foot {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 0.8rem;
 flex-wrap: wrap;
 padding-top: 12px;
 border-top: 1px dashed var(--pb-folding);
}
.pb-reply-foot .pb-ip {
 font-size: 0.8rem;
}
.pb-reply-ops {
 display: inline-flex;
 gap: 0.3rem;
 flex-wrap: wrap;
 align-items: center;
}
.pb-reply-ops .btn {
 min-height: 30px;
 padding: 0.3rem 0.7rem;
 font-size: 0.78rem;
 line-height: 1.2;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0.25rem;
 background: transparent;
 border: 1px solid var(--pb-folding);
 border-radius: 6px;
 color: var(--ink-soft);
 font-weight: 500;
 cursor: pointer;
 transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pb-reply-ops .btn:hover {
 background: var(--pb-paper-3);
 color: var(--ink);
 border-color: var(--ink-soft);
}
.pb-reply-ops .btn.is-success { color: var(--pb-echo); }
.pb-reply-ops .btn.is-success:hover { background: var(--pb-echo-soft); border-color: var(--pb-echo); }
.pb-reply-ops .btn.is-danger { color: var(--pb-state-off); }
.pb-reply-ops .btn.is-danger:hover { background: rgba(184, 84, 80, 0.08); border-color: var(--pb-state-off); }

@media (max-width: 640px) {
 .pb-reply-card { padding: 14px 16px 12px; }
 .pb-reply-content { font-size: 0.96rem; }
 .pb-reply-time { margin-left: 0; width: 100%; text-align: right; }
 .pb-reply-foot { flex-direction: column; align-items: stretch; }
 .pb-reply-ops { justify-content: flex-end; }
}

#pbEntriesTable th, #pbEntriesTable td,
.pb-reports-table th, .pb-reports-table td,
.pb-audit-table th, .pb-audit-table td {
 padding: 14px 14px;
 vertical-align: middle;
}

#pbEntriesTable th,
.pb-reports-table th,
.pb-audit-table th {
 font-size: 0.74rem;
 font-weight: 600;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--ink-soft);
 background: var(--pb-paper-2);
 border-bottom: 1px solid var(--pb-folding);
 white-space: nowrap;
 position: sticky;
 top: 0;
 z-index: 2;
}
#pbEntriesTable th:first-child, .pb-reports-table th:first-child, .pb-audit-table th:first-child { padding-left: 18px; }
#pbEntriesTable th:last-child, .pb-reports-table th:last-child, .pb-audit-table th:last-child { padding-right: 18px; }

.pb-table-fixed {
 table-layout: fixed;
 width: 100%;
 border-collapse: separate;
 border-spacing: 0;
}
.pb-table-fixed td {
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 border-bottom: 1px dashed var(--pb-folding);
 background: var(--pb-paper);
 transition: background 0.16s ease;
}
.pb-table-fixed td.pb-content-cell {
 white-space: normal;
}

.pb-table-fixed td.pb-time-cell,
.pb-table-fixed td.pb-ip-cell,
.pb-table-fixed td.pb-actions-cell,
.pb-table-fixed td.pb-id-cell,
.pb-table-fixed td.pb-status-cell {
 overflow: visible;
 text-overflow: clip;
 white-space: nowrap;
}

.pb-table-fixed tbody tr:last-child td { border-bottom: 0; }

.pb-table-fixed tbody tr:hover td { background: var(--pb-paper-3); }
.pb-table-fixed tbody tr.is-checked td { background: var(--pb-paper-4); }
.pb-table-fixed tbody tr.is-checked:hover td { background: var(--pb-paper-4); }

.pb-table-fixed td:first-child { position: relative; }
.pb-table-fixed tbody tr.is-checked td:first-child::before {
 content: "";
 position: absolute;
 left: 0; top: 6px; bottom: 6px;
 width: 3px;
 background: var(--brand);
 border-radius: 0 2px 2px 0;
}

.pb-content-cell {
 max-width: 380px;
 cursor: pointer;
 padding-top: 14px;
 padding-bottom: 12px;
}
.pb-content-text {
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
 line-clamp: 2;
 overflow: hidden;
 font-family: var(--font);
 font-size: 1.02rem;
 line-height: 1.6;
 color: var(--ink);
 letter-spacing: 0.005em;
 word-break: break-word;
 white-space: normal;
 font-weight: 400;
}

.pb-content-meta {
 display: flex; align-items: center; gap: 0.4rem;
 margin-top: 0.35rem;
 font-size: 0.7rem;
 color: var(--ink-muted);
 letter-spacing: 0.04em;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
.pb-content-meta .pb-mood-tag,
.pb-content-meta .pb-alias { font-size: 0.68rem; }
.pb-content-text:hover { color: var(--brand); }

.pb-mood-tag {
 display: inline-flex;
 align-items: center;
 padding: 0.05rem 0.5rem;
 border-radius: 4px;
 font-size: 0.72rem;
 background: var(--pb-echo-soft);
 color: var(--pb-echo);
 border: 1px solid transparent;
 white-space: nowrap;
}
.pb-mood-tag::before {
 content: "";
 width: 3px; height: 3px;
 border-radius: 50%;
 background: currentColor;
 margin-right: 0.4rem;
 opacity: 0.55;
}

.pb-reactions {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 4px 4px;
 align-items: center;
 justify-content: start;
 width: 100%;
}
.pb-reaction {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0.25rem;
 padding: 0.25rem 0.45rem;
 border-radius: 999px;
 font-size: 0.78rem;
 font-variant-numeric: tabular-nums;
 font-family: var(--font);
 font-weight: 500;
 background: transparent;
 border: 1px solid currentColor;
 white-space: nowrap;
 cursor: pointer;
 line-height: 1;
 transition: background 0.16s, transform 0.1s;
}
.pb-reaction:hover { transform: translateY(-1px); }
.pb-reaction:active { transform: translateY(0); }
.pb-reaction.is-zero { opacity: 0.32; border-style: dashed; }
.pb-reaction.is-zero:hover { opacity: 0.6; }
.pb-reaction-icon { display: inline-flex; }
.pb-reaction-icon .icon { width: 11px; height: 11px; }

.pb-reaction[data-pb-rx-kind="echo"] { color: var(--pb-echo); }
.pb-reaction[data-pb-rx-kind="echo"]:not(.is-zero) { background: var(--pb-echo-soft); }
.pb-reaction[data-pb-rx-kind="lit"] { color: var(--pb-lit); }
.pb-reaction[data-pb-rx-kind="lit"]:not(.is-zero) { background: var(--pb-lit-soft); }
.pb-reaction[data-pb-rx-kind="fold"] { color: var(--pb-fold); }
.pb-reaction[data-pb-rx-kind="fold"]:not(.is-zero) { background: var(--pb-fold-soft); }
.pb-reaction[data-pb-rx-kind="burn"] { color: var(--pb-burn); }
.pb-reaction[data-pb-rx-kind="burn"]:not(.is-zero) { background: var(--pb-burn-soft); }

.pb-status-cell { padding-left: 0; }
.pb-dot {
 display: inline-block;
 width: 11px;
 height: 11px;
 border-radius: 50%;
 background: var(--pb-state-pause);
 position: relative;
 cursor: help;
 vertical-align: middle;
 box-shadow: 0 0 0 4px transparent;
 transition: box-shadow 0.18s, transform 0.18s;
}
.pb-dot:hover { transform: scale(1.1); }
.pb-dot.pb-d-active {
 background: var(--pb-state-on);
 box-shadow: 0 0 0 3px rgba(90, 122, 82, 0.16);
}
.pb-dot.pb-d-hidden {
 background: var(--pb-state-pause);
 box-shadow: 0 0 0 3px rgba(154, 158, 148, 0.14);
}
.pb-dot.pb-d-deleted {
 background: var(--pb-state-off);
 box-shadow: 0 0 0 3px rgba(182, 90, 69, 0.14);
}

.pb-dot.pb-d-showcase::after {
 content: "";
 position: absolute;
 inset: -5px;
 border: 1px solid var(--brand);
 border-radius: 50%;
 opacity: 0.6;
 pointer-events: none;
}

.pb-time {
 font-variant-numeric: tabular-nums;
 font-size: 0.88rem;
 color: var(--ink-soft);
 white-space: nowrap;
 letter-spacing: 0.01em;
}

.pb-ip {
 font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
 font-size: 0.84rem;
 color: var(--ink-muted);
 letter-spacing: 0;
}
.pb-ip::after { content: "·x"; color: var(--ink-muted); opacity: 0.5; margin-left: 1px; }

.pb-alias {
 font-size: 0.88rem;
 color: var(--ink-soft);
 display: inline-flex;
 align-items: center;
 gap: 0.2rem;
 max-width: 110px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.pb-alias::before {
 content: "·";
 color: var(--ink-muted);
 opacity: 0.5;
}
.pb-alias.pb-alias-admin { color: var(--pb-echo); }
.pb-alias.pb-alias-admin::before { content: "✦"; }

.pb-id {
 font-family: var(--font);
 font-variant-numeric: tabular-nums;
 font-size: 0.92rem;
 color: var(--ink-soft);
 font-weight: 600;
 white-space: nowrap;
 letter-spacing: 0.02em;
}
.pb-id .pb-reply-badge {
 display: inline-flex;
 align-items: center;
 margin-left: 0.3rem;
 padding: 0 0.4rem;
 font-size: 0.66rem;
 background: var(--pb-fold-soft);
 color: var(--pb-fold);
 border-radius: 4px;
 vertical-align: 1px;
 font-style: normal;
 font-family: var(--font);
}

.pb-actions { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; vertical-align: middle; }
.pb-actions .btn {
 min-height: 32px;
 padding: 0.35rem 0.75rem;
 font-size: 0.82rem;
 line-height: 1.2;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0.3rem;
 background: transparent;
 border: 1px solid var(--pb-folding);
 border-radius: 7px;
 color: var(--ink-soft);
 font-weight: 500;
 cursor: pointer;
 transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pb-actions .btn:hover {
 background: var(--pb-paper-3);
 color: var(--ink);
 border-color: var(--ink-soft);
}
.pb-actions .btn .icon { width: 13px; height: 13px; }

.pb-actions .btn[data-pb-edit]:hover { color: var(--pb-lit); border-color: var(--pb-lit); background: var(--pb-lit-soft); }

.pb-actions .btn[data-pb-hide]:hover,
.pb-actions .btn[data-pb-show]:hover { color: var(--pb-echo); border-color: var(--pb-echo); background: var(--pb-echo-soft); }

.pb-actions .btn[data-pb-restore]:hover { color: var(--pb-echo); border-color: var(--pb-echo); background: var(--pb-echo-soft); }

.pb-actions .btn[data-pb-del] { color: var(--ink-muted); }
.pb-actions .btn[data-pb-del]:hover { color: var(--pb-burn); border-color: var(--pb-burn); background: var(--pb-burn-soft); }

.pb-actions .btn[data-pb-resolve]:hover { color: var(--pb-echo); border-color: var(--pb-echo); background: var(--pb-echo-soft); }
.pb-actions .btn[data-pb-reject] { color: var(--ink-muted); }
.pb-actions .btn[data-pb-reject]:hover { color: var(--pb-burn); border-color: var(--pb-burn); background: var(--pb-burn-soft); }

.pb-actions .btn.is-danger { border-color: rgba(182, 90, 69, 0.3); }

.pb-actions .btn.is-success { border-color: rgba(90, 122, 82, 0.3); }

.actions {
 text-align: right;
 vertical-align: middle;
 white-space: nowrap;
}

.pb-report-target {
 cursor: pointer;
 border-bottom: 1px dashed var(--line-strong);
 transition: color 0.15s ease, border-color 0.15s ease;
}
.pb-report-target:hover {
 color: var(--ink);
 border-bottom-color: var(--brand);
}

.pb-mood-chips {
 display: flex;
 gap: 0.35rem;
 flex-wrap: wrap;
 align-items: center;
 margin: 0 0 0.6rem;
 padding: 0.4rem 0.5rem 0.45rem;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
}
.pb-mood-chips-label {
 font-size: 0.78rem;
 color: var(--text-muted);
 letter-spacing: 0.08em;
 margin-right: 0.2rem;
}
.pb-mood-chip {
 appearance: none;
 background: transparent;
 border: 1px solid var(--border);
 color: var(--text-secondary);
 padding: 0.18rem 0.7rem;
 border-radius: 14px;
 font: inherit;
 font-size: 0.78rem;
 cursor: pointer;
 letter-spacing: 0.04em;
 transition: all 0.15s;
 display: inline-flex;
 align-items: center;
 gap: 0.3rem;
}
.pb-mood-chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-hover); }
.pb-mood-chip.is-active { color: var(--brand); background: var(--brand-soft); border-color: var(--brand); }
.pb-mood-chip-count { font-size: 0.78rem; opacity: 0.7; font-variant-numeric: tabular-nums; }

.pb-bulk-bar {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 padding: 0.55rem 0.8rem;
 margin: 0 0 0.6rem;
 background: var(--brand-soft-2);
 border: 1px solid var(--brand-soft);
 border-radius: var(--radius);
 font-size: 0.85rem;
 color: var(--text);
 flex-wrap: wrap;
}
.pb-bulk-bar.is-hidden { display: none; }
.pb-bulk-bar-info { color: var(--text-secondary); }
.pb-bulk-bar-info strong { color: var(--brand); font-weight: 600; }
.pb-bulk-bar-actions { margin-left: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pb-check {
 appearance: none;
 width: 15px;
 height: 15px;
 border: 1.5px solid var(--border-strong);
 border-radius: 3px;
 background: var(--bg-elevated);
 cursor: pointer;
 position: relative;
 vertical-align: -2px;
 flex-shrink: 0;
}
.pb-check:checked { background: var(--brand); border-color: var(--brand); }
.pb-check:checked::after {
 content: "";
 position: absolute;
 left: 3px;
 top: 0;
 width: 4px;
 height: 8px;
 border: solid #fff;
 border-width: 0 2px 2px 0;
 transform: rotate(45deg);
}
.pb-th-check, .pb-td-check { width: 36px; padding-left: 18px !important; padding-right: 0 !important; }
.pb-th-check .pb-check, .pb-td-check .pb-check { vertical-align: middle; }

#pbSortDir { padding: 4px 8px; line-height: 1; }
#pbSortDir .icon { width: 14px; height: 14px; }
#pbSortDir.is-asc .icon { transform: rotate(180deg); transition: transform 0.2s ease; }
#pbSortDir .icon { transition: transform 0.2s ease; }

.pb-reaction-row .arch-dist-name { display: inline-flex; align-items: center; gap: 0.3rem; }
.pb-reaction-name .icon { width: 12px; height: 12px; opacity: 0.7; }

.pb-reaction {
 display: inline-flex; align-items: center; gap: 0.25rem;
 padding: 2px 6px; border-radius: 6px;
 background: var(--bg-hover, rgba(0,0,0,0.03));
 font-size: 0.78rem; line-height: 1;
 cursor: pointer;
 transition: background 0.15s, transform 0.1s;
}
.pb-reaction:hover { background: var(--brand-soft, rgba(122,140,90,0.12)); transform: translateY(-1px); }
.pb-reaction.is-zero { opacity: 0.4; cursor: default; }
.pb-reaction.is-zero:hover { background: var(--bg-hover, rgba(0,0,0,0.03)); transform: none; }
.pb-reaction-icon { display: inline-flex; align-items: center; }
.pb-reaction-icon .icon { width: 11px; height: 11px; }

.pb-reply-hint {
 display: inline-flex; align-items: center; gap: 0.25rem;
 margin-top: 0.25rem;
 font-size: 0.72rem; color: var(--brand);
}
.pb-reply-hint .icon { width: 11px; height: 11px; }
.pb-reply-badge {
 display: inline-flex; align-items: center; gap: 0.2rem;
 margin-left: 0.4rem;
 padding: 1px 6px;
 font-size: 0.7rem;
 color: var(--brand);
 background: var(--brand-soft, rgba(122,140,90,0.12));
 border-radius: 4px;
}
.pb-reply-badge .icon { width: 9px; height: 9px; }

.pb-trend { padding: 0.4rem 0.4rem 1rem; }
.pb-trend-head {
 display: flex; align-items: center; gap: 1rem;
 margin-bottom: 0.9rem;
 padding: 0 0.4rem;
}
.pb-trend-stat { display: flex; align-items: baseline; gap: 0.4rem; }
.pb-trend-num {
 font-family: var(--font);
 font-size: 1.45rem; color: var(--brand); font-weight: 600;
 font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
 line-height: 1;
}
.pb-trend-num-2 { color: var(--accent); }
.pb-trend-lbl { font-size: 0.76rem; color: var(--text-muted); letter-spacing: 0.04em; }
.pb-trend-divider {
 display: inline-block;
 width: 1px; height: 20px;
 background: var(--pb-folding);
}
.pb-trend-legend { margin-left: auto; display: flex; gap: 0.9rem; font-size: 0.75rem; color: var(--text-muted); }
.pb-trend-leg { display: inline-flex; align-items: center; gap: 0.35rem; }
.pb-trend-leg i { display: inline-block; width: 16px; height: 2px; border-radius: 1px; }
.pb-leg-entry { background: var(--brand); }
.pb-leg-react { background: transparent; border-top: 1.6px dashed var(--accent); height: 0; }

.pb-trend-chart { position: relative; }
.pb-trend-svg {
 width: 100%; height: auto; display: block;
 font-family: var(--font); overflow: visible;
}

.pb-trend-axis {
 fill: var(--text-muted);
 font-size: 9.5px;
 font-variant-numeric: tabular-nums;
 letter-spacing: 0.02em;
}
.pb-trend-axis-r { fill: var(--accent); opacity: 0.75; }

.pb-trend-grid {
 stroke: var(--pb-folding);
 stroke-width: 1;
 opacity: 0.4;
}

.pb-trend-guide {
 stroke: var(--brand);
 stroke-width: 1;
 stroke-dasharray: 3 3;
 opacity: 0;
 transition: opacity 0.15s ease;
 pointer-events: none;
}

.pb-trend-area {
 fill: var(--brand);
 fill-opacity: 0.10;
 opacity: 0;
 animation: pb-trend-fade 0.9s ease 0.5s forwards;
}
@keyframes pb-trend-fade { to { opacity: 1; } }

.pb-trend-line {
 fill: none;
 stroke-linecap: round;
 stroke-linejoin: round;
 stroke-dasharray: 100;
 stroke-dashoffset: 100;
 animation: pb-trend-draw 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.pb-trend-line-entry {
 stroke: var(--brand);
 stroke-width: 2;
 animation-delay: 0.1s;
}
@keyframes pb-trend-draw { to { stroke-dashoffset: 0; } }

.pb-trend-line-react {
 stroke: var(--accent);
 stroke-width: 1.8;
 stroke-dasharray: 5 3;
 stroke-dashoffset: 0;
 opacity: 0;
 animation: pb-trend-fade 0.8s ease 0.6s forwards;
}

.pb-trend-pt {
 opacity: 0;
 animation: pb-trend-fadein 0.4s ease forwards;
}
@keyframes pb-trend-fadein { to { opacity: 1; } }

.pb-trend-dot {
 fill: var(--brand);
 stroke: var(--bg-elevated);
 stroke-width: 1.5;
 transition: r 0.15s ease;
}

.pb-trend-dot-halo {
 fill: var(--brand);
 fill-opacity: 0.18;
 animation: pb-trend-pulse 2.4s ease-in-out infinite;
 animation-delay: 1.4s;
}
@keyframes pb-trend-pulse {
 0%, 100% { r: 7; fill-opacity: 0.18; }
 50% { r: 10; fill-opacity: 0.08; }
}
.pb-trend-dot-today { fill: var(--brand); }

.pb-trend-dot-r {
 fill: var(--accent);
 stroke: var(--bg-elevated);
 stroke-width: 1;
 opacity: 0.85;
}

.pb-trend-label {
 fill: var(--brand);
 font-size: 10.5px;
 font-weight: 600;
 font-variant-numeric: tabular-nums;
 paint-order: stroke;
 stroke: var(--bg-elevated);
 stroke-width: 3;
 stroke-linejoin: round;
}

.pb-trend-date {
 fill: var(--text-muted);
 font-size: 10px;
 letter-spacing: 0.02em;
}
.pb-trend-date-today {
 fill: var(--brand);
 font-weight: 600;
}

.pb-trend-hit { cursor: pointer; }

.pb-trend-tooltip {
 position: absolute;
 width: 132px;
 padding: 8px 10px;
 background: var(--pb-paper);
 border: 1px solid var(--pb-folding);
 border-radius: 8px;
 box-shadow: 0 4px 16px rgba(60, 50, 30, 0.14);
 font-family: var(--font);
 font-size: 0.78rem;
 color: var(--text);
 pointer-events: none;
 opacity: 0;
 transition: opacity 0.15s ease;
 z-index: 10;
}
.pb-tt-date {
 font-size: 0.72rem;
 color: var(--text-muted);
 letter-spacing: 0.04em;
 margin-bottom: 4px;
 padding-bottom: 4px;
 border-bottom: 1px dashed var(--pb-folding);
}
.pb-tt-row {
 display: flex;
 align-items: center;
 gap: 5px;
 padding: 1.5px 0;
}
.pb-tt-row span { color: var(--text-muted); }
.pb-tt-row b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.pb-tt-dot {
 display: inline-block;
 width: 7px; height: 7px;
 border-radius: 50%;
 flex-shrink: 0;
}
.pb-tt-entry { background: var(--brand); }
.pb-tt-react { background: var(--accent); }

.pb-d-head {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 flex-wrap: wrap;
 margin-bottom: 16px;
 padding-bottom: 12px;
 border-bottom: 1px dashed var(--pb-folding);
 font-size: 0.82rem;
 color: var(--ink-muted);
 letter-spacing: 0.04em;
}
.pb-d-id {
 font-family: var(--font);
 font-variant-numeric: tabular-nums;
 font-weight: 600;
 color: var(--ink-soft);
 font-size: 0.96rem;
}
.pb-d-mood {
 display: inline-flex;
 align-items: center;
 padding: 0.1rem 0.6rem;
 border-radius: 4px;
 font-size: 0.72rem;
 background: var(--pb-echo-soft);
 color: var(--pb-echo);
 letter-spacing: 0.08em;
 font-family: var(--font);
}
.pb-d-mood::before {
 content: "";
 width: 4px; height: 4px;
 border-radius: 50%;
 background: currentColor;
 margin-right: 0.35rem;
 opacity: 0.6;
}
.pb-d-status {
 display: inline-flex;
 align-items: center;
 padding: 0.1rem 0.55rem;
 border-radius: 4px;
 font-size: 0.7rem;
 letter-spacing: 0.08em;
 border: 1px solid transparent;
 white-space: nowrap;
 font-family: var(--font);
}
.pb-d-status.is-active { color: var(--pb-echo); background: var(--pb-echo-soft); border-color: rgba(90, 122, 82, 0.18); }
.pb-d-status.is-hidden { color: var(--ink-muted); background: var(--pb-paper-3); }
.pb-d-status.is-deleted { color: var(--pb-state-off); background: rgba(184, 84, 80, 0.08); border-color: rgba(184, 84, 80, 0.18); }
.pb-d-status::before {
 content: "";
 width: 5px; height: 5px;
 border-radius: 50%;
 background: currentColor;
 margin-right: 0.4rem;
 opacity: 0.7;
}
.pb-d-time {
 margin-left: auto;
 font-size: 0.74rem;
 font-family: ui-monospace, "SF Mono", Consolas, monospace;
 color: var(--ink-muted);
 letter-spacing: 0;
}

.pb-d-content {
 font-family: var(--font);
 font-size: 1.04rem;
 line-height: 1.95;
 color: var(--ink);
 letter-spacing: 0.01em;
 word-break: break-word;
 white-space: pre-wrap;
 padding: 18px 22px;
 background: var(--pb-paper);
 border-left: 3px solid var(--pb-sage);
 border-radius: 4px 10px 10px 4px;
 margin-bottom: 16px;
 box-shadow: 0 1px 2px rgba(60, 70, 50, 0.04);
}

.pb-d-ctx {
 margin: 0 0 18px;
 padding: 14px 18px;
 background: var(--pb-paper-3);
 border-left: 2px dashed var(--pb-folding);
 border-radius: 0 6px 6px 0;
}
.pb-d-ctx-head {
 display: flex;
 align-items: center;
 gap: 0.4rem;
 font-size: 0.76rem;
 color: var(--ink-muted);
 letter-spacing: 0.08em;
 margin-bottom: 8px;
 flex-wrap: wrap;
}
.pb-d-ctx-arrow { font-size: 0.92rem; color: var(--pb-fold); line-height: 1; }
.pb-d-ctx-label { color: var(--ink-muted); }
.pb-d-ctx-id { font-family: var(--font); font-weight: 600; color: var(--pb-fold); font-variant-numeric: tabular-nums; }
.pb-d-ctx-alias { color: var(--ink-muted); font-style: italic; }
.pb-d-ctx-content {
 font-family: var(--font);
 font-size: 0.9rem;
 line-height: 1.75;
 color: var(--ink-soft);
 letter-spacing: 0.01em;
 font-style: italic;
 word-break: break-word;
}

.pb-d-grid {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 0.6rem 1.4rem;
 font-size: 0.85rem;
 margin: 0 0 20px;
 padding: 16px 18px;
 background: var(--pb-paper-2);
 border-radius: 8px;
 border: 1px solid var(--pb-folding);
}
.pb-d-kv { display: flex; gap: 0.5rem; min-width: 0; align-items: baseline; }
.pb-d-k {
 color: var(--ink-muted);
 letter-spacing: 0.06em;
 flex-shrink: 0;
 font-size: 0.74rem;
 text-transform: uppercase;
}
.pb-d-v {
 color: var(--ink);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 min-width: 0;
 font-family: var(--font);
}
.pb-d-grid .pb-d-kv:nth-child(4) .pb-d-v,
.pb-d-grid .pb-d-kv:last-child .pb-d-v {
 font-family: ui-monospace, "SF Mono", Consolas, monospace;
 font-size: 0.82rem;
}

.pb-d-section { margin: 0 0 20px; }
.pb-d-section-title {
 margin: 0 0 10px;
 font-size: 0.74rem;
 font-weight: 600;
 letter-spacing: 0.14em;
 color: var(--ink-muted);
 text-transform: uppercase;
 padding-left: 8px;
 border-left: 2px solid var(--pb-sage);
}

.pb-d-reactions {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 0.5rem;
}
.pb-d-rx {
 display: flex; align-items: center; gap: 0.4rem;
 padding: 0.55rem 0.75rem;
 background: var(--pb-paper);
 border: 1px solid var(--pb-folding);
 border-radius: 8px;
 font-size: 0.85rem;
 cursor: pointer;
 transition: border-color 0.15s, background 0.15s, transform 0.1s;
 color: var(--ink);
 font-family: var(--font);
}
.pb-d-rx:hover { border-color: var(--brand); background: var(--pb-paper-3); transform: translateY(-1px); }
.pb-d-rx:active { transform: translateY(0); }
.pb-d-rx-ic { display: inline-flex; color: var(--brand); }
.pb-d-rx-ic .icon { width: 14px; height: 14px; }
.pb-d-rx-lb { flex: 1; }
.pb-d-rx-c {
 font-family: var(--font);
 font-variant-numeric: tabular-nums;
 color: var(--brand);
 font-weight: 600;
}
.pb-d-hint {
 display: inline-flex; align-items: center; gap: 0.3rem;
 margin-top: 0.5rem;
 font-size: 0.82rem;
 color: var(--ink-muted);
}
.pb-d-hint .icon { width: 12px; height: 12px; }

.pb-d-reply {
 padding-top: 16px;
 border-top: 1px dashed var(--pb-folding);
}
.pb-d-reply-actions {
 display: flex; align-items: center; gap: 0.8rem;
 margin-top: 0.5rem;
 flex-wrap: wrap;
}
.pb-d-reply-actions .btn { margin-left: auto; }
.pb-d-reply-actions .btn .icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 0.2rem; }
.pb-d-reply-hint {
 font-size: 0.78rem;
 color: var(--ink-muted);
 letter-spacing: 0.04em;
}
.pb-d-reply-hint strong { color: var(--pb-echo); font-weight: 600; }

@media (max-width: 640px) {
 .pb-d-content { font-size: 0.98rem; padding: 14px 16px; }
 .pb-d-grid { grid-template-columns: 1fr; gap: 0.4rem; padding: 12px 14px; }
 .pb-d-reactions { grid-template-columns: repeat(2, 1fr); }
 .pb-d-time { margin-left: 0; width: 100%; text-align: right; }
 .pb-d-reply-actions .btn { margin-left: 0; width: 100%; }
}

.pb-rx-tabs {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 0.4rem;
 margin-bottom: 1rem;
}
.pb-rx-tab {
 display: flex; align-items: center; gap: 0.4rem;
 padding: 0.5rem 0.7rem;
 background: var(--bg-hover, rgba(0,0,0,0.03));
 border: 1px solid transparent;
 border-radius: 8px;
 font-size: 0.85rem;
 cursor: pointer;
 transition: border-color 0.15s, background 0.15s;
 color: var(--text);
}
.pb-rx-tab.is-active {
 border-color: var(--brand);
 background: var(--brand-soft, rgba(122,140,90,0.08));
 color: var(--brand);
}
.pb-rx-tab-ic { display: inline-flex; color: currentColor; }
.pb-rx-tab-ic .icon { width: 13px; height: 13px; }
.pb-rx-tab-lb { flex: 1; }
.pb-rx-tab-c {
 font-family: var(--font);
 font-variant-numeric: tabular-nums;
 font-weight: 600;
}
.pb-rx-list-head {
 font-size: 0.78rem;
 color: var(--text-muted);
 letter-spacing: 0.06em;
 margin-bottom: 0.4rem;
 padding-bottom: 0.3rem;
 border-bottom: 1px solid var(--line, rgba(0,0,0,0.06));
}
.pb-rx-ul { list-style: none; padding: 0; margin: 0; }
.pb-rx-li {
 display: grid;
 grid-template-columns: 1.4rem 6.5rem 1fr 7rem;
 align-items: center;
 gap: 0.6rem;
 padding: 0.45rem 0.2rem;
 border-bottom: 1px dashed var(--line, rgba(0,0,0,0.05));
 font-size: 0.85rem;
}
.pb-rx-li:last-child { border-bottom: none; }
.pb-rx-li-ic { display: inline-flex; color: var(--brand); }
.pb-rx-li-ic .icon { width: 12px; height: 12px; }
.pb-rx-li-ip {
 font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
 font-size: 0.78rem;
 color: var(--text);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.pb-rx-li-ua {
 color: var(--text-muted);
 font-size: 0.78rem;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.pb-rx-li-time {
 color: var(--text-muted);
 font-size: 0.78rem;
 text-align: right;
 font-variant-numeric: tabular-nums;
}

.pb-edit-modal {
 max-width: 680px;
}

.pb-edit-modal .pb-edit-head {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 16px;
 padding: 22px 28px 14px;
 border-bottom: none;
}
.pb-edit-head-text {
 display: flex;
 flex-direction: column;
 gap: 4px;
 min-width: 0;
}
.pb-edit-head-text .modal-title {
 margin: 0;
 font-size: 1.12rem;
 letter-spacing: 0.04em;
}
.pb-edit-head-sub {
 margin: 0;
 font-size: 0.8rem;
 color: var(--text-muted);
 letter-spacing: 0.1em;
 font-weight: 400;
}

.pb-edit-modal .pb-edit-body {
 padding: 4px 28px 8px;
}
.pb-edit-form {
 display: flex;
 flex-direction: column;
 gap: 22px;
}
.pb-edit-row {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 22px;
}
.pb-edit-row-bottom { margin-top: 4px; }

.pb-edit-block {
 display: flex;
 flex-direction: column;
 gap: 8px;
 min-width: 0;
}
.pb-edit-block-head {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 10px;
}

.pb-edit-label {
 display: inline-block;
 font-size: 0.72rem;
 color: var(--text-muted);
 letter-spacing: 0.18em;
 text-transform: uppercase;
 font-weight: 500;
 font-family: var(--font);
}
.pb-edit-label-hint {
 display: inline-block;
 margin-left: 6px;
 font-size: 0.72rem;
 color: var(--text-muted);
 text-transform: none;
 letter-spacing: 0.04em;
 opacity: 0.7;
}
.pb-edit-counter {
 font-size: 0.78rem;
 color: var(--text-muted);
 font-variant-numeric: tabular-nums;
 letter-spacing: 0.04em;
}
.pb-edit-counter #pbContentCount { color: var(--text-secondary); font-weight: 500; }

.pb-edit-textarea {
 width: 100%;
 min-height: 140px;
 padding: 16px 18px;
 background: var(--pb-paper);
 border: 1px solid var(--border);
 border-radius: 10px;
 font-family: var(--font);
 font-size: 1rem;
 line-height: 1.75;
 color: var(--text);
 resize: vertical;
 transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
 outline: none;
}
.pb-edit-textarea::placeholder { color: var(--text-muted); opacity: 0.55; }
.pb-edit-textarea:hover { border-color: var(--border-strong); }
.pb-edit-textarea:focus {
 border-color: var(--brand);
 background: #fffdf7;
 box-shadow: 0 0 0 3px var(--brand-soft-2);
}

.pb-edit-input {
 width: 100%;
 padding: 9px 0 8px;
 background: transparent;
 border: none;
 border-bottom: 1px solid var(--border);
 font-family: var(--font);
 font-size: 0.95rem;
 color: var(--text);
 letter-spacing: 0.01em;
 transition: border-color 0.2s ease, background 0.2s ease;
 outline: none;
 border-radius: 0;
 -webkit-appearance: none;
 appearance: none;
}
.pb-edit-input::placeholder { color: var(--text-muted); opacity: 0.55; }
.pb-edit-input:hover { border-bottom-color: var(--border-strong); }
.pb-edit-input:focus {
 border-bottom-color: var(--brand);
 background: linear-gradient(to top, var(--brand-soft-2) 0%, transparent 60%);
}
.pb-edit-input-number { font-variant-numeric: tabular-nums; }

.pb-edit-input-number::-webkit-outer-spin-button,
.pb-edit-input-number::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pb-edit-chips {
 display: flex;
 gap: 6px;
 flex-wrap: wrap;
}
.pb-edit-toggle { gap: 4px; }
.pb-edit-chip {
 display: inline-flex;
 align-items: center;
 gap: 7px;
 padding: 6px 13px;
 background: transparent;
 border: 1px solid var(--border);
 border-radius: 999px;
 font-family: var(--font);
 font-size: 0.86rem;
 color: var(--text-secondary);
 cursor: pointer;
 letter-spacing: 0.02em;
 transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.1s ease;
 line-height: 1.2;
 white-space: nowrap;
}
.pb-edit-chip:hover {
 border-color: var(--border-strong);
 color: var(--text);
}
.pb-edit-chip:active { transform: translateY(1px); }
.pb-edit-chip.is-active {
 background: var(--brand-soft);
 border-color: var(--brand);
 color: var(--brand);
 font-weight: 500;
}
.pb-edit-toggle .pb-edit-chip { padding: 6px 18px; }

.pb-edit-chip-dot {
 display: inline-block;
 width: 8px;
 height: 8px;
 border-radius: 50%;
 background: var(--text-muted);
 flex-shrink: 0;
}
.pb-edit-chip-dot.pb-d-active { background: var(--pb-state-on); }
.pb-edit-chip-dot.pb-d-hidden { background: var(--pb-state-pause); }
.pb-edit-chip-dot.pb-d-deleted { background: var(--pb-state-off); }

.pb-edit-modal .pb-edit-actions {
 padding: 18px 28px 22px;
 margin-top: 6px;
 border-top: 1px dashed var(--border);
}

@media (max-width: 540px) {
 .pb-edit-modal .pb-edit-head,
 .pb-edit-modal .pb-edit-body,
 .pb-edit-modal .pb-edit-actions { padding-left: 20px; padding-right: 20px; }
 .pb-edit-row { grid-template-columns: 1fr; gap: 18px; }
}

.pb-r-pill {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 3px 9px 3px 7px;
 border: 1px solid var(--border);
 border-radius: 999px;
 font-size: 0.78rem;
 color: var(--text-secondary);
 background: transparent;
 letter-spacing: 0.02em;
 line-height: 1.2;
 white-space: nowrap;
}
.pb-r-dot {
 display: inline-block;
 width: 7px;
 height: 7px;
 border-radius: 50%;
 background: var(--text-muted);
 flex-shrink: 0;
}

.pb-r-pending { background: var(--pb-state-pending, #c9a86a); box-shadow: 0 0 0 2px rgba(201, 168, 106, 0.16); }
.pb-r-resolved { background: var(--pb-state-on, #5a7a52); box-shadow: 0 0 0 2px rgba(90, 122, 82, 0.16); }
.pb-r-rejected { background: var(--pb-state-off, #b65a45); box-shadow: 0 0 0 2px rgba(182, 90, 69, 0.14); }

.pb-r-action.pb-act-create { color: #4a5d76; border-color: rgba(74, 93, 118, 0.28); }
.pb-r-action.pb-act-create .pb-r-dot { background: #4a5d76; }
.pb-r-action.pb-act-update { color: #5a7a52; border-color: rgba(90, 122, 82, 0.28); }
.pb-r-action.pb-act-update .pb-r-dot { background: #5a7a52; }
.pb-r-action.pb-act-del { color: #b65a45; border-color: rgba(182, 90, 69, 0.28); }
.pb-r-action.pb-act-del .pb-r-dot { background: #b65a45; }
.pb-r-action.pb-act-restore { color: #7a8a5e; border-color: rgba(122, 138, 94, 0.30); }
.pb-r-action.pb-act-restore .pb-r-dot { background: #7a8a5e; }
.pb-r-action.pb-act-reply { color: #8a6d4a; border-color: rgba(138, 109, 74, 0.28); }
.pb-r-action.pb-act-reply .pb-r-dot { background: #8a6d4a; }
.pb-r-action.pb-act-hide { color: #9a9e94; border-color: rgba(154, 158, 148, 0.32); }
.pb-r-action.pb-act-hide .pb-r-dot { background: #9a9e94; }
.pb-r-action.pb-act-show { color: #5a7a52; border-color: rgba(90, 122, 82, 0.28); }
.pb-r-action.pb-act-show .pb-r-dot { background: #5a7a52; }
.pb-r-action.pb-act-resolve { color: #4a5d76; border-color: rgba(74, 93, 118, 0.28); }
.pb-r-action.pb-act-resolve .pb-r-dot { background: #4a5d76; }
.pb-r-action.pb-act-default { color: var(--text-muted); }
.pb-r-action.pb-act-default .pb-r-dot { background: var(--text-muted); }

.pb-feedback-tag {
 display: inline-flex;
 align-items: center;
 gap: 5px;
 padding: 3px 10px;
 background: var(--sage-soft, rgba(122, 140, 90, 0.10));
 color: #5e6e4e;
 border: 1px dashed rgba(122, 140, 90, 0.36);
 border-radius: 999px;
 font-size: 0.78rem;
 letter-spacing: 0.02em;
}
.pb-feedback-mini {
 display: inline-block;
 margin-left: 6px;
 padding: 1px 6px;
 font-size: 0.68rem;
 color: #5e6e4e;
 background: rgba(122, 140, 90, 0.10);
 border-radius: 4px;
 letter-spacing: 0.1em;
 vertical-align: middle;
}

.pb-report-target {
 display: inline-flex;
 align-items: baseline;
 gap: 8px;
 cursor: pointer;
 padding: 2px 0;
 max-width: 100%;
 transition: color 0.15s ease;
}
.pb-report-target-id {
 font-family: var(--font);
 font-size: 0.78rem;
 color: var(--text-muted);
 font-variant-numeric: tabular-nums;
 flex-shrink: 0;
 border-bottom: 1px dashed var(--line-strong, rgba(0,0,0,0.18));
 padding-bottom: 1px;
}
.pb-report-target-text {
 font-family: var(--font);
 font-size: 0.92rem;
 color: var(--text);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 max-width: 280px;
}
.pb-report-target:hover .pb-report-target-text { color: var(--brand); }
.pb-report-target:hover .pb-report-target-id { color: var(--brand); border-bottom-color: var(--brand); }

.pb-reason-text {
 font-family: var(--font);
 font-size: 0.92rem;
 color: var(--text);
 line-height: 1.55;
 letter-spacing: 0.005em;
 word-break: break-word;
}

.pb-reports-table td,
.pb-audit-table td {
 border-bottom: 1px dashed var(--pb-folding);
 background: var(--pb-paper);
 transition: background 0.16s ease;
}
.pb-reports-table tbody tr:hover td,
.pb-audit-table tbody tr:hover td { background: var(--pb-paper-3); }

.pb-reports-table colgroup col:nth-child(1) { width: 82px; }
.pb-reports-table colgroup col:nth-child(2) { width: 22%; min-width: 200px; }
.pb-reports-table colgroup col:nth-child(3) { width: auto; min-width: 160px; }
.pb-reports-table colgroup col:nth-child(4) { width: 120px; }
.pb-reports-table colgroup col:nth-child(5) { width: 144px; }
.pb-reports-table colgroup col:nth-child(6) { width: 158px; }
.pb-reports-table colgroup col:nth-child(7) { width: 108px; }
.pb-reports-table colgroup col:nth-child(8) { width: 190px; }

.data-table tr.pb-row-pending {
 background: linear-gradient(to right, rgba(201, 168, 106, 0.05), transparent 60%) !important;
}
.data-table tr.pb-row-pending:hover {
 background: rgba(201, 168, 106, 0.08) !important;
}

.pb-audit-action-cell { white-space: nowrap; }

.pb-audit-table colgroup col:nth-child(1) { width: 76px; }
.pb-audit-table colgroup col:nth-child(2) { width: 136px; }
.pb-audit-table colgroup col:nth-child(3) { width: 84px; }
.pb-audit-table colgroup col:nth-child(4) { width: auto; min-width: 280px; }
.pb-audit-table colgroup col:nth-child(5) { width: 120px; }
.pb-audit-table colgroup col:nth-child(6) { width: 158px; }

.pb-audit-op {
 display: inline-block;
 padding: 2px 8px;
 background: rgba(107, 144, 128, 0.10);
 color: #4a5d76;
 border-radius: 4px;
 font-family: var(--font);
 font-size: 0.78rem;
 letter-spacing: 0.02em;
}

.pb-audit-meta {
 display: flex;
 flex-wrap: wrap;
 gap: 6px 12px;
 align-items: baseline;
}
.pb-audit-kv {
 display: inline-flex;
 align-items: baseline;
 gap: 5px;
 font-size: 0.9rem;
 line-height: 1.5;
 max-width: 100%;
}
.pb-audit-k {
 color: var(--text-muted);
 font-size: 0.76rem;
 letter-spacing: 0.08em;
 text-transform: uppercase;
 flex-shrink: 0;
}
.pb-audit-v {
 color: var(--text);
 font-family: var(--font);
 word-break: break-word;
 white-space: normal;
}
.pb-audit-detail { min-width: 0; max-width: 360px; }

.pb-feedback-mini { font-size: 0.7rem; }

.pb-badge-general {
 background: var(--sage-soft, rgba(122,140,90,0.10));
 color: var(--ink, var(--text));
 border: 1px dashed var(--line-strong, rgba(0,0,0,0.16));
}

.form-grid-half {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 0.85rem 1rem;
 align-content: start;
}
.form-grid-half .form-row-full { grid-column: 1 / -1; }
.form-grid-half .form-row-half { grid-column: span 1; }
.form-grid-half .form-row {
 flex-direction: column;
 align-items: stretch;
 gap: 0;
}
.form-grid-half .form-row-inline {
 flex-direction: row;
 align-items: center;
 gap: 0.55rem;
}
@media (max-width: 640px) {
 .form-grid-half { grid-template-columns: 1fr; }
}

.form-section {
 margin-top: 0.3rem;
 margin-bottom: -0.2rem;
 padding-bottom: 0.35rem;
 border-bottom: 1px solid var(--border);
 display: flex;
 align-items: center;
 gap: 0.5rem;
}
.form-section:first-of-type { margin-top: 0; }
.form-section-title {
 margin: 0;
 font-size: 0.78rem;
 font-weight: 500;
 color: var(--text-muted, #888);
 letter-spacing: 0.16em;
 text-transform: none;
}
.form-section::before {
 content: '';
 width: 3px;
 height: 11px;
 background: var(--accent, #5d6e4f);
 border-radius: 1px;
 opacity: 0.5;
}

.form-fieldset {
 border: 1px solid var(--border);
 border-radius: var(--radius-sm, 6px);
 padding: 0.75rem 0.9rem 0.85rem;
 background: rgba(0, 0, 0, 0.015);
}
.form-fieldset legend {
 font-size: 0.76rem;
 letter-spacing: 0.06em;
 color: var(--text, #333);
 padding: 0 0.4em;
 font-weight: 500;
 text-transform: none;
}
.form-fieldset .form-em {
 font-style: normal;
 text-transform: none;
 letter-spacing: 0;
 font-size: 0.72rem;
 color: var(--text-muted, #999);
 font-weight: normal;
 margin-left: 0.4em;
}
.dark-mode .form-fieldset {
 background: rgba(255, 255, 255, 0.02);
}

.upload-row {
 display: flex;
 flex-direction: column;
 gap: 0.55rem;
 margin-top: 0.4rem;
}
.upload-row input[type="text"].upload-row-key {
 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
 font-size: 0.78rem;
 letter-spacing: 0;
 background: var(--bg-elevated, #fff);
 border-color: var(--border);
 padding: 0.5rem 0.7rem;
}
.dark-mode .upload-row input[type="text"].upload-row-key {
 background: rgba(0, 0, 0, 0.18);
}
.upload-row-actions {
 display: flex;
 gap: 0.4rem;
 align-items: center;
}
.upload-row-actions .btn {
 display: inline-flex;
 align-items: center;
 gap: 0.3rem;
 cursor: pointer;
}
.upload-row-actions .btn input[type="file"] {
 display: none;
}
.upload-preview {
 margin-top: 0.4rem;
 border-radius: 6px;
 overflow: hidden;
 max-width: 220px;
 background: rgba(0, 0, 0, 0.04);
 border: 1px solid var(--border);
 position: relative;
 min-height: 80px;
 display: flex;
 align-items: center;
 justify-content: center;
}
.upload-preview img {
 display: block;
 width: 100%;
 height: auto;
 max-height: 130px;
 object-fit: cover;
}
.upload-preview.is-empty::after {
 content: '封面未就绪';
 font-size: 0.78rem;
 color: var(--text-muted, #999);
 letter-spacing: 0.04em;
 padding: 1.4rem 0;
}
.upload-preview.is-empty img { display: none; }
.upload-progress {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 font-size: 0.78rem;
 color: var(--text-muted);
}
.upload-progress-bar {
 flex: 1;
 height: 4px;
 background: rgba(0, 0, 0, 0.08);
 border-radius: 2px;
 overflow: hidden;
 position: relative;
}
.upload-progress-bar::before {
 content: '';
 position: absolute;
 inset: 0;
 width: var(--p, 0%);
 background: var(--accent, #5d6e4f);
 transition: width 0.2s ease;
}
.upload-progress-text {
 font-family: ui-monospace, monospace;
 white-space: nowrap;
 min-width: 5em;
 text-align: right;
}

.modal-actions-hint {
 flex: 1;
 font-size: 0.8rem;
 color: var(--text-muted, #999);
 margin-right: 0.6rem;
}
.modal-actions-hint.is-error { color: #c0392b; }
.modal-actions-hint.is-success { color: #4a7d4a; }

.tr-loading td,
.tr-empty td {
 padding: 0;
}
.tr-loading-inner {
 padding: 2.5rem 1rem;
 text-align: center;
 font-size: 0.85rem;
 color: var(--text-muted, #999);
 letter-spacing: 0.06em;
}
.tr-empty-inner {
 padding: 3.4rem 1rem 3.8rem;
 text-align: center;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 0.4rem;
}
.tr-empty-icon {
 width: 44px;
 height: 44px;
 border-radius: 50%;
 background: var(--brand-soft);
 color: var(--brand);
 display: flex;
 align-items: center;
 justify-content: center;
 margin-bottom: 0.5rem;
}
.tr-empty-icon svg {
 width: 22px;
 height: 22px;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.5;
}
.tr-empty-icon.is-error {
 background: rgba(196, 117, 88, 0.12);
 color: var(--danger, #c47558);
}
.tr-empty-text {
 font-size: 0.95rem;
 color: var(--text);
 letter-spacing: 0.04em;
 font-weight: 500;
}
.tr-empty-hint {
 font-size: 0.8rem;
 color: var(--text-muted, #999);
 letter-spacing: 0.04em;
}
.dark-mode .tr-empty-icon {
 background: rgba(141, 185, 163, 0.10);
}

.v-cover {
 display: block;
 width: 80px;
 height: 46px;
 object-fit: cover;
 border-radius: 6px;
 border: 1px solid var(--border);
 background: #1a1815;
}
.v-cover-fallback {
 display: inline-block;
 width: 80px;
 height: 46px;
 border-radius: 6px;
 background: rgba(0, 0, 0, 0.05);
 position: relative;
}
.v-cover-fallback::after {
 content: '';
 position: absolute;
 top: 50%;
 left: 50%;
 width: 14px;
 height: 14px;
 margin: -7px 0 0 -7px;
 border: 1.5px solid var(--text-muted, #aaa);
 border-radius: 50%;
 border-top-color: transparent;
 opacity: 0.4;
}
.dark-mode .v-cover-fallback {
 background: rgba(255, 255, 255, 0.05);
}
.v-title-block { display: flex; flex-direction: column; gap: 0.18rem; }
.v-no {
 font-size: 0.72rem;
 letter-spacing: 0.22em;
 color: var(--text-muted, #999);
 font-family: var(--serif, serif);
 font-weight: 400;
}
.v-title { font-weight: 500; font-size: 0.95rem; }
.v-sub {
 font-size: 0.82rem;
 color: var(--text-muted, #888);
 display: inline-block;
 max-width: 24em;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.v-status-pill {
 display: inline-block;
 padding: 0.18em 0.7em;
 font-size: 0.72rem;
 border-radius: 999px;
 letter-spacing: 0.06em;
 font-weight: 500;
}
.v-status-pill.is-active {
 background: rgba(107, 142, 90, 0.1);
 color: #6b8e5a;
 border: 1px solid rgba(107, 142, 90, 0.22);
}
.v-status-pill.is-hidden {
 background: rgba(150, 150, 150, 0.08);
 color: #9a948a;
 border: 1px solid rgba(150, 150, 150, 0.18);
}
.row-actions {
 display: inline-flex;
 gap: 0.3rem;
}
.row-actions .btn-icon {
 background: transparent;
 border: 1px solid var(--border);
 color: inherit;
 width: 30px;
 height: 30px;
 border-radius: 6px;
 cursor: pointer;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-size: 0.92rem;
 line-height: 1;
 transition: all 0.18s;
 opacity: 0.78;
}
.row-actions .btn-icon:hover {
 background: rgba(111, 148, 184, 0.08);
 border-color: var(--accent, #6f94b8);
 color: var(--accent, #6f94b8);
 opacity: 1;
}
.row-actions .btn-icon-danger:hover {
 background: rgba(176, 58, 58, 0.08);
 border-color: rgba(176, 58, 58, 0.35);
 color: var(--danger, #b03a3a);
 opacity: 1;
}

.toolbar-right .btn:disabled,
.toolbar-right .btn.is-disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

.cloud-panel { gap: 0.7rem; }
.cloud-panel-head {
 display: flex;
 flex-direction: column;
 gap: 0.2rem;
 margin-bottom: 0.5rem;
 padding-bottom: 0.7rem;
 border-bottom: 1px solid var(--border);
}
.cloud-panel-title {
 margin: 0;
 font-size: 0.95rem;
 font-weight: 500;
 letter-spacing: 0.04em;
 color: var(--text);
}
.cloud-panel-sub {
 margin: 0;
 font-size: 0.75rem;
 color: var(--text-muted, #999);
 letter-spacing: 0.02em;
}
.cloud-tabs {
 display: flex;
 gap: 0.25rem;
 border-bottom: 1px solid var(--border);
 margin-bottom: 0.6rem;
}
.cloud-tab {
 background: transparent;
 border: none;
 border-bottom: 2px solid transparent;
 padding: 0.45rem 0.85rem 0.55rem;
 font-size: 0.84rem;
 cursor: pointer;
 color: var(--text-muted, #888);
 letter-spacing: 0.08em;
 font-family: inherit;
 transition: color 0.15s, border-color 0.15s;
 margin-bottom: -1px;
}
.cloud-tab:hover { color: var(--text, #333); }
.cloud-tab.is-active {
 color: var(--text, #222);
 border-bottom-color: var(--accent, #5d6e4f);
 font-weight: 500;
}
.cloud-search {
 display: flex;
 gap: 0.4rem;
 margin-bottom: 0.7rem;
}
.cloud-search .search-box {
 flex: 1;
 min-width: 0;
}
.cloud-search .search-box input {
 width: 100%;
 padding: 0.45rem 0.7rem 0.45rem 2rem;
 font-size: 0.82rem;
 border-radius: var(--radius-sm);
 border: 1px solid var(--border);
 background: var(--bg-input);
 outline: none;
 transition: border-color 0.15s, box-shadow 0.15s;
}
.cloud-search .search-box input:focus {
 border-color: var(--accent, #5d6e4f);
 box-shadow: 0 0 0 3px var(--brand-soft-2);
}
.cloud-search .search-box svg {
 width: 14px;
 height: 14px;
 left: 8px;
}
.cloud-list {
 flex: 1;
 overflow-y: auto;
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
 padding-right: 4px;
 margin-right: -4px;
}
.cloud-empty {
 text-align: center;
 padding: 2.5rem 1.5rem;
 color: var(--text-muted, #888);
 font-size: 0.85rem;
 letter-spacing: 0.04em;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 0.45rem;
}
.cloud-empty-glyph {
 width: 36px;
 height: 36px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 background: rgba(0, 0, 0, 0.04);
 color: var(--text-muted, #888);
 font-size: 1.05rem;
 font-weight: 500;
 margin-bottom: 0.2rem;
}
.cloud-empty-glyph-soft {
 background: transparent;
 font-size: 1.6rem;
 color: var(--text-muted, #aaa);
 font-weight: 400;
}
.dark-mode .cloud-empty-glyph {
 background: rgba(255, 255, 255, 0.06);
}
.cloud-empty-title {
 font-size: 0.9rem;
 color: var(--text);
 letter-spacing: 0.04em;
 font-weight: 500;
}
.cloud-empty-hint {
 font-size: 0.78rem;
 color: var(--text-muted, #999);
 letter-spacing: 0.03em;
 margin-bottom: 0.3rem;
}
.cloud-empty-retry {
 margin-top: 0.3rem;
 padding: 0.4rem 1rem;
 font-size: 0.78rem;
 font-family: inherit;
 color: var(--text);
 background: transparent;
 border: 1px solid var(--border);
 border-radius: 999px;
 cursor: pointer;
 letter-spacing: 0.06em;
 transition: all 0.18s;
}
.cloud-empty-retry:hover {
 background: rgba(0, 0, 0, 0.05);
 border-color: var(--text-muted, #888);
}
.dark-mode .cloud-empty-retry:hover {
 background: rgba(255, 255, 255, 0.06);
}
.cloud-item {
 display: grid;
 grid-template-columns: 88px minmax(0, 1fr) auto;
 align-items: center;
 gap: 0.65rem;
 padding: 0.5rem;
 background: var(--bg-elevated, #fff);
 border: 1px solid var(--border);
 border-radius: 6px;
 cursor: pointer;
 transition: border-color 0.15s, background-color 0.15s;
}
.cloud-item:hover {
 border-color: var(--accent, #5d6e4f);
 background: rgba(0, 0, 0, 0.02);
}
.cloud-item-thumb {
 width: 88px;
 height: 50px;
 border-radius: 4px;
 overflow: hidden;
 background: rgba(0, 0, 0, 0.06);
 position: relative;
 display: flex;
 align-items: center;
 justify-content: center;
}
.cloud-item-thumb img {
 width: 100%;
 height: 100%;
 object-fit: cover;
}
.cloud-item-thumb-fallback {
 width: 100%;
 height: 100%;
 background: rgba(0, 0, 0, 0.04);
 color: var(--text-muted, #999);
 font-size: 0.7rem;
 letter-spacing: 0.12em;
 display: flex;
 align-items: center;
 justify-content: center;
 font-family: ui-monospace, monospace;
}
.dark-mode .cloud-item-thumb {
 background: rgba(255, 255, 255, 0.04);
}
.dark-mode .cloud-item-thumb-fallback {
 background: rgba(255, 255, 255, 0.04);
}
.cloud-item-body {
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 0.18rem;
}
.cloud-item-name {
 font-size: 0.82rem;
 font-weight: 500;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
.cloud-item-meta {
 font-size: 0.7rem;
 color: var(--text-muted, #999);
 display: flex;
 gap: 0.3em;
}
.cloud-item-pick {
 background: transparent;
 border: 1px solid var(--border);
 color: var(--text-muted, #888);
 padding: 0.32rem 0.7rem;
 font-size: 0.78rem;
 border-radius: 999px;
 cursor: pointer;
 font-family: inherit;
 letter-spacing: 0.04em;
 transition: all 0.15s;
}
.cloud-item-pick:hover {
 background: rgba(0, 0, 0, 0.04);
 border-color: var(--accent, #5d6e4f);
 color: var(--accent, #5d6e4f);
}
.dark-mode .cloud-item-pick:hover {
 background: rgba(255, 255, 255, 0.06);
}

.legal-card {
 padding: 0;
 overflow: hidden;
}

.legal-toolbar {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 16px 20px;
 border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.08));
 background: var(--bg-soft, #faf7f1);
 flex-wrap: wrap;
}
.legal-toolbar-left { flex: 1; min-width: 180px; }
.legal-toolbar-right {
 display: flex;
 gap: 8px;
 flex-wrap: wrap;
}
.legal-toolbar-right .btn { display: inline-flex; align-items: center; gap: 6px; }
.legal-status {
 font-size: 13px;
 color: var(--text-muted, #9a8e80);
 letter-spacing: 0.5px;
 line-height: 1.6;
}
.legal-status::before {
 content: '●';
 color: #6b9080;
 margin-right: 6px;
 font-size: 10px;
 vertical-align: middle;
}
.dark-mode .legal-status { color: var(--text-muted, #8e8275); }
.dark-mode .legal-toolbar { background: var(--bg-soft, #252119); }

.legal-version-badge {
 display: inline-block;
 padding: 2px 8px;
 font-size: 12px;
 font-weight: 500;
 letter-spacing: 0.5px;
 color: #6b9080;
 background: rgba(107, 144, 128, 0.12);
 border: 1px solid rgba(107, 144, 128, 0.3);
 border-radius: 4px;
 margin-left: 10px;
 vertical-align: middle;
}
.dark-mode .legal-version-badge {
 color: #8db9a3;
 background: rgba(141, 185, 163, 0.12);
 border-color: rgba(141, 185, 163, 0.3);
}

.legal-preview-btn { text-decoration: none; }

.legal-tabs {
 display: flex;
 gap: 0;
 padding: 0 20px;
 border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.08));
 background: var(--bg, #fffdf7);
}
.legal-tab {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 padding: 14px 20px;
 background: none;
 border: none;
 border-bottom: 2px solid transparent;
 cursor: pointer;
 font-family: inherit;
 font-size: 14px;
 letter-spacing: 1px;
 color: var(--text-muted, #9a8e80);
 transition: color 0.2s, border-color 0.2s;
}
.legal-tab:hover { color: var(--text, #3d3530); }
.legal-tab.active {
 color: #6b9080;
 border-bottom-color: #6b9080;
 font-weight: 500;
}
.dark-mode .legal-tab { color: var(--text-muted, #8e8275); }
.dark-mode .legal-tab:hover { color: var(--text, #e8dfd3); }
.dark-mode .legal-tab.active { color: #7da896; border-bottom-color: #7da896; }
.dark-mode .legal-tabs { background: var(--bg, #1f1c18); }

.legal-editor {
 padding: 20px;
 min-height: 400px;
}
.legal-loading {
 padding: 48px 0;
 text-align: center;
 color: var(--text-muted, #9a8e80);
 font-size: 14px;
 letter-spacing: 1px;
}

.legal-title-row {
 margin-bottom: 20px;
 padding-bottom: 16px;
 border-bottom: 1px dashed var(--border-color, rgba(0,0,0,0.08));
}
.legal-title-label {
 display: block;
 font-size: 12px;
 color: var(--text-muted, #9a8e80);
 letter-spacing: 2px;
 margin-bottom: 8px;
}
.legal-title-input {
 width: 100%;
 padding: 10px 14px;
 font-size: 16px;
 font-family: inherit;
 border: 1px solid var(--border-color, rgba(0,0,0,0.1));
 border-radius: 8px;
 background: var(--bg-soft, #faf7f1);
 color: var(--text, #3d3530);
 box-sizing: border-box;
 transition: border-color 0.2s, box-shadow 0.2s;
}
.legal-title-input:focus {
 outline: none;
 border-color: #6b9080;
 box-shadow: 0 0 0 3px rgba(107, 144, 128, 0.12);
}
.dark-mode .legal-title-input { background: var(--bg-soft, #252119); color: var(--text, #e8dfd3); }

.legal-sections { display: flex; flex-direction: column; gap: 12px; }
.legal-section-item {
 padding: 14px 16px;
 border: 1px solid var(--border-color, rgba(0,0,0,0.1));
 border-radius: 10px;
 background: var(--bg-soft, #faf7f1);
 transition: border-color 0.2s, box-shadow 0.2s;
}
.legal-section-item:hover {
 border-color: rgba(107, 144, 128, 0.4);
 box-shadow: 0 2px 8px rgba(107, 144, 128, 0.08);
}
.dark-mode .legal-section-item {
 background: var(--bg-soft, #252119);
 border-color: var(--border-color, rgba(255,255,255,0.08));
}
.dark-mode .legal-section-item:hover {
 border-color: rgba(125, 168, 150, 0.4);
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.legal-section-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 10px;
}
.legal-section-num {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-width: 24px;
 height: 24px;
 padding: 0 8px;
 font-size: 12px;
 font-weight: 600;
 color: #6b9080;
 background: rgba(107, 144, 128, 0.12);
 border-radius: 999px;
 letter-spacing: 0.5px;
}
.dark-mode .legal-section-num { color: #7da896; background: rgba(125, 168, 150, 0.15); }

.legal-section-actions {
 display: flex;
 gap: 4px;
}
.legal-section-actions button {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 28px;
 height: 28px;
 padding: 0;
 border: 1px solid var(--border-color, rgba(0,0,0,0.1));
 border-radius: 6px;
 background: var(--bg, #fffdf7);
 color: var(--text-muted, #9a8e80);
 cursor: pointer;
 font-size: 14px;
 transition: all 0.15s;
}
.legal-section-actions button:hover {
 background: #6b9080;
 color: #fff;
 border-color: #6b9080;
}
.legal-section-actions button.legal-del:hover {
 background: #c75450;
 border-color: #c75450;
}
.dark-mode .legal-section-actions button {
 background: var(--bg, #1f1c18);
 border-color: var(--border-color, rgba(255,255,255,0.1));
 color: var(--text-muted, #8e8275);
}

.legal-h-input {
 width: 100%;
 padding: 8px 12px;
 font-size: 14px;
 font-family: inherit;
 border: 1px solid var(--border-color, rgba(0,0,0,0.08));
 border-radius: 6px;
 background: var(--bg, #fffdf7);
 color: var(--text, #3d3530);
 box-sizing: border-box;
 margin-bottom: 8px;
 transition: border-color 0.2s;
}
.legal-h-input:focus {
 outline: none;
 border-color: #6b9080;
}
.dark-mode .legal-h-input { background: var(--bg, #1f1c18); color: var(--text, #e8dfd3); }

.legal-p-input {
 width: 100%;
 padding: 10px 12px;
 font-size: 14px;
 font-family: inherit;
 border: 1px solid var(--border-color, rgba(0,0,0,0.08));
 border-radius: 6px;
 background: var(--bg, #fffdf7);
 color: var(--text, #3d3530);
 box-sizing: border-box;
 line-height: 1.8;
 min-height: 80px;
 resize: vertical;
 transition: border-color 0.2s;
}
.legal-p-input:focus {
 outline: none;
 border-color: #6b9080;
}
.dark-mode .legal-p-input { background: var(--bg, #1f1c18); color: var(--text, #e8dfd3); }

.legal-empty {
 padding: 32px;
 text-align: center;
 color: var(--text-muted, #9a8e80);
 font-size: 14px;
 border: 1px dashed var(--border-color, rgba(0,0,0,0.1));
 border-radius: 10px;
 margin-bottom: 12px;
}

.legal-add-btn {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 8px 16px;
 font-size: 13px;
 font-family: inherit;
 border: 1px dashed #6b9080;
 border-radius: 8px;
 background: rgba(107, 144, 128, 0.06);
 color: #6b9080;
 cursor: pointer;
 transition: all 0.2s;
 margin-top: 4px;
}
.legal-add-btn:hover {
 background: #6b9080;
 color: #fff;
 border-style: solid;
}
.dark-mode .legal-add-btn { color: #7da896; border-color: #7da896; background: rgba(125, 168, 150, 0.08); }
.dark-mode .legal-add-btn:hover { background: #7da896; color: #1f1c18; }

.legal-tips {
 padding: 16px 20px;
 border-top: 1px solid var(--border-color, rgba(0,0,0,0.08));
 background: var(--bg-soft, #faf7f1);
 display: flex;
 flex-direction: column;
 gap: 6px;
}
.dark-mode .legal-tips { background: var(--bg-soft, #252119); }
.legal-tip {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: 12px;
 color: var(--text-muted, #9a8e80);
 line-height: 1.6;
}
.legal-tip-dot {
 width: 4px;
 height: 4px;
 border-radius: 50%;
 background: #6b9080;
 flex-shrink: 0;
}
.dark-mode .legal-tip-dot { background: #7da896; }
.legal-tip a {
 color: #6b9080;
 text-decoration: none;
 border-bottom: 1px dashed rgba(107, 144, 128, 0.5);
}
.dark-mode .legal-tip a { color: #7da896; border-bottom-color: rgba(125, 168, 150, 0.5); }

.legal-save-btn.saving {
 opacity: 0.7;
 pointer-events: none;
}

.legal-modal-overlay {
 position: fixed;
 inset: 0;
 background: rgba(40, 35, 28, 0.45);
 backdrop-filter: blur(2px);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 9999;
 padding: 20px;
 animation: legalModalFade 0.18s ease;
}
@keyframes legalModalFade { from { opacity: 0; } to { opacity: 1; } }
.legal-modal {
 width: 100%;
 max-width: 520px;
 max-height: 80vh;
 display: flex;
 flex-direction: column;
 background: var(--bg, #fffdf7);
 border-radius: 14px;
 box-shadow: 0 12px 40px rgba(40, 35, 28, 0.2);
 overflow: hidden;
}
.dark-mode .legal-modal { background: var(--bg, #1f1c18); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.legal-modal-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 16px 20px;
 border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.08));
}
.legal-modal-head h3 {
 margin: 0;
 font-size: 16px;
 font-weight: 500;
 letter-spacing: 1px;
 color: var(--text, #3d3530);
}
.legal-modal-close {
 width: 28px;
 height: 28px;
 border: none;
 background: none;
 font-size: 20px;
 line-height: 1;
 color: var(--text-muted, #9a8e80);
 cursor: pointer;
 border-radius: 6px;
 transition: background 0.15s, color 0.15s;
}
.legal-modal-close:hover { background: rgba(0,0,0,0.06); color: var(--text, #3d3530); }
.dark-mode .legal-modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text, #e8dfd3); }
.legal-modal-body {
 padding: 18px 20px;
 overflow-y: auto;
 flex: 1;
}
.legal-modal-foot {
 display: flex;
 justify-content: flex-end;
 gap: 8px;
 padding: 14px 20px;
 border-top: 1px solid var(--border-color, rgba(0,0,0,0.08));
 background: var(--bg-soft, #faf7f1);
}
.dark-mode .legal-modal-foot { background: var(--bg-soft, #252119); }

.legal-notify-info {
 font-size: 13px;
 color: var(--text-muted, #9a8e80);
 line-height: 1.7;
 margin-bottom: 14px;
}
.legal-notify-tabs {
 display: flex;
 gap: 8px;
 margin-bottom: 14px;
}
.legal-notify-tab {
 flex: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
 padding: 10px 12px;
 border: 1px solid var(--border-color, rgba(0,0,0,0.1));
 border-radius: 8px;
 cursor: pointer;
 font-size: 13px;
 color: var(--text-muted, #9a8e80);
 background: var(--bg-soft, #faf7f1);
 transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.legal-notify-tab:hover { color: var(--text, #3d3530); }
.legal-notify-tab input { accent-color: #6b9080; }
.legal-notify-tab:has(input:checked) {
 border-color: #6b9080;
 color: #6b9080;
 background: rgba(107, 144, 128, 0.08);
}
.dark-mode .legal-notify-tab { background: var(--bg-soft, #252119); color: var(--text-muted, #8e8275); }
.dark-mode .legal-notify-tab:has(input:checked) { border-color: #7da896; color: #7da896; background: rgba(125, 168, 150, 0.1); }

.legal-notify-all-panel {
 font-size: 13px;
 color: var(--text, #3d3530);
 line-height: 1.7;
 padding: 12px 14px;
 background: var(--bg-soft, #faf7f1);
 border-radius: 8px;
 border: 1px solid var(--border-color, rgba(0,0,0,0.08));
}
.dark-mode .legal-notify-all-panel { background: var(--bg-soft, #252119); color: var(--text, #e8dfd3); }

.legal-notify-search-row {
 display: flex;
 gap: 10px;
 align-items: center;
 margin-bottom: 10px;
}
.legal-notify-search {
 flex: 1;
 padding: 8px 12px;
 font-size: 13px;
 font-family: inherit;
 border: 1px solid var(--border-color, rgba(0,0,0,0.1));
 border-radius: 6px;
 background: var(--bg, #fffdf7);
 color: var(--text, #3d3530);
 box-sizing: border-box;
}
.legal-notify-search:focus { outline: none; border-color: #6b9080; }
.dark-mode .legal-notify-search { background: var(--bg, #1f1c18); color: var(--text, #e8dfd3); }
.legal-notify-count {
 font-size: 12px;
 color: #6b9080;
 white-space: nowrap;
 letter-spacing: 0.5px;
}
.dark-mode .legal-notify-count { color: #7da896; }

.legal-notify-list {
 max-height: 280px;
 overflow-y: auto;
 border: 1px solid var(--border-color, rgba(0,0,0,0.08));
 border-radius: 8px;
 background: var(--bg, #fffdf7);
 margin-bottom: 10px;
}
.dark-mode .legal-notify-list { background: var(--bg, #1f1c18); }
.legal-notify-empty {
 padding: 24px;
 text-align: center;
 font-size: 13px;
 color: var(--text-muted, #9a8e80);
}
.legal-notify-item {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 9px 12px;
 cursor: pointer;
 border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.04));
 transition: background 0.12s;
}
.legal-notify-item:last-child { border-bottom: none; }
.legal-notify-item:hover { background: rgba(107, 144, 128, 0.06); }
.legal-notify-item.is-checked { background: rgba(107, 144, 128, 0.1); }
.dark-mode .legal-notify-item:hover { background: rgba(125, 168, 150, 0.08); }
.dark-mode .legal-notify-item.is-checked { background: rgba(125, 168, 150, 0.12); }
.legal-notify-item input { accent-color: #6b9080; }
.legal-notify-name {
 font-size: 13px;
 color: var(--text, #3d3530);
 font-weight: 500;
}
.dark-mode .legal-notify-name { color: var(--text, #e8dfd3); }
.legal-notify-email {
 font-size: 12px;
 color: var(--text-muted, #9a8e80);
 margin-left: auto;
}
.legal-notify-actions {
 display: flex;
 gap: 8px;
 margin-bottom: 4px;
}

.freedom-layout {
 display: grid;
 grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
 gap: 1rem;
 align-items: start;
}
@media (max-width: 960px) {
 .freedom-layout { grid-template-columns: 1fr; }
 .freedom-preview-card { position: static !important; }
}
.freedom-preview-card {
 background: var(--card-bg, #fff);
 border: 1px solid var(--border, rgba(0,0,0,0.08));
 border-radius: 12px;
 padding: 1rem;
 position: sticky;
 top: 1rem;
}
.dark-mode .freedom-preview-card { background: #1f1d1a; border-color: rgba(255,255,255,0.06); }
.freedom-preview-wrap {
 position: relative;
 width: 100%;
 aspect-ratio: 16 / 9;
 background: linear-gradient(180deg, #2a241e 0%, #1a1814 100%);
 border-radius: 10px;
 overflow: hidden;
}
.freedom-preview-wrap video,
.freedom-preview-wrap img {
 position: absolute;
 inset: 0;
 width: 100%;
 height: 100%;
 object-fit: cover;
 border: 0;
 display: none;
}
.freedom-preview-wrap.has-video video { display: block; }
.freedom-preview-wrap.has-cover img { display: block; }
.freedom-preview-empty {
 position: absolute;
 inset: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 color: rgba(237, 229, 216, 0.5);
 font-size: 0.85rem;
 letter-spacing: 0.1em;
 pointer-events: none;
}
.freedom-preview-wrap.has-video .freedom-preview-empty,
.freedom-preview-wrap.has-cover .freedom-preview-empty { display: none; }
.freedom-preview-hint {
 margin: 0.7rem 0 0;
 font-size: 0.78rem;
 color: var(--text-muted, #8a7e72);
 text-align: center;
}
.dark-mode .freedom-preview-hint { color: #998d7e; }

.freedom-form-card {
 background: var(--card-bg, #fff);
 border: 1px solid var(--border, rgba(0,0,0,0.08));
 border-radius: 12px;
 padding: 1.2rem 1.4rem;
}
.dark-mode .freedom-form-card { background: #1f1d1a; border-color: rgba(255,255,255,0.06); }
.freedom-section {
 padding: 1.1rem 0;
 border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}
.dark-mode .freedom-section { border-bottom-color: rgba(255,255,255,0.05); }
.freedom-section:first-child { padding-top: 0; }
.freedom-section:last-child { border-bottom: 0; padding-bottom: 0; }
.freedom-section-title {
 margin: 0 0 0.9rem;
 font-size: 0.88rem;
 font-weight: 600;
 color: var(--text, #2e342d);
 letter-spacing: 0.04em;
 position: relative;
 padding-left: 0.7rem;
}
.freedom-section-title::before {
 content: "";
 position: absolute;
 left: 0;
 top: 50%;
 transform: translateY(-50%);
 width: 3px;
 height: 0.95em;
 background: #9f8c76;
 border-radius: 2px;
}
.dark-mode .freedom-section-title { color: #ede5d8; }
.dark-mode .freedom-section-title::before { background: #b78168; }
.freedom-toggle { display: flex; align-items: center; gap: 0.6rem; }
.freedom-section-hint {
 margin: 0.4rem 0 0;
 font-size: 0.76rem;
 color: var(--text-muted, #8a7e72);
}
.dark-mode .freedom-section-hint { color: #998d7e; }

.freedom-field {
 margin-bottom: 0.9rem;
}
.freedom-field:last-child { margin-bottom: 0; }
.freedom-field-label {
 display: block;
 margin-bottom: 0.35rem;
 font-size: 0.8rem;
 font-weight: 500;
 color: var(--text, #2e342d);
 letter-spacing: 0.02em;
}
.dark-mode .freedom-field-label { color: #ede5d8; }
.freedom-input {
 width: 100%;
 padding: 0.5rem 0.7rem;
 font-size: 0.86rem;
 font-family: inherit;
 color: var(--text, #2e342d);
 background: var(--bg-subtle, rgba(0,0,0,0.02));
 border: 1px solid var(--border, rgba(0,0,0,0.1));
 border-radius: 8px;
 outline: none;
 transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.dark-mode .freedom-input {
 color: #ede5d8;
 background: rgba(255,255,255,0.04);
 border-color: rgba(255,255,255,0.08);
}
.freedom-input::placeholder {
 color: var(--text-muted, #aaa);
 opacity: 0.7;
}
.dark-mode .freedom-input::placeholder { color: #6e655a; }
.freedom-input:hover {
 border-color: rgba(159, 140, 118, 0.5);
}
.freedom-input:focus {
 border-color: #9f8c76;
 background: var(--card-bg, #fff);
 box-shadow: 0 0 0 3px rgba(159, 140, 118, 0.15);
}
.dark-mode .freedom-input:focus {
 border-color: #b78168;
 background: rgba(255,255,255,0.06);
 box-shadow: 0 0 0 3px rgba(183, 129, 104, 0.18);
}
.freedom-input-mono {
 font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
 font-size: 0.8rem;
 letter-spacing: 0;
}
.freedom-field-hint {
 display: block;
 margin-top: 0.3rem;
 font-size: 0.73rem;
 color: var(--text-muted, #8a7e72);
 line-height: 1.5;
}
.dark-mode .freedom-field-hint { color: #998d7e; }

.freedom-upload {
 margin-top: 0.6rem;
}
.freedom-dropzone {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 0.3rem;
 padding: 1.1rem 0.8rem;
 border: 1px dashed var(--border, rgba(0,0,0,0.15));
 border-radius: 8px;
 cursor: pointer;
 text-align: center;
 transition: border-color 0.2s, background 0.2s;
 background: var(--bg-subtle, rgba(0,0,0,0.015));
}
.dark-mode .freedom-dropzone {
 border-color: rgba(255,255,255,0.12);
 background: rgba(255,255,255,0.02);
}
.freedom-dropzone:hover {
 border-color: #9f8c76;
 background: rgba(159, 140, 118, 0.06);
}
.dark-mode .freedom-dropzone:hover {
 border-color: #b78168;
 background: rgba(183, 129, 104, 0.08);
}
.freedom-dropzone-icon {
 width: 30px;
 height: 30px;
 border-radius: 50%;
 background: rgba(159, 140, 118, 0.16);
 color: #9f8c76;
 display: grid;
 place-items: center;
 font-size: 0.95rem;
 font-weight: 600;
 line-height: 1;
}
.dark-mode .freedom-dropzone-icon {
 background: rgba(183, 129, 104, 0.18);
 color: #b78168;
}
.freedom-dropzone-text {
 font-size: 0.82rem;
 font-weight: 500;
 color: var(--text, #2e342d);
 letter-spacing: 0.02em;
}
.dark-mode .freedom-dropzone-text { color: #ede5d8; }
.freedom-dropzone-meta {
 font-size: 0.7rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.02em;
}
.dark-mode .freedom-dropzone-meta { color: #998d7e; }

.freedom-upload-actions {
 margin-top: 0.6rem;
 display: flex;
 gap: 0.6rem;
 align-items: center;
 flex-wrap: wrap;
}
.freedom-upload-btn {
 padding: 0.45rem 1.1rem;
 font-size: 0.8rem;
 font-weight: 500;
 font-family: inherit;
 color: #fff;
 background: #9f8c76;
 border: 0;
 border-radius: 6px;
 cursor: pointer;
 transition: background 0.18s, transform 0.1s;
 line-height: 1.4;
}
.freedom-upload-btn:hover:not(:disabled) { background: #8a7864; }
.freedom-upload-btn:active:not(:disabled) { transform: translateY(1px); }
.freedom-upload-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dark-mode .freedom-upload-btn { background: #b78168; }
.dark-mode .freedom-upload-btn:hover:not(:disabled) { background: #a06b52; }

.freedom-file-info {
 font-size: 0.76rem;
 color: var(--text-muted, #8a7e72);
 transition: color 0.2s, background 0.2s, padding 0.2s;
}
.dark-mode .freedom-file-info { color: #998d7e; }
.freedom-file-info.is-set {
 color: var(--text, #2e342d);
 background: rgba(159, 140, 118, 0.14);
 padding: 0.25rem 0.6rem;
 border-radius: 4px;
}
.dark-mode .freedom-file-info.is-set {
 color: #ede5d8;
 background: rgba(183, 129, 104, 0.16);
}
.freedom-progress { margin-top: 0.6rem; }

.freedom-pool {
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
 padding: 0.6rem;
 background: rgba(159, 140, 118, 0.05);
 border: 1px dashed rgba(159, 140, 118, 0.3);
 border-radius: 6px;
 max-height: 360px;
 overflow-y: auto;
}
.dark-mode .freedom-pool {
 background: rgba(255, 255, 255, 0.02);
 border-color: rgba(255, 255, 255, 0.1);
}
.freedom-pool-row {
 display: flex;
 align-items: center;
 gap: 0.5rem;
}
.freedom-pool-row .freedom-pool-idx {
 flex-shrink: 0;
 width: 22px;
 height: 22px;
 border-radius: 50%;
 background: rgba(159, 140, 118, 0.18);
 color: #8a7864;
 display: grid;
 place-items: center;
 font-size: 0.7rem;
 font-weight: 600;
 font-family: "SF Mono", "Menlo", "Monaco", monospace;
}
.dark-mode .freedom-pool-row .freedom-pool-idx {
 background: rgba(183, 129, 104, 0.2);
 color: #d4a48a;
}
.freedom-pool-row .freedom-pool-input {
 flex: 1;
 min-width: 0;
 padding: 0.45rem 0.6rem;
 font-size: 0.82rem;
 font-family: inherit;
 color: var(--text, #2e342d);
 background: #fff;
 border: 1px solid rgba(159, 140, 118, 0.25);
 border-radius: 4px;
 outline: none;
 transition: border-color 0.18s, box-shadow 0.18s;
}
.freedom-pool-row .freedom-pool-input:focus {
 border-color: #9f8c76;
 box-shadow: 0 0 0 3px rgba(159, 140, 118, 0.15);
}
.dark-mode .freedom-pool-row .freedom-pool-input {
 color: #ede5d8;
 background: rgba(255, 255, 255, 0.04);
 border-color: rgba(255, 255, 255, 0.12);
}
.dark-mode .freedom-pool-row .freedom-pool-input:focus {
 border-color: #b78168;
 box-shadow: 0 0 0 3px rgba(183, 129, 104, 0.18);
}
.freedom-pool-row .freedom-pool-del {
 flex-shrink: 0;
 width: 28px;
 height: 28px;
 border: 0;
 background: transparent;
 color: #b4a08a;
 font-size: 1rem;
 border-radius: 4px;
 cursor: pointer;
 display: grid;
 place-items: center;
 transition: background 0.15s, color 0.15s;
}
.freedom-pool-row .freedom-pool-del:hover {
 background: rgba(180, 80, 60, 0.12);
 color: #b4503c;
}
.dark-mode .freedom-pool-row .freedom-pool-del { color: #998d7e; }
.dark-mode .freedom-pool-row .freedom-pool-del:hover {
 background: rgba(212, 100, 80, 0.18);
 color: #d46450;
}
.freedom-pool-empty {
 padding: 0.8rem;
 text-align: center;
 font-size: 0.78rem;
 color: var(--text-muted, #8a7e72);
}
.dark-mode .freedom-pool-empty { color: #998d7e; }
.freedom-pool-actions {
 margin-top: 0.55rem;
 display: flex;
 justify-content: flex-end;
}
.freedom-add-row {
 padding: 0.4rem 0.9rem;
 font-size: 0.78rem;
 font-family: inherit;
 color: #8a7864;
 background: transparent;
 border: 1px dashed rgba(159, 140, 118, 0.45);
 border-radius: 4px;
 cursor: pointer;
 transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.freedom-add-row:hover {
 background: rgba(159, 140, 118, 0.1);
 border-color: #9f8c76;
 color: #6b5a48;
}
.dark-mode .freedom-add-row {
 color: #d4a48a;
 border-color: rgba(183, 129, 104, 0.4);
}
.dark-mode .freedom-add-row:hover {
 background: rgba(183, 129, 104, 0.1);
 border-color: #b78168;
 color: #ede5d8;
}
.freedom-field-hint code {
 font-family: "SF Mono", "Menlo", "Monaco", monospace;
 font-size: 0.78em;
 padding: 0 4px;
 background: rgba(159, 140, 118, 0.12);
 border-radius: 3px;
 color: #6b5a48;
}
.dark-mode .freedom-field-hint code {
 background: rgba(183, 129, 104, 0.16);
 color: #d4a48a;
}

.weather-layout {

}
.freedom-row-2 {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 0.7rem;
}
@media (max-width: 640px) {
 .freedom-row-2 { grid-template-columns: 1fr; }
}

.weather-usage-card {
 background: linear-gradient(180deg, rgba(255, 253, 250, 0.78), rgba(252, 249, 242, 0.7));
 border: 1px solid rgba(0, 0, 0, 0.06);
 border-radius: 12px;
 padding: 1rem 1.2rem;
 margin-bottom: 1.2rem;
}
.dark-mode .weather-usage-card {
 background: rgba(35, 38, 34, 0.6);
 border-color: rgba(255, 255, 255, 0.06);
}
.weather-usage-header {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 margin-bottom: 0.55rem;
}
.weather-usage-title {
 font-family: "Songti SC", "STSong", serif;
 font-size: 0.92rem;
 font-weight: 500;
 color: var(--text, #2e342d);
 letter-spacing: 0.06em;
}
.dark-mode .weather-usage-title { color: #e8e2d3; }
.weather-usage-reset {
 font-size: 0.72rem;
 color: var(--text-muted, #8a7e72);
 font-family: "Kaiti SC", "STKaiti", serif;
}
.weather-usage-bar-wrap {
 width: 100%;
 height: 8px;
 background: rgba(0, 0, 0, 0.05);
 border-radius: 999px;
 overflow: hidden;
 margin-bottom: 0.5rem;
}
.dark-mode .weather-usage-bar-wrap { background: rgba(255, 255, 255, 0.05); }
.weather-usage-bar {
 height: 100%;
 background: #6b9080;
 border-radius: 999px;
 transition: width 0.6s ease, background 0.3s ease;
}
.weather-usage-bar.is-warn { background: #c79a4a; }
.weather-usage-bar.is-full { background: #c75a5a; }
.dark-mode .weather-usage-bar { background: #8aab9a; }
.dark-mode .weather-usage-bar.is-warn { background: #d4a96a; }
.dark-mode .weather-usage-bar.is-full { background: #e07070; }
.weather-usage-text {
 display: flex;
 align-items: baseline;
 gap: 0.3rem;
 margin-bottom: 0.4rem;
 font-family: "SF Mono", "Menlo", monospace;
 font-size: 0.9rem;
}
.weather-usage-used {
 font-size: 1.25rem;
 font-weight: 600;
 color: #5d4a3a;
 font-variant-numeric: tabular-nums;
}
.dark-mode .weather-usage-used { color: #f0e8d4; }
.weather-usage-sep {
 color: var(--text-muted, #8a7e72);
 margin: 0 0.1rem;
}
.weather-usage-quota {
 color: var(--text, #2e342d);
 font-variant-numeric: tabular-nums;
}
.dark-mode .weather-usage-quota { color: #e8e2d3; }
.weather-usage-unit {
 font-size: 0.72rem;
 color: var(--text-muted, #8a7e72);
 margin-left: 0.1rem;
}
.weather-usage-remain {
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
 margin-left: 0.6rem;
 font-family: "Kaiti SC", "STKaiti", serif;
}
.weather-usage-hint {
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
 line-height: 1.6;
 font-family: "Kaiti SC", "STKaiti", serif;
}
.dark-mode .weather-usage-hint { color: #998d7e; }

.weather-key-status {
 display: inline-flex;
 align-items: center;
 gap: 0.55rem;
 padding: 0.55rem 0.85rem;
 border-radius: 8px;
 font-size: 0.85rem;
 margin-bottom: 0.7rem;
}
.weather-key-status.is-ok {
 background: rgba(107, 144, 128, 0.08);
 border: 1px solid rgba(107, 144, 128, 0.25);
 color: #5a7a6c;
}
.weather-key-status.is-fail {
 background: rgba(199, 90, 90, 0.06);
 border: 1px solid rgba(199, 90, 90, 0.22);
 color: #a14a4a;
}
.dark-mode .weather-key-status.is-ok {
 background: rgba(138, 171, 154, 0.1);
 border-color: rgba(138, 171, 154, 0.25);
 color: #9dbfae;
}
.dark-mode .weather-key-status.is-fail {
 background: rgba(224, 112, 112, 0.08);
 border-color: rgba(224, 112, 112, 0.25);
 color: #e09090;
}
.weather-key-dot {
 width: 8px;
 height: 8px;
 border-radius: 50%;
 background: currentColor;
 flex-shrink: 0;
 box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
 animation: weatherKeyPulse 2.4s ease-in-out infinite;
}
.dark-mode .weather-key-dot {
 box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
}
@keyframes weatherKeyPulse {
 0%, 100% { opacity: 1; }
 50% { opacity: 0.5; }
}
.weather-key-text {
 font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
 letter-spacing: 0.04em;
}

.weather-key-instructions {
 background: rgba(255, 253, 250, 0.6);
 border: 1px dashed rgba(159, 140, 118, 0.3);
 border-radius: 8px;
 padding: 0.8rem 0.9rem;
 margin: 0.6rem 0 0.8rem;
}
.dark-mode .weather-key-instructions {
 background: rgba(255, 255, 255, 0.03);
 border-color: rgba(218, 211, 190, 0.18);
}
.weather-key-step {
 display: flex;
 align-items: flex-start;
 gap: 0.6rem;
 padding: 0.25rem 0;
 font-size: 0.78rem;
 color: var(--text, #2e342d);
 line-height: 1.6;
}
.dark-mode .weather-key-step { color: #c8c0ad; }
.weather-key-step + .weather-key-step {
 border-top: 1px dashed rgba(159, 140, 118, 0.18);
 margin-top: 0.25rem;
 padding-top: 0.5rem;
}
.dark-mode .weather-key-step + .weather-key-step {
 border-top-color: rgba(218, 211, 190, 0.12);
}
.weather-key-step-num {
 flex-shrink: 0;
 width: 18px;
 height: 18px;
 border-radius: 50%;
 background: #9f8c76;
 color: #fff;
 font-size: 0.7rem;
 font-weight: 600;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 margin-top: 1px;
 font-family: "SF Mono", "Menlo", monospace;
}
.dark-mode .weather-key-step-num { background: #b78168; }
.weather-key-step code {
 font-family: "SF Mono", "Menlo", monospace;
 font-size: 0.74rem;
 padding: 1px 5px;
 background: rgba(0, 0, 0, 0.05);
 border-radius: 3px;
 color: #5d4a3a;
}
.dark-mode .weather-key-step code {
 background: rgba(255, 255, 255, 0.08);
 color: #d8d0bc;
}
.weather-key-step a {
 color: #6b9080;
 text-decoration: underline;
 text-underline-offset: 2px;
}
.dark-mode .weather-key-step a { color: #8aab9a; }

.weather-test-result {
 display: inline-block;
 margin-left: 0.6rem;
 font-size: 0.8rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.02em;
}
.weather-test-result.is-ok { color: #6b9080; }
.weather-test-result.is-fail { color: #c75a5a; }
.dark-mode .weather-test-result.is-ok { color: #8aab9a; }
.dark-mode .weather-test-result.is-fail { color: #e07070; }

.weather-search-hint {
 display: inline-block;
 margin-left: 0.6rem;
 font-size: 0.78rem;
 color: var(--text-muted, #8a7e72);
}
.weather-search-hint.is-ok { color: #6b9080; }
.weather-search-hint.is-fail { color: #c75a5a; }

.weather-tips {
 display: flex;
 flex-direction: column;
 gap: 0.45rem;
}
.weather-tip {
 display: flex;
 align-items: flex-start;
 gap: 0.55rem;
 font-size: 0.78rem;
 color: var(--text-muted, #8a7e72);
 line-height: 1.55;
}
.weather-tip-dot {
 flex-shrink: 0;
 width: 6px;
 height: 6px;
 margin-top: 7px;
 border-radius: 50%;
 background: #9f8c76;
 opacity: 0.6;
}
.dark-mode .weather-tip { color: #998d7e; }
.dark-mode .weather-tip-dot { background: #b78168; }

.weather-preview-card { }
.weather-preview {
 background: linear-gradient(180deg, rgba(255, 253, 250, 0.78), rgba(252, 249, 242, 0.7));
 border: 1px solid rgba(0, 0, 0, 0.06);
 border-radius: 10px;
 padding: 1rem 1.1rem;
 font-family: "Songti SC", "STSong", "Noto Serif SC", "Georgia", serif;
}
.dark-mode .weather-preview {
 background: rgba(35, 38, 34, 0.6);
 border-color: rgba(255, 255, 255, 0.05);
}
.weather-preview-placeholder {
 text-align: center;
 font-size: 0.85rem;
 color: var(--text-muted, #8a7e72);
 padding: 1.6rem 0;
 font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
}
.weather-preview-city {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 0.6rem;
 margin-bottom: 0.8rem;
 padding-bottom: 0.55rem;
 border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.dark-mode .weather-preview-city { border-bottom-color: rgba(255, 255, 255, 0.08); }
.weather-preview-city-name {
 font-family: "Songti SC", "STSong", serif;
 font-size: 1.05rem;
 font-weight: 500;
 color: var(--text, #2e342d);
 letter-spacing: 0.05em;
}
.weather-preview-provider {
 font-size: 0.7rem;
 color: var(--text-muted, #8a7e72);
 font-family: "SF Mono", "Menlo", monospace;
 padding: 2px 8px;
 border: 1px solid rgba(0, 0, 0, 0.08);
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.5);
}
.dark-mode .weather-preview-provider {
 color: #998d7e;
 border-color: rgba(255, 255, 255, 0.08);
 background: rgba(255, 255, 255, 0.04);
}
.weather-preview-main {
 display: flex;
 align-items: baseline;
 gap: 0.6rem;
 margin: 0.4rem 0 0.65rem;
}
.weather-preview-icon {
 font-size: 1.8rem;
 line-height: 1;
}
.weather-preview-temp {
 font-family: "Songti SC", "STSong", serif;
 font-size: 2.6rem;
 font-weight: 500;
 color: #5d4a3a;
 line-height: 1;
 font-variant-numeric: tabular-nums;
}
.dark-mode .weather-preview-temp { color: #f0e8d4; }
.weather-preview-text {
 font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
 font-size: 0.95rem;
 color: #6a5942;
 letter-spacing: 0.04em;
}
.dark-mode .weather-preview-text { color: rgba(232, 226, 211, 0.85); }
.weather-preview-details {
 font-size: 0.75rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.02em;
 margin-bottom: 0.6rem;
}
.weather-preview-daily {
 display: flex;
 gap: 0.85rem;
 flex-wrap: wrap;
 padding-top: 0.5rem;
 border-top: 1px dashed rgba(0, 0, 0, 0.06);
}
.dark-mode .weather-preview-daily { border-top-color: rgba(255, 255, 255, 0.06); }
.weather-preview-day {
 display: inline-flex;
 align-items: baseline;
 gap: 0.35rem;
 font-size: 0.75rem;
 color: var(--text-muted, #8a7e72);
}
.weather-preview-day-name {
 font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
}
.weather-preview-day-range {
 font-variant-numeric: tabular-nums;
}

.holidays-layout {
 display: grid;
 grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
 gap: 1rem;
 align-items: start;
}
@media (max-width: 960px) {
 .holidays-layout { grid-template-columns: 1fr; }
}
.holidays-form-card,
.holidays-list-card {
 background: var(--card-bg, #fff);
 border: 1px solid var(--border, rgba(0,0,0,0.08));
 border-radius: 12px;
 padding: 1.2rem 1.4rem;
}
.dark-mode .holidays-form-card,
.dark-mode .holidays-list-card { background: #1f1d1a; border-color: rgba(255,255,255,0.06); }
.holidays-section {
 padding-bottom: 0.4rem;
}
.holidays-section-title {
 margin: 0 0 0.9rem;
 font-size: 0.88rem;
 font-weight: 600;
 color: var(--text, #2e342d);
 letter-spacing: 0.04em;
 position: relative;
 padding-left: 0.7rem;
}
.holidays-section-title::before {
 content: "";
 position: absolute;
 left: 0;
 top: 50%;
 transform: translateY(-50%);
 width: 3px;
 height: 0.95em;
 background: #9f8c76;
 border-radius: 2px;
}
.dark-mode .holidays-section-title { color: #ede5d8; }
.dark-mode .holidays-section-title::before { background: #b78168; }

.holidays-field {
 margin-bottom: 0.9rem;
}
.holidays-field:last-child { margin-bottom: 0; }
.holidays-field-label {
 display: block;
 margin-bottom: 0.35rem;
 font-size: 0.8rem;
 font-weight: 500;
 color: var(--text, #2e342d);
 letter-spacing: 0.02em;
}
.dark-mode .holidays-field-label { color: #ede5d8; }
.holidays-em {
 font-style: normal;
 font-size: 0.7rem;
 color: var(--text-muted, #8a7e72);
 font-weight: 400;
 margin-left: 0.3rem;
}
.dark-mode .holidays-em { color: #998d7e; }
.holidays-field-hint {
 display: block;
 margin-top: 0.3rem;
 font-size: 0.72rem;
 color: var(--text-muted, #8a7e72);
 line-height: 1.5;
}
.dark-mode .holidays-field-hint { color: #998d7e; }
.holidays-form-hint {
 margin: 0.6rem 0 0;
 font-size: 0.72rem;
 color: var(--text-muted, #8a7e72);
 line-height: 1.5;
}
.dark-mode .holidays-form-hint { color: #998d7e; }

.holidays-input {
 width: 100%;
 padding: 0.5rem 0.7rem;
 font-size: 0.86rem;
 font-family: inherit;
 color: var(--text, #2e342d);
 background: var(--bg-subtle, rgba(0,0,0,0.02));
 border: 1px solid var(--border, rgba(0,0,0,0.1));
 border-radius: 8px;
 outline: none;
 transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.dark-mode .holidays-input {
 color: #ede5d8;
 background: rgba(255,255,255,0.04);
 border-color: rgba(255,255,255,0.08);
}
.holidays-input::placeholder {
 color: var(--text-muted, #aaa);
 opacity: 0.7;
}
.dark-mode .holidays-input::placeholder { color: #6e655a; }
.holidays-input:hover { border-color: rgba(159, 140, 118, 0.5); }
.holidays-input:focus {
 border-color: #9f8c76;
 background: var(--card-bg, #fff);
 box-shadow: 0 0 0 3px rgba(159, 140, 118, 0.15);
}
.dark-mode .holidays-input:focus {
 border-color: #b78168;
 background: rgba(255,255,255,0.06);
 box-shadow: 0 0 0 3px rgba(183, 129, 104, 0.18);
}
.holidays-input-mono {
 font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
 font-size: 0.8rem;
 letter-spacing: 0;
}
.holidays-row {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 0.6rem;
}
.holidays-color-row {
 display: flex;
 align-items: center;
 gap: 0.5rem;
}
.holidays-color {
 width: 40px;
 height: 36px;
 padding: 2px;
 border: 1px solid var(--border, rgba(0,0,0,0.1));
 border-radius: 6px;
 background: #fff;
 cursor: pointer;
 flex-shrink: 0;
}
.dark-mode .holidays-color { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }

.holidays-form-actions {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 margin-top: 0.6rem;
}
.holidays-btn-primary {
 display: inline-flex;
 align-items: center;
 gap: 0.4rem;
 padding: 0.55rem 1.1rem;
 font-size: 0.85rem;
 font-family: inherit;
 color: #fff;
 background: #9f8c76;
 border: 0;
 border-radius: 8px;
 cursor: pointer;
 transition: background 0.18s, transform 0.1s;
}
.holidays-btn-primary:hover { background: #8a7864; }
.holidays-btn-primary:active { transform: translateY(1px); }
.holidays-btn-secondary {
 padding: 0.55rem 1rem;
 font-size: 0.85rem;
 font-family: inherit;
 color: var(--text, #2e342d);
 background: transparent;
 border: 1px solid var(--border, rgba(0,0,0,0.15));
 border-radius: 8px;
 cursor: pointer;
 transition: background 0.18s, border-color 0.18s;
}
.holidays-btn-secondary:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.25); }
.dark-mode .holidays-btn-secondary { color: #ede5d8; border-color: rgba(255,255,255,0.12); }
.dark-mode .holidays-btn-secondary:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.2); }

.holidays-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
 gap: 0.7rem;
 margin-top: 0.8rem;
}
.holidays-empty {
 grid-column: 1 / -1;
 padding: 1.4rem 0;
 text-align: center;
 font-size: 0.82rem;
 color: var(--text-muted, #8a7e72);
}
.dark-mode .holidays-empty { color: #998d7e; }

.holiday-card {
 position: relative;
 display: flex;
 align-items: stretch;
 gap: 0.6rem;
 padding: 0.85rem 0.9rem;
 background: var(--bg-subtle, rgba(0,0,0,0.02));
 border: 1px solid var(--border, rgba(0,0,0,0.06));
 border-radius: 10px;
 transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.holiday-card:hover {
 border-color: rgba(159, 140, 118, 0.45);
 background: rgba(159, 140, 118, 0.04);
}
.holiday-card.is-editing {
 border-color: #9f8c76;
 background: rgba(159, 140, 118, 0.08);
 box-shadow: 0 0 0 2px rgba(159, 140, 118, 0.18);
}
.dark-mode .holiday-card { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.05); }
.dark-mode .holiday-card:hover { border-color: rgba(183, 129, 104, 0.4); background: rgba(183, 129, 104, 0.04); }
.dark-mode .holiday-card.is-editing { border-color: #b78168; background: rgba(183, 129, 104, 0.08); box-shadow: 0 0 0 2px rgba(183, 129, 104, 0.18); }

.holiday-card-dot {
 flex-shrink: 0;
 width: 6px;
 border-radius: 3px;
 margin: 2px 0;
}
.holiday-card-body {
 flex: 1;
 min-width: 0;
}
.holiday-card-title {
 font-size: 0.95rem;
 font-weight: 600;
 color: var(--text, #2e342d);
 letter-spacing: 0.02em;
 margin-bottom: 0.2rem;
 word-break: break-all;
}
.dark-mode .holiday-card-title { color: #ede5d8; }
.holiday-card-sub {
 display: flex;
 align-items: center;
 gap: 0.4rem;
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
 flex-wrap: wrap;
}
.dark-mode .holiday-card-sub { color: #998d7e; }
.holiday-card-date { white-space: nowrap; }
.holiday-card-off {
 display: inline-block;
 margin-top: 0.35rem;
 padding: 1px 6px;
 font-size: 0.66rem;
 color: #8a7864;
 background: rgba(159, 140, 118, 0.14);
 border-radius: 8px;
 letter-spacing: 0.04em;
}
.dark-mode .holiday-card-off { color: #d4a48a; background: rgba(183, 129, 104, 0.18); }
.holiday-card-poetry {
 margin-top: 0.3rem;
 font-size: 0.74rem;
 color: #8a7e72;
 font-style: italic;
 letter-spacing: 0.02em;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
.dark-mode .holiday-card-poetry { color: #b6a896; }

.holiday-card-tag {
 display: inline-block;
 padding: 0 6px;
 font-size: 0.66rem;
 line-height: 1.4;
 border-radius: 3px;
 letter-spacing: 0.04em;
 color: #8a7864;
 background: rgba(159, 140, 118, 0.12);
}
.dark-mode .holiday-card-tag { color: #d4a48a; background: rgba(183, 129, 104, 0.18); }
.holiday-card-tag.tag-solar { color: #9f8c76; background: rgba(159, 140, 118, 0.15); }
.holiday-card-tag.tag-lunar { color: #b78168; background: rgba(196, 123, 107, 0.15); }
.holiday-card-tag.tag-solar_term { color: #6b8e4e; background: rgba(155, 191, 124, 0.18); }
.dark-mode .holiday-card-tag.tag-solar { color: #d4a48a; }
.dark-mode .holiday-card-tag.tag-lunar { color: #d4a48a; }
.dark-mode .holiday-card-tag.tag-solar_term { color: #b8d4a0; }

.holiday-card-actions {
 display: flex;
 flex-direction: column;
 gap: 0.3rem;
 align-items: center;
 justify-content: center;
}
.holiday-card-btn {
 width: 26px;
 height: 26px;
 display: grid;
 place-items: center;
 background: transparent;
 border: 0;
 border-radius: 4px;
 color: #b4a08a;
 cursor: pointer;
 transition: background 0.15s, color 0.15s;
}
.holiday-card-btn:hover { background: rgba(159, 140, 118, 0.12); color: #6b5a48; }
.holiday-card-btn-del:hover { background: rgba(180, 80, 60, 0.12); color: #b4503c; }
.dark-mode .holiday-card-btn { color: #998d7e; }
.dark-mode .holiday-card-btn:hover { background: rgba(183, 129, 104, 0.15); color: #ede5d8; }
.dark-mode .holiday-card-btn-del:hover { background: rgba(212, 100, 80, 0.18); color: #d46450; }

.holidays-tips {
 margin-top: 1rem;
 padding-top: 0.8rem;
 border-top: 1px dashed var(--border, rgba(0,0,0,0.08));
 display: flex;
 flex-direction: column;
 gap: 0.4rem;
}
.dark-mode .holidays-tips { border-top-color: rgba(255,255,255,0.06); }
.holidays-tip {
 display: flex;
 align-items: flex-start;
 gap: 0.5rem;
 font-size: 0.72rem;
 color: var(--text-muted, #8a7e72);
 line-height: 1.5;
}
.dark-mode .holidays-tip { color: #998d7e; }
.holidays-tip-dot {
 flex-shrink: 0;
 width: 5px;
 height: 5px;
 border-radius: 50%;
 background: #9f8c76;
 margin-top: 0.5em;
}
.dark-mode .holidays-tip-dot { background: #b78168; }

.dash-greeting-wrap {
 display: flex;
 align-items: flex-end;
 justify-content: space-between;
 gap: 1.5rem;
 flex-wrap: wrap;
}
.dash-greeting-side {
 flex: 1;
 min-width: 220px;
 max-width: 380px;
 text-align: right;
 font-size: 0.85rem;
 font-style: italic;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.02em;
 line-height: 1.6;
 position: relative;
 padding-right: 0.4rem;
}
.dash-greeting-side::before {
 content: "—";
 margin-right: 0.4rem;
 color: #9f8c76;
 font-style: normal;
}
.dark-mode .dash-greeting-side { color: #998d7e; }
.dark-mode .dash-greeting-side::before { color: #b78168; }

.stat-grid {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 0.7rem;
 margin-bottom: 0.7rem;
}
@media (max-width: 960px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card {
 display: flex;
 flex-direction: column;
 padding: 0.9rem 1rem;
 background: var(--card-bg, #fff);
 border: 1px solid var(--border, rgba(0,0,0,0.08));
 border-radius: 10px;
 position: relative;
 overflow: hidden;
 transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
 border-color: rgba(159, 140, 118, 0.4);
 transform: translateY(-1px);
 box-shadow: 0 2px 8px rgba(159, 140, 118, 0.08);
}
.dark-mode .stat-card { background: #1f1d1a; border-color: rgba(255,255,255,0.06); }
.stat-card-icon {
 position: absolute;
 top: 0.9rem;
 right: 0.9rem;
 width: 28px;
 height: 28px;
 display: grid;
 place-items: center;
 border-radius: 6px;
 background: rgba(159, 140, 118, 0.1);
 color: #9f8c76;
}
.dark-mode .stat-card-icon { background: rgba(183, 129, 104, 0.18); color: #b78168; }
.stat-card-label {
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.04em;
 margin-bottom: 0.4rem;
}
.dark-mode .stat-card-label { color: #998d7e; }
.stat-card-value {
 font-size: 1.5rem;
 font-weight: 600;
 color: var(--text, #2e342d);
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
 font-variant-numeric: tabular-nums;
 letter-spacing: 0.02em;
 line-height: 1.2;
}
.stat-card-value small {
 font-size: 0.74rem;
 font-weight: 400;
 color: var(--text-muted, #8a7e72);
 margin-left: 0.2rem;
}
.dark-mode .stat-card-value { color: #ede5d8; }
.dark-mode .stat-card-value small { color: #998d7e; }
.stat-card-trend {
 margin-top: 0.4rem;
 font-size: 0.7rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.04em;
}
.stat-card-trend.neutral { color: var(--text-muted, #8a7e72); }
.dark-mode .stat-card-trend { color: #998d7e; }

.dash-row-1, .dash-row-2, .dash-row-3 { margin-bottom: 0.7rem; }
.dash-row-4 { margin-bottom: 0; }

.dash-mini-stat {
 text-align: right;
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.02em;
 line-height: 1.4;
}
.dash-mini-stat strong {
 display: block;
 font-size: 1.1rem;
 color: var(--text, #2e342d);
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
 font-weight: 600;
}
.dark-mode .dash-mini-stat { color: #998d7e; }
.dark-mode .dash-mini-stat strong { color: #ede5d8; }

.dash-trend-chart {
 width: 100%;
 height: 130px;
 margin: 0.4rem 0 0.3rem;
}
.dash-trend-chart svg { width: 100%; height: 100%; }
.dash-trend-line {
 fill: none;
 stroke: #9f8c76;
 stroke-width: 1.5;
 stroke-linejoin: round;
 stroke-linecap: round;
}
.dash-trend-area {
 fill: rgba(159, 140, 118, 0.18);
 stroke: none;
}
.dash-trend-dot { fill: #9f8c76; }
.dash-trend-grid { stroke: rgba(0,0,0,0.06); stroke-width: 1; stroke-dasharray: 2 2; }
.dash-trend-label {
 font-size: 9px;
 fill: var(--text-muted, #8a7e72);
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
}
.dark-mode .dash-trend-line { stroke: #b78168; }
.dark-mode .dash-trend-area { fill: rgba(183, 129, 104, 0.22); }
.dark-mode .dash-trend-dot { fill: #b78168; }
.dark-mode .dash-trend-grid { stroke: rgba(255,255,255,0.06); }
.dark-mode .dash-trend-label { fill: #998d7e; }
.dash-trend-axis {
 display: flex;
 justify-content: space-between;
 font-size: 0.66rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.04em;
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
}
.dark-mode .dash-trend-axis { color: #998d7e; }
.dash-trend-empty {
 height: 130px;
 display: grid;
 place-items: center;
 font-size: 0.84rem;
 color: var(--text-muted, #8a7e72);
}

.dash-quick-grid {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 0.5rem;
}
.dash-quick {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 padding: 0.7rem 0.9rem;
 font-family: inherit;
 font-size: 0.84rem;
 color: var(--text, #2e342d);
 background: var(--bg-subtle, rgba(0,0,0,0.02));
 border: 1px solid var(--border, rgba(0,0,0,0.06));
 border-radius: 8px;
 cursor: pointer;
 transition: all 0.18s;
 text-align: left;
}
.dash-quick:hover {
 border-color: rgba(159, 140, 118, 0.5);
 background: rgba(159, 140, 118, 0.08);
 transform: translateY(-1px);
}
.dash-quick-ico {
 flex-shrink: 0;
 width: 28px;
 height: 28px;
 display: grid;
 place-items: center;
 border-radius: 6px;
 background: rgba(159, 140, 118, 0.12);
 color: #9f8c76;
}
.dark-mode .dash-quick { color: #ede5d8; background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.06); }
.dark-mode .dash-quick:hover { border-color: rgba(183, 129, 104, 0.5); background: rgba(183, 129, 104, 0.08); }
.dark-mode .dash-quick-ico { background: rgba(183, 129, 104, 0.18); color: #b78168; }
.dash-quick-text { flex: 1; }

.dash-hour-chart {
 display: flex;
 align-items: flex-end;
 justify-content: space-between;
 gap: 2px;
 height: 130px;
 padding-top: 1rem;
 margin-top: 0.3rem;
}
.dash-hour-col {
 flex: 1;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 0.1rem;
 position: relative;
 height: 100%;
}
.dash-hour-v {
 font-size: 0.62rem;
 color: var(--text-muted, #8a7e72);
 height: 1em;
 line-height: 1;
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
}
.dash-hour-bar {
 width: 100%;
 max-width: 18px;
 background: linear-gradient(to top, #9f8c76, rgba(159, 140, 118, 0.4));
 border-radius: 2px 2px 0 0;
 min-height: 2px;
 transition: background 0.2s;
}
.dash-hour-col.is-peak .dash-hour-bar {
 background: linear-gradient(to top, #c47b6b, rgba(196, 123, 107, 0.4));
}
.dash-hour-h {
 font-size: 0.62rem;
 color: var(--text-muted, #8a7e72);
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
 height: 1em;
 line-height: 1;
}
.dark-mode .dash-hour-bar { background: linear-gradient(to top, #b78168, rgba(183, 129, 104, 0.4)); }
.dark-mode .dash-hour-col.is-peak .dash-hour-bar { background: linear-gradient(to top, #d4a48a, rgba(212, 164, 138, 0.4)); }
.dark-mode .dash-hour-v, .dark-mode .dash-hour-h { color: #998d7e; }

.dash-rank-list, .dash-event-list, .dash-user-list {
 display: flex;
 flex-direction: column;
 gap: 0.45rem;
}
.dash-rank-item, .dash-event-item {
 display: flex;
 align-items: center;
 gap: 0.6rem;
 font-size: 0.8rem;
 color: var(--text, #2e342d);
}
.dash-rank-name, .dash-event-name {
 flex-shrink: 0;
 min-width: 0;
 max-width: 90px;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
.dash-event-name { color: var(--text, #2e342d); }
.dash-rank-bar {
 flex: 1;
 height: 4px;
 background: rgba(0,0,0,0.05);
 border-radius: 2px;
 overflow: hidden;
}
.dash-rank-fill {
 height: 100%;
 background: linear-gradient(to right, #9f8c76, #c47b6b);
 border-radius: 2px;
 transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.dash-rank-val {
 flex-shrink: 0;
 min-width: 30px;
 text-align: right;
 font-size: 0.78rem;
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
 font-variant-numeric: tabular-nums;
 color: var(--text-muted, #8a7e72);
}
.dark-mode .dash-rank-item, .dark-mode .dash-event-item { color: #ede5d8; }
.dark-mode .dash-event-name { color: #ede5d8; }
.dark-mode .dash-rank-bar { background: rgba(255,255,255,0.05); }
.dark-mode .dash-rank-fill { background: linear-gradient(to right, #b78168, #d4a48a); }
.dark-mode .dash-rank-val { color: #998d7e; }

.dash-user-item {
 display: flex;
 align-items: center;
 gap: 0.6rem;
}
.dash-user-avatar {
 flex-shrink: 0;
 width: 26px;
 height: 26px;
 border-radius: 50%;
 background: rgba(159, 140, 118, 0.18);
 color: #9f8c76;
 display: grid;
 place-items: center;
 font-size: 0.7rem;
 font-weight: 600;
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
}
.dash-user-info { flex: 1; min-width: 0; }
.dash-user-name {
 display: block;
 font-size: 0.8rem;
 color: var(--text, #2e342d);
 margin-bottom: 0.2rem;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
.dark-mode .dash-user-avatar { background: rgba(183, 129, 104, 0.25); color: #b78168; }
.dark-mode .dash-user-name { color: #ede5d8; }

.dash-heat-wrap {
 display: grid;
 grid-template-columns: repeat(15, 1fr);
 gap: 3px;
 padding: 0.3rem 0 0.5rem;
}
.dash-heat-cell {
 aspect-ratio: 1 / 1;
 border-radius: 2px;
 background: rgba(0,0,0,0.04);
 transition: transform 0.15s, background 0.2s;
 cursor: default;
}
.dash-heat-cell:hover { transform: scale(1.4); }
.dash-heat-cell.lvl-0 { background: rgba(0,0,0,0.04); }
.dash-heat-cell.lvl-1 { background: rgba(159, 140, 118, 0.18); }
.dash-heat-cell.lvl-2 { background: rgba(159, 140, 118, 0.35); }
.dash-heat-cell.lvl-3 { background: rgba(159, 140, 118, 0.55); }
.dash-heat-cell.lvl-4 { background: rgba(196, 123, 107, 0.85); }
.dark-mode .dash-heat-cell.lvl-0 { background: rgba(255,255,255,0.04); }
.dark-mode .dash-heat-cell.lvl-1 { background: rgba(183, 129, 104, 0.2); }
.dark-mode .dash-heat-cell.lvl-2 { background: rgba(183, 129, 104, 0.4); }
.dark-mode .dash-heat-cell.lvl-3 { background: rgba(183, 129, 104, 0.6); }
.dark-mode .dash-heat-cell.lvl-4 { background: rgba(212, 164, 138, 0.9); }
.dash-heat-axis {
 display: flex;
 justify-content: space-between;
 font-size: 0.7rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.04em;
 margin-top: 0.4rem;
 padding-top: 0.5rem;
 border-top: 1px dashed var(--border, rgba(0,0,0,0.08));
}
.dark-mode .dash-heat-axis { color: #998d7e; border-top-color: rgba(255,255,255,0.06); }
.dash-heat-axis strong { color: var(--text, #2e342d); font-weight: 600; }
.dark-mode .dash-heat-axis strong { color: #ede5d8; }

.dash-foot-note {
 margin: 0.7rem 0 0;
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
 letter-spacing: 0.04em;
 text-align: right;
 padding-top: 0.4rem;
 border-top: 1px dashed var(--border, rgba(0,0,0,0.08));
}
.dark-mode .dash-foot-note { color: #998d7e; border-top-color: rgba(255,255,255,0.06); }
.dash-foot-note strong { color: #9f8c76; font-weight: 600; }
.dark-mode .dash-foot-note strong { color: #b78168; }

.storage-bar-wrap { padding: 0.5rem 0 0.6rem; }
.storage-bar-bg {
 height: 6px;
 background: rgba(0,0,0,0.05);
 border-radius: 3px;
 overflow: hidden;
}
.storage-bar-fill {
 height: 100%;
 background: linear-gradient(to right, #9f8c76, #c47b6b);
 border-radius: 3px;
 transition: width 0.6s;
}
.storage-bar-info {
 display: flex;
 justify-content: space-between;
 align-items: baseline;
 margin-top: 0.5rem;
 font-size: 0.78rem;
 color: var(--text-muted, #8a7e72);
}
.storage-bar-info strong {
 font-size: 1rem;
 color: var(--text, #2e342d);
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
}
.dark-mode .storage-bar-bg { background: rgba(255,255,255,0.05); }
.dark-mode .storage-bar-info { color: #998d7e; }
.dark-mode .storage-bar-info strong { color: #ede5d8; }
.storage-breakdown {
 display: flex;
 gap: 0.7rem;
 margin-top: 0.7rem;
 padding-top: 0.6rem;
 border-top: 1px dashed var(--border, rgba(0,0,0,0.08));
}
.dark-mode .storage-breakdown { border-top-color: rgba(255,255,255,0.06); }
.storage-bd-item {
 display: flex;
 align-items: center;
 gap: 0.35rem;
 font-size: 0.74rem;
 color: var(--text-muted, #8a7e72);
}
.storage-bd-item strong {
 color: var(--text, #2e342d);
 font-family: var(--mono, "SF Mono", "Menlo", monospace);
 font-weight: 600;
 font-size: 0.8rem;
}
.storage-bd-dot {
 width: 7px;
 height: 7px;
 border-radius: 50%;
}
.dark-mode .storage-bd-item { color: #998d7e; }
.dark-mode .storage-bd-item strong { color: #ede5d8; }

@media (max-width: 960px) {
 .dash-greeting-side { text-align: left; padding-right: 0; max-width: none; }
 .dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
 .storage-breakdown { flex-wrap: wrap; gap: 0.5rem; }
}

.notes-grid {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.note-item {
 align-items: stretch;
 padding: 14px;
 gap: 14px;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: 10px;
 transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.note-item:hover {
 border-color: var(--accent, #6f94b8);
 box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
body.dark-mode .note-item:hover {
 box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.note-preview {
 flex: 0 0 140px;
 min-height: 100px;
 padding: 14px 12px;
 border-radius: 3px;
 box-shadow:
 0 1px 1px rgba(0, 0, 0, 0.08),
 0 2px 6px rgba(0, 0, 0, 0.06);
 position: relative;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 transform: rotate(-1.2deg);
 transition: transform 0.2s ease;
}
.note-item:hover .note-preview {
 transform: rotate(0deg) scale(1.02);
}

.note-preview::before {
 content: '';
 position: absolute;
 top: -6px;
 left: 50%;
 transform: translateX(-50%) rotate(2deg);
 width: 36px;
 height: 12px;
 background: rgba(255, 255, 255, 0.45);
 border: 1px solid rgba(0, 0, 0, 0.04);
 border-radius: 1px;
}
.note-preview-text {
 font-size: 0.86rem;
 line-height: 1.55;
 color: #3a342a;
 word-break: break-word;
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif;
 letter-spacing: 0.02em;
}
.note-preview-foot {
 font-size: 0.7rem;
 color: rgba(0, 0, 0, 0.45);
 margin-top: 6px;
 text-align: right;
}
body.dark-mode .note-preview {
 box-shadow:
 0 1px 1px rgba(0, 0, 0, 0.3),
 0 2px 6px rgba(0, 0, 0, 0.2);
}
body.dark-mode .note-preview-text {
 color: rgba(20, 22, 18, 0.85);
}

.note-color-picker {
 display: inline-flex;
 gap: 5px;
}
.note-color-swatch {
 width: 18px;
 height: 18px;
 border-radius: 50%;
 border: 1.5px solid transparent;
 cursor: pointer;
 padding: 0;
 transition: transform 0.15s ease, border-color 0.15s ease;
 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.note-color-swatch:hover {
 transform: scale(1.15);
}
.note-color-swatch.is-active {
 border-color: var(--ink, #2f322e);
 transform: scale(1.15);
}
body.dark-mode .note-color-swatch.is-active {
 border-color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 720px) {
 .note-item {
 flex-wrap: wrap;
 }
 .note-preview {
 flex: 1 1 100%;
 min-height: 80px;
 }
 .list-item-actions {
 flex-direction: row !important;
 }
}

.ai-scene {
 transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ai-scene.is-active {
 background: var(--ink, #2f322e);
 color: #fff;
 border-color: var(--ink, #2f322e);
}
.ai-candidate {
 position: relative;
}
.ai-candidate:hover {
 z-index: 2;
}
.ai-candidate::after {
 content: '+ 点击保存';
 position: absolute;
 inset: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 0.78rem;
 color: rgba(0,0,0,0.55);
 background: rgba(255,255,255,0.6);
 opacity: 0;
 transition: opacity 0.15s ease;
 border-radius: 3px;
 letter-spacing: 0.04em;
}
.ai-candidate:hover::after {
 opacity: 1;
}
@media (max-width: 560px) {
 #ai-results { grid-template-columns: 1fr !important; }
}

.agent-summary-output {
 min-height: 120px;
 position: relative;
}
.agent-summary-placeholder {
 color: var(--text-muted);
 text-align: center;
 padding: 32px 16px;
 font-size: 0.92rem;
 letter-spacing: 0.04em;
 line-height: 1.7;
 background: rgba(108, 120, 98, 0.04);
 border: 1px dashed var(--border);
 border-radius: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
}
.agent-summary-placeholder .spinner {
 width: 16px;
 height: 16px;
 border: 2px solid var(--brand-soft);
 border-top-color: var(--brand);
 border-radius: 50%;
 animation: spin 0.8s linear infinite;
}
.agent-summary-text {
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "Kaiti SC", serif;
 font-size: 0.98rem;
 line-height: 1.9;
 color: var(--text);
 letter-spacing: 0.02em;
}
.agent-summary-text p {
 margin: 0 0 14px;
 text-indent: 2em;
}
.agent-summary-text p:last-child { margin-bottom: 0; }
.agent-summary-raw {
 margin: 0;
 padding: 14px 16px;
 background: var(--bg-code);
 border-radius: 8px;
 font-family: "SF Mono", "Menlo", monospace;
 font-size: 0.78rem;
 line-height: 1.6;
 color: var(--text-secondary);
 max-height: 360px;
 overflow: auto;
 white-space: pre-wrap;
 word-break: break-all;
}
.text-danger { color: var(--danger, #c47558); }
[data-theme="dark"] .agent-summary-text { color: rgba(238, 240, 232, 0.92); }
[data-theme="dark"] .agent-summary-placeholder {
 background: rgba(200, 210, 200, 0.04);
 border-color: rgba(200, 210, 200, 0.10);
}

.ai-status-hero {
 position: relative;
 background:
 linear-gradient(180deg, rgba(244, 244, 241, 0.85), rgba(232, 235, 230, 0.55)),
 radial-gradient(120% 100% at 0% 0%, rgba(111, 148, 184, 0.10), transparent 50%),
 radial-gradient(120% 100% at 100% 100%, rgba(107, 144, 128, 0.10), transparent 50%);
 border: 1px solid rgba(108, 120, 108, 0.10);
 overflow: hidden;
}
.ai-status-hero::before {
 content: '';
 position: absolute;
 top: 0; left: 0; right: 0;
 height: 1px;
 background: linear-gradient(90deg, transparent, rgba(111, 148, 184, 0.4), transparent);
}
.ai-status-hero-grid {
 display: grid;
 grid-template-columns: 1.4fr 1fr;
 gap: 32px;
 padding: 22px 24px 18px;
 align-items: stretch;
}
.ai-status-eyebrow {
 font-size: 0.68rem;
 letter-spacing: 0.18em;
 text-transform: uppercase;
 color: var(--muted, #5e6760);
 opacity: 0.65;
 margin-bottom: 8px;
 font-family: "Songti SC", serif;
}
.ai-status-title {
 font-size: 1.65rem;
 font-weight: 500;
 letter-spacing: 0.04em;
 line-height: 1.35;
 color: var(--ink, #2f322e);
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif;
 margin-bottom: 10px;
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
}
.ai-status-sub {
 font-size: 0.9rem;
 line-height: 1.7;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
 margin-bottom: 14px;
}
.ai-status-sub strong { color: var(--ink, #2f322e); font-weight: 500; }
.ai-status-sub code {
 background: rgba(108, 120, 108, 0.08);
 padding: 1px 6px;
 border-radius: 4px;
 font-size: 0.85em;
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-status-tags {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}
.ai-status-tag {
 display: inline-flex;
 align-items: center;
 font-size: 0.72rem;
 letter-spacing: 0.04em;
 padding: 3px 9px;
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.6);
 border: 1px solid rgba(108, 120, 108, 0.16);
 color: var(--ink, #2f322e);
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-status-dot {
 display: inline-block;
 width: 9px;
 height: 9px;
 border-radius: 50%;
 flex-shrink: 0;
 box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.92);
}
.ai-status-dot.on {
 background: #6b9080;
 animation: aiStatusPulse 1.6s ease-in-out infinite;
}
@keyframes aiStatusPulse {
 0%, 100% { box-shadow: 0 0 0 0 rgba(107, 144, 128, 0.45), 0 0 0 1.5px rgba(255, 255, 255, 0.92); }
 50% { box-shadow: 0 0 0 6px rgba(107, 144, 128, 0.0), 0 0 0 1.5px rgba(255, 255, 255, 0.92); }
}
.ai-status-dot.off {
 background: rgba(160, 165, 158, 0.55);
}

.ai-status-hero-side {
 background: rgba(255, 255, 255, 0.5);
 border: 1px solid rgba(108, 120, 108, 0.10);
 border-radius: 10px;
 padding: 14px 16px;
 display: flex;
 flex-direction: column;
 justify-content: center;
}
.ai-status-hero-side .ai-status-eyebrow { margin-bottom: 10px; }
.ai-status-hero-side .agent-empty-state { margin: 0; }

.ai-status-actions {
 display: flex;
 gap: 8px;
 flex-wrap: wrap;
 padding: 12px 24px;
 border-top: 1px solid rgba(108, 120, 108, 0.08);
 background: rgba(248, 246, 240, 0.4);
}

[data-theme="dark"] .ai-status-hero {
 background:
 linear-gradient(180deg, rgba(34, 38, 40, 0.5), rgba(28, 32, 34, 0.3)),
 radial-gradient(120% 100% at 0% 0%, rgba(111, 148, 184, 0.10), transparent 50%),
 radial-gradient(120% 100% at 100% 100%, rgba(107, 144, 128, 0.10), transparent 50%);
 border-color: rgba(200, 210, 200, 0.10);
}
[data-theme="dark"] .ai-status-title { color: rgba(238, 240, 232, 0.94); }
[data-theme="dark"] .ai-status-sub { color: rgba(220, 220, 215, 0.70); }
[data-theme="dark"] .ai-status-sub strong { color: rgba(238, 240, 232, 0.92); }
[data-theme="dark"] .ai-status-tag {
 background: rgba(34, 38, 40, 0.5);
 border-color: rgba(200, 210, 200, 0.18);
 color: rgba(238, 240, 232, 0.85);
}
[data-theme="dark"] .ai-status-hero-side {
 background: rgba(34, 38, 40, 0.4);
 border-color: rgba(200, 210, 200, 0.10);
}
[data-theme="dark"] .ai-status-actions {
 background: rgba(28, 32, 34, 0.4);
 border-top-color: rgba(200, 210, 200, 0.08);
}

@media (max-width: 720px) {
 .ai-status-hero-grid { grid-template-columns: 1fr; gap: 18px; }
 .ai-status-title { font-size: 1.4rem; }
}

.ai-docs-guide {
 margin-bottom: 22px;
 padding: 14px 16px;
 background: linear-gradient(135deg, rgba(244, 244, 241, 0.6), rgba(238, 240, 232, 0.4));
 border: 1px solid rgba(108, 120, 108, 0.10);
 border-radius: 10px;
}
.ai-docs-guide-steps {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
 margin-bottom: 8px;
}
.ai-docs-step {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 font-size: 0.85rem;
 color: var(--ink, #2f322e);
 letter-spacing: 0.04em;
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif;
}
.ai-docs-step code {
 background: rgba(108, 120, 108, 0.10);
 padding: 1px 6px;
 border-radius: 4px;
 font-size: 0.82em;
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-docs-step-num {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 20px;
 height: 20px;
 border-radius: 50%;
 background: var(--brand, #6f94b8);
 color: #fff;
 font-size: 0.72rem;
 font-weight: 500;
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
 flex-shrink: 0;
}
.ai-docs-step-arrow {
 color: var(--muted, #5e6760);
 opacity: 0.4;
 font-size: 0.9rem;
}
.ai-docs-guide-hint {
 font-size: 0.78rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
 line-height: 1.6;
 opacity: 0.85;
}
[data-theme="dark"] .ai-docs-guide {
 background: linear-gradient(135deg, rgba(34, 38, 40, 0.4), rgba(28, 32, 34, 0.3));
 border-color: rgba(200, 210, 200, 0.10);
}
[data-theme="dark"] .ai-docs-step { color: rgba(238, 240, 232, 0.88); }
[data-theme="dark"] .ai-docs-guide-hint { color: rgba(220, 220, 215, 0.60); }

.ai-providers-group {
 margin-bottom: 24px;
}
.ai-providers-group:last-child { margin-bottom: 0; }
.ai-providers-group-head {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 margin: 0 0 12px;
 padding-bottom: 8px;
 border-bottom: 1px dashed rgba(108, 120, 108, 0.16);
}
.ai-providers-group-bar {
 display: block;
 width: 3px;
 min-height: 22px;
 border-radius: 2px;
 flex-shrink: 0;
 margin-top: 2px;
}
.ai-providers-group[data-group="domestic"] .ai-providers-group-bar {
 background: linear-gradient(180deg, #c89968, #b87a3e);
}
.ai-providers-group[data-group="overseas"] .ai-providers-group-bar {
 background: linear-gradient(180deg, #6f94b8, #4a6e8c);
}
.ai-providers-group[data-group="custom"] .ai-providers-group-bar {
 background: linear-gradient(180deg, #8a8278, #6e6760);
}
.ai-providers-group-title-wrap { flex: 1; }
.ai-providers-group-title {
 font-size: 1.02rem;
 font-weight: 500;
 margin: 0 0 2px;
 letter-spacing: 0.06em;
 color: var(--ink, #2f322e);
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif;
 display: flex;
 align-items: center;
 gap: 10px;
}
.ai-providers-group-tag {
 display: inline-flex;
 align-items: center;
 font-size: 0.66rem;
 letter-spacing: 0.10em;
 padding: 2px 8px;
 border-radius: 999px;
 font-weight: 400;
}
.ai-providers-group[data-group="domestic"] .ai-providers-group-tag {
 background: rgba(200, 153, 104, 0.12);
 color: #9a6a32;
}
.ai-providers-group[data-group="overseas"] .ai-providers-group-tag {
 background: rgba(111, 148, 184, 0.12);
 color: #4a6e8c;
}
.ai-providers-group[data-group="custom"] .ai-providers-group-tag {
 background: rgba(138, 130, 120, 0.12);
 color: #6e6760;
}
.ai-providers-group-desc {
 font-size: 0.76rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
 margin: 0;
 opacity: 0.8;
}
[data-theme="dark"] .ai-providers-group-title { color: rgba(238, 240, 232, 0.94); }
[data-theme="dark"] .ai-providers-group-desc { color: rgba(220, 220, 215, 0.60); }
[data-theme="dark"] .ai-providers-group-head { border-bottom-color: rgba(200, 210, 200, 0.10); }
[data-theme="dark"] .ai-providers-group[data-group="domestic"] .ai-providers-group-tag { background: rgba(200, 153, 104, 0.18); color: rgba(222, 180, 130, 0.9); }
[data-theme="dark"] .ai-providers-group[data-group="overseas"] .ai-providers-group-tag { background: rgba(111, 148, 184, 0.18); color: rgba(184, 207, 222, 0.9); }
[data-theme="dark"] .ai-providers-group[data-group="custom"] .ai-providers-group-tag { background: rgba(138, 130, 120, 0.18); color: rgba(200, 195, 188, 0.8); }

.ai-providers {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
 gap: 10px;
}

.ai-provider-card {
 position: relative;
 padding: 12px 14px 11px;
 border: 1px solid rgba(108, 120, 108, 0.12);
 border-radius: 9px;
 background: rgba(255, 255, 255, 0.55);
 display: flex;
 flex-direction: column;
 gap: 8px;
 transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.ai-provider-card:hover {
 border-color: rgba(111, 148, 184, 0.35);
 background: rgba(255, 255, 255, 0.85);
 transform: translateY(-1px);
 box-shadow: 0 3px 10px rgba(60, 70, 68, 0.06);
}
.ai-provider-card.is-current {
 border-color: var(--brand, #6f94b8);
 background: rgba(111, 148, 184, 0.06);
}
.ai-provider-card.is-current:hover {
 background: rgba(111, 148, 184, 0.10);
}

.ai-provider-card-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
}
.ai-provider-actions {
 display: flex;
 align-items: center;
 gap: 6px;
 flex-shrink: 0;
}
.ai-provider-web {
 font-size: 0.7rem;
 font-family: var(--ui-font, system-ui);
 padding: 3px 10px;
 background: rgba(255, 255, 255, 0.7);
 border: 1px solid rgba(108, 120, 108, 0.18);
 color: var(--muted, #5e6760);
 border-radius: 999px;
 cursor: pointer;
 letter-spacing: 0.06em;
 text-decoration: none;
 transition: all 0.18s ease;
 display: inline-flex;
 align-items: center;
}
.ai-provider-web:hover {
 background: rgba(200, 153, 104, 0.10);
 border-color: rgba(200, 153, 104, 0.35);
 color: #9a6a32;
}
.ai-provider-web::after {
 content: '↗';
 font-size: 0.85em;
 margin-left: 3px;
 opacity: 0.6;
}
.ai-provider-name {
 display: flex;
 align-items: baseline;
 gap: 7px;
 flex-wrap: wrap;
}
.ai-provider-name strong {
 font-size: 0.92rem;
 font-weight: 500;
 letter-spacing: 0.04em;
 color: var(--ink, #2f322e);
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", serif;
}
.ai-provider-key-badge {
 font-size: 0.68rem;
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
 color: var(--muted, #5e6760);
 background: rgba(108, 120, 108, 0.08);
 padding: 1px 6px;
 border-radius: 4px;
 letter-spacing: 0.02em;
}
.ai-provider-tag {
 font-size: 0.66rem;
 font-family: var(--ui-font, system-ui);
 padding: 2px 8px;
 background: var(--brand, #6f94b8);
 color: #fff;
 border-radius: 999px;
 letter-spacing: 0.06em;
 flex-shrink: 0;
}
.ai-provider-copy {
 font-size: 0.7rem;
 font-family: var(--ui-font, system-ui);
 padding: 3px 10px;
 background: rgba(255, 255, 255, 0.7);
 border: 1px solid rgba(108, 120, 108, 0.18);
 color: var(--muted, #5e6760);
 border-radius: 999px;
 cursor: pointer;
 letter-spacing: 0.06em;
 transition: all 0.18s ease;
 flex-shrink: 0;
}
.ai-provider-copy:hover {
 background: rgba(111, 148, 184, 0.10);
 border-color: rgba(111, 148, 184, 0.35);
 color: var(--brand, #6f94b8);
}
.ai-provider-copy.is-copied {
 background: rgba(107, 144, 128, 0.12);
 border-color: rgba(107, 144, 128, 0.30);
 color: #4a6658;
}

.ai-provider-fields {
 display: flex;
 flex-direction: column;
 gap: 3px;
}
.ai-provider-field {
 display: flex;
 align-items: baseline;
 gap: 8px;
 font-size: 0.74rem;
 line-height: 1.5;
}
.ai-provider-field-label {
 flex-shrink: 0;
 width: 92px;
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
 font-size: 0.68rem;
 color: var(--muted, #5e6760);
 opacity: 0.7;
 letter-spacing: 0.02em;
}
.ai-provider-field-val {
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
 font-size: 0.72rem;
 color: var(--ink, #2f322e);
 word-break: break-all;
 letter-spacing: 0.01em;
}
.ai-provider-field-val.is-empty {
 color: var(--muted, #5e6760);
 opacity: 0.5;
 font-style: italic;
}

.ai-provider-note {
 font-size: 0.74rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.03em;
 line-height: 1.5;
 padding-left: 8px;
 border-left: 2px solid rgba(108, 120, 108, 0.14);
 margin-top: 2px;
}

.ai-docs-footer {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
 margin-top: 18px;
 padding-top: 12px;
 border-top: 1px dashed rgba(108, 120, 108, 0.12);
 font-size: 0.76rem;
 color: var(--muted, #5e6760);
 letter-spacing: 0.04em;
}
.ai-docs-footer code {
 background: rgba(108, 120, 108, 0.08);
 padding: 1px 5px;
 border-radius: 3px;
 font-size: 0.85em;
 font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-docs-footer-dot { opacity: 0.4; }

[data-theme="dark"] .ai-provider-card {
 background: rgba(34, 38, 40, 0.4);
 border-color: rgba(200, 210, 200, 0.10);
}
[data-theme="dark"] .ai-provider-card:hover {
 background: rgba(34, 38, 40, 0.6);
 border-color: rgba(111, 148, 184, 0.30);
}
[data-theme="dark"] .ai-provider-card.is-current { background: rgba(111, 148, 184, 0.10); }
[data-theme="dark"] .ai-provider-name strong { color: rgba(238, 240, 232, 0.92); }
[data-theme="dark"] .ai-provider-key-badge { background: rgba(200, 210, 200, 0.08); color: rgba(220, 220, 215, 0.60); }
[data-theme="dark"] .ai-provider-field-label { color: rgba(220, 220, 215, 0.50); }
[data-theme="dark"] .ai-provider-field-val { color: rgba(238, 240, 232, 0.88); }
[data-theme="dark"] .ai-provider-field-val.is-empty { color: rgba(220, 220, 215, 0.40); }
[data-theme="dark"] .ai-provider-note { color: rgba(220, 220, 215, 0.55); border-left-color: rgba(200, 210, 200, 0.12); }
[data-theme="dark"] .ai-provider-copy { background: rgba(34, 38, 40, 0.5); border-color: rgba(200, 210, 200, 0.16); color: rgba(220, 220, 215, 0.60); }
[data-theme="dark"] .ai-provider-copy:hover { background: rgba(111, 148, 184, 0.14); border-color: rgba(111, 148, 184, 0.30); color: rgba(184, 207, 222, 0.92); }
[data-theme="dark"] .ai-provider-copy.is-copied { background: rgba(107, 144, 128, 0.14); border-color: rgba(107, 144, 128, 0.28); color: rgba(150, 180, 165, 0.9); }
[data-theme="dark"] .ai-provider-web { background: rgba(34, 38, 40, 0.5); border-color: rgba(200, 210, 200, 0.16); color: rgba(220, 220, 215, 0.60); }
[data-theme="dark"] .ai-provider-web:hover { background: rgba(200, 153, 104, 0.14); border-color: rgba(200, 153, 104, 0.30); color: rgba(222, 180, 130, 0.9); }
[data-theme="dark"] .ai-docs-footer { color: rgba(220, 220, 215, 0.50); border-top-color: rgba(200, 210, 200, 0.08); }
[data-theme="dark"] .ai-docs-footer code { background: rgba(200, 210, 200, 0.08); }

.ai-user-preview {
 margin: 0 0 16px;
 padding: 12px 14px;
 background: linear-gradient(180deg, rgba(244, 244, 241, 0.55), rgba(238, 240, 232, 0.45));
 border: 1px solid rgba(108, 120, 108, 0.10);
 border-radius: 10px;
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "Kaiti SC", serif;
}
.ai-user-preview-label {
 font-size: 0.72rem;
 letter-spacing: 0.10em;
 color: var(--muted, #5e6760);
 opacity: 0.7;
 margin-bottom: 8px;
 text-transform: uppercase;
}
.ai-user-preview .agent-empty-state {
 margin: 0;
}
[data-theme="dark"] .ai-user-preview {
 background: linear-gradient(180deg, rgba(34, 38, 40, 0.4), rgba(28, 32, 34, 0.3));
 border-color: rgba(200, 210, 200, 0.10);
}
.ai-config-grid { width: 100%; }
.ai-config-rows {
 display: flex;
 flex-direction: column;
 gap: 10px;
}
.ai-config-row {
 display: grid;
 grid-template-columns: 110px 1fr;
 gap: 12px;
 align-items: start;
 padding-bottom: 8px;
 border-bottom: 1px dashed var(--border, rgba(108, 120, 98, 0.12));
}
.ai-config-row:last-child { border-bottom: none; padding-bottom: 0; }
.ai-config-label {
 font-size: 0.82rem;
 color: var(--text-muted, #5e6760);
 letter-spacing: 0.04em;
 padding-top: 2px;
}
.ai-config-value {
 font-size: 0.92rem;
 color: var(--text, #2f322e);
 word-break: break-all;
}
.ai-env-list {
 display: flex;
 flex-direction: column;
 gap: 4px;
 margin-top: 4px;
 padding: 8px 10px;
 background: rgba(108, 120, 98, 0.04);
 border-radius: 6px;
}
.ai-env-row {
 display: flex;
 align-items: baseline;
 gap: 8px;
 font-size: 0.78rem;
 font-family: "SF Mono", "Menlo", monospace;
 line-height: 1.6;
}
.ai-env-key {
 color: var(--brand, #6f94b8);
 min-width: 130px;
 flex-shrink: 0;
}
.ai-env-val { color: var(--text-secondary, #5e6760); word-break: break-all; }
.ai-quota-wrap {
 display: flex;
 flex-direction: column;
 gap: 8px;
}
.ai-quota-stats {
 display: flex;
 align-items: baseline;
 gap: 12px;
 font-size: 0.9rem;
 color: var(--text, #2f322e);
}
.ai-quota-num {
 font-size: 1.5rem;
 font-weight: 500;
 font-family: "SF Mono", "Menlo", monospace;
 color: var(--brand, #6f94b8);
}
.ai-quota-remain {
 margin-left: auto;
 font-size: 0.82rem;
 color: var(--text-muted, #5e6760);
}
.ai-quota-bar {
 height: 6px;
 background: rgba(108, 120, 98, 0.10);
 border-radius: 3px;
 overflow: hidden;
}
.ai-quota-bar-fill {
 height: 100%;
 background: linear-gradient(90deg, #6f94b8, #8a8278);
 border-radius: 3px;
 transition: width 0.4s ease;
}
.ai-quota-source {
 display: inline-flex;
 align-items: center;
 padding: 1px 8px;
 font-size: 0.72rem;
 border-radius: 999px;
 border: 1px solid transparent;
 letter-spacing: 0.04em;
 line-height: 1.5;
 font-weight: 400;
 white-space: nowrap;
}
.ai-quota-source.is-override {
 color: #6f94b8;
 border-color: rgba(111, 148, 184, 0.32);
 background: rgba(111, 148, 184, 0.08);
}
.ai-quota-source.is-env {
 color: #8a8278;
 border-color: rgba(138, 130, 120, 0.28);
 background: rgba(138, 130, 120, 0.06);
}
.ai-quota-source.is-default {
 color: var(--text-muted, #5e6760);
 border-color: var(--border, rgba(108, 120, 98, 0.18));
 background: rgba(108, 120, 98, 0.04);
}
.ai-quota-edit {
 margin-top: 12px;
 padding: 12px 14px;
 border-radius: 8px;
 background: rgba(108, 120, 98, 0.04);
 border: 1px solid var(--border, rgba(108, 120, 98, 0.10));
 display: flex;
 flex-direction: column;
 gap: 8px;
 animation: aiQuotaEditIn 0.28s ease;
}
@keyframes aiQuotaEditIn {
 from { opacity: 0; transform: translateY(-4px); }
 to { opacity: 1; transform: translateY(0); }
}
.ai-quota-edit-label {
 font-size: 0.78rem;
 color: var(--text-secondary, #5e6760);
 letter-spacing: 0.04em;
}
.ai-quota-edit-row {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}
.ai-quota-edit-input {
 width: 110px;
 padding: 6px 10px;
 font-size: 0.9rem;
 font-family: "SF Mono", "Menlo", monospace;
 color: var(--text, #2f322e);
 background: var(--bg-input, #fffdf7);
 border: 1px solid var(--border, rgba(108, 120, 98, 0.18));
 border-radius: 6px;
 transition: border-color 0.18s ease, box-shadow 0.18s ease;
 font-variant-numeric: tabular-nums;
 text-align: center;
}
.ai-quota-edit-input::-webkit-outer-spin-button,
.ai-quota-edit-input::-webkit-inner-spin-button {
 -webkit-appearance: none;
 margin: 0;
}
.ai-quota-edit-input:focus {
 outline: none;
 border-color: rgba(111, 148, 184, 0.55);
 box-shadow: 0 0 0 3px rgba(111, 148, 184, 0.10);
}
.ai-quota-edit-unit {
 font-size: 0.82rem;
 color: var(--text-muted, #5e6760);
 letter-spacing: 0.04em;
}
.ai-quota-edit-hint {
 font-size: 0.74rem;
 color: var(--text-muted, #5e6760);
 letter-spacing: 0.02em;
 line-height: 1.6;
 margin: 0;
}
.ai-quota-edit-hint code {
 font-size: 0.72rem;
 padding: 1px 5px;
 background: rgba(108, 120, 98, 0.08);
 border-radius: 3px;
}
.ai-quota-edit-toggle {
 margin-top: 10px;
 display: flex;
 justify-content: flex-end;
}
[data-theme="dark"] .ai-quota-edit {
 background: rgba(200, 210, 200, 0.04);
 border-color: rgba(200, 210, 200, 0.10);
}
[data-theme="dark"] .ai-quota-edit-input {
 background: #232622;
 color: #eef0e8;
 border-color: rgba(200, 210, 200, 0.14);
}
[data-theme="dark"] .ai-quota-edit-input:focus {
 border-color: rgba(111, 148, 184, 0.6);
 box-shadow: 0 0 0 3px rgba(111, 148, 184, 0.16);
}
[data-theme="dark"] .ai-quota-edit-hint code {
 background: rgba(200, 210, 200, 0.08);
}
[data-theme="dark"] .ai-quota-source.is-default {
 color: rgba(220, 220, 215, 0.65);
 border-color: rgba(200, 210, 200, 0.10);
}
.ai-kb-list {
 display: flex;
 flex-direction: column;
 gap: 14px;
}
.ai-kb-item {
 display: flex;
 flex-direction: column;
 gap: 4px;
 position: relative;
}
.ai-kb-label {
 font-size: 0.82rem;
 font-weight: 500;
 color: var(--text-secondary, #5e6760);
 letter-spacing: 0.04em;
}
.ai-kb-textarea {
 width: 100%;
 min-height: 80px;
 padding: 8px 10px;
 font-size: 0.85rem;
 line-height: 1.6;
 color: var(--text, #2f322e);
 background: var(--bg-input, #fffdf7);
 border: 1px solid var(--border, rgba(108, 120, 98, 0.18));
 border-radius: 6px;
 resize: vertical;
 font-family: inherit;
 transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ai-kb-textarea:focus {
 outline: none;
 border-color: rgba(111, 148, 184, 0.55);
 box-shadow: 0 0 0 3px rgba(111, 148, 184, 0.10);
}
.ai-kb-count {
 position: absolute;
 bottom: 6px;
 right: 10px;
 font-size: 0.72rem;
 color: var(--text-muted, #5e6760);
 opacity: 0.6;
 font-family: "SF Mono", "Menlo", monospace;
 pointer-events: none;
}
.ai-docs-simple {
 padding: 8px 4px;
 font-size: 0.88rem;
 line-height: 1.8;
 color: var(--text-secondary, #5e6760);
}
.ai-docs-simple p { margin: 0 0 8px; }
.ai-docs-simple-hint {
 font-size: 0.8rem;
 color: var(--text-muted, #5e6760);
 opacity: 0.8;
}
[data-theme="dark"] .ai-kb-textarea {
 background: #232622;
 color: #eef0e8;
 border-color: rgba(200, 210, 200, 0.14);
}
[data-theme="dark"] .ai-kb-textarea:focus {
 border-color: rgba(111, 148, 184, 0.6);
 box-shadow: 0 0 0 3px rgba(111, 148, 184, 0.16);
}
.ai-logs {
 max-height: 320px;
 overflow: auto;
}
.ai-logs-table {
 width: 100%;
 border-collapse: collapse;
 font-size: 0.82rem;
}
.ai-logs-table th,
.ai-logs-table td {
 padding: 7px 8px;
 text-align: left;
 border-bottom: 1px solid var(--border, rgba(108, 120, 98, 0.10));
 white-space: nowrap;
}
.ai-logs-table th {
 font-weight: 500;
 color: var(--text-muted, #5e6760);
 font-size: 0.78rem;
 background: rgba(108, 120, 98, 0.04);
 position: sticky;
 top: 0;
}
.ai-log-msg {
 white-space: normal;
 max-width: 260px;
 color: var(--text-secondary, #5e6760);
 font-size: 0.78rem;
}
.ai-log-ok { color: #6b9080; }
.ai-log-fail { color: #c47558; }
.ai-logs-table tr.fail td { background: rgba(196, 117, 88, 0.04); }
[data-theme="dark"] .ai-config-row { border-bottom-color: rgba(200, 210, 200, 0.08); }
[data-theme="dark"] .ai-config-value { color: rgba(238, 240, 232, 0.92); }
[data-theme="dark"] .ai-env-list { background: rgba(200, 210, 200, 0.04); }
[data-theme="dark"] .ai-env-val { color: rgba(220, 220, 215, 0.65); }
[data-theme="dark"] .ai-quota-bar { background: rgba(200, 210, 200, 0.10); }
[data-theme="dark"] .ai-logs-table th { background: rgba(200, 210, 200, 0.05); color: rgba(220, 220, 215, 0.6); }

.agent-empty {
 margin: 8px 4px;
 padding: 4px;
 font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "Kaiti SC", serif;
 color: var(--ink, #2f322e);
 letter-spacing: 0.04em;
 line-height: 1.7;
 display: flex;
 flex-direction: column;
 gap: 14px;
 animation: agentMsgIn 0.32s ease;
}
.agent-empty-greeting {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 padding: 4px 6px 2px;
}
.agent-empty-avatar {
 width: 32px;
 height: 32px;
 flex-shrink: 0;
 border-radius: 50%;
 background: linear-gradient(135deg, rgba(111, 148, 184, 0.18), rgba(184, 207, 222, 0.18));
 color: var(--ink, #2f322e);
 display: inline-flex;
 align-items: center;
 justify-content: center;
}
.agent-empty-avatar svg { width: 18px; height: 18px; }
.agent-empty-text { flex: 1; padding-top: 1px; }
.agent-empty-line { font-size: 0.92rem; line-height: 1.6; }
.agent-empty-hi { font-size: 1rem; font-weight: 500; letter-spacing: 0.06em; }
.agent-empty-sub { font-size: 0.78rem; color: var(--muted, #5e6760); letter-spacing: 0.05em; }

.agent-empty-state {
 display: flex;
 align-items: center;
 gap: 8px;
 margin: 0 6px;
 padding: 8px 12px;
 border-radius: 9px;
 font-size: 0.78rem;
 letter-spacing: 0.05em;
 line-height: 1.5;
 border: 1px solid transparent;
}
.agent-empty-state-icon {
 width: 16px;
 text-align: center;
 font-size: 0.85rem;
 line-height: 1;
 flex-shrink: 0;
}
.agent-empty-state-off {
 background: rgba(184, 207, 222, 0.12);
 border-color: rgba(108, 120, 108, 0.14);
 color: var(--muted, #5e6760);
}
.agent-empty-state-off .agent-empty-state-icon { color: var(--muted, #5e6760); }
.agent-empty-state-on {
 background: rgba(107, 144, 128, 0.10);
 border-color: rgba(107, 144, 128, 0.22);
 color: #4a6658;
}
.agent-empty-state-on .agent-empty-state-icon { color: #6b9080; }

@keyframes agentMsgIn {
 from { opacity: 0; transform: translateY(4px); }
 to { opacity: 1; transform: translateY(0); }
}
.spinner {
 display: inline-block;
 width: 12px;
 height: 12px;
 border: 2px solid rgba(108, 120, 108, 0.2);
 border-top-color: rgba(111, 148, 184, 0.7);
 border-radius: 50%;
 vertical-align: -2px;
 margin-right: 4px;
 animation: agentSpin 0.8s linear infinite;
}
@keyframes agentSpin { to { transform: rotate(360deg); } }
[data-theme="dark"] .agent-empty { color: rgba(238, 240, 232, 0.92); }
[data-theme="dark"] .agent-empty-sub { color: rgba(220, 220, 215, 0.65); }
[data-theme="dark"] .agent-empty-avatar { background: linear-gradient(135deg, rgba(111, 148, 184, 0.22), rgba(184, 207, 222, 0.16)); }