/* ===================== Design Tokens ===================== */
:root {
  --primary: #6366F1;
  --primary-light: #A5B4FC;
  --primary-dark: #4F46E5;
  --primary-bg: #EEF2FF;
  --primary-subtle: #F5F7FF;
  --secondary: #10B981;
  --secondary-light: #6EE7B7;
  --accent: #F59E0B;
  --bg: #F0F2F5;
  --card-bg: #FFFFFF;
  --surface: #F8FAFC;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-light: #94A3B8;
  --text-muted: #CBD5E1;
  --border: #E2E8F0;
  --border-focus: #A5B4FC;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --sidebar-bg: #FFFFFF;
  --sidebar-hover: #F1F5F9;
  --sidebar-active: #EEF2FF;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
::selection { background: var(--primary-bg); color: var(--primary-dark); }

/* ===================== Buttons ===================== */
button {
  cursor: pointer; border: 1px solid var(--border); background: var(--card-bg);
  padding: 8px 20px; border-radius: var(--radius-sm); font-size: 14px;
  color: var(--text); transition: all var(--transition); font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
button:hover { border-color: var(--primary); color: var(--primary); }
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--primary); color: white; border: none;
  font-weight: 500; box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}
.btn-primary:hover { background: var(--primary-dark); color: white; box-shadow: 0 4px 12px rgba(99,102,241,0.35); transform: translateY(-1px); }
.btn-success {
  background: var(--secondary); color: white; border: none;
  font-weight: 500; box-shadow: 0 1px 3px rgba(16,185,129,0.3);
}
.btn-success:hover { background: #059669; color: white; box-shadow: 0 4px 12px rgba(16,185,129,0.35); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: white; border: none; }
.btn-danger:hover { background: #DC2626; color: white; }
.btn-sm { padding: 4px 12px; font-size: 13px; }

/* ===================== Inputs ===================== */
input, select, textarea {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; width: 100%; outline: none; transition: all var(--transition);
  background: var(--card-bg); font-family: inherit; color: var(--text);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-focus); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); background: white; }
textarea { resize: vertical; min-height: 80px; }
::placeholder { color: var(--text-light); }

/* ===================== Layout ===================== */
body.logged-in #app { display: flex; min-height: 100vh; }
#main-content { flex: 1; min-width: 0; }
.ws-content { padding: 28px 32px; max-width: 1120px; }

/* ===================== Sidebar ===================== */
#sidebar {
  display: none; width: 264px; flex-shrink: 0; background: var(--sidebar-bg);
  border-right: 1px solid var(--border); position: sticky; top: 0;
  height: 100vh; overflow-y: auto; z-index: 50;
}
.sidebar-inner { display: flex; flex-direction: column; height: 100%; }
.sidebar-logo {
  padding: 22px 20px 18px; font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  cursor: pointer; border-bottom: 1px solid var(--border);
  letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px;
}
.sidebar-section-title {
  padding: 18px 20px 6px; font-size: 10px; font-weight: 700;
  color: var(--text-light); text-transform: uppercase; letter-spacing: 1.2px;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 4px 12px; gap: 1px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 14px;
  font-weight: 500; text-decoration: none; transition: all var(--transition);
}
.sidebar-nav-item:hover { background: var(--sidebar-hover); color: var(--primary); }
.sidebar-nav-item.active {
  background: var(--sidebar-active); color: var(--primary); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar-nav-item .nav-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; opacity: 0.8; }
.sidebar-nav-item.active .nav-icon { opacity: 1; }

