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

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

html { font-size: 15px; height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

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

h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 600; }
h3 { font-size: var(--fs-lg); font-weight: 600; }

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

/* Top navbar */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: var(--fs-lg); color: var(--text);
}
.navbar-brand .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; font-weight: 800;
}
.navbar-user {
  display: flex; align-items: center; gap: var(--gap);
}
.navbar-user .user-info {
  text-align: right; line-height: 1.3;
}
.navbar-user .user-name { font-weight: 600; font-size: var(--fs-sm); }
.navbar-user .user-role { font-size: var(--fs-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

/* Page content area */
.page-content {
  flex: 1; padding: var(--gap-lg);
  max-width: 1400px; width: 100%; margin: 0 auto;
}
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--gap-lg);
}
.page-title { font-size: var(--fs-2xl); font-weight: 700; }
.page-subtitle { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 4px; }

/* Loader */
.loader {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; color: var(--text-dim); font-size: var(--fs-lg);
}

/* Login page */
.login-container {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(129,140,248,0.06) 0%, transparent 60%),
              var(--bg-primary);
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-xl);
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-box h1 {
  text-align: center; margin-bottom: var(--gap-xs);
  background: linear-gradient(135deg, var(--accent), #818cf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-box .subtitle {
  text-align: center; color: var(--text-dim); font-size: var(--fs-sm);
  margin-bottom: var(--gap-lg);
}
.login-box .error-msg {
  background: var(--danger-dim); border: 1px solid var(--danger);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: var(--fs-sm); color: var(--danger); margin-bottom: var(--gap);
  display: none;
}
.login-box .version {
  text-align: center; font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--gap);
}

/* Responsive */
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 768px) {
  .navbar { padding: 10px 16px; }
  .page-content { padding: var(--gap); }
  .page-header { flex-direction: column; align-items: flex-start; gap: var(--gap-sm); }
}
