/* GRAINEE Dashboard — Common Styles */
/* Design tokens from docs/DESIGN_SYSTEM.md */

:root {
  --bg-page: #0E0E13;
  --bg-card: #151519;
  --bg-input: #1E1E24;
  --text-primary: #EDEDED;
  --text-secondary: #9D9DA8;
  --text-muted: #6B6B76;
  --accent: hsl(25, 85%, 65%);
  --accent-hover: hsl(25, 85%, 58%);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --border: #272729;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px rgba(0,0,0,0.15);
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; }

/* Toast notifications */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 14px 20px; border-radius: var(--radius-sm);
  color: #fff; font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow); pointer-events: auto;
  animation: toastIn 0.3s ease-out;
  max-width: 380px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Auth header */
.auth-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
}
.auth-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.auth-header-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem;
  color: var(--text-primary); text-decoration: none;
}
.auth-header-logo svg { width: 24px; height: 24px; color: var(--accent); }
.auth-header-nav { display: flex; align-items: center; gap: 20px; }
.auth-header-nav a {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.auth-header-nav a:hover, .auth-header-nav a.active { color: var(--text-primary); }
.auth-header-user {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-secondary); font-size: 0.85rem;
}
.auth-header-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}
.auth-header-logout {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.8rem; transition: all 0.2s;
}
.auth-header-logout:hover { border-color: var(--danger); color: var(--danger); }

/* Mobile burger for auth header */
.auth-header-burger {
  display: none; background: none; border: none; color: var(--text-primary);
  font-size: 1.4rem; cursor: pointer; padding: 4px;
}
@media (max-width: 768px) {
  .auth-header-nav { display: none; }
  .auth-header-burger { display: block; }
  .auth-header-nav.is-open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: 15px 20px; gap: 15px;
  }
}

/* Dashboard footer */
.dashboard-footer {
  text-align: center; padding: 30px 20px;
  color: var(--text-muted); font-size: 0.8rem;
  border-top: 1px solid var(--border); margin-top: 40px;
}

/* Loading spinner */
.spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 20px; color: var(--text-secondary);
}

/* Empty state */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 15px; display: block; }
.empty-state p { font-size: 0.95rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Responsive helpers */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