/* Sidebar Status */
.sidebar-status { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.status-section-title { font-size: 10px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 12px; }
.status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.status-row .status-label { font-size: 12px; color: var(--text-light); width: 70px; flex-shrink: 0; }
.status-bar-wrap { flex: 1; height: 6px; background: #E2E8F0; border-radius: 3px; overflow: hidden; }
.status-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.4s ease; }
.status-num { font-size: 12px; font-weight: 600; color: var(--text); width: 48px; text-align: right; flex-shrink: 0; }
.status-actions { display: flex; gap: 6px; margin-bottom: 14px; }
.status-btn {
  flex: 1; padding: 6px 10px; font-size: 12px; border-radius: 6px; text-align: center;
  cursor: pointer; border: 1px solid var(--border); background: var(--card-bg);
  color: var(--text); transition: all var(--transition); text-decoration: none; display: inline-block;
  justify-content: center;
}
.status-btn:hover { border-color: var(--primary); color: var(--primary); }
.recharge-btn { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; font-weight: 600; }
.recharge-btn:hover { background: #FDE68A; border-color: var(--accent); color: #92400E; }
.status-api { margin-bottom: 12px; }
.api-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; }
.api-label { color: var(--text-light); }
.api-status { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.status-ready { background: var(--success-bg); color: #065F46; }
.status-mock { background: var(--warning-bg); color: #92400E; }
.status-user { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; font-size: 13px; color: var(--text); border-top: 1px solid var(--border); }
.sidebar-login { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface); }

/* ===================== Scrollbar ===================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
#sidebar::-webkit-scrollbar { width: 3px; }

/* ===================== Top Bar ===================== */
.ws-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; gap: 16px;
}
.ws-title {
  font-size: 22px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.ws-icon { font-size: 26px; }
.ws-desc { font-size: 14px; color: var(--text-light); margin-top: 4px; line-height: 1.5; }
.ws-top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ws-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: var(--card-bg); color: var(--text-secondary);
  text-decoration: none; transition: all var(--transition);
}
.ws-btn:hover { border-color: var(--primary); color: var(--primary); }
.ws-btn-outline { background: transparent; }
.ws-btn-sm { padding: 4px 10px; font-size: 12px; }

/* ===================== Stats ===================== */
.ws-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.ws-stat {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; transition: all var(--transition);
}
.ws-stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ws-stat-num { display: block; font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.ws-stat-label { display: block; font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ===================== Step Blocks ===================== */
.step-block {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden;
  transition: box-shadow var(--transition);
}
.step-block:hover { box-shadow: var(--shadow); }
.step-header {
  display: flex; align-items: center; gap: 12px; padding: 16px 22px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.step-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 14px;
  border-radius: 20px; font-size: 11px; font-weight: 700;
  background: var(--primary); color: white; white-space: nowrap;
  letter-spacing: 0.3px;
}
.step-title { font-size: 15px; font-weight: 600; color: var(--text); }
.step-hint { font-size: 13px; color: var(--text-light); }
.step-body { padding: 22px; }

/* ===================== Form Fields ===================== */
.fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.field-item { display: flex; flex-direction: column; gap: 6px; }
.field-item .field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field-select, .field-input, .field-textarea {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; width: 100%; outline: none; transition: all var(--transition);
  background: var(--card-bg);
}
.field-select:focus, .field-input:focus, .field-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.field-textarea { min-height: 60px; resize: vertical; }

/* Prompt Examples */
.ex-card {
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition); background: var(--card-bg);
  position: relative; overflow: hidden; border-left: 3px solid var(--primary-light);
}
.ex-card:hover { border-color: var(--primary-light); border-left-color: var(--primary); box-shadow: var(--shadow-sm); background: var(--primary-subtle); }
.ex-card:active { transform: scale(0.99); }

/* ===================== Upload Zone ===================== */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 36px 20px; border: 2px dashed var(--border);
  border-radius: var(--radius); cursor: pointer; transition: all var(--transition);
  background: var(--surface); min-height: 140px;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-bg); }
.upload-zone.drag-over { border-color: var(--primary); background: var(--primary-bg); }
.uz-icon { font-size: 36px; line-height: 1; opacity: 0.6; }
.upload-zone:hover .uz-icon { opacity: 1; }
.uz-text { font-size: 14px; color: var(--text-light); }
.uz-hint { font-size: 12px; color: var(--text-muted); }
.uz-preview { margin-top: 8px; }
.uz-thumb {
  position: relative; display: inline-block; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border);
}
.uz-thumb img { display: block; width: 120px; height: 120px; object-fit: cover; }
.uz-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  background: rgba(15,23,42,0.6); color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; border: none; transition: background var(--transition);
}
.uz-remove:hover { background: var(--danger); }

/* ===================== Buttons (Generate) ===================== */
.gen-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gen-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--card-bg); color: var(--text);
  transition: all var(--transition); font-family: inherit;
  justify-content: center;
}
.gen-btn:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.gen-btn:active { transform: scale(0.97); }
.gen-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.gen-btn-primary {
  background: var(--primary); color: white; border: none;
  box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}
