/* ============================================================
   PicoFold — MIUI Design System
   style.css — единый файл стилей для всех страниц
   ============================================================ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  /* Цвета */
  --accent:      #1296DB;
  --accent-dark: #0E7AB8;
  --accent-light: #E8F4FC;
  --bg:          #F5F5F5;
  --surface:     #FFFFFF;
  --text:        #333333;
  --text-2:      #999999;
  --text-3:      #CCCCCC;
  --danger:      #FF4D4F;
  --danger-bg:   #FFF1F0;
  --success:     #52C41A;
  --success-bg:  #F6FFED;
  --warning:     #FA8C16;
  --warning-bg:  #FFF7E6;
  --border:      #E8E8E8;

  /* Типографика */
  --font: -apple-system, "MiSans", "Inter", "Segoe UI", sans-serif;
  --mono: "SF Mono", "Consolas", "Fira Code", monospace;

  /* Размеры */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Тени */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow:    0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Анимации */
  --ease: 0.2s ease;

  /* Layout */
  --max-w: 1120px;
  --nav-h: 64px;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 0.9375rem;   /* 15px */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--accent-dark); }

ul, ol { list-style: none; }

button { cursor: pointer; font-family: inherit; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── 3. Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

.text-sm  { font-size: 0.8125rem; }
.text-xs  { font-size: 0.75rem; }
.text-lg  { font-size: 1.0625rem; }
.text-muted { color: var(--text-2); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--mono); }

/* ── 4. Layout ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.page-wrap {
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 48px;
  min-height: 100vh;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ── 5. Navigation ────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

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

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--ease), color var(--ease);
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { color: var(--accent); background: var(--accent-light); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ── 6. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  transition: background var(--ease), color var(--ease),
              box-shadow var(--ease), opacity var(--ease);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(18, 150, 219, 0.35);
}

/* Secondary */
.btn-secondary {
  background: #F0F0F0;
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  background: #E4E4E4;
  color: var(--text);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: #D93738;
  color: #fff;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover:not(:disabled) {
  background: var(--accent-light);
  color: var(--accent);
}

/* Sizes */
.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Icon-only */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Loading state */
.btn.loading { position: relative; color: transparent; pointer-events: none; }
.btn.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.btn-primary.loading::after { border-top-color: #fff; }

/* ── 7. Cards ─────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body { padding: 24px; }
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
}
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Stat card */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-2);
  font-weight: 500;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-2);
}

/* ── 8. Forms ─────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.15);
  background: var(--surface);
}

.form-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.12);
}

.form-control.success {
  border-color: var(--success);
}

textarea.form-control {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-2);
}
.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
}

.form-stack { display: flex; flex-direction: column; gap: 20px; }

/* Honeypot — скрыто от пользователя, видно ботам */
.hp-field { display: none !important; }

