/* ============================================================
   WEB3S STUDIO - PREMIUM REDESIGNED STYLE SYSTEM (ARIAL GLOBAL)
   ============================================================ */

:root {
  --font: Arial, Helvetica, sans-serif;
  
  /* Light Theme Variables */
  --bg: #f1f5f9;            /* Slate 100 */
  --panel: #ffffff;         /* Pure White */
  --text: #0f172a;          /* Slate 900 */
  --muted: #475569;         /* Slate 600 */
  --border: #e2e8f0;        /* Slate 200 */
  --line: #cbd5e1;          /* Slate 300 */
  --primary: #2563eb;       /* Royal Blue */
  --primary-hover: #1d4ed8;
  --secondary: #64748b;     /* Slate 500 */
  --secondary-hover: #475569;
  --success: #10b981;
  --error: #ef4444;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

/* Global resets */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  transition: background 0.3s, color 0.3s;
}

/* Dark Mode Variables Override */
body.dark {
  --bg: #0b0f19;            /* Very Dark Blue-Black */
  --panel: #111827;         /* Gray 900 */
  --text: #f8fafc;          /* Slate 50 */
  --muted: #94a3b8;         /* Slate 400 */
  --border: #1f2937;        /* Gray 800 */
  --line: #374151;          /* Gray 700 */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Layout wrap */
.wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.sidebar .brand {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar .brand h1 { font-size: 20px; font-weight: 800; color: var(--primary); }
.sidebar .brand p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; padding: 0 16px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 13px;
  transition: all 0.2s ease-in-out;
}
.sidebar nav a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}
.sidebar nav a.active {
  background: var(--primary);
  color: #ffffff;
}

.side-promo {
  margin: auto 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.01) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.side-promo h2 {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.side-promo ul {
  list-style: none;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-promo li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-cta {
  display: block;
  text-align: center;
  padding: 8px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
  font-size: 11px;
}

.copy {
  padding: 16px 24px 0;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* Main app content */
.app-main {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Form and UI inputs */
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  border-radius: var(--radius);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

label {
  display: block;
  margin-bottom: 16px;
  font-weight: 800;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
label input, label select, label textarea {
  margin-top: 6px;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

/* Checkbox container styling */
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
  text-transform: none;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: normal;
}
.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 0;
  cursor: pointer;
}
.check.mini {
  margin-bottom: 0;
}

/* Buttons (Universal Styles) */
button, input[type="submit"], .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--primary);
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  min-height: 38px;
}
button:hover, input[type="submit"]:hover, .btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
button.secondary, input[type="submit"].secondary, .btn.secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
button.secondary:hover, input[type="submit"].secondary:hover, .btn.secondary:hover {
  background: var(--bg);
  border-color: var(--line);
}
button.danger, .btn.danger {
  background: var(--error);
}
button.danger:hover, .btn.danger:hover {
  background: #dc2626;
}

/* Card design */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card h2 { font-size: 22px; margin-bottom: 12px; font-weight: 800; }
.card h3 { font-size: 16px; margin-bottom: 16px; font-weight: 800; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.muted { color: var(--muted); font-size: 13px; }

/* Grid systems */
.grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.admin-points-grid { grid-template-columns: 1.2fr 0.8fr; }
@media (max-width: 992px) { .admin-points-grid { grid-template-columns: 1fr; } }

/* Table styling revamp */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
}
table th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  text-align: left;
}
table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  background: var(--panel);
}
table tr:first-child td {
  border-top: none;
}
table tr:hover td {
  background: rgba(37, 99, 235, 0.01);
}
table input, table select {
  padding: 6px 10px;
  font-size: 12px;
  max-width: 160px;
}
table .btn, table button {
  padding: 8px 14px;
  font-size: 11px;
  min-height: 34px;
}

/* Align tables content cleanly */
.selectbox { display: inline-flex; align-items: center; justify-content: center; }
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-form label {
  margin-bottom: 0;
}
.inline-form input {
  padding: 6px 10px;
  font-size: 12px;
  width: auto;
  max-width: 140px;
}

/* Flash & alerts */
.flash-message {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: bold;
}
.flash-success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.flash-error { background: rgba(239,68,68,0.1); color: var(--error); border: 1px solid rgba(239,68,68,0.2); }

.index-alert {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}
.index-alert b {
  font-weight: bold;
}

