/* style.css – UI modern, responsiv, pentru Tema Sesiune */


:root {
  --bg: #f3f6fb;
  --bg-card: #ffffff;
  --bg-card-alt: #f9fbff;
  --border-soft: #dde5f0;
  --accent: #3f51b5;
  --accent-soft: #e3e7ff;
  --accent-strong: #283593;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --danger: #e53935;
  --warning: #fb8c00;
  --success: #43a047;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #e0e7ff 0, #f3f6fb 45%, #ffffff 100%);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */

.topbar {
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  background: linear-gradient(90deg, rgba(63, 81, 181, 0.95), rgba(103, 58, 183, 0.95));
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1rem;
  text-transform: uppercase;
}

.logo span {
  color: #ffeb3b;
}

.topbar-title {
  font-size: 0.95rem;
  opacity: 0.9;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-pill {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.3);
  font-size: 0.8rem;
}

/* Layout main */

.main-content {
  flex: 1;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.section {
  margin-bottom: 2rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.section-header p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
}

/* Cards */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.card-header {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(90deg, #f5f7ff, #edf2ff);
}

.card-header h1,
.card-header h2 {
  margin: 0;
  font-size: 1rem;
}

.card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  font-size: 0.95rem;
}

.card-empty {
  text-align: left;
}

/* Table */

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table thead {
  background: #eef2ff;
}

.table th,
.table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.table tbody tr:hover {
  background: #f9fbff;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: none;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
  background: var(--accent-strong);
}

.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--accent);
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-deadline {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge-green {
  background: rgba(67, 160, 71, 0.1);
  color: var(--success);
}

.badge-orange {
  background: rgba(251, 140, 0, 0.1);
  color: var(--warning);
}

.badge-red {
  background: rgba(229, 57, 53, 0.08);
  color: var(--danger);
}

/* Input row copy */

.copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}

.copy-input {
  flex: 1;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  font-size: 0.85rem;
}

/* Hints */

.hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Deadline states (fundal animat subtil) */

.deadline-info {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  background: #f9fafb;
  font-weight: 500;
}

body.deadline-48 .deadline-info {
  background: rgba(251, 192, 45, 0.15);
  border: 1px dashed #fbc02d;
}

body.deadline-24 .deadline-info {
  background: rgba(255, 152, 0, 0.18);
  border: 1px dashed #ff9800;
}

body.deadline-12 .deadline-info {
  background: rgba(244, 67, 54, 0.15);
  border: 1px dashed #e53935;
}

body.deadline-passed .deadline-info {
  background: rgba(128, 128, 128, 0.12);
  border: 1px dashed #9e9e9e;
}

/* Grid */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* Status buttons (profesor verdict) */

.status-buttons {
  display: inline-flex;
  gap: 0.3rem;
}

.status-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: #e5e7eb;
}

.status-btn.status-green {
  background: rgba(67, 160, 71, 0.35);
}

.status-btn.status-orange {
  background: rgba(251, 140, 0, 0.35);
}

.status-btn.status-red {
  background: rgba(229, 57, 53, 0.35);
}

.status-btn.active {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

/* Elev – întrebări */

.questions-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.question-card .question-text {
  margin-top: 0;
  font-weight: 500;
}

.teacher-answer {
  margin: 0.5rem 0 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.teacher-answer .label {
  font-weight: 600;
  margin-right: 0.25rem;
}

.meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.answer-text {
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 0.45rem 0.6rem;
  font-family: inherit;
  resize: vertical;
}

/* Simple form (elev login) */

.section-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}

.card-narrow {
  max-width: 420px;
  width: 100%;
}

.simple-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.simple-form label {
  font-size: 0.9rem;
}

.simple-form input {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

/* Footer */

.main-footer {
  padding: 0.6rem 1.5rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .main-content {
    padding-inline: 1rem;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding-inline: 1rem;
  }
  .topbar-title {
    display: none;
  }

  .section-header h1 {
    font-size: 1.25rem;
  }

  .table th,
  .table td {
    padding: 0.4rem 0.45rem;
  }

  .questions-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
