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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  min-height: 100vh;
}

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

.navbar {
  background: white;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.navbar ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar li {
  flex: 1;
}

.navbar a {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: #495057;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
  background: #f8f9fa;
  color: #2c3e50;
  border-bottom-color: #495057;
}

.content-card {
  background: white;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.content-card h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
  display: inline-block;
}

.content-card h3 {
  color: #495057;
  font-size: 1.4rem;
  margin: 25px 0 15px 0;
  padding-left: 15px;
  border-left: 3px solid #6c757d;
}

.content-card p {
  margin-bottom: 15px;
  text-align: justify;
  font-size: 1.1rem;
  color: #495057;
}

.content-card ul {
  margin: 15px 0;
  padding-left: 30px;
}

.content-card li {
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: #495057;
}

.highlight-box {
  background: #f8f9fa;
  color: #495057;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #dee2e6;
}

.highlight-box h4 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-align: center;
  color: #2c3e50;
}

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.accounts-table th {
  background: #495057;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
}

.accounts-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.accounts-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.accounts-table tr:hover {
  background-color: #e9ecef;
}

.accounts-section {
  margin-bottom: 40px;
}

.accounts-section h3 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #495057;
  display: inline-block;
}

.accounts-section h4 {
    color: #495057;
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
    padding-left: 15px;
    border-left: 3px solid #6c757d;
}

.accounts-section h5 {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 20px 0 12px 0;
    padding-left: 20px;
    border-left: 2px solid #adb5bd;
}

