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

/* Dark (default) */
:root {
  --accent:   #7C5CFC;
  --accent2:  #A78BFA;
  --bg:       #09090C;
  --surface:  #111118;
  --card:     #16161F;
  --card2:    #1C1C28;
  --border:   #252535;
  --text:     #F0EFFF;
  --muted:    #6B6B85;
  --success:  #22C55E;
  --warning:  #F59E0B;
  --danger:   #EF4444;
  --shadow:   rgba(0,0,0,.4);
  --radius:   16px;
}

/* Light */
html[data-theme="light"] {
  --bg:      #F5F5FA;
  --surface: #FFFFFF;
  --card:    #FFFFFF;
  --card2:   #F0F0F8;
  --border:  #E2E2EE;
  --text:    #111118;
  --muted:   #7B7B95;
  --shadow:  rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; transition: background-color .2s, color .2s, border-color .2s; }

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

/* ── NAV ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 12px var(--shadow);
}
.nav-logo {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.2rem;
  color: var(--accent2); cursor: pointer; text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); text-decoration: none; padding: 7px 14px;
  font-size: .85rem; border-radius: 8px; transition: all .2s;
}
.nav-links a:hover { color: var(--text); background: var(--card2); }
.nav-btn {
  background: var(--accent); color: #fff !important;
  padding: 7px 18px !important; font-weight: 600; border-radius: 8px;
}
.nav-btn:hover { background: #6445E0 !important; }

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px; cursor: pointer;
  font-size: 1rem; line-height: 1; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
}
.theme-toggle:hover { background: var(--border); }

/* ── CARDS ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}

/* ── FORMS ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 11px 14px;
  font-size: .92rem; font-family: 'Inter', sans-serif; outline: none;
  transition: border-color .2s;
}
.field input:focus, .field select:focus { border-color: var(--accent); }

/* ── BUTTONS ── */
.btn {
  padding: 11px 22px; border: none; border-radius: 10px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .9rem;
  transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #9b7dff); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124,92,252,.4); }
.btn-secondary { background: var(--card2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.btn-danger:hover { background: rgba(239,68,68,.22); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }

/* ── PROGRESS ── */
.progress-wrap { margin-top: 16px; display: none; }
.progress-wrap.visible { display: block; }
.progress-bg { background: var(--card2); border-radius: 99px; height: 6px; overflow: hidden; margin-bottom: 8px; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .3s; }
.progress-status { font-size: .82rem; color: var(--muted); }

/* ── RESULT ── */
.result-card {
  display: none; margin-top: 14px; padding: 18px 20px;
  background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25);
  border-radius: 12px; align-items: center; gap: 14px;
}
.result-card.visible { display: flex; }
.result-info { flex: 1; }
.result-info h4 { font-size: .92rem; font-weight: 600; margin-bottom: 3px; }
.result-info p  { font-size: .78rem; color: var(--muted); }
.btn-download {
  background: var(--success); color: #fff; border: none; cursor: pointer;
  padding: 9px 18px; border-radius: 8px; font-size: .85rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: background .2s;
}
.btn-download:hover { background: #16a34a; }

/* ── ALERTS ── */
.alert { padding: 11px 14px; border-radius: 8px; font-size: .85rem; margin-bottom: 16px; display: none; }
.alert.visible { display: block; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25);  color: #f87171; }
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.25);  color: #4ade80; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: var(--success); color: #fff; padding: 13px 22px;
  border-radius: 10px; font-weight: 600; font-size: .88rem;
  transform: translateY(80px); opacity: 0; transition: all .3s; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── BADGE ── */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 99px;
  font-size: .73rem; font-weight: 600;
  background: rgba(124,92,252,.15); color: var(--accent2);
}
.badge-success { background: rgba(34,197,94,.15);  color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,.15);  color: var(--danger);  }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 16px; font-size: .73rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
td { padding: 11px 16px; font-size: .83rem; border-top: 1px solid var(--border); }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .82rem; margin-top: 40px;
}
footer a { color: var(--accent2); text-decoration: none; }

/* ── UTILS ── */
.page { max-width: 960px; margin: 0 auto; padding: 40px 24px; }
.page-sm { max-width: 480px; margin: 0 auto; padding: 40px 24px; }
.section { margin-bottom: 24px; }
.section-title { font-family: 'Poppins', sans-serif; font-size: .9rem; font-weight: 700; color: var(--accent2); margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; }
@media(max-width:640px) { .grid-2 { grid-template-columns: 1fr; } nav { padding: 0 16px; } .page { padding: 24px 16px; } }
