@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --font-display: 'Poppins', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 76px;
}

/* Fallback vars (overridden immediately by js/theme.js once /api/theme responds) */
[data-theme='light'] {
  --accent-primary: #0284c7; --accent-secondary: #4f46e5; --accent-tertiary: #bae6fd;
  --bg-primary: #f4f7fb; --bg-secondary: #e6eef7; --bg-card: #ffffff;
  --text-primary: #101828; --text-secondary: #475569; --text-muted: #8a94a6;
  --border-color: #dde5f0; --button-bg: #0284c7; --button-hover-bg: #0369a1; --button-text: #ffffff;
  --link-color: #0284c7; --link-hover-color: #4f46e5;
}
[data-theme='dark'] {
  --accent-primary: #38bdf8; --accent-secondary: #818cf8; --accent-tertiary: #0c4a6e;
  --bg-primary: #0b1220; --bg-secondary: #131b2e; --bg-card: #17213a;
  --text-primary: #f1f5f9; --text-secondary: #cbd5e1; --text-muted: #7c8aa0;
  --border-color: #223047; --button-bg: #0284c7; --button-hover-bg: #0ea5e9; --button-text: #ffffff;
  --link-color: #38bdf8; --link-hover-color: #818cf8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

body:not(.auth-body)[data-background-type="gradient"] { background: var(--background-gradient, var(--bg-primary)); }
body:not(.auth-body)[data-background-type="image"] {
  background-image: var(--background-image);
  background-size: var(--background-size, cover);
  background-position: var(--background-position, center center);
  background-repeat: var(--background-repeat, no-repeat);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); margin: 0 0 10px; letter-spacing: -0.02em; }
h1 { font-size: 2.15rem; } h2 { font-size: 1.55rem; } h3 { font-size: 1.2rem; }
/* Safety net: if the configured theme has poor contrast (e.g. dark text on a dark
   background), this subtle dual glow keeps headings legible without changing their
   color. Nearly invisible on a well-contrasted theme, saves badly-contrasted ones. */
h1, h2, h3 { text-shadow: 0 0 1px rgba(255,255,255,0.35), 0 1px 3px rgba(0,0,0,0.35); }
p { line-height: 1.6; color: var(--text-secondary); }
a { color: var(--link-color); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--link-hover-color); }
.text-muted { color: var(--text-muted); }
.center { text-align: center; }

/* ---------- App shell: sidebar + content, used by every storefront page ---------- */
body.has-sidebar { display: flex; min-height: 100vh; }

#topbar.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.25s ease;
  z-index: 20;
}
#topbar.app-sidebar.collapsed { width: var(--sidebar-width-collapsed); }

.sb-header {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px; border-bottom: 1px solid var(--border-color);
}
.sb-header .sb-logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  white-space: nowrap; overflow: hidden;
}
.app-sidebar.collapsed .sb-logo { opacity: 0; width: 0; }
.sb-header .sb-toggle {
  margin-left: auto; background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.1rem; padding: 4px;
}
.sb-bell { position: relative; background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.05rem; padding: 4px; margin-left: 6px; }
.sb-bell:hover { color: var(--accent-primary); }
.sb-bell-dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid var(--bg-card); }
.app-sidebar.collapsed .sb-bell { display: none; }

