
/* CSS Dinâmico do Sistema Asher - Responsivo e Compacto */

/* Reset e variáveis */
:root {
  --primary-color: #0056b3;
  --primary-color1: #013d65;
  --secondary-color: #202e32;
  --font-color: #202e32;
  --font-padrao: #000000;
  --hover-color: #469cf9;
  --border-color: #e9ecef;
  --light-color: #f8f9fa;
  --white-color: #ffffff;
  --font-main: 'Roboto', sans-serif;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-main);
  color: var(--font-color);
}

.container-flex {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
}

/* Seção de login */
.login-section {
  width: 100%;
  flex: 2;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, var(--white-color), var(--primary-color1));
  padding: 1rem;
}

/* Login Box - 20% menor e mais quadrado */
.login-box {
  width: 100%;
  max-width: 300px;
  min-height: 320px;
  padding: 24px;
  box-sizing: border-box;
  background: var(--white-color);
  border-radius: 12px;
  transition: 0.3s ease-in-out;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-box:hover {
  transform: scale(1.01);
}

/* Logo reduzida */
.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.logo-marca {
  width: 80px !important;
  height: 80px !important;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-marca img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Inputs compactos com labels flutuantes */
.user-box {
  position: relative;
  margin-bottom: 16px;
}

.user-box input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  color: var(--font-padrao);
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  background: #f5f5f5;
  transition: 0.3s ease-in-out;
  font-family: var(--font-main);
}

.user-box input:focus {
  background: var(--white-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 4px rgba(1, 91, 151, 0.4);
}

.user-box label {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #666;
  pointer-events: none;
  transition: 0.3s ease-in-out;
  font-family: var(--font-main);
}

.user-box input:focus ~ label,
.user-box input:valid ~ label {
  top: -12px;
  left: 0;
  transform: none;
  font-size: 10px;
  color: var(--primary-color);
}

/* Botão compacto */
.login-container {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.login-button {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: var(--primary-color);
  color: var(--white-color);
  cursor: pointer;
  transition: 0.3s ease-in-out;
  font-family: var(--font-main);
}

.login-button:hover {
  background: var(--hover-color);
  color: var(--font-color);
}

/* Alertas Bootstrap 5 - compactos */
.alert {
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 12px;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-success {
  background-color: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}

/* Botão WhatsApp compacto */
#whatsapp-button {
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 1000;
  transition: transform 0.3s ease;
}

#whatsapp-button:hover {
  transform: scale(1.1);
}

#whatsapp-button img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

/* Botões gerais */
.btn-primary,
.btn-secondary,
button,
input[type="button"],
input[type="submit"] {
  background-color: var(--primary-color);
  font-size: 11px;
  margin-bottom: 8px;
  color: var(--white-color);
  transition: background 0.3s ease;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-main);
}

.btn-primary:hover,
.btn-secondary:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background-color: var(--hover-color);
  color: var(--font-color);
}

/* =========================== */
/* RESPONSIVIDADE COMPLETA */
/* =========================== */

/* Desktop Grande (1920px+) */
@media (min-width: 1920px) {
  .login-box {
    max-width: 340px;
    min-height: 360px;
    padding: 28px;
  }
  
  .logo-marca {
    width: 90px !important;
    height: 90px !important;
  }
  
  .user-box input {
    font-size: 15px;
    padding: 11px;
  }
  
  .login-button {
    font-size: 15px;
    padding: 11px;
  }
}

/* Desktop Padrão (1366px - 1919px) */
@media (min-width: 1366px) and (max-width: 1919px) {
  .login-box {
    max-width: 320px;
    min-height: 340px;
    padding: 26px;
  }
  
  .logo-marca {
    width: 85px !important;
    height: 85px !important;
  }
}

/* Notebooks 15 polegadas (1440x900, 1680x1050) */
@media (min-width: 1200px) and (max-width: 1365px) {
  .login-section {
    padding: 1.5rem;
  }
  
  .login-box {
    max-width: 300px;
    min-height: 320px;
    padding: 24px;
  }
  
  .logo-marca {
    width: 80px !important;
    height: 80px !important;
  }
}

/* Notebooks 13-14 polegadas (1024x768, 1280x800, 1366x768) */
@media (min-width: 992px) and (max-width: 1199px) {
  .login-section {
    padding: 1rem;
  }
  
  .login-box {
    max-width: 280px;
    min-height: 300px;
    padding: 20px;
  }
  
  .logo-marca {
    width: 70px !important;
    height: 70px !important;
  }
  
  .user-box input {
    font-size: 13px;
    padding: 9px;
  }
  
  .user-box label {
    font-size: 11px;
  }
  
  .login-button {
    font-size: 13px;
    padding: 9px;
  }
  
  #whatsapp-button img {
    width: 45px;
    height: 45px;
  }
}

