:root {
	--bg: #f6f8fb;
	--panel: #ffffff;
	--text: #0f172a;
	--muted: #64748b;
	--border: #e5e7eb;
	--surface: #f1f5f9;
	--primary: #1677ff;
	--primary-2: #0b5ed7;
	--primary-text: #ffffff;
	--shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.hidden { display: none !important; }

.layout {
	display: flex;
	height: 100vh;
	width: 100%;
}

.sidebar {
	width: 240px;
	background: #f8fafc;
	border-right: 1px solid var(--border);
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .nav-item { font-size: 0; }
.sidebar.collapsed .nav-item::before { font-size: 13px; }
.sidebar.collapsed .sidebar-footer { display: none; }

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 6px;
}

.logo {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--primary), #38bdf8);
	color: white;
	display: grid;
	place-items: center;
	font-weight: 800;
	box-shadow: var(--shadow);
}

.brand-title { font-weight: 700; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; padding: 2px; }

.nav-item {
	padding: 10px 10px;
	border-radius: 10px;
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
	position: relative;
}

.nav-item:hover { background: rgba(22, 119, 255, 0.08); }

.nav-item.active {
	background: rgba(22, 119, 255, 0.12);
	color: var(--primary-2);
}

.nav-item.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.nav-sep { height: 1px; background: var(--border); margin: 8px 6px; }
.nav-group-title { font-size: 12px; color: var(--muted); padding: 0 8px; }

.sidebar-footer { margin-top: auto; padding: 8px 6px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
	height: 60px;
	background: var(--panel);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-weight: 700; }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.user-badge {
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
}

.content {
	padding: 18px;
	overflow: auto;
}

.view { display: none; }
.view.active { display: block; }

.panel, .card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	box-shadow: 0 1px 0 rgba(2,6,23,0.02);
}

.panel { padding: 18px; }

.panel-title { font-weight: 700; margin-bottom: 10px; }
.card-title { font-weight: 700; margin-bottom: 10px; }

.hero {
	display: flex;
	gap: 14px;
	align-items: stretch;
	justify-content: space-between;
	margin-bottom: 14px;
}

.hero-left h1 { margin: 0 0 8px; font-size: 22px; }
.hero-left p { margin: 0; }

.hero-right { width: 160px; display: flex; align-items: center; justify-content: flex-end; }
.hero-illu {
	width: 120px;
	height: 80px;
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(22,119,255,0.18), rgba(56,189,248,0.18));
	border: 1px dashed rgba(22,119,255,0.35);
	display: grid;
	place-items: center;
	font-weight: 900;
	color: var(--primary-2);
}

.dropzone {
	position: relative;
	border: 1px dashed #cbd5e1;
	border-radius: 14px;
	background: #fbfdff;
	padding: 18px;
	min-height: 120px;
	display: grid;
	place-items: center;
	margin-bottom: 12px;
}

.dropzone.dragover { border-color: var(--primary); background: rgba(22,119,255,0.06); }

.dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.dropzone-title { font-weight: 700; }
.dropzone-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.grid-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 220px;
	gap: 10px;
}

.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
}

@media (max-width: 980px) {
	.grid-3 { grid-template-columns: 1fr; }
	.grid-2 { grid-template-columns: 1fr; }
	.hero-right { display: none; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 12px; color: var(--muted); }

input, .select {
	width: 100%;
	padding: 10px 10px;
	border: 1px solid var(--border);
	border-radius: 10px;
	outline: none;
	background: var(--panel);
}

input:focus, .select:focus { border-color: rgba(22,119,255,0.55); box-shadow: 0 0 0 3px rgba(22,119,255,0.12); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--panel);
	cursor: pointer;
	font-weight: 600;
}

.btn.primary {
	background: var(--primary);
	color: var(--primary-text);
	border-color: var(--primary);
}

.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ghost, .link, .icon-btn {
	border: 1px solid var(--border);
	background: transparent;
	border-radius: 10px;
	padding: 10px 12px;
	cursor: pointer;
	font-weight: 600;
}

.link { border: none; padding: 0; color: var(--primary-2); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; }

.help { font-size: 12px; color: var(--muted); }

.pre {
	background: var(--surface);
	border-radius: 12px;
	padding: 10px;
	overflow: auto;
	white-space: pre-wrap;
	min-height: 24px;
	border: 1px solid var(--border);
}

