/* Shared login/auth theme — Educacional Elos
   Used by: avaelos/login/index.html, avaelos/login/professor.html,
            login/secretaria.php, login/financeiro.html */

:root {
  --brand-primary: #3579b1;
  --brand-primary-dark: #1d4a6e;
  --brand-accent: #f2a900;
  --brand-accent-deep: #a9740a;
  --ink: #172431;
  --ink-soft: #56697c;
  --paper: #faf7f1;
  --paper-alt: #eef1ee;
  --line: rgba(23, 36, 49, 0.1);
  --font-display: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

/* Tab navigation between the four portals */
.tabbar {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.tabbar a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tabbar a i {
  font-size: 14px;
}

.tabbar a:hover {
  color: var(--ink);
  text-decoration: none;
}

.tabbar a.active {
  color: var(--ink);
  border-bottom-color: var(--brand-accent);
}

.tabbar a:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: -2px;
}

/* Page shell */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-wrap {
  width: 100%;
  max-width: 360px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo img {
  width: 90px;
  max-width: 100%;
  height: auto;
}

/* Card */
.auth-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 28px 28px;
  box-shadow: 0 16px 32px rgba(23, 36, 49, 0.08);
  text-align: center;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-accent);
}

.auth-card .icon-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--ink));
  box-shadow: 0 0 0 5px rgba(242, 169, 0, 0.14);
  color: #fff;
  font-size: 28px;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  margin: 0 0 4px;
}

.auth-card p.subtitle {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0 0 24px;
}

/* Fields */
.auth-field {
  position: relative;
  margin-bottom: 16px;
  text-align: left;
}

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

.auth-field i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
}

.auth-input {
  width: 100%;
  height: 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 4px 14px 4px 38px;
}

.auth-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(53, 121, 177, 0.15);
}

.auth-forgot {
  text-align: right;
  margin: -6px 0 16px;
}

.auth-forgot a {
  color: var(--ink-soft);
  font-size: 12px;
  text-decoration: none;
}

.auth-forgot a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* Submit control — applies to both <button type=submit> and <input type=submit> */
.auth-submit {
  display: block;
  width: 100%;
  height: 44px;
  background-color: var(--brand-primary);
  border: none;
  cursor: pointer;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
  transition: background-color 0.2s ease;
}

.auth-submit:hover {
  background-color: var(--brand-primary-dark);
}

.auth-submit:active {
  opacity: 0.85;
}

.auth-submit:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9ca3af;
  font-size: 12px;
  margin: 20px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-secondary {
  display: block;
  width: 100%;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.auth-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  text-decoration: none;
}

.auth-support {
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-soft);
}

.auth-support a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #1f9e56;
  font-weight: 600;
  text-decoration: none;
}

.auth-support a:hover {
  text-decoration: underline;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

::placeholder {
  color: #9ca3af;
}

.modal-content {
  color: var(--ink);
  font-family: var(--font-body);
}

.modal-content .modal-title {
  font-family: var(--font-display);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
