:root {
  --blue: #0a57d5;
  --blue-strong: #0b4fb7;
  --blue-soft: #e7eefc;
  --page: #edf3f9;
  --sidebar: #ffffff;
  --text: #20242d;
  --muted: #6f7785;
  --border: #dbe3ee;
  --card: #ffffff;
  --warning-bg: #fee7c6;
  --warning-border: #ba7d25;
  --success: #0ea272;
  --dark: #24272e;
  --input-border: #5f6676;
  --shadow: 0 10px 26px rgba(41, 73, 123, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--page);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-only {
  display: none;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 41.5%) 1fr;
}

.login-panel {
  background: var(--dark);
  color: #fff;
  padding: 46px 48px 36px;
  display: flex;
  flex-direction: column;
}

.login-brand {
  width: 185px;
  margin-bottom: 68px;
}

.login-copy h1 {
  margin: 0 0 12px;
  font-size: 3.2rem;
  line-height: 1.05;
  font-weight: 800;
}

.login-copy p {
  margin: 0;
  max-width: 420px;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.login-form {
  margin-top: 48px;
  max-width: 438px;
}

.form-step {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-group label {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field-group input {
  height: 58px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: transparent;
  color: #fff;
  padding: 0 16px;
  font-size: 1rem;
  outline: none;
}

.field-group input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.password-row {
  position: relative;
}

.password-hint {
  margin: 8px 0 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.primary-button {
  height: 58px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #2373f1 0%, #1466e7 100%);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 102, 231, 0.28);
}

.ghost-button {
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 0;
  font-weight: 800;
  cursor: pointer;
}

.login-footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
}

.login-footer h2 {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.social-item {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.9);
}

.version {
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.95rem;
}

.login-visual {
  background: center / cover no-repeat url("https://login.anhanguera.com/img/bg.jpg");
}

.portal-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid #d8dee7;
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 10px;
}

.portal-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-brand-badge .brand-mark {
  flex: 0 0 auto;
}

.portal-brand-badge .brand-text {
  color: #222833;
}

.brand-mark {
  width: 28px;
  height: 34px;
  position: relative;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
}

.brand-mark::before {
  top: 0;
  border-bottom: 14px solid #e36e1b;
}

.brand-mark span {
  top: 10px;
  border-bottom: 12px solid #f68f2c;
}

.brand-mark::after {
  top: 18px;
  border-bottom: 10px solid #f4b24b;
}

.brand-text {
  font-weight: 800;
  line-height: 0.95;
  font-size: 1.02rem;
}

.sidebar-nav,
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav {
  margin-top: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  border-radius: 12px;
  padding: 0 14px;
  color: #1f2834;
  font-size: 1.02rem;
}

.sidebar-link.active {
  background: var(--blue-soft);
}

.sidebar-divider {
  height: 1px;
  background: #eef2f6;
  margin: 20px 0;
}

.sidebar-footer {
  margin-top: 6px;
}

.sidebar-grow {
  flex: 1;
}

.sidebar-link small {
  margin-left: auto;
  color: #2b69be;
}

.portal-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid #dde4ee;
  display: grid;
  grid-template-columns: minmax(280px, 540px) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 20px 0 10px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: flex-start;
  min-width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #26364d;
  cursor: pointer;
  padding: 0 8px 0 0;
  font-weight: 700;
  gap: 8px;
}

.topbar-brand {
  display: none;
  align-items: center;
  justify-content: center;
}

.topbar-search-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #1f2834;
}

.search-shell {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  background: #eef3fb;
  padding: 0 14px;
  color: #4c5563;
  font-size: 1rem;
}

.search-shell span {
  opacity: 0.82;
}

.top-icons {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 26px;
  color: #20242d;
}

.profile-area {
  border-left: 1px solid #dfe5ee;
  padding-left: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffb05c 0%, #d9675a 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.page {
  flex: 1;
  padding: 28px 32px 40px;
  background: var(--page);
}

.mobile-bottom-nav {
  display: none;
}

.mobile-overlay {
  display: none;
}

.page-header {
  margin-bottom: 28px;
}

.page-header.compact {
  margin-bottom: 22px;
}

.greeting {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  color: var(--blue);
}

.page-title {
  margin: 0 0 6px;
  font-size: 2.2rem;
  line-height: 1.1;
  font-weight: 800;
}

.page-subtitle {
  margin: 0;
  color: #232933;
  font-size: 1rem;
}

.section-title {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 800;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.quick-card,
.service-card,
.task-card,
.subject-card,
.tab-shell,
.filter-chip,
.empty-panel {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.quick-card,
.service-card {
  min-height: 120px;
  padding: 18px 18px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.quick-card strong,
.service-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.quick-card p,
.service-card p,
.task-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.task-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) 410px;
  gap: 16px;
  align-items: start;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-card {
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.task-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.progress {
  margin-top: 14px;
  height: 5px;
  border-radius: 999px;
  background: #dbe6df;
  overflow: hidden;
}

.progress > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--success);
}

.promo-card {
  min-height: 232px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(90deg, rgba(10, 36, 117, 0.96) 0%, rgba(7, 65, 167, 0.95) 58%, rgba(255, 255, 255, 0.14) 58%, rgba(255, 255, 255, 0.14) 100%),
    radial-gradient(circle at top left, rgba(255, 213, 80, 0.25), transparent 40%);
  color: #fff;
  padding: 22px 24px;
}

.promo-card h3 {
  margin: 0 0 10px;
  max-width: 220px;
  font-size: 2.35rem;
  line-height: 0.95;
  font-weight: 900;
  color: #ffe756;
}

.promo-card p {
  margin: 0;
  max-width: 250px;
  font-size: 0.98rem;
  line-height: 1.35;
}

.promo-side {
  position: absolute;
  inset: 0 0 0 auto;
  width: 37%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 50% 18%, #f3bba1 0 18%, transparent 19%),
    linear-gradient(180deg, transparent 0 34%, #d26b55 34% 62%, #3655b3 62% 100%);
}

.promo-badge {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 86px;
  height: 86px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.16);
}

.warning-box {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 28px;
}

.warning-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #8a5510;
}

