/* ═══════════════════════════════════════════════════════════
   VINTEO — Design System
   Premium dark UI — Linear × Nike aesthetic
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:     #08080D;
  --bg-surface:  #0F0F16;
  --bg-elevated: #14141C;
  --bg-overlay:  #1A1A25;
  --bg-hover:    #1E1E2C;

  --border-subtle:  rgba(255,255,255,0.04);
  --border-default: rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.14);

  --accent:      #00E676;
  --accent-dim:  rgba(0,230,118,0.10);
  --accent-glow: rgba(0,230,118,0.22);
  --accent-2:    #7C6EFA;
  --accent-2-dim: rgba(124,110,250,0.10);
  --accent-3:    #4D9FFF;

  --text-primary:   #EEEEF5;
  --text-secondary: #7A7A8C;
  --text-tertiary:  #3A3A4C;

  --green:  #00E676;
  --orange: #F5A623;
  --red:    #FF4D4D;
  --blue:   #4D9FFF;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ─── GRAIN OVERLAY ─── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9998;
}

/* ─── AMBIENT BACKGROUND ─── */
.ambient {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-1 {
  position: absolute;
  top: -25%; left: -15%;
  width: 55%; height: 55%;
  background: radial-gradient(ellipse, rgba(124,110,250,0.065) 0%, transparent 68%);
  animation: af1 14s ease-in-out infinite alternate;
}
.ambient-2 {
  position: absolute;
  bottom: -20%; right: -10%;
  width: 50%; height: 50%;
  background: radial-gradient(ellipse, rgba(0,230,118,0.04) 0%, transparent 65%);
  animation: af2 18s ease-in-out infinite alternate;
}
.ambient-3 {
  position: absolute;
  top: 30%; left: 40%;
  width: 30%; height: 30%;
  background: radial-gradient(ellipse, rgba(77,159,255,0.03) 0%, transparent 60%);
  animation: af3 22s ease-in-out infinite alternate;
}
@keyframes af1 { from{transform:translate(0,0) scale(1)} to{transform:translate(4%,6%) scale(1.12)} }
@keyframes af2 { from{transform:translate(0,0) scale(1)} to{transform:translate(-5%,-4%) scale(1.1)} }
@keyframes af3 { from{transform:translate(0,0)} to{transform:translate(-3%,5%)} }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ─── NAVBAR ─── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
  background: transparent;
}
.navbar .logo-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.logo-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-overlay);
}
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.username {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ─── LAYOUT ─── */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 60px;
  width: 100%;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--accent);
  color: #000;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: #1AFF85;
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.3);
}
.btn-primary:disabled {
  background: var(--bg-overlay);
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-overlay);
}

.btn-danger {
  background: rgba(255,77,77,0.12);
  color: var(--red);
  border: 1px solid rgba(255,77,77,0.25);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: rgba(255,77,77,0.22); }

.btn-sm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.btn-sm:hover { border-color: var(--border-strong); color: var(--text-primary); background: var(--bg-overlay); }

/* ─── INPUTS ─── */
.input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.input::placeholder { color: var(--text-tertiary); }
.input-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%237A7A8C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-success { background: rgba(0,230,118,0.08); color: #00E676; border: 1px solid rgba(0,230,118,0.15); }
.badge-success::before { background: #00E676; box-shadow: 0 0 5px #00E676; }
.badge-warning { background: rgba(245,166,35,0.08); color: #F5A623; border: 1px solid rgba(245,166,35,0.15); }
.badge-warning::before { background: #F5A623; }
.badge-info    { background: rgba(77,159,255,0.08); color: #4D9FFF; border: 1px solid rgba(77,159,255,0.15); }
.badge-info::before { background: #4D9FFF; }
.badge-error   { background: rgba(255,77,77,0.08); color: #FF4D4D; border: 1px solid rgba(255,77,77,0.15); }
.badge-error::before { background: #FF4D4D; }

/* ─── ALERTS ─── */
.alert {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
}
.alert.show, .alert.success, .alert.error, .alert.loading {
  display: flex;
}
.alert-success, .alert.success { background: rgba(0,230,118,0.08); border: 1px solid rgba(0,230,118,0.2); color: #00E676; }
.alert-error, .alert.error     { background: rgba(255,77,77,0.08); border: 1px solid rgba(255,77,77,0.2); color: #FF4D4D; }
.alert-loading, .alert.loading { background: rgba(77,159,255,0.08); border: 1px solid rgba(77,159,255,0.2); color: #4D9FFF; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .25s, background .25s;
}
.card:hover {
  border-color: var(--border-strong);
}

/* ─── SPINNER ─── */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TOGGLE SWITCH ─── */
.toggle {
  position: relative;
  width: 44px; height: 24px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.3s, border-color 0.3s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: transform 0.3s var(--ease-spring), background 0.3s;
}
.toggle:checked { background: var(--accent-dim); border-color: var(--accent); }
.toggle:checked::after {
  transform: translateX(20px);
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 24px 0;
}

/* ─── SECTION LABEL ─── */
.section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

/* ─── FORM GROUP ─── */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  text-align: center;
}
.empty-icon { opacity: 0.12; margin-bottom: 4px; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-sub { font-size: 12px; color: var(--text-tertiary); max-width: 260px; }

/* ─── NOTIFICATION TOAST ─── */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  z-index: 10000;
  color: var(--text-primary);
  transform: translateX(400px);
  transition: transform .4s var(--ease-out-expo);
}
.notification.show { transform: translateX(0); }
.notification.success { background: rgba(0,230,118,0.12); border: 1px solid rgba(0,230,118,0.25); color: var(--green); }
.notification.error { background: rgba(255,77,77,0.12); border: 1px solid rgba(255,77,77,0.25); color: var(--red); }

/* ─── UTILITY ─── */
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-mono { font-family: var(--font-mono); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