.gen-btn-primary:hover { background: var(--primary-dark); color: white; box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.gen-btn-success {
  background: linear-gradient(135deg, var(--secondary), #059669); color: white; border: none;
  box-shadow: 0 1px 3px rgba(16,185,129,0.3);
}
.gen-btn-success:hover { background: linear-gradient(135deg, #059669, #047857); color: white; box-shadow: 0 4px 12px rgba(16,185,129,0.35); }
.gen-btn-outline { background: transparent; }

/* ===================== Result ===================== */
.result-item { margin-bottom: 12px; }
.result-item-label { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.result-item-text { font-size: 14px; color: var(--text); line-height: 1.6; background: var(--surface); padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.result-image-wrap { margin: 16px 0; text-align: center; }
.result-image-wrap .result-image { max-width: 100%; max-height: 600px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.prompt-details { margin: 12px 0; }
.prompt-details summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--primary); padding: 4px 0; }
.prompt-box {
  background: #1E293B; color: #E2E8F0; padding: 16px; border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Consolas', monospace; font-size: 13px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow-y: auto; margin: 12px 0;
}

/* ===================== Card ===================== */
.card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; margin-bottom: 16px; transition: box-shadow var(--transition); }
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ===================== Tabs ===================== */
.ws-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.ws-tab {
  padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--text-light);
  transition: all var(--transition); white-space: nowrap;
}
.ws-tab:hover { color: var(--text); }
.ws-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===================== Modal ===================== */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,23,42,0.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  animation: modalFade 0.2s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  background: var(--card-bg); border-radius: var(--radius-xl); padding: 32px;
  width: 90%; max-width: 480px; max-height: 80vh; overflow-y: auto;
  position: relative; box-shadow: var(--shadow-xl);
  animation: modalSlide 0.25s ease;
}
@keyframes modalSlide { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-content.modal-lg { max-width: 720px; }
.modal .close { position: absolute; top: 16px; right: 16px; font-size: 22px; cursor: pointer; color: var(--text-light); transition: color var(--transition); background: none; border: none; padding: 4px 8px; }
.modal .close:hover { color: var(--text); }
.modal h2 { margin-bottom: 20px; font-size: 18px; }

/* ===================== Loading ===================== */
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-container { text-align: center; padding: 60px 20px; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin: 12px 0; overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.3s ease; }

/* ===================== History ===================== */
.hist-list { display: flex; flex-direction: column; gap: 6px; }
.hist-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
}
.hist-item:hover { border-color: var(--primary-light); background: var(--surface); }
.hist-thumb { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.hist-completed { background: var(--success-bg); color: #065F46; }
.hist-failed { background: var(--danger-bg); color: #991B1B; }
.hist-pending { background: var(--warning-bg); color: #92400E; }

/* ===================== Tables ===================== */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table-wrap th { background: var(--surface); font-weight: 600; color: var(--text-secondary); font-size: 12px; }
.table-wrap tr:hover td { background: var(--surface); }

/* ===================== Status Badges ===================== */
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-pending { background: var(--warning-bg); color: #92400E; }
.status-generating { background: #DBEAFE; color: #1E40AF; }
.status-prompt_ready { background: var(--primary-bg); color: var(--primary-dark); }
.status-completed { background: var(--success-bg); color: #065F46; }
.status-failed, .status-image_failed { background: var(--danger-bg); color: #991B1B; }

/* ===================== Forms ===================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.hint-box { background: var(--primary-bg); border: 1px solid #C7D2FE; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; line-height: 1.5; }
.hint-box code { background: rgba(99,102,241,0.1); padding: 1px 6px; border-radius: 4px; font-size: 12px; color: var(--primary); }

/* ===================== Admin ===================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; text-align: center; transition: all var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card .number { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ===================== Recolor Module ===================== */
.ft-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ft-pill { padding: 10px 18px; border-radius: 24px; font-size: 14px; font-weight: 500; background: var(--card-bg); border: 1.5px solid var(--border); cursor: pointer; transition: all var(--transition); }
.ft-pill:hover { border-color: var(--primary-light); color: var(--primary); }
.ft-pill.active { background: var(--primary); color: white; border-color: var(--primary); }
.region-module { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; background: var(--card-bg); overflow: hidden; transition: box-shadow var(--transition); }
.region-module:hover { box-shadow: var(--shadow); }
.region-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface); border-left: 3px solid var(--primary-light); }
.region-header-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.region-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.region-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; user-select: none; }
.region-toggle input[type="checkbox"] { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: #CBD5E1; border: none; cursor: pointer; position: relative; transition: background 0.25s; flex-shrink: 0; outline: none; padding: 0; }
.region-toggle input[type="checkbox"]::before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.region-toggle input[type="checkbox"]:checked { background: var(--primary); }
.region-toggle input[type="checkbox"]:checked::before { transform: translateX(16px); }
.region-body { padding: 16px; border-top: 1px solid var(--border); }
.region-config-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.region-config-item { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 130px; }
.region-config-item > label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.add-region-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; border: 2px dashed var(--border); border-radius: var(--radius-sm); background: transparent; font-size: 13px; font-weight: 500; color: var(--text-light); cursor: pointer; transition: all var(--transition); margin-top: 4px; }
.add-region-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-subtle); }
.preset-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.preset-btn { display: flex; flex-direction: column; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card-bg); cursor: pointer; text-align: left; transition: all var(--transition); min-width: 130px; flex: 1; }
.preset-btn:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-1px); }
.preset-btn .preset-name { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.preset-btn .preset-desc { font-size: 11px; color: var(--text-light); margin-bottom: 6px; }
.preset-btn .preset-colors { display: flex; gap: 3px; }
.preset-btn .preset-colors span { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border); }
.color-options { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; transition: all var(--transition); }
.color-dot:hover, .color-dot.selected { border-color: var(--primary); transform: scale(1.15); }

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
  #sidebar { width: 220px; }
}
@media (max-width: 900px) {
  .ws-stats { grid-template-columns: repeat(2, 1fr); }
  .fields-grid { grid-template-columns: 1fr; }
  #sidebar { width: 200px; }
}
@media (max-width: 640px) {
  #sidebar { display: none !important; }
  .ws-content { padding: 16px; }
  .ws-topbar { flex-direction: column; }
  .ws-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ws-stat { padding: 12px; }
  .ws-stat-num { font-size: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .modal-content { padding: 24px; }
}
