/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, sans-serif;
  background-color: #f9fafb;
  color: #1a202c;
}

a {
  color: #2b6cb0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3748;
}

.header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-content {
  padding: 2rem 0;
  min-height: 65vh;
}

.sidebar {
  background: #edf2f7;
  border-radius: 8px;
  padding: 1.5rem;
}

.footer {
  background: #2d3748;
  color: #e2e8f0;
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
}

/* Components */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  border: none;
}

.btn-primary {
  background: #3182ce;
  color: #ffffff;
}

.btn-primary:hover {
  background: #2b6cb0;
}

.btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

/* Form elements */
input, textarea, select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49,130,206,0.2);
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: #718096; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }

/* Responsive grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .header nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Fonts - self-hosted */
@font-face {
  font-family: 'Roboto';
  src: local('Roboto'), local('Roboto-Regular'),
       url('/fonts/roboto-v30-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}