/* AsteriaHub — Global Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

:root {
  --bg:           #0a0c0f;
  --bg-2:         #111318;
  --bg-3:         #181c22;
  --bg-card:      #1a1e26;
  --bg-hover:     #222733;
  --border:       #252a35;
  --border-2:     #2e3444;
  --text:         #e8edf5;
  --text-2:       #8892a4;
  --text-3:       #555f70;
  --accent:       #8b5cf6;
  --accent-2:     #a78bfa;
  --accent-dim:   rgba(139,92,246,0.12);
  --yellow:       #f5a623;
  --success:      #3fb950;
  --danger:       #f85149;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-height: 52px;
  --max-w: 860px;
  --r: 6px;
  --transition: 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; min-height: 100vh; }
a { color: var(--accent-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; transition: all var(--transition); }
input, textarea, select { font-family: var(--font); font-size: 14px; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; color: var(--text); }
.text-sm { font-size: 12px; }
.text-dim { color: var(--text-3); }
.text-muted { color: var(--text-2); }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); background: var(--bg-2); border-bottom: 1px solid var(--border); z-index: 1000; display: flex; align-items: center; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 24px; gap: 16px; }
.navbar-logo { font-weight: 900; font-size: 14px; letter-spacing: 0.12em; color: var(--text); text-decoration: none; }
.navbar-logo .logo-accent { color: var(--accent-2); }
.navbar-links { display: flex; align-items: center; gap: 2px; }
.navbar-links a { padding: 5px 12px; border-radius: var(--r); color: var(--text-2); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; transition: all var(--transition); text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; }
.navbar-links a:hover { background: var(--bg-hover); color: var(--text); }
.navbar-links a.active { color: var(--accent-2); }
.navbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.online-badge { font-size: 11px; font-weight: 600; color: var(--success); background: rgba(63,185,80,0.1); padding: 3px 8px; border-radius: 20px; letter-spacing: 0.03em; }
.burger-btn { display: none; flex-direction: column; gap: 4px; padding: 6px; border-radius: var(--r); }
.burger-btn span { display: block; width: 18px; height: 2px; background: var(--text-2); border-radius: 2px; }
.mobile-drawer { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0; background: var(--bg-2); z-index: 999; overflow-y: auto; border-top: 1px solid var(--border); flex-direction: column; padding: 8px; }
.mobile-drawer.open { display: flex; }
.mobile-drawer a { display: flex; align-items: center; padding: 10px 14px; border-radius: var(--r); color: var(--text-2); font-size: 14px; transition: all var(--transition); }
.mobile-drawer a:hover { background: var(--bg-hover); color: var(--text); }
.drawer-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); padding: 16px 14px 4px; }
.drawer-divider { height: 1px; background: var(--border); margin: 6px 0; }
.drawer-auth { display: flex; flex-direction: column; gap: 8px; padding: 16px 0 0; }
.main-content { padding-top: var(--nav-height); min-height: 100vh; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: var(--r); font-size: 13px; font-weight: 600; transition: all var(--transition); white-space: nowrap; cursor: pointer; border: 1px solid transparent; letter-spacing: 0.02em; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-2); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* AVATAR */
.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-card); flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; }

/* DROPDOWN */
.dropdown-wrapper { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px; background: var(--bg-card); border: 1px solid var(--border-2); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0,0,0,0.5); overflow: hidden; z-index: 200; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; width: 100%; padding: 8px 14px; color: var(--text-2); font-size: 13px; transition: all var(--transition); text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-divider { height: 1px; background: var(--border); margin: 3px 0; }

/* NOTIF BELL */
.notif-bell { position: relative; cursor: pointer; color: var(--text-2); padding: 6px; border-radius: var(--r); transition: all var(--transition); }
.notif-bell:hover { background: var(--bg-hover); color: var(--text); }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; background: #e3342f; border-radius: 50%; border: 2px solid var(--bg-2); }

/* FORMS */
.input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); padding: 7px 12px; outline: none; transition: border-color var(--transition); font-size: 14px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.input::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 90px; }
.label { display: block; font-size: 11px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-error { font-size: 12px; color: var(--danger); }

/* CARDS */
.card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.card-sm { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }

/* BADGE */
.badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }

/* TABS */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn { padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--transition); letter-spacing: 0.05em; text-transform: uppercase; }
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { color: var(--accent-2); border-bottom-color: var(--accent); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 24px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.6); animation: modal-in 0.18s ease; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.97) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 15px; font-weight: 700; }

/* TOAST */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-card); border: 1px solid var(--border-2); border-radius: var(--r); padding: 10px 16px; min-width: 240px; max-width: 340px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 10px; font-size: 13px; animation: toast-in 0.2s ease; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent-2); }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* MISC */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--text-3); font-size: 13px; }
.empty-state { padding: 24px; color: var(--text-3); font-size: 13px; text-align: center; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .flex-1 { flex: 1; } .flex-wrap { flex-wrap: wrap; }

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .burger-btn { display: flex; }
  .toast-container { bottom: 14px; right: 14px; left: 14px; }
  .toast { min-width: unset; max-width: 100%; }
}