.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.section-title-row { display: flex; gap: 10px; align-items: baseline; margin-top: 16px; margin-bottom: 10px; }
.section-title { font-weight: 800; }
.section-sub { font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

@media (max-width: 980px) { .cards { grid-template-columns: 1fr; } }

.card-btn {
	text-align: left;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	cursor: pointer;
}

.card-btn:hover { border-color: rgba(22,119,255,0.35); box-shadow: var(--shadow); }
.card-btn-title { font-weight: 800; }
.card-btn-sub { font-size: 12px; margin-top: 6px; }

.toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.search { width: 320px; }
@media (max-width: 520px) { .search { width: 100%; } }

.table {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	overflow: hidden;
}

.tr {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr 1fr;
	gap: 12px;
	padding: 12px 14px;
	align-items: center;
}

.th {
	background: #f8fafc;
	font-weight: 800;
	font-size: 12px;
	color: #334155;
	border-bottom: 1px solid var(--border);
}

.tbody .tr { border-bottom: 1px solid var(--border); }
.tbody .tr:last-child { border-bottom: none; }

.empty { padding: 40px 12px; text-align: center; color: var(--muted); }

.pill {
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
}

.tag {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: #334155;
	display: inline-block;
}

.tag.ok { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); color: #15803d; }
.tag.warn { border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.10); color: #92400e; }

.preview { display: grid; gap: 10px; margin-top: 12px; }

.section {
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 12px;
	background: #ffffff;
}

.section h3 { margin: 0 0 8px; font-size: 15px; }
.section .content { white-space: pre-wrap; line-height: 1.6; color: #0f172a; }

.raw { margin-top: 10px; }

.wizard-head {
	display: grid;
	grid-template-columns: 80px 1fr 120px;
	gap: 12px;
	align-items: center;
	margin-bottom: 12px;
}

.wizard-steps { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.step { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.step.active { color: var(--primary-2); font-weight: 800; }
.dot {
	width: 22px; height: 22px; border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	display: grid; place-items: center;
	font-weight: 800;
	color: #334155;
}
.step.active .dot { border-color: rgba(22,119,255,0.5); background: rgba(22,119,255,0.12); color: var(--primary-2); }

.wizard-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) { .wizard-body { grid-template-columns: 1fr; } }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-item {
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--panel);
	cursor: pointer;
	font-weight: 700;
	font-size: 12px;
}
.seg-item.active { border-color: rgba(22,119,255,0.5); background: rgba(22,119,255,0.10); color: var(--primary-2); }

.checklist { display: grid; grid-template-columns: 1fr; gap: 8px; }
.check {
	display: flex; gap: 8px; align-items: center;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: #fff;
}
.check input { width: 16px; height: 16px; }
.check span { font-weight: 600; font-size: 13px; }

.modal.hidden, .toast.hidden { display: none; }

.modal { position: fixed; inset: 0; z-index: 50; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.modal-body {
	position: relative;
	max-width: 720px;
	margin: 10vh auto;
	background: var(--panel);
	border-radius: 16px;
	padding: 16px;
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
}
.modal-title { font-weight: 900; margin-bottom: 12px; }

.toast {
	position: fixed;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	background: #0f172a;
	color: #fff;
	padding: 10px 12px;
	border-radius: 12px;
	box-shadow: var(--shadow);
	max-width: calc(100vw - 24px);
	font-size: 13px;
}


/* =============================================
   NEW PAGES: Upload, Fangan, Zixin, Sucai, Bidder
   ============================================= */

/* Split Layout (Fangan, Zixin, Sucai) */
.split-layout {
	display: flex;
	gap: 0;
	height: calc(100vh - 96px);
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	overflow: hidden;
}

.split-left {
	width: 240px;
	min-width: 200px;
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	background: #fafbfc;
}

.split-header {
	padding: 12px;
	display: flex;
	gap: 8px;
	border-bottom: 1px solid var(--border);
}

.split-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.split-toolbar {
	padding: 12px 14px;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--border);
	background: #fff;
}

.flex-spacer { flex: 1; }

.split-actions { display: flex; gap: 8px; }

/* Search Input */
.search-input {
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	outline: none;
	background: #fff;
	font-size: 13px;
	min-width: 120px;
}
.search-input:focus { border-color: rgba(22,119,255,0.55); }

/* Library List */
.lib-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}

.lib-item {
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
	margin-bottom: 4px;
}
.lib-item:hover { background: rgba(22,119,255,0.06); }
.lib-item.active { background: rgba(22,119,255,0.12); }

.lib-item-name { font-weight: 700; font-size: 14px; }
.lib-item-sub { font-size: 12px; margin-top: 2px; }

/* Button variants */
.btn-sm { padding: 6px 10px; font-size: 12px; }
.select-sm { padding: 6px 10px; font-size: 12px; min-width: 80px; }

/* View Tabs (Fangan) */
.view-tabs {
	display: flex;
	gap: 4px;
	background: var(--surface);
	padding: 4px;
	border-radius: 10px;
}

.view-tab {
	padding: 6px 12px;
	border: none;
	background: transparent;
	border-radius: 8px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
}
.view-tab:hover { background: rgba(22,119,255,0.08); }
.view-tab.active {
	background: #fff;
	color: var(--primary-2);
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Tab Group (Sucai) */
.tab-group {
	display: flex;
	gap: 0;
	border: 1px solid var(--border);
	border-radius: 10px;
	overflow: hidden;
}

.tab-btn {
	padding: 6px 14px;
	border: none;
	background: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	border-right: 1px solid var(--border);
}
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { background: var(--surface); }
.tab-btn.active { background: var(--primary); color: #fff; }

/* Empty State */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	color: var(--muted);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* Fangan Content */
.fangan-content {
	flex: 1;
	overflow: auto;
	padding: 16px;
}

/* Zixin Cards Grid */
.card-grid {
	flex: 1;
	overflow: auto;
	padding: 16px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 14px;
	align-content: start;
}

.zixin-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	cursor: pointer;
	transition: box-shadow 0.15s, border-color 0.15s;
}
.zixin-card:hover {
	border-color: rgba(22,119,255,0.35);
	box-shadow: var(--shadow);
}

.zixin-thumb {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: linear-gradient(135deg, rgba(22,119,255,0.1), rgba(56,189,248,0.1));
	display: grid;
	place-items: center;
	font-size: 24px;
	flex-shrink: 0;
}

.zixin-info { flex: 1; min-width: 0; }
.zixin-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.zixin-meta { font-size: 12px; }

/* Sucai Content */
.sucai-content {
	flex: 1;
	overflow: auto;
	padding: 16px;
}

/* =============================================
   Upload Page
   ============================================= */
.upload-panel {
	max-width: 800px;
	margin: 0 auto;
}

.upload-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	flex-wrap: wrap;
	gap: 12px;
}

.upload-title {
	font-size: 18px;
	font-weight: 800;
}

.upload-capacity {
	display: flex;
	align-items: center;
	gap: 12px;
}

.capacity-text {
	font-size: 13px;
	color: var(--muted);
}

.capacity-bar {
	width: 120px;
	height: 8px;
	background: var(--surface);
	border-radius: 999px;
	overflow: hidden;
}

.capacity-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--primary), #38bdf8);
	border-radius: 999px;
	transition: width 0.3s;
}

