/* === CSS Variables & Reset === */
:root {
  --primary: #ff0000;
  --primary-dark: #cc0000;
  --primary-light: #ffcccc;
  --accent: #ffcc00;
  --bg: #ffffff;
  --bg-card: #f9f9f9;
  --bg-card-hover: #f1f1f1;
  --bg-surface: #fdfdfd;
  --text: #333333;
  --text-muted: #666666;
  --text-light: #999999;
  --border: #dddddd;
  --success: #00b894;
  --danger: #e17055;
  --warning: #ffeaa7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.15);
  --transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

/* === Dark Mode === */
[data-theme="dark"] {
  --bg: #0f0f13;
  --bg-card: #1a1a24;
  --bg-card-hover: #22222f;
  --bg-surface: #16161f;
  --text: #e8e8f0;
  --text-muted: #9090a8;
  --text-light: #606078;
  --border: #2a2a3a;
  --shadow: 0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--primary);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* === Utility === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.85;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* === Navbar === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.cart-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.cart-btn:hover {
  background: var(--bg-card-hover);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Hero === */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -50px;
  right: -50px;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: #00cec9;
  top: 50%;
  left: 60%;
}

/* === Packs Section === */
.packs-section {
  padding: 60px 0 100px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

/* === Pack Card === */
.pack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.pack-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(255, 0, 0, 0.12);
}

.pack-image {
  width: 100%;
  aspect-ratio: 5 / 7;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.pack-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.pack-image-placeholder svg {
  opacity: 0.3;
}

.pack-image-placeholder span {
  font-size: 0.8rem;
  opacity: 0.4;
}

.pack-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pack-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pack-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  flex: 1;
}

.pack-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pack-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.add-to-cart {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.add-to-cart:hover {
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.35);
  transform: scale(1.03);
}

/* === Cart Sidebar === */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--text-muted);
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

 qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

 qty-btn:hover {
  background: var(--bg-card-hover);
}

.cart-item-qty span {
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

/* === Forms === */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(225, 112, 85, 0.1);
  border-radius: var(--radius-sm);
}

.success-msg {
  color: var(--success);
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 184, 148, 0.1);
  border-radius: var(--radius-sm);
}

/* === Checkout === */
.sandbox-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 234, 167, 0.08);
  border: 1px solid rgba(255, 234, 167, 0.2);
  border-radius: var(--radius-sm);
  color: var(--warning);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.order-summary-mini {
  margin-bottom: 20px;
}

.order-summary-mini h5 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}

.summary-total {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.confirmation-content {
  text-align: center;
  padding: 20px 0;
}

.confirmation-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #00e676);
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.confirmation-content h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.confirmation-content p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.order-id-display {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--bg-card);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 20px;
}

/* === Footer === */
.footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--text);
}

/* ===================== */
/* === ADMIN STYLES  === */
/* ===================== */

.admin-body {
  background: var(--bg);
}

.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card h2 {
  margin-bottom: 8px;
}

.login-card > p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.hint-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 16px;
}

.hint-text code {
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.admin-container {
  display: flex;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(255, 0, 0, 0.1);
  color: var(--primary);
}

.logout-link {
  margin-top: auto;
  color: var(--danger);
}

.logout-link:hover {
  background: rgba(225, 112, 85, 0.1);
}

.sidebar-version {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0 10px;
  opacity: 0.6;
  letter-spacing: 0.04em;
  user-select: none;
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow-x: auto;
}

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
}

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.table-search-wrap {
  flex-shrink: 0;
}

.table-search {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: 7px 12px;
  width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.table-search:focus {
  border-color: var(--accent);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.admin-table .thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.admin-table .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(0, 184, 148, 0.12);
  color: var(--success);
}

.status-badge.inactive {
  background: rgba(225, 112, 85, 0.12);
  color: var(--danger);
}

.status-badge.completed {
  background: rgba(0, 184, 148, 0.12);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(255, 234, 167, 0.12);
  color: #f39c12;
}

.action-btns {
  display: flex;
  gap: 8px;
}

.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.bulk-action-bar span {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  margin-bottom: 20px;
}

.settings-card h4 {
  margin-bottom: 20px;
}

.dfu-card {
  border-color: var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.04);
}

