/* ============================================================
   assets/css/style.css
   Global styles for Google Forms Clone
   ============================================================ */

/* ── Root Variables ─────────────────────────────────────── */
:root {
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --success: #0f9d58;
  --danger: #d93025;
  --warning: #f4b400;
  --bg-page: #f0f4f9;
  --bg-card: #ffffff;
  --text-main: #202124;
  --text-muted: #5f6368;
  --border: #dadce0;
  --shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, .07), 0 2px 4px rgba(0, 0, 0, .06);
  --radius: 8px;
  --radius-sm: 4px;
}

/* ── Base ─────────────────────────────────────────────────── */
body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Google Sans', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary) !important;
  letter-spacing: -.3px;
}

.navbar {
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

.card-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

/* ── Form Header Card ─────────────────────────────────────── */
.form-header-card {
  border-top: 8px solid var(--primary);
}

/* ── Section Card ─────────────────────────────────────────── */
.section-card {
  border-left: 4px solid var(--primary);
}

/* ── Question Card ────────────────────────────────────────── */
.question-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}

.question-card:hover {
  box-shadow: var(--shadow-md);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ── Badges ───────────────────────────────────────────────── */
.badge-draft {
  background-color: #fce8e6;
  color: var(--danger);
}

.badge-published {
  background-color: #e6f4ea;
  color: var(--success);
}

/* ── Stat Boxes (Dashboard) ───────────────────────────────── */
.stat-box {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.stat-box .stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}

.stat-box .stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .3rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Form Fill View ────────────────────────────────────────── */
.fill-form-container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ── Required asterisk ─────────────────────────────────────── */
.required-star {
  color: var(--danger);
  margin-left: 2px;
}

/* ── Drag handle for reordering ────────────────────────────── */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
}

/* ── Table responsive ─────────────────────────────────────── */
.table th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
}

/* ── Auth pages ────────────────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.auth-logo {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: .5rem;
}

/* ── Sidebar (teacher area) ────────────────────────────────── */
.sidebar {
  width: 240px;
  min-height: calc(100vh - 56px);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: fixed;
  top: 56px;
  left: 0;
  overflow-y: auto;
}

.sidebar .nav-link {
  color: var(--text-main);
  padding: .55rem 1.5rem;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  border-radius: 0 24px 24px 0;
  margin-right: 1rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #e8f0fe;
  color: var(--primary);
  font-weight: 600;
}

.main-content {
  margin-left: 240px;
  padding: 2rem;
  min-height: calc(100vh - 56px);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
}

/* ── Alert styling ─────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  font-size: .9rem;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  opacity: .4;
}

/* ── Option rows ───────────────────────────────────────────── */
.option-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
}

/* ── Export buttons ────────────────────────────────────────── */
.export-btn-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}