/* =========================
   VARIÁVEIS DE CORES E SOMBRAS
   ========================= */
:root {
    --primary-color: #ff6b35;         /* Laranja principal */
    --secondary-color: #f7931e;       /* Laranja secundário */
    --accent-color: #ffd700;          /* Amarelo destaque */
    --dark-color: #2c3e50;            /* Azul escuro/neutro */
    --light-color: #ecf0f1;           /* Cinza claro */
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --gradient-secondary: linear-gradient(135deg, #ffd700 0%, #ff6b35 100%);
    --shadow-light: 0 4px 15px rgba(255, 107, 53, 0.1);
    --shadow-medium: 0 8px 25px rgba(255, 107, 53, 0.15);
    --shadow-heavy: 0 15px 35px rgba(255, 107, 53, 0.2);
}

/* =========================
   RESET E CONFIGURAÇÃO GLOBAL
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1rem; /* Base para o ajuste de fonte com JS */
}

/* =========================
   HEADER (CABEÇALHO)
   ========================= */
.header-custom {
    background: rgba(255, 255, 255, 0.459);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo-img {
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* =========================
   NAVEGAÇÃO DESKTOP
   ========================= */
.nav-button {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-button:hover::before,
.nav-button.active::before {
    left: 0;
}

.nav-button:hover,
.nav-button.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* =========================
   BOTÃO MENU MOBILE (HAMBURGUER)
   ========================= */
.mobile-menu-toggle {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* =========================
   MENU MOBILE COLAPSÁVEL
   ========================= */
.mobile-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

/* =========================
   CONTAINER DE LOGIN (FUNDO)
   ========================= */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #617aec 0%, #b7e0f3 100%);
    position: relative;
    overflow: hidden;
}

/* Efeito animado de fundo no login */
.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* =========================
   CARTÃO DE LOGIN (FORMULÁRIO)
   ========================= */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.25);
}

/* =========================
   CABEÇALHO DO LOGIN (LOGO E TÍTULO)
   ========================= */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-medium);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-title {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
}

/* =========================
   FORMULÁRIO DE LOGIN
   ========================= */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: white;
}

/* Ícone dentro do input */
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-control:focus + .input-icon {
    color: var(--primary-color);
}

/* Botão de mostrar senha */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* =========================
   OPÇÕES DO FORMULÁRIO (LEMBRAR, ESQUECI SENHA)
   ========================= */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
}

.form-check-input:checked {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* =========================
   BOTÃO DE LOGIN
   ========================= */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-login:active {
    transform: translateY(0);
}

/* =========================
   DIVISOR E LOGIN SOCIAL
   ========================= */
.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #6c757d;
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-social {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: var(--dark-color);
}

/* =========================
   LINK PARA CADASTRO
   ========================= */
.signup-link {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* =========================
   RODAPÉ
   ========================= */
footer {
    background: #2c3e50;
    color: white;
    margin-top: auto;
}

footer h6 {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

footer a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

/* =========================
   RESPONSIVIDADE
   ========================= */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .social-login {
        flex-direction: column;
    }
}

/* =========================
   ANIMAÇÃO DE LOADING
   ========================= */
.loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login.loading .loading {
    display: inline-block;
}

.btn-login.loading .btn-text {
    display: none;
}

/* =========================
   DROPDOWN DE CONFIGURAÇÕES
   ========================= */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.1);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 0.5rem 0;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.dropdown-item.text-danger {
    color: #dc3545 !important;
}

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    margin: 0.5rem 0;
}

/* =========================
   MODO ESCURO
   ========================= */
[data-theme="dark"] {
    --primary-color: #ff8c42;
    --secondary-color: #ffa726;
    --accent-color: #ffeb3b;
    --dark-color: #ffffff;
    --light-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #ff8c42 0%, #ffa726 100%);
    --gradient-secondary: linear-gradient(135deg, #ffeb3b 0%, #ff8c42 100%);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--dark-color);
}

[data-theme="dark"] .header-custom {
    background: rgba(26, 26, 46, 0.9);
    border-bottom: 1px solid rgba(255, 140, 66, 0.2);
}

[data-theme="dark"] .mobile-nav {
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(255, 140, 66, 0.2);
}

[data-theme="dark"] .nav-button {
    color: var(--dark-color);
}

[data-theme="dark"] .dropdown-menu {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 140, 66, 0.2);
}

[data-theme="dark"] .dropdown-item {
    color: var(--dark-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 140, 66, 0.2);
    color: var(--primary-color);
}

[data-theme="dark"] .dropdown-divider {
    border-top: 1px solid rgba(255, 140, 66, 0.2);
}

/* =========================
   TRANSIÇÕES SUAVES PARA MUDANÇA DE TEMA
   ========================= */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* =========================
   CARTÕES DO DASHBOARD
   ========================= */
.dashboard-card:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 20px rgba(0,0,0,0.20);
        z-index: 2;
      }

/* mobile*/
@media (max-width: 768px) {
    .position-absolute:has(img[src="imagens/index_foto.jpg"]) {
      display: none !important;
    }
  }

  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
  }
  
  @keyframes titleGlow {
    0% { text-shadow: 0 4px 20px rgba(255,255,255,0.3); }
    100% { text-shadow: 0 4px 30px rgba(255,255,255,0.5), 0 0 40px rgba(255,215,0,0.3); }
  }
  
  /* Efeito de hover no botão */
  .btn:hover .fa-arrow-right {
    transform: translateX(5px);
  }
  
  /* Responsividade melhorada */
  @media (max-width: 768px) {
    .display-3 {
      font-size: 2.5rem !important;
    }
    .lead {
      font-size: 1.1rem !important;
    }
    .col-lg-7 {
      padding-left: 2rem !important;
      padding-right: 2rem !important;
    }
  }

body.dark-theme {
  background-color: #2c3e50;
  color: #ffffff;
}

body.dark-theme .dashboard-card {
  background-color: #34495e;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
}

/* =========================
   ESTILOS DE ACESSIBILIDADE
   ========================= */
body.increase-letter-spacing {
    letter-spacing: 0.1em;
}
