@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --ink:       #08101f;
  --blue:      #1557f0;
  --blue-2:    #0e42c7;
  --blue-pale: #e8effe;
  --sky:       #dce8ff;
  --white:     #ffffff;
  --off:       #f5f7fc;
  --mist:      #eef1f8;
  --gray-4:    #4a5568;
  --gray-6:    #718096;
  --gray-b:    #b0bac8;
  --gold:      #f0a500;
  --green:     #0abf76;
  --green-pale:#d1fae5;
  --red:       #f03a3a;
  --red-pale:  #fee2e2;
  --amber:     #f59e0b;
  --amber-pale:#fef3c7;
  --r:         12px;
  --r-lg:      20px;
  --r-xl:      28px;
  --sh:        0 4px 24px rgba(21,87,240,.09);
  --sh-lg:     0 16px 48px rgba(21,87,240,.14);
  --font-h:    'Syne', sans-serif;
  --font-b:    'Instrument Sans', sans-serif;
  --nav-h:     68px;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-b); background: var(--white); color: var(--ink); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-b); border: none; outline: none; background: none; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: var(--font-b); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px;
  font-size: 14px; font-weight: 600; transition: all .2s; white-space: nowrap; cursor: pointer;
}
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-blue { background: var(--blue); color: white; border: none; }
.btn-blue:hover { background: var(--blue-2); transform: translateY(-1px); box-shadow: var(--sh); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--mist); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-white { background: white; color: var(--blue); border: none; }
.btn-white:hover { background: var(--sky); }
.btn-outline-white { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,.35); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: #089c60; }
.btn-red { background: var(--red); color: white; }
.btn-red:hover { background: #d42e2e; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-blue   { background: var(--blue-pale); color: var(--blue); }
.badge-green  { background: var(--green-pale); color: #065f46; }
.badge-gold   { background: var(--amber-pale); color: #78350f; }
.badge-gray   { background: var(--mist); color: var(--gray-4); }
.badge-red    { background: var(--red-pale); color: #991b1b; }
.badge-or     { background: #fef3c7; color: #78350f; }
.badge-argent { background: #f1f5f9; color: #475569; }
.badge-bronze { background: #fef3c7; color: #92400e; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--mist); border-radius: var(--r);
  font-size: 14px; font-family: var(--font-b); color: var(--ink);
  background: white; outline: none; transition: all .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,87,240,.1);
}
.form-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5568' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { display: none; padding: 12px 16px; border-radius: var(--r); font-size: 14px; margin-top: 10px; }
.form-msg.ok  { background: var(--green-pale); color: #065f46; display: block; }
.form-msg.err { background: var(--red-pale); color: #991b1b; display: block; }
.form-note { font-size: 12px; color: var(--gray-6); margin-top: 5px; }
.secure-note { display: flex; align-items: center; gap: 8px; background: var(--blue-pale); border-radius: var(--r); padding: 10px 14px; font-size: 12px; color: var(--blue); font-weight: 500; margin-bottom: 16px; }

/* ── CARDS ── */
.card { background: white; border: 1px solid var(--mist); border-radius: var(--r-lg); padding: 22px; }
.card-title { font-family: var(--font-h); font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }

/* ── STAT BOX ── */
.stat-box { background: var(--off); border-radius: var(--r); padding: 16px 20px; }
.stat-val  { font-family: var(--font-h); font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-lbl  { font-size: 12px; color: var(--gray-6); margin-top: 4px; }

/* ── AVATAR ── */
.av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.av-blue   { background: #dbeafe; color: #1e40af; }
.av-green  { background: var(--green-pale); color: #065f46; }
.av-gold   { background: var(--amber-pale); color: #92400e; }
.av-purple { background: #ede9fe; color: #5b21b6; }
.av-pink   { background: #fce7f3; color: #9d174d; }
.av-lg { width: 56px; height: 56px; font-size: 18px; }
.av-xl { width: 72px; height: 72px; font-size: 22px; }

/* ── TABLE ── */
.hl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hl-table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-6); border-bottom: 1px solid var(--mist); background: var(--off); }
.hl-table td { padding: 14px 16px; border-bottom: 1px solid var(--mist); color: var(--gray-4); vertical-align: middle; }
.hl-table tr:last-child td { border-bottom: none; }
.hl-table tr:hover td { background: var(--off); }

/* ── DIVIDER ── */
hr { border: none; border-top: 1px solid var(--mist); margin: 24px 0; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: var(--ink); color: white; padding: 14px 22px;
  border-radius: var(--r-lg); font-size: 14px; font-weight: 500;
  box-shadow: var(--sh-lg); display: flex; align-items: center; gap: 10px;
  transform: translateY(80px); opacity: 0; transition: all .35s ease;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(8,16,31,.75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--r-xl); padding: 36px;
  max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative; animation: mIn .3s ease;
}
@keyframes mIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 18px; font-size: 24px; color: var(--gray-b); cursor: pointer; line-height: 1; }
.modal-title { font-family: var(--font-h); font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.modal-sub   { font-size: 14px; color: var(--gray-6); margin-bottom: 24px; }

/* ── LOADING ── */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FADE ── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