/* Landing Page CSS */
.login-landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}
.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.ai-logo {
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}
.landing-hero {
  flex: 1;
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.landing-hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

/* Feature styling */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.feature-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-2px); }
.feature-card span { font-size: 32px; margin-bottom: 10px; display: block; }
.feature-card b { font-size: 15px; font-weight: 800; display: block; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Pricing styling */
.pricing-badge {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: bold;
}

/* Modals System (Clean Flex Split Layout) */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;             /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal.show {
  display: flex !important;  /* Toggle visible when active class is show */
}
.modal-content {
  background: var(--panel);
  border-radius: 16px;
  width: 100%;
  max-width: 950px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
  max-height: 90vh;
  display: flex;
  gap: 30px;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.modal-close:hover {
  background: var(--border);
}
.modal-close::before {
  content: '✕';
  font-size: 14px;
  color: var(--text);
  font-weight: bold;
}

/* Modal split view */
.modal-img {
  flex: 1.2;
  background: #000;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 300px;
}
.modal-img img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.modal-content aside {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 70vh;
  padding-right: 12px;
}
.modal-content aside h3 {
  font-size: 18px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.modal-content aside p {
  font-size: 13px;
  line-height: 1.5;
}
.modal-content aside b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
.modal-actions .btn {
  flex: 1;
}
.modal-content details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.modal-content details textarea {
  margin-top: 10px;
  background: var(--panel);
}

/* Toolbar in media gallery */
.media-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}
.media-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.media-search input, .media-search select {
  max-width: 200px;
}
@media (max-width: 600px) {
  .media-head { flex-direction: column; align-items: stretch; }
  .media-search input, .media-search select { max-width: none; flex: 1; }
}
.media-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.media-toolbar span {
  margin-left: auto;
  font-weight: bold;
  font-size: 12px;
  color: var(--muted);
}

/* Media Item Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.media-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.media-card:hover {
  transform: translateY(-2px);
}
.media-card img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  cursor: pointer;
}
.media-caption {
  padding: 12px;
}
.media-caption strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-caption span {
  font-size: 11px;
  color: var(--muted);
}

/* Social Buttons */
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}
.btn-social:hover { background: var(--bg); }

/* Responsive styles */
@media (max-width: 992px) {
  .wrap { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  /* Data tables (Users, Brand Kit, Profiles, History, admin_points) have no
     scroll affordance otherwise - an unbreakable string (an email address,
     a long key) can force the table past the viewport with no way to see
     the rest of it. table{display:block} alone would break column
     alignment, so thead/tbody/tr are put back into a table layout inside
     the scrollable block. */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table thead, table tbody, table tr { display: table; width: 100%; table-layout: fixed; }
  .login-landing { flex-direction: column; }
  .landing-hero { padding: 30px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  
  .modal-content {
    flex-direction: column;
    max-height: 95vh;
  }
  .modal-img {
    min-height: auto;
    max-height: 250px;
  }
  .modal-content aside {
    max-height: 50vh;
  }
}

/* Sidebar menu section headers */
.menu-section-title {
  padding: 14px 16px 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   WEB3S STUDIO — PREMIUM UI EXTENSION (v2)
   Bo sung style cho toan bo class con thieu + nang cap sang trong
   ============================================================ */

:root{
  --grad-primary: linear-gradient(135deg,#2563eb 0%,#4f46e5 55%,#7c3aed 100%);
  --grad-soft: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(124,58,237,0.05));
  --ring: 0 0 0 3px rgba(37,99,235,0.18);
}

/* Premium brand logo chip */
.ai-logo{ background: var(--grad-primary); box-shadow: 0 4px 12px rgba(79,70,229,0.35); letter-spacing:.5px; }

/* Flash / alert messages (were unstyled) */
.alert{
  background: var(--grad-soft);
  border: 1px solid rgba(37,99,235,0.25);
  color: var(--text);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 0 0 20px;
  font-weight: 700;
  font-size: 13px;
  display:flex; gap:10px; align-items:center;
}
.alert::before{ content:"\2713"; color: var(--primary); font-weight:900; }
.error{
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--error);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- CREATE / PRODUCT HERO + FORM ---------- */
.create-hero{ position:relative; overflow:hidden; }
.create-hero::before{
  content:""; position:absolute; inset:0;
  background: radial-gradient(1200px 240px at 12% -40%, rgba(79,70,229,0.10), transparent 60%);
  pointer-events:none;
}
.create-copy h2{ font-size:24px; letter-spacing:.2px; }
.create-copy{ margin-bottom:18px; }

.create-form{
  display:grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  align-items:start;
}
.create-form .fullrow,
.create-form .field-big.fullspan{ grid-column: 1 / -1; }
.field-big{ grid-column: 1 / 2; }
.field-stack{ grid-column: 2 / 3; display:flex; flex-direction:column; gap:0; }
.field-big label, .field-stack label{ margin-bottom:14px; }
.field-big textarea{ min-height:150px; resize:vertical; }
.field-big span, .field-stack span{ color: var(--muted); font-weight:600; text-transform:none; letter-spacing:0; }
.field-big small{ display:block; margin-top:8px; color:var(--muted); font-weight:600; text-transform:none; letter-spacing:0; }

/* Prompt copilot quick tags */
.prompt-copilot-tags{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.copilot-tag{
  background: var(--grad-soft);
  border:1px solid rgba(37,99,235,0.22);
  padding:7px 13px; border-radius:20px;
  font-size:12px; font-weight:700; cursor:pointer; color:var(--primary);
  transition: all .15s ease;
}
.copilot-tag:hover{ background: var(--primary); color:#fff; transform:translateY(-1px); box-shadow:0 4px 10px rgba(37,99,235,.25); }

/* Engine bar + main CTA */
.engine-bar{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  margin-top:6px; padding:16px 18px;
  background: var(--grad-soft);
  border:1px dashed rgba(37,99,235,0.3);
  border-radius:12px;
}
.engine-bar > span{
  flex:1; min-width:220px; font-size:12px; font-weight:700; color:var(--muted);
}
.primary-cta{
  background: var(--grad-primary) !important;
  border:none !important;
  font-size:14px !important;
  font-weight:800 !important;
  letter-spacing:.3px;
  padding:13px 26px !important;
  min-height:46px !important;
  box-shadow:0 8px 20px rgba(79,70,229,0.35) !important;
}
.primary-cta:hover{ filter:brightness(1.06); transform:translateY(-2px); }

/* ---------- RESULT / JOB QUEUE UI ---------- */
.result-panel{
  margin-top:24px; padding:22px;
  background:var(--panel); border:1px solid var(--border);
  border-radius:14px; box-shadow:var(--shadow-lg);
}
.result-panel h3{ font-size:16px; font-weight:800; margin-bottom:14px; }
.result, .job-result-img{ width:100%; border-radius:10px; display:block; box-shadow:var(--shadow); }
.async-job-card{ animation: cardIn .3s ease; }
@keyframes cardIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

.job-status{
  font-size:13px; font-weight:700; color:var(--muted);
  margin-bottom:12px; display:flex; align-items:center; gap:6px;
}
.job-preview{
  position:relative; min-height:140px; border-radius:12px;
  background:var(--bg); border:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:18px; gap:14px; overflow:hidden;
}
.job-preview img{ cursor:pointer; }
.pending-preview{
  background:
    linear-gradient(110deg, transparent 20%, rgba(37,99,235,0.05) 40%, transparent 60%) var(--bg);
  background-size:200% 100%;
  animation: shimmer 1.8s linear infinite;
}
@keyframes shimmer{ to{ background-position:-200% 0; } }
.job-spinner{
  width:42px; height:42px; flex-shrink:0;
  border:4px solid rgba(37,99,235,0.18);
  border-top-color:var(--primary);
  border-radius:50%;
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

.job-progress-wrap{ width:100%; max-width:520px; }
.job-progress-top{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-bottom:6px; }
.job-progress-top strong{ font-size:18px; color:var(--primary); font-weight:800; }
.job-progress-top span{ font-size:12px; color:var(--muted); text-align:right; }
.job-progress{
  height:9px; border-radius:99px; background:rgba(37,99,235,0.12); overflow:hidden;
}
.job-progress > i{
  display:block; height:100%; width:8%;
  background:var(--grad-primary); border-radius:99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.job-steps{ display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:12px; }
.job-steps span{ font-size:11px; font-weight:700; color:var(--muted); }
.job-steps .done{ color:var(--success); }
.job-steps .active{ color:var(--primary); }
.job-steps .fail{ color:var(--error); }
.job-steps .todo{ color:var(--line); }
.job-hint{ margin-top:10px; font-size:11px; color:var(--muted); line-height:1.5; }
.job-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }

/* ---------- PROMPT PREVIEW ---------- */
.prompt-preview{
  margin-top:18px; background:var(--bg);
  border:1px solid var(--border); border-radius:12px; padding:14px 16px;
}
.prompt-preview summary{ cursor:pointer; font-weight:800; font-size:13px; color:var(--primary); }
.prompt-preview textarea{ margin-top:12px; background:var(--panel); font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12px; line-height:1.5; }
.advanced-box{ margin-top:6px; background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
.advanced-box summary{ cursor:pointer; font-weight:800; font-size:13px; }

/* ---------- PRODUCT UPLOAD ---------- */
.product-upload-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:4px; }
.upload-card{
  display:flex; flex-direction:column; gap:6px;
  padding:18px; border:2px dashed var(--line); border-radius:12px;
  background:var(--bg); transition:border-color .2s, background .2s;
  text-transform:none; letter-spacing:0;
}
.upload-card:hover{ border-color:var(--primary); background:var(--grad-soft); }
.upload-card b{ font-size:14px; color:var(--text); }
.upload-card span{ font-size:12px; color:var(--muted); font-weight:600; }
.upload-card input[type="file"]{ margin-top:8px; }

/* ---------- BULK PAGE ---------- */
.bulk-page p.muted{ margin-bottom:16px; }
.bulk-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:18px; }
.bulk-grid .bulk-contexts{ grid-column:1 / -1; }
.bulk-contexts textarea{ min-height:150px; }
.bulk-results, .bulk-jobs{ margin-top:26px; }
.bulk-preview-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:18px; margin-top:14px;
}
.bulk-error{
  padding:14px; border-radius:10px; font-size:12px;
  background:rgba(239,68,68,0.07); border:1px solid rgba(239,68,68,0.25); color:var(--error);
}
.bulk-job-card .job-preview{ min-height:120px; }
.bulk-progress-summary{
  margin:8px 0 4px; padding:14px 16px; border-radius:12px;
  background:var(--panel); border:1px solid var(--border); box-shadow:var(--shadow);
}
.bulk-progress-head{ display:flex; justify-content:space-between; font-weight:800; font-size:13px; margin-bottom:8px; }
.bulk-progress-percent{ color:var(--primary); }
.bulk-progress{ height:9px; border-radius:99px; background:rgba(37,99,235,0.12); overflow:hidden; }
.bulk-progress > i{ display:block; height:100%; width:0; background:var(--grad-primary); border-radius:99px; transition:width .6s ease; }

/* ---------- MEDIA / GALLERY EXTRAS ---------- */
.wp-media{ margin-top:24px; }
.recent-grid{ grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); }
.media-page .media-head h2{ font-size:18px; }

/* ---------- SETTINGS / PROFILES / BRANDKIT / USERS ---------- */
.settings-grid, .profile-grid{ display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.api-box, .profile-box, .global-settings{
  background:var(--panel); border:1px solid var(--border); border-radius:12px;
  padding:20px; box-shadow:var(--shadow); margin-bottom:18px;
}
.api-title{ font-size:15px; font-weight:800; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.key-status{ font-size:12px; font-weight:700; color:var(--success); }
.color-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.color-row input[type="color"]{ height:42px; padding:4px; cursor:pointer; }
.hex-mirror{ margin-top:6px; }
.swatch{ display:inline-block; width:18px; height:18px; border-radius:5px; border:1px solid var(--border); vertical-align:middle; margin-right:3px; }
.logo-preview{ display:flex; align-items:center; gap:14px; margin:12px 0; }
.logo-preview img{ max-height:60px; border:1px solid var(--border); border-radius:8px; padding:6px; background:var(--bg); }
.table-logo{ max-height:38px; border-radius:6px; }
.danger-link{ color:var(--error); font-weight:700; }
.history-head, .select-actions{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.select-actions{ margin-bottom:16px; }

/* ---------- FULL WIDTH HELPERS ---------- */
.fullrow, .fullspan{ grid-column:1 / -1; }

/* ---------- LANDING (enhanced) ---------- */
.landing-hero h1{ background:var(--grad-primary); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.feature-card{ background:var(--grad-soft); }
.feature-card:hover{ box-shadow:var(--shadow-lg); border-color:rgba(37,99,235,0.3); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px){
  .create-form{ grid-template-columns:1fr; }
  .field-big, .field-stack{ grid-column:auto; }
  .bulk-grid{ grid-template-columns:1fr 1fr; }
  .product-upload-grid{ grid-template-columns:1fr; }
  .settings-grid, .profile-grid, .color-row{ grid-template-columns:1fr; }
  .app-main{ padding:24px 16px; }
}
@media (max-width: 560px){
  .bulk-grid{ grid-template-columns:1fr; }
}