.accounts-category {
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.category-summary {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-summary:hover {
    background: #e9ecef;
}

.category-summary::-webkit-details-marker {
    display: none;
}

.category-summary::after {
    content: '▼';
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

details[open] .category-summary::after {
    transform: rotate(180deg);
}

.category-summary h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.6rem;
    padding-bottom: 0;
    border-bottom: none;
    display: inline;
}

.category-description {
    color: #6c757d;
    font-size: 1rem;
    font-style: italic;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.account-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #495057;
}

.account-card .account-number {
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: #2c3e50;
  background: #e9ecef;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: inline-block;
}

.account-card .account-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.account-card .account-type {
  background: #495057;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-card .account-description {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.5;
}

.account-number {
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: #2c3e50;
  background: #e9ecef;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.account-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.account-description {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.4;
}

.practice-section {
  background: #e9ecef;
  color: #495057;
  padding: 25px;
  border-radius: 8px;
  margin: 25px 0;
  border: 1px solid #dee2e6;
}

.practice-section h3 {
  color: #2c3e50;
  border-left: 3px solid #495057;
  padding-left: 15px;
  margin-bottom: 20px;
}

.practice-section ol {
  padding-left: 25px;
}

.practice-section li {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.formula {
  background: #495057;
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  margin: 20px 0;
}

.engineering-note {
  background: #fff3cd;
  color: #856404;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #ffeaa7;
}

.engineering-note h4 {
  color: #856404;
  margin-bottom: 10px;
}

.engineering-note ul {
  color: #856404;
  margin: 15px 0;
  padding-left: 25px;
}

.engineering-note li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.t-account-example {
  margin: 25px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.t-account-example h4 {
  color: #2c3e50;
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.2rem;
}

.t-account {
  background: white;
  border: 2px solid #495057;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.t-account-header {
  background: #495057;
  color: white;
  padding: 15px;
  text-align: center;
  border-bottom: 2px solid #495057;
}

.t-account-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.t-account-number {
  font-size: 0.9rem;
  opacity: 0.9;
}

.t-account-body {
  display: flex;
  min-height: 200px;
}

.t-account-left,
.t-account-right {
  flex: 1;
  padding: 15px;
  border-right: 1px solid #dee2e6;
}

.t-account-right {
  border-right: none;
}

.t-account-label {
  background: #6c757d;
  color: white;
  padding: 8px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.t-account-entry {
  padding: 8px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9rem;
  border-left: 3px solid #dee2e6;
}

.t-account-total {
  background: #e9ecef;
  padding: 10px;
  margin-top: 15px;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  border: 1px solid #ced4da;
}

.t-account-balance {
  background: #495057;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 1.1rem;
  border-top: 2px solid #495057;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .navbar ul {
    flex-direction: column;
  }

  .accounts-table {
    font-size: 0.9rem;
  }

  .accounts-table th,
  .accounts-table td {
    padding: 10px;
  }

  .t-account-body {
    flex-direction: column;
    min-height: auto;
  }

  .t-account-left,
  .t-account-right {
    border-right: none;
    border-bottom: 1px solid #dee2e6;
  }

  .t-account-right {
    border-bottom: none;
  }

  .t-account-entry {
    font-size: 0.85rem;
  }

  .accounts-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .account-card {
    padding: 15px;
  }

  .account-card .account-name {
    font-size: 1rem;
  }

      .account-card .account-description {
        font-size: 0.9rem;
    }
    
    .category-summary {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .category-summary h3 {
        font-size: 1.4rem;
    }
    
    .accounts-section h5 {
        font-size: 1rem;
        padding-left: 15px;
    }
    
    .journal-table {
        font-size: 0.8rem;
    }
    
    .journal-table th,
    .journal-table td {
        padding: 4px 3px;
    }
    
    .journal-table th {
        font-size: 0.75rem;
    }
    
    .journal-entry h4 {
        font-size: 1.1rem;
        padding: 12px 15px;
    }
    
    .back-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .concept-summary {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .concept-summary h3 {
        font-size: 1.2rem;
    }
    
    .concept-content {
        padding: 15px;
    }
    
    .concept-content h4 {
        font-size: 1.1rem;
        padding-left: 12px;
    }
    
    .practice-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .practice-card {
        padding: 20px;
    }
    
    .practice-title {
        font-size: 1.2rem;
    }
    
    .practice-description {
        font-size: 0.9rem;
    }
    
    .unit-preview {
        padding: 20px;
    }
    
    .unit-link {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Estilos para el libro de diario */
.journal-entries {
    margin: 30px 0;
}

.journal-entry {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.journal-entry h4 {
    background: #495057;
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.2rem;
    text-align: center;
}

.journal-table {
    overflow-x: auto;
}

.journal-table table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.journal-table th {
    background: #f8f9fa;
    color: #495057;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
}

.journal-table td {
    padding: 10px 8px;
    text-align: left;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

.journal-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: #495057;
}

.journal-table td:nth-child(2) {
    text-align: center;
    font-weight: 500;
}

.journal-table td:nth-child(3) {
    font-weight: 500;
    color: #2c3e50;
}

.journal-table .debit {
    color: #28a745;
    font-weight: 600;
    text-align: right;
}

.journal-table .credit {
    color: #dc3545;
    font-weight: 600;
    text-align: right;
}

.journal-table .separator {
    background: #f8f9fa;
    height: 20px;
}

.journal-table .separator td {
    border: none;
    background: #f8f9fa;
}

.explanation-section {
    background: #e9ecef;
    color: #495057;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid #dee2e6;
}

.explanation-section h4 {
    color: #2c3e50;
    border-left: 3px solid #495057;
    padding-left: 15px;
    margin-bottom: 15px;
}

/* Estilos para el botón de regresar */
.back-button-container {
    margin-bottom: 20px;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #6c757d;
}

.back-button:hover {
    background: #495057;
    border-color: #495057;
    transform: translateY(-1px);
}

/* Estilos para las secciones de conceptos */
.concept-section {
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.concept-summary {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.concept-summary:hover {
    background: #e9ecef;
}

.concept-summary::-webkit-details-marker {
    display: none;
}

.concept-summary::after {
    content: '▼';
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

details[open] .concept-summary::after {
    transform: rotate(180deg);
}

.concept-summary h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    padding-bottom: 0;
    border-bottom: none;
    display: inline;
}

.concept-description {
    color: #6c757d;
    font-size: 0.95rem;
    font-style: italic;
}

.concept-content {
    padding: 20px;
    background: white;
}

.concept-content h4 {
    color: #495057;
    font-size: 1.2rem;
    margin: 20px 0 12px 0;
    padding-left: 15px;
    border-left: 3px solid #6c757d;
}

.concept-content h4:first-child {
    margin-top: 0;
}

/* Estilos para las prácticas */
.practice-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.practice-links h3 {
    color: #2c3e50;
    font-size: 1.6rem;
    margin-bottom: 25px;
    text-align: center;
}

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

.practice-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.practice-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #495057;
}

.practice-number {
    background: #495057;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.practice-title {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.practice-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Estilos para la vista previa de la unidad */
.unit-preview {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.unit-preview ul {
    margin-bottom: 25px;
}

.unit-preview li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.unit-link-container {
    text-align: center;
    margin-top: 20px;
}

.unit-link {
    display: inline-block;
    padding: 15px 30px;
    background: #495057;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid #495057;
}

.unit-link:hover {
    background: #2c3e50;
    border-color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