/* ── 9. Password Strength Bar ─────────────────────────────── */
.pwd-strength {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.pwd-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.pwd-strength-bar[data-level="0"] { width: 0%; }
.pwd-strength-bar[data-level="1"] { width: 25%; background: var(--danger); }
.pwd-strength-bar[data-level="2"] { width: 50%; background: var(--warning); }
.pwd-strength-bar[data-level="3"] { width: 75%; background: #FADB14; }
.pwd-strength-bar[data-level="4"] { width: 100%; background: var(--success); }

.pwd-strength-label {
  font-size: 0.75rem;
  margin-top: 4px;
}
.pwd-strength-label[data-level="1"] { color: var(--danger); }
.pwd-strength-label[data-level="2"] { color: var(--warning); }
.pwd-strength-label[data-level="3"] { color: #D4B106; }
.pwd-strength-label[data-level="4"] { color: var(--success); }

/* ── 10. Auth Pages (login / register) ───────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 32px;
  justify-content: center;
}

.auth-title { font-size: 1.375rem; margin-bottom: 6px; }
.auth-sub   { color: var(--text-2); font-size: 0.875rem; margin-bottom: 28px; }

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-2);
}

/* ── 11. Alerts / Banners ─────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
}

.alert-error   { background: var(--danger-bg);  color: #CF1322; border: 1px solid #FFA39E; }
.alert-success { background: var(--success-bg); color: #389E0D; border: 1px solid #B7EB8F; }
.alert-warning { background: var(--warning-bg); color: #D46B08; border: 1px solid #FFD591; }
.alert-info    { background: var(--accent-light); color: #0958D9; border: 1px solid #91CAFF; }

.alert-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }

/* ── 12. Tables ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--ease);
}
tbody tr:hover { background: var(--bg); }

.table-actions { display: flex; gap: 6px; align-items: center; }

/* ── 13. Badge / Status ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.badge-pending  { background: var(--warning-bg);  color: var(--warning); }
.badge-running  { background: var(--accent-light); color: var(--accent); }
.badge-done     { background: var(--success-bg);   color: var(--success); }
.badge-error    { background: var(--danger-bg);    color: var(--danger); }
.badge-active   { background: var(--success-bg);   color: var(--success); }
.badge-inactive { background: var(--bg);           color: var(--text-2); }
.badge-admin    { background: #FFF0F6;             color: #C41D7F; }

/* Dot indicator */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.running { background: var(--accent); animation: pulse 1.5s ease infinite; }
.status-dot.done    { background: var(--success); }
.status-dot.error   { background: var(--danger); }
.status-dot.pending { background: var(--warning); }

/* ── 14. File Upload / Drop Zone ──────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
  background: var(--surface);
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--text-2);
}
.dropzone:hover .dropzone-icon,
.dropzone.drag-over .dropzone-icon {
  color: var(--accent);
}

.dropzone-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.dropzone-sub { font-size: 0.8125rem; color: var(--text-2); }

.dropzone input[type="file"] { display: none; }

/* Upload progress */
.upload-progress {
  margin-top: 16px;
  display: none;
}
.upload-progress.visible { display: block; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}
.progress-label {
  font-size: 0.8125rem;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
}

/* ── 15. Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform var(--ease);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title { font-size: 1.0625rem; font-weight: 600; }

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 20px 28px 28px; }

/* ── 16. 3Dmol Viewer Container ───────────────────────────── */
.viewer-wrap {
  background: #0A0A14;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.viewer-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.viewer-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.viewer-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease);
  backdrop-filter: blur(8px);
}
.viewer-btn:hover { background: rgba(255, 255, 255, 0.22); }

.viewer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.875rem;
  height: 100%;
  min-height: 320px;
}
.viewer-placeholder svg { opacity: 0.4; }

/* ── 17. Dashboard Layout ─────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 240px;
  height: calc(100vh - var(--nav-h));
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--ease), color var(--ease);
  cursor: pointer;
  text-decoration: none;
}
.sidebar-item:hover { background: var(--bg); color: var(--text); }
.sidebar-item.active {
  background: var(--accent-light);
  color: var(--accent);
}

.sidebar-icon { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-section {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 12px 6px;
}

.main-content {
  margin-left: 240px;
  padding: calc(var(--nav-h) + 28px) 32px 48px;
  min-height: 100vh;
}

/* ── 18. Landing Page ─────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(18, 150, 219, 0.2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-accent { color: var(--accent); }

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; align-items: center; gap: 12px; justify-content: center; }

.hero-viewer {
  margin: 60px auto 0;
  max-width: 860px;
  height: 440px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Features section */
.features { padding: 72px 0; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.section-title { font-size: 1.875rem; margin-bottom: 14px; }
.section-sub { font-size: 1rem; color: var(--text-2); max-width: 520px; margin: 0 auto; }

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.feature-title { font-size: 1rem; font-weight: 600; }
.feature-desc  { font-size: 0.875rem; color: var(--text-2); line-height: 1.6; }

/* ── 19. Pricing (plan) ───────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(18, 150, 219, 0.18);
}

.pricing-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-name    { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.pricing-price   { font-size: 2.25rem; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.pricing-period  { font-size: 0.8125rem; color: var(--text-2); margin-bottom: 20px; }
.pricing-credits { font-size: 0.875rem; color: var(--text-2); margin-bottom: 24px; }

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.pricing-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}
.pricing-feature svg { color: var(--success); flex-shrink: 0; }

/* ── 20. Admin Specific ───────────────────────────────────── */
.admin-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.log-row-fail td { background: rgba(255, 77, 79, 0.03); }
.log-row-success td { background: rgba(82, 196, 26, 0.02); }

/* ── 21. Settings ─────────────────────────────────────────── */
.settings-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-info { display: flex; flex-direction: column; gap: 2px; }
.settings-row-label { font-size: 0.9375rem; font-weight: 500; }
.settings-row-sub   { font-size: 0.8125rem; color: var(--text-2); }

/* Danger zone */
.danger-zone {
  border: 1.5px solid #FFA39E;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.danger-zone .settings-row-label { color: var(--danger); }

/* ── 22. Tooltip ──────────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A2E;
  color: #fff;
  font-size: 0.75rem;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--ease);
  z-index: 300;
}
[data-tip]:hover::after { opacity: 1; }

/* ── 23. Divider ──────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 0.8125rem;
  color: var(--text-2);
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── 24. Skeleton Loader ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #EBEBEB 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; margin-bottom: 12px; }
.skeleton-btn   { height: 40px; width: 120px; border-radius: var(--radius); }

/* ── 25. Empty State ──────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
}
.empty-state-icon { color: var(--text-3); margin-bottom: 4px; }
.empty-state-title { font-size: 1rem; font-weight: 600; }
.empty-state-sub   { font-size: 0.875rem; color: var(--text-2); max-width: 320px; }

/* ── 26. Footer (landing) ─────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.8125rem; color: var(--text-2); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-2);
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--accent); }

/* ── 27. Utilities ────────────────────────────────────────── */
.hidden  { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.w-full { width: 100%; }

/* ── 28. Animations ───────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fade-in 0.3s ease both; }

/* ── 29. Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
  }
  .sidebar-section { display: none; }
  .main-content { margin-left: 0; padding: 24px 20px 48px; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 28px 24px; }
  .hero { padding: 48px 0 40px; }
  .hero-actions { flex-direction: column; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .settings-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.25rem; }
  .admin-metrics { grid-template-columns: 1fr; }
  .hero-viewer   { height: 280px; }
  .btn-lg { height: 44px; font-size: 0.9375rem; }
  .table-wrap { border-radius: var(--radius); }
}

/* ── 30. Print ────────────────────────────────────────────── */
@media print {
  .nav, .sidebar, .modal-overlay { display: none; }
  .main-content { margin: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid var(--border); }
}
