:root {
  --primary: #024a85;
  --primary-light: #3a6fa5;
  --primary-dark: #01345f;

  --secondary-green: #00a172;
  --secondary-yellow: #ffda5e;

  --accent-pink: #ea4a79;
  --accent-cyan: #45cffb;
  --accent-dark-pink: #ad2358;

  --bg-main: #f0f4f8;
  --bg-white: #ffffff;
  --text-dark: #212529;
  --text-light: #ffffff;

  --sidebar-bg: #01264a;
  --sidebar-width: 220px;

  --border-radius: 12px;
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
}


* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  top: -150px; right: -100px;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  background: rgba(0,161,114,0.12);
  border-radius: 50%;
  bottom: -100px; left: -80px;
}

.login-card {
  background: var(--bg-white);
  border-radius: 20px;
  padding: 50px 40px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
  box-shadow: 0 8px 20px rgba(2,74,133,0.3);
}

.login-card h2 {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card p.subtitle {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.login-card .form-label {
  text-align: left;
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.login-card .form-control {
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  padding: 12px 15px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  margin-bottom: 18px;
}

.login-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2,74,133,0.12);
  outline: none;
}

.btn-login {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.login-footer-note {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #aaa;
}

.portal-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-icon {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
}

.sidebar-logo-text {
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-logo-text span {
  display: block;
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 400;
}

.sidebar-nav {
  padding: 24px 0;
  flex: 1;
}

.sidebar-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
  padding: 0 20px 8px;
  margin-top: 10px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,0.07);
  color: white;
  border-left-color: var(--accent-cyan);
}

.sidebar-nav a.active {
  background: rgba(69,207,251,0.1);
}

.sidebar-nav a .nav-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.sidebar-bottom {
  padding: 16px 12px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: rgba(234,74,121,0.15);
  color: var(--accent-pink);
  border: 1px solid rgba(234,74,121,0.25);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--accent-pink);
  color: white;
  border-color: var(--accent-pink);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  background: var(--bg-white);
  padding: 22px 36px;
  border-bottom: 1px solid #e8ecf0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-header-badge {
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.page-header-sub {
  color: #888;
  font-size: 0.85rem;
}

.content-area {
  padding: 32px 36px;
  flex: 1;
}

.curriculum-section {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.curriculum-title {
  color: var(--accent-cyan);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.curriculum-title-sub {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--secondary-yellow);
  padding-bottom: 10px;
  margin-bottom: 20px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.quarter-item {
  margin-bottom: 18px;
}

.quarter-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.q1 { background: var(--accent-pink); }
.q2 { background: var(--secondary-green); }
.q3 { background: var(--primary); }
.q4 { background: var(--accent-cyan); color: var(--primary-dark); }

.quarter-item ul {
  padding-left: 20px;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.9;
}

.welcome-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--border-radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(2,74,133,0.25);
}

.welcome-card h3 { font-size: 1.4rem; margin-bottom: 6px; }
.welcome-card p { opacity: 0.85; font-size: 0.9rem; }

.welcome-card-icon {
  font-size: 4rem;
  opacity: 0.25;
}


.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
}

.stat-card.green { border-top-color: var(--secondary-green); }
.stat-card.yellow { border-top-color: var(--secondary-yellow); }
.stat-card.pink { border-top-color: var(--accent-pink); }

.stat-card .stat-label {
  font-size: 0.78rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
}


.notebooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.notebook-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: default;
  transition: transform 0.25s, box-shadow 0.25s;
}

.notebook-card:hover {
  transform: translateY(-6px)   (1.05);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.notebook-img-wrap {
  overflow: hidden;
  height: 160px;
  background: #e8ecf0;
}

.notebook-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.notebook-card:hover .notebook-img-wrap img {
  transform: scale(1.12);
}

.notebook-info {
  padding: 16px;
}

.notebook-subject {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.notebook-meta {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 6px;
}

.notebook-teacher {
  font-size: 0.82rem;
  color: #666;
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.task-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border-top: 4px solid var(--accent-cyan);
  transition: transform 0.2s, box-shadow 0.2s;
}

.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.task-subject {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.task-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.task-deadline {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 16px;
}

.btn-task {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
}

.btn-task:hover {
  background: #2db8e8;
  transform: translateY(-1px);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

.profile-avatar-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 36px 24px;
  text-align: center;
}

.avatar-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
}

.avatar-wrapper img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 16px rgba(2,74,133,0.2);
}

.avatar-wrapper .avatar-edit-btn {
  position: absolute;
  bottom: 4px; right: 4px;
  background: var(--secondary-green);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.avatar-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.avatar-section {
  font-size: 0.82rem;
  color: #888;
}

.profile-info-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.profile-info-card h5 {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary-yellow);
}

.info-row {
  margin-bottom: 18px;
}

.info-label {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.btn-change-pass {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}

.btn-change-pass:hover { background: #2db8e8; }

/* ---------- FOOTER ---------- */
.portal-footer {
  background: var(--bg-white);
  border-top: 1px solid #e5e5e5;
  padding: 12px 36px;
  font-size: 0.78rem;
  color: #aaa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: var(--sidebar-width);
}

.portal-footer a {
  color: var(--primary);
  text-decoration: none;
}

.login-footer {
  position: fixed;
  bottom: 0; right: 0;
  padding: 10px 18px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  z-index: 10;
}

input[type="file"] { display: none; }
