:root {
  --primary-color: #1F4788;
  --secondary-color: #2E5C8A;
  --accent-color: #4A7BA7;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --border-color: #dee2e6;
}

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

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: #fff;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: bold;
}

.logo p {
  font-size: 0.9rem;
  opacity: 0.9;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--light-bg) 0%, #e9ecef 100%);
  border-radius: 10px;
  margin-bottom: 3rem;
}

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

.hero p {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

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

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

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

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

.card .price {
  font-size: 2rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin: 1rem 0;
}

.card .price-label {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

.card ul {
  list-style: none;
  margin: 1rem 0;
}

.card ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.card ul li:last-child {
  border-bottom: none;
}

.card ul li:before {
  content: "✓ ";
  color: var(--success-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(31, 71, 136, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.875rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
}

thead {
  background: var(--primary-color);
  color: white;
}

th, td {
  padding: 1rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background-color: var(--light-bg);
}

tbody tr:last-child {
  border-bottom: none;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 5px;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.alert-success {
  background-color: #d4edda;
  border-color: var(--success-color);
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: var(--danger-color);
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: var(--warning-color);
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #17a2b8;
  color: #0c5460;
}

/* Pricing Calculator */
.calculator {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin: 2rem 0;
}

.calculator h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.price-display {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin: 2rem 0;
}

.price-display .amount {
  font-size: 3rem;
  font-weight: bold;
  margin: 1rem 0;
}

.price-breakdown {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 5px;
  margin: 1rem 0;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breakdown-item:last-child {
  border-bottom: none;
  font-weight: bold;
  font-size: 1.2rem;
  padding-top: 1rem;
  border-top: 2px solid var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--dark-text);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  border-top: 1px solid #444;
}

/* Admin Panel Specific */
.admin-nav {
  background: white;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.admin-nav ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  list-style: none;
  display: flex;
  gap: 2rem;
}

.admin-nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.admin-nav a:hover {
  color: var(--secondary-color);
}

.admin-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-box {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.stat-box .number {
  font-size: 3rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.stat-box .label {
  font-size: 1rem;
  opacity: 0.9;
}

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

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.875rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

/* Loading spinner */
.spinner {
  border: 4px solid var(--light-bg);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

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

.badge-warning {
  background-color: var(--warning-color);
  color: var(--dark-text);
}

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

.badge-info {
  background-color: #17a2b8;
  color: white;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: #666;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
/* Additional styles for v3.0 */
.hidden {
  display: none !important;
}

.form-section {
  background: white;
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.form-section.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.chapter-grid {
  overflow-x: auto;
  margin-top: 1rem;
}

.chapter-grid table {
  min-width: 900px;
}

.price-display {
  background: linear-gradient(135deg, #1F4788 0%, #2E5C8A 100%);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin: 2rem 0;
}

.price-display .amount {
  font-size: 3rem;
  font-weight: bold;
  margin: 1rem 0;
}

.price-breakdown {
  background: white;
  padding: 1.5rem;
  border-radius: 5px;
  margin-top: 1rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.breakdown-item:last-child {
  border-bottom: none;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid #1F4788;
}

.mt-3 {
  margin-top: 1rem;
}
