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

:root {
  --primary: #8B6F47;
  --primary-dark: #6B4E2E;
  --primary-light: #D4A574;
  --secondary: #2C3E50;
  --accent: #E8B4A0;
  --success: #27AE60;
  --warning: #F39C12;
  --danger: #E74C3C;
  --light: #ECF0F1;
  --dark: #2C3E50;
  --text: #34495E;
  --border: #BDC3C7;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 1.5rem 0;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.logo a {
  color: white;
  text-decoration: none;
}

.tagline {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.8;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 600px;
  margin: 0 auto;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  color: var(--primary-dark);
  font-size: 1.8rem;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Cards */
.card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
}

.btn-secondary {
  background: var(--light);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-content h2 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  transition: color 0.3s;
}

.close:hover {
  color: var(--danger);
}

/* Lists */
.list {
  list-style: none;
}

.list-item {
  padding: 0.75rem;
  background: var(--light);
  border-left: 4px solid var(--primary);
  margin-bottom: 0.5rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item span {
  font-size: 0.85rem;
  color: #7f8c8d;
}

/* Badges & Scores */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-primary {
  background: #E8F4F8;
  color: var(--primary);
}

.badge-success {
  background: #D5F4E6;
  color: var(--success);
}

.badge-warning {
  background: #FADBD8;
  color: var(--warning);
}

.badge-danger {
  background: #F5B7B1;
  color: var(--danger);
}

.metric {
  text-align: center;
  padding: 1rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text);
}

.metric-bar {
  width: 100%;
  height: 8px;
  background: var(--light);
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: 4px;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 2rem;
  color: #7f8c8d;
  font-style: italic;
}

.hidden {
  display: none !important;
}

/* Profiles Grid */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.profile-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.profile-card h3 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.profile-card p {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
  }

  .modal-content {
    width: 96%;
    padding: 1.5rem;
  }
}
