/*
 * Lingo4All Booking Platform - Design System
 * -------------------------------------------
 * Versão Final: Layout com formulário de registro único e corrigido.
 */

/* ==========================================================================
   1. Variáveis de Cores (Design Tokens)
   ========================================================================== */
:root {
  --background: hsl(210, 36%, 96%);
  --card: hsl(0, 0%, 100%);
  --text-dark: hsl(215, 25%, 27%);
  --text-muted: hsl(215, 16%, 47%);
  --primary-blue: hsl(213, 94% 68%);
  --primary-blue-hover: hsl(213, 94% 60%);
  --secondary-green: hsl(142, 76% 36%);
  --secondary-green-hover: hsl(142, 76% 30%);
  --destructive-red: hsl(0, 84% 60%);
  --border: hsl(213, 27% 92%);
  --input-bg: hsl(210, 36%, 96%);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --font-body: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
  --radius: 0.5rem;
}

/* ==========================================================================
   2. Estilos Globais e do Layout (Mobile First)
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
}
body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.page-container {
  max-width: 1280px;
  width: 100%;
  padding: 1rem;
}
.card-container {
  background-color: var(--card);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  width: 90%;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
}
.logo-card-container {
  background-color: var(--card);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  width: 90%;
  max-width: 450px;
  margin: 0 auto 1.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-login {
  height: 3.5rem;
  display: inline-block;
}
.title-login {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.subtitle-login {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.text-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}
.text-link:hover {
    text-decoration: underline;
}
.text-muted {
    color: var(--text-muted);
}
.body-base { font-size: 1rem; line-height: 1.625; }
.body-sm { font-size: 0.875rem; line-height: 1.5; }

/* ==========================================================================
   3. Componentes do Formulário
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.5rem;
}
.form-input {
  display: flex;
  height: 2.75rem;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--input-bg) !important;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--primary-blue);
}
.input-icon-container {
    position: relative;
}
.input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1rem;
}
.form-input-with-icon {
    padding-left: 2.5rem;
}
.form-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Estilos de botões */
.btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-primary {
  background-color: var(--primary-blue);
  color: var(--card);
}
.btn-primary:hover {
  background-color: var(--primary-blue-hover);
}
.btn-secondary {
  background-color: var(--text-muted);
  color: var(--card);
}
.btn-secondary:hover {
  background-color: var(--text-dark);
}
.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}
.btn-group .btn {
    width: 50%;
}
.btn-link {
    display: block;
    text-align: center;
    color: var(--primary-blue);
    font-size: 0.875rem;
    text-decoration: none;
}
.btn-link:hover {
    text-decoration: underline;
}
.forgot-password {
    text-align: right;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}
.forgot-password .btn-link {
    color: var(--text-muted);
}
.forgot-password .btn-link:hover {
    color: var(--primary-blue);
}

/* Estilos para alertas */
.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
}
.alert-danger {
    background-color: hsla(0, 84%, 60%, 0.1);
    color: var(--destructive-red);
    border: 1px solid hsla(0, 84%, 60%, 0.2);
}
.alert-success {
    background-color: hsla(142, 76%, 36%, 0.1);
    color: var(--secondary-green);
    border: 1px solid hsla(142, 76%, 36%, 0.2);
}

/* ==========================================================================
   4. Estilos Específicos das Páginas
   ========================================================================== */
.footer-login {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 1rem;
    margin-top: auto;
}
.footer-login a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer-login a:hover {
    text-decoration: underline;
}
.footer-login span {
    white-space: nowrap;
}

/* Portal */
.header-portal {
    background-color: var(--primary-blue);
    color: var(--card);
    padding: 2rem;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
}
.logout-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    background-color: var(--destructive-red);
    color: var(--card);
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}
.logout-btn:hover {
    background-color: hsl(0, 84%, 50%);
}
.professors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.professor-card {
    background-color: var(--card);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.professor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.professor-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-blue);
}
.footer-portal {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* ==========================================================================
   5. Media Queries
   ========================================================================== */
@media (max-width: 767px) {
    .logo-login { height: 2.5rem; }
    .title-login { font-size: 1.75rem; }
    .subtitle-login { font-size: 0.875rem; }
    .form-input { height: 2.75rem; }
    .form-input-with-icon { padding-left: 2.5rem; }
}
@media (min-width: 768px) {
    .card-container { max-width: 550px; }
    .logo-card-container { max-width: 550px; }
    .logo-login { height: 4rem; }
    .title-login { font-size: 2rem; }
    .subtitle-login { font-size: 1rem; }
    .form-input { height: 3.25rem; }
    .form-input-with-icon { padding-left: 3rem; }
    .input-icon { left: 1rem; }
}
@media (min-width: 1024px) {
    .card-container { max-width: 600px; }
    .logo-card-container { max-width: 600px; }
    .logo-login { height: 5rem; }
}