body {
  transition: 0.3s;
}

.home-hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.18), rgba(39, 39, 42, 0.7)),
    rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  border-radius: 1rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.75fr);
  margin-bottom: 2rem;
  padding: 2rem;
}

.home-quote {
  background: rgba(9, 9, 11, 0.5);
  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
}

.home-quote p {
  color: rgb(250 204 21);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-quote span {
  color: rgb(212 212 216);
  margin-top: 0.75rem;
}

.exam-card {
  background: rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  border-radius: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s;
}

.exam-card:hover {
  border-color: rgb(217 119 6);
  transform: translateY(-2px);
}

.exam-card strong {
  font-size: 1.25rem;
}

.exam-card span:not(.exam-card-tag) {
  color: rgb(161 161 170);
}

.exam-card-tag {
  align-self: flex-start;
  background: rgba(217, 119, 6, 0.16);
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-radius: 999px;
  color: rgb(251 191 36);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
}

.home-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.builder-panel,
.entry-card {
  background: rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  border-radius: 0.8rem;
  padding: 1rem;
}

.stack-form,
.diary-form {
  display: grid;
  gap: 1rem;
}

.stack-form label {
  color: rgb(212 212 216);
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.stack-form input,
.stack-form textarea,
.entry-form input,
.diary-form select,
.diary-form textarea {
  background: rgb(9 9 11);
  border: 1px solid rgb(63 63 70);
  border-radius: 0.65rem;
  color: rgb(244 244 245);
  padding: 0.75rem;
  width: 100%;
}

.primary-btn {
  background: rgb(217 119 6);
  border-radius: 0.65rem;
  color: white;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.form-message {
  color: rgb(161 161 170);
  min-height: 1.25rem;
}

.form-message.success {
  color: rgb(74 222 128);
}

.form-message.error {
  color: rgb(248 113 113);
}

.workspace-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.workspace-nav button {
  background: rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  border-radius: 0.75rem;
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.workspace-nav button.active {
  background: rgb(217 119 6);
}

.entry-form {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  margin-bottom: 1rem;
}

.entry-list {
  display: grid;
  gap: 0.85rem;
}

.entry-card {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.entry-card span,
.entry-card p,
.empty-state {
  color: rgb(161 161 170);
}

.entry-card button {
  color: rgb(248 113 113);
}

.card {
  background: rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  border-radius: 1rem;
  padding: 1rem;
}

.card-title {
  color: rgb(161 161 170);
  font-size: 0.9rem;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tab-btn {
  background: rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  padding: 0.7rem 1rem;
  border-radius: 0.8rem;
  white-space: nowrap;
}

.tab-btn.active {
  background: rgb(217 119 6);
}

.subject-card {
  background: rgb(24 24 27);
  border: 1px solid rgb(39 39 42);
  border-radius: 1rem;
  padding: 1rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgb(39 39 42);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: rgb(217 119 6);
}

.topic-table {
  width: 100%;
  border-collapse: collapse;
}

.topic-table th,
.topic-table td {
  padding: 1rem;
  border-bottom: 1px solid rgb(39 39 42);
}

.topic-table th {
  background: rgb(24 24 27);
  color: rgb(161 161 170);
  text-align: left;
}

.topic-table th:last-child,
.topic-table td:last-child {
  min-width: 320px;
  width: 38%;
}

.topic-table tr:hover {
  background: rgba(255,255,255,0.02);
}

textarea {
  resize: vertical;
}

@media (max-width: 768px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .home-grid,
  .entry-form {
    grid-template-columns: 1fr;
  }
}
