:root {
  --purple: #b174e7;
  --blue: #1c81e9;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-page,
.app-page {
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: 1.6rem;
  font-weight: 800;
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28, 129, 233, 0.12);
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
}

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

.small-btn {
  width: auto;
  padding: 10px 14px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-message {
  min-height: 20px;
  font-size: 0.92rem;
}

.form-message.error {
  color: #c62828;
}

.form-message.success {
  color: #167c3c;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header {
  margin-bottom: 16px;
}

.full-width {
  grid-column: 1 / -1;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}

.toggle-row input {
  width: auto;
  margin: 0;
  box-shadow: none;
}

.hidden-block {
  display: none;
}

.class-list,
.assignment-list {
  display: grid;
  gap: 12px;
}

.class-card,
.assignment-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.class-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.class-name,
.assignment-name {
  font-weight: 700;
  font-size: 1rem;
}

.class-meta,
.assignment-meta,
.assignment-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.assignment-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
}

.assignment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.pill {
  background: #eef4ff;
  color: var(--blue);
  padding: 6px 10px;
  border-radius: 999px;
  text-transform: capitalize;
  font-size: 0.82rem;
  font-weight: 700;
}

.empty-state-wrap {
  min-height: 80px;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row,
  .two-col {
    grid-template-columns: 1fr;
  }
}
.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background: #fff;
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-52%);
  pointer-events: none;
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 700;
}

.icon-preview-wrap {
  display: grid;
  gap: 8px;
}

.icon-preview-box {
  min-height: 88px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fafbff;
}

.icon-preview-placeholder {
  color: var(--muted);
  font-size: 0.92rem;
}

.class-icon-preview-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.class-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f6f8ff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.class-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.class-icon-fallback {
  font-size: 1.3rem;
}

.assignment-class-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.assignment-inline-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
