:root {
  --bg-1: #a4d88f;
  --bg-2: #7ec08b;
  --navy-900: #0d3468;
  --navy-700: #194d90;
  --slate-900: #15202e;
  --slate-700: #314052;
  --white: #ffffff;
  --off-white: #eef3f7;
  --danger: #b71e2f;
  --shadow: 0 18px 42px rgba(7, 28, 56, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow", sans-serif;
  color: var(--slate-900);
  background: #ffffff;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(420px, 100%);
}

.login-panel {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(2px);
}

.brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-pill {
  display: inline-block;
  background: var(--navy-900);
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 12px;
}

.brand-header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--navy-900);
}

.brand-header p {
  margin: 8px 0 0;
  color: var(--slate-700);
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  font-weight: 600;
  color: var(--navy-900);
}

.login-form input {
  border: 1px solid #b6c4d4;
  border-radius: 12px;
  height: 46px;
  padding: 0 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.login-form input:focus {
  border-color: var(--navy-700);
}

.login-form button {
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  height: 48px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.login-form button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.error-message {
  min-height: 20px;
  margin: 2px 0;
  color: var(--danger);
  font-weight: 600;
}

.card-panel {
  display: flex;
  justify-content: center;
}

.student-card {
  width: min(360px, 100%);
  background: var(--navy-700);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-top {
  background: linear-gradient(180deg, #082d59 0%, var(--navy-700) 100%);
  padding: 0 16px 18px;
  text-align: center;
  color: var(--white);
}

.card-title-bar {
  margin: 0 -16px;
  padding: 10px 16px 9px;
  background: #0b2c55;
}

.card-top h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.university {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.university-logo {
  width: 150px;
  max-width: 100%;
  height: auto;
}

.avatar {
  display: block;
  width: 92px;
  height: 112px;
  object-fit: cover;
  margin: 14px auto 0;
  border: 3px solid rgba(255, 255, 255, 0.45);
}

.student-name {
  margin: 12px 0 4px;
  font-size: 1.15rem;
  font-weight: 500;
}

.student-doc {
  margin: 0;
  opacity: 0.92;
  font-size: 0.82rem;
}

.card-bottom {
  margin: 16px;
  background: #f6f8fb;
  border-radius: 16px;
  padding: 12px 14px 16px;
  text-align: center;
}

.crest {
  margin: 0 auto 8px;
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.student-level {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: #465a74;
  font-weight: 600;
}

.course {
  margin: 0;
  font-size: 1.12rem;
  color: var(--navy-700);
  font-weight: 700;
}

.card-divider {
  margin: 10px auto 10px;
  width: 100%;
  max-width: 270px;
  border-bottom: 1px solid #d4dce5;
}

.meta {
  display: flex;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
}

.meta-label {
  display: block;
  color: #516170;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.meta strong {
  font-size: 1rem;
}

.qr {
  width: 150px;
  height: 150px;
  margin-top: 10px;
  background: var(--white);
  border: 6px solid var(--white);
}

.location {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #5b6775;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .app-shell {
    min-height: 100dvh;
    display: block;
    padding: 0;
  }

  .panel {
    width: 100%;
    min-height: 100dvh;
  }

  .login-panel {
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .card-panel {
    min-height: 100dvh;
  }

  .student-card {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .card-bottom {
    margin: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .meta {
    width: 100%;
  }
}