.sb-notif-panel {
  position: absolute; top: 58px; left: 12px; width: 320px; max-width: 90vw; max-height: 420px; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,0.18); z-index: 60;
}
.sb-notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-color); font-weight: 700; font-size: 0.88rem; }
.sb-notif-head a { font-size: 0.75rem; font-weight: 600; }
.sb-notif-list { display: flex; flex-direction: column; }
.sb-notif-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.sb-notif-item:hover { background: var(--bg-secondary); text-decoration: none; }
.sb-notif-item:last-child { border-bottom: none; }
.sb-notif-item.unread { background: rgba(124,58,237,0.06); }
.sb-notif-item i { margin-top: 2px; }
.sb-notif-title { font-size: 0.83rem; font-weight: 700; }
.sb-notif-msg { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.sb-notif-code {
  font-family: monospace; font-size: 0.76rem; background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 6px; padding: 6px 8px; margin-top: 5px; color: var(--text-primary); word-break: break-all;
}
.sb-notif-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.app-sidebar.collapsed .sb-header { justify-content: center; }
.app-sidebar.collapsed .sb-header .sb-toggle { margin: 0; }

.sb-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.sb-section-title {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  color: var(--text-muted); padding: 6px 10px; margin-top: 8px;
}
.app-sidebar.collapsed .sb-section-title { opacity: 0; height: 0; padding: 0; overflow: hidden; }

.sb-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-weight: 500; font-size: 0.92rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden;
  text-shadow: 0 0 1px rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.25);
}
.sb-link i { width: 18px; text-align: center; font-size: 1.05rem; flex-shrink: 0; }
.sb-link:hover { background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; }
.sb-link.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35); text-shadow: none;
}
.app-sidebar.collapsed .sb-link span { opacity: 0; width: 0; }
.app-sidebar.collapsed .sb-link { justify-content: center; padding: 12px; }
.app-sidebar.collapsed .sb-link i { width: auto; font-size: 1.15rem; }

.sb-footer { padding: 14px 12px; border-top: 1px solid var(--border-color); }
.sb-credit {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 9px 12px;
  font-size: 0.82rem; font-weight: 600; color: var(--accent-primary); margin-bottom: 10px;
}
.app-sidebar.collapsed .sb-credit span.label { display: none; }
.sb-user { display: flex; align-items: center; gap: 10px; position: relative; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); }
.sb-user:hover { background: var(--bg-secondary); }
.sb-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border-color); }
.sb-user .sb-user-info { overflow: hidden; white-space: nowrap; flex: 1; }
.app-sidebar.collapsed .sb-user .sb-user-info, .app-sidebar.collapsed .sb-user-caret { display: none; }
.sb-user-name { font-weight: 600; font-size: 0.85rem; }
.sb-user-email { font-size: 0.72rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.sb-user-caret { font-size: 0.7rem; color: var(--text-muted); transition: transform 0.2s; }
.sb-user.open .sb-user-caret { transform: rotate(180deg); }
.sb-user-menu {
  display: flex; flex-direction: column; gap: 2px; margin-top: 6px; overflow: hidden;
  max-height: 220px; transition: max-height 0.2s ease, opacity 0.2s ease; opacity: 1;
}
.sb-user-menu.collapsed { max-height: 0; opacity: 0; margin-top: 0; }
.sb-theme-toggle { background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px; color: var(--text-muted); cursor: pointer; width: 100%; text-align: center; margin-bottom: 8px; }
.sb-theme-toggle:hover { color: var(--accent-primary); border-color: var(--accent-primary); }

.app-content { flex: 1; min-width: 0; }

.impersonate-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; width: 100%; background: #111827; color: #fde68a;
  text-align: center; padding: 10px 16px; font-size: 0.85rem; font-weight: 600; box-sizing: border-box;
}
.impersonate-banner a { color: #fbbf24; margin-left: 10px; text-decoration: underline; }
body.has-impersonate-banner { padding-top: 42px; }
body.has-impersonate-banner #topbar.app-sidebar { height: calc(100vh - 42px); top: 42px; }

/* ---------- Generic layout ---------- */
.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 44px 48px; box-sizing: border-box; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 60px 24px; }
@media (max-width: 1100px) { .container { padding: 32px 28px; } }
@media (max-width: 600px) { .container { padding: 20px 16px; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 28px; box-shadow: 0 2px 14px rgba(20, 10, 50, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.card + .card { margin-top: 18px; }
.card.hoverable:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20, 10, 50, 0.08); }

/* When the site background is an image, cards go semi-transparent + blurred so the
   image is actually visible behind content, instead of being fully hidden. */
body[data-background-type="image"] .card,
body[data-background-type="image"] #topbar.app-sidebar {
  background: rgba(255,255,255,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
html[data-theme="dark"] body[data-background-type="image"] .card,
html[data-theme="dark"] body[data-background-type="image"] #topbar.app-sidebar {
  background: rgba(20,15,35,0.72);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-primary); cursor: pointer;
  font-size: 0.9rem; font-weight: 600; font-family: var(--font-sans); transition: all 0.2s ease;
}
.btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--button-bg), var(--accent-secondary)); border: none; color: var(--button-text);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover { filter: brightness(1.08); color: var(--button-text); transform: translateY(-1px); }
.btn-danger { background: #fee2e2; border-color: #fecaca; color: #dc2626; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: 8px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border-color); border-radius: 10px;
  font-size: 0.92rem; background: var(--bg-secondary); color: var(--text-primary); font-family: var(--font-sans);
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--accent-primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } table { display: block; overflow-x: auto; white-space: nowrap; } }

