:root {
  --bg: #777;
  --panel: #c0c0c0;
  --soft-panel: #f5f5f5;
  --teal: #008080;
  --teal-dark: #004c4c;
  --teal-mid: #006666;
  --student-primary: #b87582;
  --student-dark: #7f4a55;
  --text: #2f2f2f;
  --white: #f5f5f5;
  --shadow: rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 10px;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 100%;
  max-width: 520px;
  min-height: calc(100vh - 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 8px 18px var(--shadow);
  padding: 18px;
  text-align: center;
}

.screen.active {
  display: block;
}

h1,
h2,
h3 {
  font-family: 'Gagalin', Arial, sans-serif;
  letter-spacing: 1px;
  font-weight: normal;
  margin-top: 0;
  color: var(--teal);
}

.admin-theme {
  background: #a8a8a8;
}

.admin-theme h2,
.admin-theme h3 {
  color: var(--teal-dark);
}

.student-theme {
  background: #d6cdcd;
}

.student-theme h2,
.student-theme h3 {
  color: var(--student-dark);
}



.app-logo {
  width: 38vw;
  max-width: 120px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: block;
}

.subtitle,
.helper-text,
.mini-text {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.4;
}

.auth-box {
  background: var(--soft-panel);
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
  border: 1px solid rgba(0, 128, 128, 0.25);
}

.hidden {
  display: none;
}

input,
select {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid var(--teal);
  font-size: 1rem;
  color: var(--teal-dark);
  margin: 10px 0 14px;
  background: var(--white);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: 'Gagalin', Arial, sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 4px 8px rgba(0,0,0,0.16);
  width: 100%;
  min-height: 48px;
}

button:active {
  transform: scale(0.97);
}

.admin-theme button {
  background: var(--teal-dark);
}

.student-theme button {
  background: var(--student-dark);
}

.small-btn {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.top-bar,
.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-bottom: 2px solid rgba(0, 0, 0, 0.18);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  text-align: left;
  padding: 18px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: white;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-btn {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-section {
  background: var(--soft-panel);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.task-card {
  background: #f5f5f5;
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  border-left: 6px solid var(--student-dark);
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  margin-bottom: 10px;
}

.admin-task-card {
  border-left-color: var(--teal-dark);
}

.task-title {
  font-weight: bold;
  color: #222;
  margin-bottom: 5px;
}

.task-meta {
  font-size: 0.85rem;
  color: #555;
}

.status-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #e5e4e2;
  color: #222;
}

.error-message {
  color: #8b0000;
  font-weight: bold;
  min-height: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--soft-panel);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--teal-dark);
}
.subject-panel h3 {
  margin-bottom: 14px;
}

.subject-add-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.subject-add-row input {
  margin: 0;
}

.enter-btn {
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 14px;
  font-size: 1.4rem;
  font-family: Arial, sans-serif;
}

.pending-subject-chip {
  background: #e5e4e2;
  color: #333;
  border-radius: 999px;
  padding: 8px 12px;
  margin: 6px 0;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pending-subject-chip button {
  width: auto;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.save-btn {
  margin-top: 12px;
}

#modify-subject-box {
  margin-top: 12px;
}

.status-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.status-display {
  background: #e5e4e2;
  color: #333;
  border-radius: 12px;
  padding: 12px;
  font-weight: bold;
  text-align: left;
  font-size: 0.95rem;
}

.status-toggle-btn {
  width: auto;
  min-width: 130px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.8rem;
}

@media (max-width: 420px) {
  .status-action-row {
    grid-template-columns: 1fr;
  }

  .status-toggle-btn {
    width: 100%;
  }
}





@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}
