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

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

.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: hidden;
 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);
}

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

#pbEntriesTable th,
.pb-reports-table th,
.pb-audit-table th {
 font-size: 0.68rem;
 font-weight: 500;
 letter-spacing: 0.16em;
 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: 0.96rem;
 line-height: 1.55;
 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.82rem;
 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.78rem;
 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.82rem;
 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.85rem;
 color: var(--ink-soft);
 font-weight: 500;
 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.3rem; flex-wrap: nowrap; justify-content: flex-end; align-items: center; vertical-align: middle; }
.pb-actions .btn {
 width: 30px;
 height: 30px;
 padding: 0;
 font-size: 0.72rem;
 line-height: 1;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 background: transparent;
 border: 1px solid transparent;
 border-radius: 7px;
 color: var(--ink-soft);
 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(--pb-folding);
}
.pb-actions .btn .icon { width: 14px; height: 14px; }

.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); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.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); }

.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-detail-content {
 font-family: var(--font);
 white-space: pre-wrap;
 line-height: 1.95;
 font-size: 1.02rem;
 padding: 0.4rem 0.2rem 1rem;
 border-bottom: 1px dashed var(--line, rgba(0,0,0,0.08));
 margin-bottom: 0.8rem;
 color: var(--text);
}
.pb-detail-grid {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 0.5rem 1.2rem;
 font-size: 0.85rem;
 margin-bottom: 0.8rem;
}
.pb-detail-kv { display: flex; gap: 0.5rem; min-width: 0; }
.pb-detail-k {
 color: var(--text-muted);
 letter-spacing: 0.06em;
 flex-shrink: 0;
}
.pb-detail-v {
 color: var(--text);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 min-width: 0;
}
.pb-detail-section { margin: 0 0 1.2rem; }
.pb-detail-section-title {
 margin: 0 0 0.5rem;
 font-size: 0.78rem;
 font-weight: 600;
 letter-spacing: 0.1em;
 color: var(--text-muted);
 text-transform: uppercase;
}
.pb-detail-reactions {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 0.5rem;
}
.pb-detail-rx {
 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-detail-rx:hover { border-color: var(--brand); background: var(--brand-soft, rgba(122,140,90,0.08)); }
.pb-detail-rx-ic { display: inline-flex; color: var(--brand); }
.pb-detail-rx-ic .icon { width: 14px; height: 14px; }
.pb-detail-rx-lb { flex: 1; }
.pb-detail-rx-c {
 font-family: var(--font);
 font-variant-numeric: tabular-nums;
 color: var(--brand);
 font-weight: 600;
}
.pb-detail-hint {
 display: inline-flex; align-items: center; gap: 0.3rem;
 margin-top: 0.4rem;
 font-size: 0.85rem;
 color: var(--text-muted);
}
.pb-detail-hint .icon { width: 12px; height: 12px; }

.pb-detail-reply { padding-top: 0.6rem; border-top: 1px dashed var(--line, rgba(0,0,0,0.08)); }
.pb-detail-reply-actions {
 display: flex; align-items: center; gap: 0.8rem;
 margin-top: 0.5rem;
 flex-wrap: wrap;
}
.pb-detail-reply-actions .btn { margin-left: auto; }
.pb-detail-reply-actions .btn .icon { width: 12px; height: 12px; vertical-align: -2px; margin-right: 0.2rem; }

.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: 620px;
}

.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: 78px; }
.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: 140px; }
.pb-reports-table colgroup col:nth-child(4) { width: 110px; }
.pb-reports-table colgroup col:nth-child(5) { width: 140px; }
.pb-reports-table colgroup col:nth-child(6) { width: 150px; }
.pb-reports-table colgroup col:nth-child(7) { width: 100px; }
.pb-reports-table colgroup col:nth-child(8) { width: 170px; }

.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: 72px; }
.pb-audit-table colgroup col:nth-child(2) { width: 130px; }
.pb-audit-table colgroup col:nth-child(3) { width: 80px; }
.pb-audit-table colgroup col:nth-child(4) { width: auto; min-width: 220px; }
.pb-audit-table colgroup col:nth-child(5) { width: 110px; }
.pb-audit-table colgroup col:nth-child(6) { width: 150px; }

.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.86rem;
 line-height: 1.4;
}
.pb-audit-k {
 color: var(--text-muted);
 font-size: 0.72rem;
 letter-spacing: 0.12em;
 text-transform: uppercase;
}
.pb-audit-v {
 color: var(--text);
 font-family: var(--font);
 word-break: break-word;
}
.pb-audit-detail { min-width: 0; }

.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(74, 125, 74, 0.1);
 color: #4a7d4a;
 border: 1px solid rgba(74, 125, 74, 0.22);
}
.v-status-pill.is-hidden {
 background: rgba(150, 150, 150, 0.1);
 color: #888;
 border: 1px solid rgba(150, 150, 150, 0.22);
}
.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(0, 0, 0, 0.05);
 border-color: var(--accent, #5d6e4f);
 color: var(--accent, #5d6e4f);
 opacity: 1;
}
.row-actions .btn-icon-danger:hover {
 background: rgba(170, 90, 80, 0.08);
 border-color: rgba(170, 90, 80, 0.4);
 color: #a55a50;
 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);
}