.upload-note {
	font-size: 12px;
	margin-bottom: 16px;
}

.dropzone-large {
	min-height: 200px;
	margin-bottom: 12px;
}

.dropzone-icon {
	font-size: 40px;
	margin-bottom: 8px;
	opacity: 0.6;
}

.upload-limits {
	font-size: 12px;
	text-align: center;
	margin-bottom: 16px;
}

.upload-file-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.upload-file-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: var(--surface);
	border-radius: 10px;
}

.upload-file-icon { font-size: 20px; }
.upload-file-name { flex: 1; font-weight: 600; font-size: 13px; }
.upload-file-size { font-size: 12px; color: var(--muted); }
.upload-file-status { font-size: 12px; }
.upload-file-status.ok { color: #15803d; }
.upload-file-status.error { color: #dc2626; }

/* =============================================
   Bidder Page
   ============================================= */
.bidder-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 16px;
}

.bidder-card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	min-height: 180px;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.bidder-card:hover {
	border-color: rgba(22,119,255,0.35);
	box-shadow: var(--shadow);
}

.bidder-card-new {
	cursor: pointer;
	align-items: center;
	justify-content: center;
	border-style: dashed;
	background: #fbfdff;
}

.bidder-new-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--surface);
	display: grid;
	place-items: center;
	font-size: 24px;
	color: var(--muted);
	margin-bottom: 8px;
}

.bidder-new-text {
	font-weight: 600;
	color: var(--muted);
}

.bidder-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 10px;
}

.bidder-card-title {
	font-weight: 800;
	font-size: 15px;
}

.bidder-card-actions {
	display: flex;
	gap: 4px;
}

.icon-btn-sm {
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	display: grid;
	place-items: center;
}
.icon-btn-sm:hover { background: var(--surface); }