.warning-box p {
  margin: 0 0 12px;
  font-size: 1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.finance-block-title {
  margin: 34px 0 18px;
  font-size: 1.1rem;
  font-weight: 900;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  color: var(--blue);
  font-weight: 800;
}

.empty-panel {
  min-height: 140px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.22);
}

.secretary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.secretary-card {
  min-height: 150px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.secretary-card strong {
  display: block;
  font-size: 1.02rem;
  margin: 14px 0 6px;
}

.secretary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.student-card-view {
  display: grid;
  place-items: center;
}

.student-card-frame {
  width: min(100%, 460px);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.student-card-frame img {
  display: block;
  width: 100%;
  border-radius: 22px;
}

.bill-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bill-row {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}

.bill-row strong,
.bill-row span {
  display: block;
}

.bill-row strong {
  font-size: 1rem;
}

.bill-row span {
  color: var(--muted);
  font-size: 0.96rem;
}

.bill-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e7f8f1;
  color: #127a58;
  font-weight: 800;
  white-space: nowrap;
}

.status-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #14a06f;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 800;
}

.tab-shell {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin: 10px 0 26px;
}

.tab-pill {
  min-width: 132px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  color: var(--blue);
}

.tab-pill.active {
  background: var(--blue);
  color: #fff;
}

.filters-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.filters-line strong {
  font-size: 1rem;
}

.select-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  color: #3467ac;
  font-weight: 700;
}

.result-count {
  margin: 0 0 18px;
  font-size: 0.98rem;
}

.subject-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.subject-card {
  padding: 18px 20px 22px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: #eef2f7;
  padding: 4px 8px;
  font-size: 0.92rem;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2e6dd8;
}

.status-badge.approved .status-dot {
  background: #15986b;
}

.status-badge.failed .status-dot {
  background: #df5752;
}

.subject-card h3 {
  margin: 16px 0 18px;
  font-size: 1.05rem;
}

.subject-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  color: #303740;
  font-size: 0.98rem;
}

.subject-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--blue-strong);
  font-weight: 800;
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.icon.large {
  width: 42px;
  height: 42px;
  color: #1f58b6;
}

.icon.small {
  width: 18px;
  height: 18px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .login-layout,
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    width: min(280px, calc(100vw - 24px));
    z-index: 30;
    border-right: 0;
    border-bottom-right-radius: 18px;
    box-shadow: 0 18px 30px rgba(32, 44, 68, 0.12);
  }

  body.menu-open .sidebar {
    display: flex;
  }

  body.menu-open .mobile-overlay {
    display: block;
    position: fixed;
    inset: 62px 0 0;
    background: rgba(22, 33, 52, 0.28);
    z-index: 20;
  }

  .topbar {
    grid-template-columns: 32px auto 1fr auto auto;
    gap: 8px;
  }

  .search-shell {
    min-width: 0;
  }

  .task-grid,
  .cards-grid,
  .service-grid,
  .secretary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .login-panel,
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-copy h1 {
    font-size: 2.4rem;
  }

  .greeting {
    font-size: 2.2rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .topbar {
    padding: 0 10px;
  }

  .top-icons {
    display: flex;
    gap: 14px;
    justify-self: auto;
  }

  .profile-area {
    border-left: 0;
    padding-left: 0;
  }

  .menu-toggle,
  .mobile-only {
    display: inline-flex;
  }

  .topbar-brand,
  .topbar-search-icon {
    display: inline-flex;
  }

  .topbar-brand .portal-brand-badge {
    gap: 6px;
  }

  .topbar-brand .brand-mark {
    width: 18px;
    height: 22px;
  }

  .topbar-brand .brand-mark::before,
  .topbar-brand .brand-mark::after,
  .topbar-brand .brand-mark span {
    border-left-width: 9px;
    border-right-width: 9px;
  }

  .topbar-brand .brand-mark::before {
    border-bottom-width: 9px;
  }

  .topbar-brand .brand-mark span {
    top: 7px;
    border-bottom-width: 8px;
  }

  .topbar-brand .brand-mark::after {
    top: 13px;
    border-bottom-width: 6px;
  }

  .topbar-brand .brand-text {
    font-size: 0.62rem;
    line-height: 0.9;
  }

  .search-shell {
    display: none;
  }

  .menu-toggle span {
    display: none;
  }

  .menu-toggle {
    width: 32px;
    min-width: 32px;
    padding: 0;
  }

  .menu-toggle .icon.small {
    width: 18px;
    height: 18px;
  }

  .topbar-search-icon {
    width: 28px;
    height: 28px;
  }

  .top-icons {
    gap: 10px;
  }

  .top-icons .icon {
    width: 19px;
    height: 19px;
  }

  .page {
    padding-bottom: 92px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #dbe3ee;
  }

  .mobile-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #2c3a51;
    font-size: 0.73rem;
    text-align: center;
  }

  .mobile-bottom-link.active {
    color: var(--blue);
    font-weight: 800;
  }

  .bill-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-area .icon.small {
    display: none;
  }

  .avatar {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }
}