/* Tablets Landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container-flex {
    flex-direction: column;
  }

  .login-section {
    width: 100%;
    min-width: auto;
    padding: 2rem;
  }

  .login-box {
    max-width: 260px;
    min-height: 280px;
    padding: 18px;
  }
  
  .logo-marca {
    width: 65px !important;
    height: 65px !important;
  }
  
  .user-box {
    margin-bottom: 14px;
  }
  
  .user-box input {
    font-size: 13px;
    padding: 9px;
  }
  
  .login-button {
    font-size: 13px;
    padding: 9px;
  }
}

/* Tablets Portrait e Celulares Grandes (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .login-section {
    padding: 1.5rem;
  }

  .login-box {
    max-width: 240px;
    min-height: 260px;
    padding: 16px;
    border-radius: 10px;
  }
  
  .logo {
    margin-bottom: 12px;
  }
  
  .logo-marca {
    width: 60px !important;
    height: 60px !important;
  }
  
  .user-box {
    margin-bottom: 12px;
  }
  
  .user-box input {
    font-size: 12px;
    padding: 8px;
    border-radius: 5px;
  }
  
  .user-box label {
    font-size: 10px;
    top: 8px;
  }
  
  .user-box input:focus ~ label,
  .user-box input:valid ~ label {
    top: -10px;
    font-size: 9px;
  }
  
  .login-container {
    margin-top: 12px;
  }
  
  .login-button {
    font-size: 12px;
    padding: 8px;
    border-radius: 5px;
  }
  
  .alert {
    font-size: 11px;
    padding: 6px 10px;
  }
  
  #whatsapp-button {
    bottom: 10px;
    right: 10px;
  }
  
  #whatsapp-button img {
    width: 40px;
    height: 40px;
  }
}

/* Celulares Médios (360px - 479px) */
@media (min-width: 360px) and (max-width: 479px) {
  .login-section {
    padding: 1rem;
  }

  .login-box {
    max-width: 220px;
    min-height: 240px;
    padding: 14px;
    border-radius: 8px;
  }
  
  .logo {
    margin-bottom: 10px;
  }
  
  .logo-marca {
    width: 55px !important;
    height: 55px !important;
  }
  
  .user-box {
    margin-bottom: 10px;
  }
  
  .user-box input {
    font-size: 11px;
    padding: 7px;
  }
  
  .user-box label {
    font-size: 9px;
    top: 7px;
  }
  
  .user-box input:focus ~ label,
  .user-box input:valid ~ label {
    top: -9px;
    font-size: 8px;
  }
  
  .login-button {
    font-size: 11px;
    padding: 7px;
  }
  
  .alert {
    font-size: 10px;
    padding: 5px 8px;
    margin-bottom: 8px;
  }
  
  #whatsapp-button img {
    width: 35px;
    height: 35px;
  }
}

/* Celulares Pequenos (320px - 359px) */
@media (max-width: 359px) {
  .login-section {
    padding: 0.5rem;
  }

  .login-box {
    max-width: 200px;
    min-height: 220px;
    padding: 12px;
    border-radius: 6px;
  }
  
  .logo {
    margin-bottom: 8px;
  }
  
  .logo-marca {
    width: 50px !important;
    height: 50px !important;
  }
  
  .user-box {
    margin-bottom: 8px;
  }
  
  .user-box input {
    font-size: 10px;
    padding: 6px;
  }
  
  .user-box label {
    font-size: 8px;
    top: 6px;
  }
  
  .user-box input:focus ~ label,
  .user-box input:valid ~ label {
    top: -8px;
    font-size: 7px;
  }
  
  .login-container {
    margin-top: 8px;
  }
  
  .login-button {
    font-size: 10px;
    padding: 6px;
  }
  
  .alert {
    font-size: 9px;
    padding: 4px 6px;
    margin-bottom: 6px;
  }
  
  #whatsapp-button {
    bottom: 8px;
    right: 8px;
  }
  
  #whatsapp-button img {
    width: 30px;
    height: 30px;
  }
}

/* Ajustes para altura de tela pequena (orientação landscape em celulares) */
@media (max-height: 500px) {
  .login-section {
    padding: 0.5rem;
  }
  
  .login-box {
    padding: 10px;
    min-height: auto;
  }
  
  .logo {
    margin-bottom: 6px;
  }
  
  .logo-marca {
    width: 45px !important;
    height: 45px !important;
  }
  
  .user-box {
    margin-bottom: 8px;
  }
  
  .login-container {
    margin-top: 6px;
  }
}

/* Ajustes específicos para iPhone SE e similares (375x667) */
@media (max-width: 375px) and (max-height: 667px) {
  .login-box {
    max-width: 190px;
    min-height: 210px;
  }
}

/* Ajustes para dispositivos muito estreitos */
@media (max-width: 280px) {
  .login-section {
    padding: 0.25rem;
  }
  
  .login-box {
    max-width: 180px;
    min-height: 200px;
    padding: 8px;
  }
  
  .logo-marca {
    width: 40px !important;
    height: 40px !important;
  }
  
  .user-box input {
    font-size: 9px;
    padding: 5px;
  }
  
  .login-button {
    font-size: 9px;
    padding: 5px;
  }
}

/* Força o aspecto quadrado em todos os tamanhos */
@media (orientation: portrait) {
  .login-box {
    aspect-ratio: 1 / 1.1;
  }
}

@media (orientation: landscape) {
  .login-box {
    aspect-ratio: 1.1 / 1;
  }
}
