:root {
  --primary-color: #2c5aa0;
  --secondary-color: #6bb6ff;
  --accent-color: #ff6b6b;
  --text-color: #333;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --border-color: #ddd;
  --success-color: #51cf66;
  --warning-color: #ffd43b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

header h1 img {
  height: 40px;
  margin-right: 10px;
  flex-shrink: 0;
  max-width: 40px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

.card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input[type="range"] {
  width: 100%;
}

.range-value {
  text-align: center;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #1e4278;
}

.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #4a9fe6;
}

.btn-success {
  background-color: var(--success-color);
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* Messages */
.error {
  background-color: #ffe0e0;
  color: #d63031;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border-left: 4px solid #d63031;
}

.success {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border-left: 4px solid #28a745;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 400px;
  margin: 2rem 0;
}

/* Footer */
footer {
  background-color: var(--text-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  header h1 img {
    height: 32px;
    margin-right: 8px;
    max-width: 32px;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 2rem;
  }
}