.dfu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--danger, #ef4444);
}

.dfu-header h4 {
  margin: 0;
  color: var(--danger, #ef4444);
}

.dfu-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.dfu-confirm-label {
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.dfu-input {
  background: var(--bg-surface);
  border: 1px solid var(--danger, #ef4444);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 8px 12px;
  width: 120px;
  outline: none;
  font-family: monospace;
  letter-spacing: 0.1em;
}

.dfu-input:focus {
  box-shadow: 0 0 0 2px rgba(239,68,68,0.25);
}

/* Toggle switch (shared: settings + setup) */
.setup-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.setup-toggle-title { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.setup-toggle-hint  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.setup-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.setup-toggle input { opacity: 0; width: 0; height: 0; }
.setup-toggle-slider {
  position: absolute; inset: 0;
  background: var(--border, rgba(255,255,255,0.15));
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.setup-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.setup-toggle input:checked + .setup-toggle-slider { background: var(--primary, #6366f1); }
.setup-toggle input:checked + .setup-toggle-slider::before { transform: translateX(18px); }

/* HTTPS settings card */
.https-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text);
}
.https-card-header h4 { margin: 0; }
.https-card-header svg { flex-shrink: 0; color: var(--primary, #6366f1); }
.https-status-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 20px;
}
.https-on  { background: rgba(0,184,148,0.15); color: var(--success, #00b894); border: 1px solid rgba(0,184,148,0.3); }
.https-off { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }
.https-file-status { font-weight: 400; font-size: 0.75rem; margin-left: 6px; }
.https-restart-notice {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 12px 0;
}
.cert-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cert-input-row input { flex: 1; min-width: 0; }
.cert-file-btn {
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  user-select: none;
}
.https-generate-section {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0 0;
}
.https-generate-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}
.https-generate-warn { color: var(--warning, #f59e0b); font-size: 0.75rem; }
.https-generate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.https-generate-row input[type=number] { max-width: 90px; }
.https-generate-hint { font-size: 0.78rem; color: var(--text-muted); }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

.desc-cell {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Toast Notification === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 3px solid var(--success);
}

/* ============================== */
/* === PHOTO SUBMISSION STYLES === */
/* ============================== */

.submit-section {
  padding: 60px 0 100px;
  border-top: 1px solid var(--border);
}

.submit-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.05);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-muted);
}

.upload-placeholder svg {
  opacity: 0.4;
}

.upload-placeholder span {
  font-size: 0.95rem;
}

.upload-hint {
  font-size: 0.8rem !important;
  opacity: 0.5;
}

.upload-preview {
  position: relative;
  width: 100%;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
}

.upload-preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.remove-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.remove-photo:hover {
  background: var(--danger);
}

.submit-success {
  text-align: center;
  padding: 20px 0;
}

/* === Admin Submissions Grid === */

.submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.submission-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.1);
}

.submission-photo {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.submission-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.submission-details {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submission-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.field-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.submission-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.submission-actions a {
  text-decoration: none;
  color: white;
}

/* === Responsive === */

/* -- Tablet (max 1024px) -- */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 200px;
  }

  .inbox-layout {
    grid-template-columns: 220px 1fr;
  }

  .invoice-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* -- Mobile (max 768px) -- */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    padding: 0 12px;
  }

  .nav-container {
    height: 56px;
  }

  .nav-logo {
    font-size: 1rem;
  }

  .logo-icon {
    font-size: 1.2rem;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  /* Hero */
  .hero {
    padding: 60px 16px 48px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
  }

  /* Container */
  .container {
    padding: 0 16px;
  }

  /* Packs */
  .packs-section {
    padding: 40px 0 60px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    margin-bottom: 28px;
    font-size: 0.9rem;
  }

  .packs-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pack-body {
    padding: 16px;
  }

  .pack-footer {
    flex-wrap: wrap;
    gap: 10px;
  }

  .add-to-cart {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  /* Cart sidebar */
  .cart-sidebar {
    width: 100%;
    max-width: 100vw;
  }

  .cart-header {
    padding: 16px;
  }

  .cart-items {
    padding: 12px 16px;
  }

  .cart-footer {
    padding: 16px;
  }

  /* Checkout modal */
  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal {
    max-height: 85vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Photo submission */
  .submit-section {
    padding: 40px 0 60px;
  }

  .submit-card {
    padding: 20px;
  }

  .upload-placeholder {
    padding: 28px 16px;
  }

  /* Submissions grid */
  .submissions-grid {
    grid-template-columns: 1fr;
  }

  /* Admin layout */
  .admin-container {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    padding: 10px 12px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 2px;
  }

  .sidebar-link {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .sidebar-version {
    display: none;
  }

  .logout-link {
    margin-top: 0;
    margin-left: auto;
  }

  .admin-main {
    padding: 16px;
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-search {
    width: 100%;
  }

  /* Admin tables */
  .admin-table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  .desc-cell {
    max-width: 140px;
  }

  .action-btns {
    flex-direction: column;
    gap: 4px;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .bulk-action-bar {
    flex-wrap: wrap;
  }

  /* Settings */
  .settings-card {
    padding: 20px;
    max-width: 100%;
  }

  .cert-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .https-generate-row {
    flex-direction: column;
    align-items: stretch;
  }

  .https-generate-row input[type=number] {
    max-width: 100%;
  }

  /* Login card */
  .login-card {
    padding: 28px 20px;
  }

  /* Inbox */
  .inbox-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 196px);
  }

  .inbox-list {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 35vh;
  }

  .inbox-viewer {
    min-height: 50vh;
  }

  .inbox-msg-header {
    padding: 12px 16px;
  }

  .inbox-msg-body {
    padding: 12px 16px;
  }

  .inbox-reply {
    padding: 10px 16px;
  }

  /* Invoice modal */
  .modal-lg {
    max-width: 100%;
  }

  .invoice-header {
    flex-direction: column;
    gap: 12px;
  }

  .invoice-meta {
    text-align: left;
  }

  .invoice-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .invoice-table th,
  .invoice-table td {
    padding: 8px 8px;
    font-size: 0.8rem;
  }

  /* Toast */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  /* Footer */
  .footer {
    padding: 28px 16px;
  }

  /* KB */
  .kb-article-list {
    grid-template-columns: 1fr;
  }
}

/* -- Small phones (max 480px) -- */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .hero {
    padding: 40px 12px 36px;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .cart-btn {
    padding: 6px 10px;
  }

  .packs-grid {
    gap: 16px;
  }

  .pack-name {
    font-size: 1.05rem;
  }

  .pack-price {
    font-size: 1.2rem;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal {
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 90vh;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 6px;
    font-size: 0.75rem;
  }

  .sidebar-link {
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 6px;
  }

  .sidebar-link svg {
    width: 14px;
    height: 14px;
  }

  .login-icon {
    width: 64px;
    height: 64px;
  }

  .login-card h2 {
    font-size: 1.2rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* === Account Page Styles === */
.login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  color: white;
}

.login-icon svg {
  stroke: white;
}

.logged-in-icon {
  background: linear-gradient(135deg, var(--success), #00d2a0);
}

.account-card {
  max-width: 480px;
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.account-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ============================
   Invoice Modal
   ============================ */
.modal-lg {
  max-width: 720px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.invoice-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-shop-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.invoice-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invoice-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.invoice-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.invoice-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.invoice-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.invoice-ship-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.invoice-ship-detail {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.invoice-table th {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border);
  padding: 10px 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.invoice-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.invoice-table tfoot td {
  border-bottom: none;
  border-top: 2px solid var(--border);
  padding-top: 12px;
  font-size: 1rem;
}

.invoice-total-row td {
  background: transparent;
}

.text-right {
  text-align: right;
}

@media print {
  body > *:not(#invoiceModal) { display: none !important; }
  #invoiceModal {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: white !important;
    display: block !important;
  }
  #invoiceModal .modal {
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
    max-width: 100% !important;
  }
  #invoiceModal .modal-header button { display: none !important; }
}

/* ============================
   Pack Image Upload
   ============================ */
.pack-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pack-upload-area:hover {
  border-color: var(--primary);
  background: rgba(255, 0, 0, 0.03);
}

.pack-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  color: var(--text-muted);
  text-align: center;
  pointer-events: none;
}

.pack-upload-placeholder span {
  font-size: 0.875rem;
}

.upload-hint {
  font-size: 0.75rem !important;
  opacity: 0.7;
}

.pack-upload-preview {
  position: relative;
  width: 100%;
  line-height: 0;
}

.pack-upload-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.pack-upload-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pack-upload-remove:hover {
  background: rgba(239,68,68,0.85);
}

.password-change-section h4 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.success-msg {
  background: rgba(0, 184, 148, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 12px;
  text-align: center;
}

/* ================================================
   Inbox
   ================================================ */
.inbox-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 196px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.inbox-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface);
}
.inbox-list-item {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}
.inbox-list-item:hover { background: rgba(255,255,255,0.04); }
.inbox-list-item.active { background: rgba(255,0,0,0.07); border-left-color: var(--primary); }
.inbox-list-item.unread .inbox-item-from,
.inbox-list-item.unread .inbox-item-subject { font-weight: 700; color: var(--text); }
.inbox-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.inbox-item-from {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.inbox-item-date { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.inbox-item-subject {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-viewer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.inbox-empty-viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 14px;
  opacity: 0.35;
}
.inbox-empty-viewer p { margin: 0; font-size: 0.9rem; }
.inbox-message {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.inbox-msg-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.inbox-msg-subject {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.inbox-msg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.inbox-msg-meta strong { color: var(--text); }
.inbox-msg-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}
.inbox-html-body { max-width: 100%; overflow: hidden; }
.inbox-html-body img { max-width: 100%; height: auto; }
.inbox-html-body a { color: var(--primary); }
.inbox-text-body {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}
.inbox-reply {
  border-top: 1px solid var(--border);
  padding: 12px 22px;
  background: var(--bg-card);
  flex-shrink: 0;
}
.inbox-reply-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.inbox-reply textarea {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  min-height: 68px;
}
.inbox-reply textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255,0,0,0.1);
}
.inbox-reply-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.inbox-list-placeholder {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.inbox-no-config {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.7;
}
.inbox-no-config p { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.inbox-no-config code { background: rgba(255,255,255,0.08); padding: 2px 5px; border-radius: 3px; font-size: 0.82rem; }
.inbox-acct-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ============================
   User Manager
   ============================ */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-you-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 0, 0, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: 20px;
}

/* ── Knowledge Base ───────────────────────── */
.kb-search-wrap {
  position: relative;
  margin-bottom: 24px;
}
.kb-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.kb-search {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.kb-search:focus { border-color: var(--primary); }
.kb-search::placeholder { color: var(--text-muted); }

.kb-category {
  margin-bottom: 28px;
}
.kb-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.kb-article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.kb-article-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.kb-article-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover, var(--bg-card));
}
.kb-article-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 0, 0, 0.08);
  color: var(--primary);
}
.kb-article-info { flex: 1; min-width: 0; }
.kb-article-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.kb-article-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.kb-no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.kb-no-results svg { margin-bottom: 10px; opacity: 0.4; }

.kb-back-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kb-back-btn:hover { text-decoration: underline; }
.kb-article-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.kb-article-content .kb-article-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.kb-article-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}
.kb-article-content p,
.kb-article-content li {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}
.kb-article-content ol,
.kb-article-content ul {
  padding-left: 22px;
  margin: 8px 0 16px;
}
.kb-article-content li { margin-bottom: 6px; }
.kb-article-content code {
  background: rgba(0,0,0,0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}
[data-theme="dark"] .kb-article-content code {
  background: rgba(255,255,255,0.08);
}
.kb-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.84rem;
  color: var(--text);
  margin: 16px 0;
  line-height: 1.6;
}
.kb-tip svg { flex-shrink: 0; margin-top: 2px; color: #3b82f6; }
.kb-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.84rem;
  color: var(--text);
  margin: 16px 0;
  line-height: 1.6;
}
.kb-warn svg { flex-shrink: 0; margin-top: 2px; color: #ef4444; }