/* ---------- Alerts / badges ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.88rem; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

.badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-muted { background: var(--bg-secondary); color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; }
th { color: var(--text-muted); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Grids / product cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-auto { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid-auto { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-auto { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } .grid { gap: 18px; } }

/* ---------- Mobile sidebar (hamburger + slide-in + backdrop) ---------- */
.mobile-menu-btn {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 40; width: 42px; height: 42px;
  border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary);
  font-size: 1.1rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 25;
  opacity: 0; transition: opacity 0.2s ease;
}
.sidebar-backdrop.visible { display: block; opacity: 1; }

@media (max-width: 900px) {
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  #topbar.app-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 84vw; max-width: 300px;
    transform: translateX(-100%); transition: transform 0.25s ease; z-index: 30;
  }
  #topbar.app-sidebar.collapsed { width: 84vw; max-width: 300px; } /* ignore desktop-collapsed state on mobile */
  #topbar.app-sidebar.mobile-open { transform: translateX(0); }
  .app-content { width: 100%; }
  .container { padding-top: 74px; }
}

.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card img {
  width: 100%; height: 230px; object-fit: cover; border-radius: 12px; margin-bottom: 16px;
  background: var(--bg-secondary);
}
@media (max-width: 640px) { .product-card img { height: 190px; } }
.price { font-weight: 700; color: var(--accent-primary); font-size: 1.3rem; font-family: var(--font-display); }
.price .old { text-decoration: line-through; color: var(--text-muted); font-weight: 400; font-size: 0.9rem; margin-right: 8px; }

