/* ============================================================
   VideoFetch — Responsive Styles
   ============================================================ */

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

:root {
  --bg:        #0f1117;
  --surface:   #1a1d27;
  --surface2:  #21253a;
  --border:    #2e3347;
  --accent:    #5c6ef8;
  --accent-h:  #4a5ce6;
  --success:   #22c55e;
  --error:     #ef4444;
  --warn:      #f59e0b;
  --text:      #e8eaf0;
  --text-muted:#8b92a8;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  height: 56px;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

/* ── Main ── */
.main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.card-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

/* ── URL Input ── */
.input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}
.url-input {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s;
  min-height: 48px;
}
.url-input:focus { border-color: var(--accent); }
.url-input::placeholder { color: var(--text-muted); }

/* ── Form options ── */
.form-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.option-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.select {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  cursor: pointer;
  min-height: 40px;
  transition: border-color 0.15s;
}
.select:focus { border-color: var(--accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  min-height: 40px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-large {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
  min-height: 52px;
}
.btn-icon { padding: 0.55rem 0.75rem; }
.btn-xs { font-size: 0.78rem; padding: 0.2rem 0.6rem; min-height: auto; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Two-button row ── */
.btn-row {
  display: flex;
  gap: 10px;
}
.btn-large-half {
  flex: 1;
  padding: 0.9rem;
  font-size: 1rem;
  min-height: 52px;
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

/* ── Resolution picker ── */
.resolution-picker {
  margin-top: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  animation: slideDown 0.18s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.resolution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.resolution-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resolution-meta strong { color: var(--text); }
.resolution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding: 0.85rem;
}
.res-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  min-height: 64px;
  color: var(--text);
}
.res-btn:hover    { border-color: var(--accent); background: rgba(92,110,248,0.07); }
.res-btn:active   { transform: scale(0.97); }
.res-btn.res-best { border-color: var(--accent); background: rgba(92,110,248,0.1); }
.res-btn.res-selected { border-color: var(--success); background: rgba(34,197,94,0.1); }
.res-label {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}
.res-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.res-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth hint ── */
.auth-hint {
  font-size: 0.85rem;
  color: var(--warn);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Progress card ── */
.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* Method badges */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1.25rem;
}
.method-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  transition: border-color 0.2s;
}
.method-badge.active  { border-color: var(--accent); background: rgba(92,110,248,0.08); }
.method-badge.success { border-color: var(--success); background: rgba(34,197,94,0.08); }
.method-badge.failed  { border-color: var(--error);   background: rgba(239,68,68,0.08); }

.method-icon { font-size: 1rem; width: 16px; text-align: center; }
.method-badge.active .method-icon  { color: var(--accent); }
.method-badge.success .method-icon { color: var(--success); }
.method-badge.failed .method-icon  { color: var(--error); }

/* Progress bar */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}

/* Log feed */
.log-wrap {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.log-feed {
  height: 220px;
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-muted);
  scroll-behavior: smooth;
}
.log-feed::-webkit-scrollbar { width: 4px; }
.log-feed::-webkit-scrollbar-track { background: transparent; }
.log-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.log-entry { display: block; }
.log-entry.log-success { color: var(--success); }
.log-entry.log-error   { color: var(--error); }
.log-entry.log-warn    { color: var(--warn); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-running { color: var(--accent);  background: rgba(92,110,248,0.12); }
.badge-success { color: var(--success); background: rgba(34,197,94,0.12); }
.badge-failed  { color: var(--error);   background: rgba(239,68,68,0.12); }
.badge-pending { color: var(--warn);    background: rgba(245,158,11,0.12); }

/* ── Result cards ── */
.result-card {
  text-align: center;
  padding: 2.5rem 1.75rem;
}
.result-icon {
  margin: 0 auto 1rem;
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon { background: rgba(34,197,94,0.12); color: var(--success); }
.error-icon   { background: rgba(239,68,68,0.12);  color: var(--error); }
.result-meta {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── History panel ── */
.history-panel {
  position: fixed;
  top: 0; right: 0;
  width: 340px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
  transform: translateX(0);
  transition: transform 0.25s ease;
}
.history-panel.hidden { transform: translateX(100%); }
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.history-header h3 { font-size: 1rem; font-weight: 700; }
.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
  cursor: default;
}
.history-item:hover { background: var(--surface2); }
.history-item-info { flex: 1; min-width: 0; }
.history-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-size { font-size: 0.75rem; color: var(--text-muted); }
.history-item-actions { display: flex; gap: 4px; }
.history-item-actions a,
.history-item-actions button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.history-item-actions a:hover,
.history-item-actions button:hover { background: var(--surface2); color: var(--text); }
.history-item-actions button.del:hover { border-color: var(--error); color: var(--error); }

/* ── Cookies dot in header ── */
.header-right { display: flex; gap: 8px; align-items: center; }
.cookies-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: -4px;
  margin-right: 2px;
  flex-shrink: 0;
}
.cookies-dot-none   { background: var(--text-muted); }
.cookies-dot-ok     { background: var(--success); }

/* ── Cookies panel ── */
.cookies-panel { width: 400px; }
.cookies-panel-body { padding: 1rem; overflow-y: auto; flex: 1; }
.cookies-status-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.cookies-status-box.ok    { border-color: var(--success); color: var(--success); }
.cookies-status-box.none  { border-color: var(--border);  color: var(--text-muted); }

.setup-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.setup-section:last-child { border-bottom: none; }
.setup-heading {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-tag {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(92,110,248,0.15);
  color: var(--accent);
  border-radius: 99px;
  padding: 2px 8px;
}
.setup-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.setup-desc code {
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text);
  font-size: 0.8rem;
}
.setup-steps {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin: 0.6rem 0;
  line-height: 1.9;
}
.setup-steps strong { color: var(--text); }
.setup-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.export-result {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.export-result.ok    { border-color: var(--success); color: var(--success); background: rgba(34,197,94,0.08); }
.export-result.error { border-color: var(--error);   color: var(--error);   background: rgba(239,68,68,0.08); }
.upload-name { font-size: 0.8rem; color: var(--text-muted); }
.btn-danger:hover { border-color: var(--error) !important; color: var(--error) !important; }

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 150;
  backdrop-filter: blur(2px);
  transition: opacity 0.2s;
}
.overlay.hidden { pointer-events: none; opacity: 0; }

.empty-msg { color: var(--text-muted); font-size: 0.9rem; padding: 1rem 0.5rem; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Mode tabs ── */
.mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
.mode-tab {
  flex: 1;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mode-tab.active { background: var(--surface2); color: var(--text); }
.mode-tab:hover:not(.active) { color: var(--text); }
.batch-tab-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  font-size: 0.7rem;
  padding: 1px 7px;
  font-weight: 700;
}

/* ── Batch drop zone ── */
.batch-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2rem 1rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.batch-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(92,110,248,0.05);
}
.drop-label { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.drop-sub { font-size: 0.82rem; }
.drop-filename { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.drop-filename.hidden { display: none; }

/* ── Batch progress card ── */
.batch-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.batch-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.batch-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Done counter ── */
.batch-done-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.batch-done-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--success);
  line-height: 1;
}
.batch-done-sep {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 300;
}
.batch-done-total {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.batch-done-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 2px;
  align-self: center;
}

/* ── Batch job list ── */
.batch-job-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.batch-job-list::-webkit-scrollbar { width: 4px; }
.batch-job-list::-webkit-scrollbar-track { background: transparent; }
.batch-job-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.batch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.2s;
  min-width: 0;
}
.batch-item.status-running  { border-color: var(--accent); }
.batch-item.status-success  { border-color: var(--success); }
.batch-item.status-failed   { border-color: var(--error); }

.batch-item-icon { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.status-pending  .batch-item-icon { color: var(--text-muted); }
.status-running  .batch-item-icon { color: var(--accent); animation: spin 1s linear infinite; display: inline-block; }
.status-success  .batch-item-icon { color: var(--success); }
.status-failed   .batch-item-icon { color: var(--error); }

.batch-item-info { flex: 1; min-width: 0; }
.batch-item-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-item-status {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 2px;
}
.batch-item-bar {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  margin-top: 5px;
  overflow: hidden;
}
.batch-item-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.status-success .batch-item-bar-fill { background: var(--success); }
.status-failed  .batch-item-bar-fill { background: var(--error); }

.batch-item-size {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
}
.batch-item-error {
  color: var(--error);
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}
.batch-item-error.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.batch-item-action { flex-shrink: 0; }
.batch-item-action a {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}
.batch-item-action a:hover { background: var(--surface); }

/* ── Responsive — Mobile ── */
@media (max-width: 640px) {
  .main { padding: 1rem 0.85rem 3rem; gap: 1rem; }
  .card { padding: 1.25rem 1rem; }
  .card-title { font-size: 1.15rem; }
  .methods-grid { grid-template-columns: repeat(2, 1fr); }
  .form-options { flex-direction: column; gap: 0.75rem; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .history-panel { width: 100%; }
  .url-input { font-size: 16px; } /* prevents iOS zoom */
  .log-feed { height: 160px; }
}
@media (max-width: 400px) {
  .methods-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Login page ── */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
}
.login-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-logo-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(92,110,248,0.15);
  border: 1px solid rgba(92,110,248,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.login-logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.login-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.login-field {
  margin-bottom: 1.25rem;
}
.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.login-input-wrap {
  position: relative;
}
.login-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 48px;
}
.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92,110,248,0.15);
}
.login-input::placeholder { color: var(--text-muted); }
.login-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  transition: color 0.15s;
}
.login-eye:hover { color: var(--text); }
.login-error {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.85rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1rem;
}
.login-btn {
  margin-top: 0.25rem;
  position: relative;
}
.login-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
}
.login-footer {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
@media (max-width: 480px) {
  .login-card { padding: 1.5rem 1.25rem; }
  .login-logo-text { font-size: 1.3rem; }
}