.bidder-card-body {
	flex: 1;
	font-size: 13px;
	line-height: 1.6;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.bidder-card-footer {
	font-size: 12px;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
}

/* =============================================
   Responsive adjustments
   ============================================= */
@media (max-width: 768px) {
	.split-layout {
		flex-direction: column;
		height: auto;
	}
	.split-left {
		width: 100%;
		max-height: 200px;
		border-right: none;
		border-bottom: 1px solid var(--border);
	}
	.split-toolbar {
		flex-wrap: wrap;
	}
	.view-tabs {
		order: 10;
		width: 100%;
		justify-content: center;
	}
}

/* ---------------------------
   Generate Status / Progress
   --------------------------- */
.generate-status {
	background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
	border: 1px solid var(--primary);
	border-radius: 12px;
	padding: 16px 20px;
	margin: 16px 0;
}

.generate-status.hidden {
	display: none;
}

.generate-status.error {
	background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
	border-color: #ef4444;
}

.generate-status.success {
	background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
	border-color: #22c55e;
}

.status-header {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 12px;
}

.status-icon {
	font-size: 20px;
	display: inline-block;
}

.status-icon.spinning {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.progress-bar-wrapper {
	height: 8px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 10px;
}

.progress-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--primary) 0%, #60a5fa 100%);
	border-radius: 4px;
	transition: width 0.5s ease;
}

.generate-status.error .progress-bar-fill {
	background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.generate-status.success .progress-bar-fill {
	background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

.status-detail {
	font-size: 13px;
	margin-bottom: 8px;
}

.section-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.section-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 20px;
	font-size: 12px;
	color: var(--muted);
	transition: all 0.3s ease;
}

.section-chip.pending {
	background: rgba(0, 0, 0, 0.05);
	color: var(--muted);
}

.section-chip.generating {
	background: var(--primary);
	color: white;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

.section-chip.done {
	background: #dcfce7;
	color: #166534;
}

.section-chip.error {
	background: #fee2e2;
	color: #dc2626;
}


/* ---------------------------
   Auth Page Styles
   --------------------------- */
.auth-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
	background: var(--panel);
	border-radius: 16px;
	padding: 40px;
	width: 100%;
	max-width: 400px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.auth-header {
	text-align: center;
	margin-bottom: 32px;
}

.auth-logo {
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, #1677ff, #0b5ed7);
	color: white;
	font-size: 32px;
	font-weight: bold;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.auth-header h1 {
	margin: 0 0 8px;
	font-size: 24px;
	color: var(--text);
}

.auth-form h2 {
	margin: 0 0 24px;
	font-size: 18px;
	text-align: center;
	color: var(--text);
}

.auth-form .form-group {
	margin-bottom: 16px;
}

.auth-form .form-group label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
}

.auth-form .form-group input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-group input:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
}

.btn-block {
	width: 100%;
	padding: 12px;
	font-size: 16px;
	margin-top: 8px;
}

.auth-switch {
	text-align: center;
	margin-top: 20px;
	font-size: 14px;
	color: var(--muted);
}

.auth-switch a {
	color: var(--primary);
	font-weight: 500;
	cursor: pointer;
}

.auth-switch a:hover {
	text-decoration: underline;
}

/* Topbar user section */
.topbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

#btnLogout {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
}

#btnLogout:hover {
	background: var(--surface);
	color: var(--text);
}

/* Empty hint for lists */
.empty-hint {
	padding: 20px;
	text-align: center;
	font-size: 13px;
}

/* Fangan detail */
.fangan-detail {
	padding: 20px;
}

.fangan-detail h3 {
	margin: 0 0 8px;
	font-size: 18px;
}

.fangan-body {
	margin-top: 16px;
	padding: 16px;
	background: var(--surface);
	border-radius: 8px;
	min-height: 200px;
	white-space: pre-wrap;
}

/* File upload area */
.file-upload-area {
	border: 2px dashed var(--border);
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}

.file-upload-area:hover {
	border-color: var(--primary);
	background-color: rgba(22, 119, 255, 0.05);
}

.file-upload-hint {
	color: var(--muted);
	font-size: 14px;
}

.file-list {
	margin-top: 12px;
	text-align: left;
}

.file-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: var(--surface);
	border-radius: 6px;
	margin-top: 8px;
}

.file-item-name {
	flex: 1;
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file-item-remove {
	background: none;
	border: none;
	color: var(--muted);
	cursor: pointer;
	font-size: 16px;
	padding: 0 4px;
}

.file-item-remove:hover {
	color: #ef4444;
}

/* Required field */
.required {
	color: #ef4444;
}

/* Danger button */
.btn.danger {
	background: #ef4444;
	color: white;
}

.btn.danger:hover {
	background: #dc2626;
}

/* Grid 2 columns */
.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 600px) {
	.grid-2 {
		grid-template-columns: 1fr;
	}
}

/* Modal improvements */
.modal-body textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 14px;
	resize: vertical;
	font-family: inherit;
}

.modal-body textarea:focus {
	outline: none;
	border-color: var(--primary);
}