.product-card.out-of-stock { opacity: 0.6; }
.product-card.out-of-stock img { filter: grayscale(0.6); }
.btn:disabled, .btn[disabled] {
  background: #d1d5db; color: #6b7280; border-color: #d1d5db; cursor: not-allowed;
  opacity: 1; box-shadow: none;
}
.btn:disabled:hover { border-color: #d1d5db; color: #6b7280; }

.hero-card {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 24px; padding: 72px 50px; color: #fff; text-align: center; margin-bottom: 36px;
  box-shadow: 0 16px 44px rgba(124, 58, 237, 0.3);
}
.hero-card h1 { color: #fff; font-size: 2.8rem; }
.hero-card p { color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 26px; font-size: 1.1rem; }
.hero-card .btn-primary { background: #fff; color: var(--accent-primary); box-shadow: none; padding: 13px 28px; font-size: 1rem; }
.hero-card .btn-primary:hover { color: var(--accent-primary); filter: brightness(0.97); }

/* ---------- Misc utility ---------- */
.hidden { display: none !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }

/* ---------- Payment method cards ---------- */
.payment-methods-grid { display: flex; flex-direction: column; gap: 10px; }
.payment-method-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--border-color); background: var(--bg-card); cursor: pointer; transition: all 0.15s;
}
.payment-method-card:hover { border-color: var(--accent-primary); }
.payment-method-card.selected { border-color: var(--accent-primary); background: var(--bg-secondary); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.pm-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--bg-secondary); color: var(--accent-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.payment-method-card.selected .pm-icon { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); color: #fff; }
.pm-text { flex: 1; min-width: 0; }
.pm-label { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.pm-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.pm-check { font-size: 1.2rem; color: var(--border-color); flex-shrink: 0; }
.payment-method-card.selected .pm-check { color: var(--accent-primary); }
.priority-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.priority-low { background: #e5e7eb; color: #4b5563; }
.priority-medium { background: #dbeafe; color: #1d4ed8; }
.priority-high { background: #ffedd5; color: #c2410c; }
.priority-urgent { background: #fee2e2; color: #b91c1c; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.ticket-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-card);
  margin-bottom: 10px; transition: all 0.15s;
}
.ticket-card:hover { border-color: var(--accent-primary); transform: translateY(-1px); text-decoration: none; box-shadow: 0 6px 18px rgba(20,10,50,0.06); }
.ticket-card .tc-subject { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.ticket-card .tc-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.ticket-card .tc-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.chat-thread { display: flex; flex-direction: column; gap: 16px; max-height: 520px; overflow-y: auto; padding: 4px 4px 4px 0; }
.chat-row { display: flex; gap: 10px; max-width: 82%; }
.chat-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: #fff; }
.chat-avatar.support { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); }
.chat-avatar.user { background: var(--text-muted); }
.chat-bubble { border-radius: 14px; padding: 12px 15px; font-size: 0.9rem; line-height: 1.5; }
.chat-row.mine .chat-bubble { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); color: #fff; border-bottom-right-radius: 4px; }
.chat-row:not(.mine) .chat-bubble { background: var(--bg-secondary); color: var(--text-primary); border-bottom-left-radius: 4px; }
.chat-meta-line { font-size: 0.7rem; color: var(--text-muted); margin-top: 5px; }
.chat-row.mine .chat-meta-line { text-align: right; }
.chat-attachment {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.15); font-size: 0.8rem; color: inherit;
}
.chat-row:not(.mine) .chat-attachment { background: rgba(0,0,0,0.05); }
.chat-attachment img { max-width: 220px; border-radius: 8px; display: block; margin-top: 6px; }

.ticket-composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; border-top: 1px solid var(--border-color); padding-top: 16px; }
.ticket-composer textarea { flex: 1; resize: none; }
.ticket-attach-btn { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); flex-shrink: 0; }
.ticket-attach-btn:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.attach-preview { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; }
body.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; position: relative; overflow: hidden; }
body.auth-body::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}
body.auth-body::after { content: ""; position: absolute; inset: 0; background: rgba(10, 5, 25, 0.35); z-index: -1; }

.auth-shell {
  display: flex; width: 860px; max-width: 92%; min-height: 480px; background: var(--bg-card);
  border-radius: 20px; overflow: hidden; box-shadow: 0 25px 70px rgba(0,0,0,0.35);
}
.auth-visual {
  flex: 1; position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 32px; color: #fff; background: linear-gradient(160deg, var(--accent-primary), var(--accent-secondary));
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,5,25,0.15), rgba(10,5,25,0.55)); }
.auth-visual > * { position: relative; z-index: 2; }
.auth-visual h2 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.auth-visual p { color: rgba(255,255,255,0.88); font-size: 0.88rem; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand img { width: 34px; height: 34px; min-width: 34px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.auth-brand h2 { margin: 0; font-size: 1.05rem; }

.auth-panel { flex: 1; padding: 40px 42px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.auth-panel h1 { font-size: 1.45rem; margin-bottom: 4px; }
.auth-panel .sub { color: var(--text-muted); margin-bottom: 20px; font-size: 0.88rem; }
.auth-panel form { display: flex; flex-direction: column; gap: 14px; }
.auth-panel .form-group { margin-bottom: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.78rem; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid var(--border-color);
  border-radius: 10px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; padding: 11px;
  font-size: 0.88rem; font-weight: 600; width: 100%; transition: all 0.2s;
}
.google-btn:hover { border-color: var(--accent-primary); text-decoration: none; }
.google-btn img { width: 18px; height: 18px; }
.auth-panel .forgot { text-align: right; font-size: 0.8rem; }
.auth-panel .bottom-text { margin-top: 18px; text-align: center; font-size: 0.86rem; color: var(--text-muted); }
.auth-panel .bottom-text a { font-weight: 700; }
@media (max-width: 760px) { .auth-visual { display: none; } .auth-shell { width: 100%; max-width: 96%; } .auth-panel { padding: 32px 26px; } }
