/* ======================= */
/* VARIABLES Y RESET */
/* ======================= */

:root {
    /* Verde institucional */
    --primary: #1F4D32;
    --primary-dark: #123522;
    --primary-light: #356B48;

    /* Dorado del logo */
    --accent: #C49A3A;
    --accent-light: #DDBB68;

    /* Colores base */
    --white: #ffffff;
    --cream: #FAF7EF;

    /* Grises cálidos */
    --gray-50: #FAF9F6;
    --gray-100: #F3F0E8;
    --gray-200: #E5E0D4;
    --gray-300: #D2CCBE;
    --gray-400: #9B9588;
    --gray-500: #756F64;
    --gray-600: #575248;
    --gray-700: #3F3B34;
    --gray-800: #28251F;

    /* Estados */
    --error: #C94A45;
    --success: #3D8B61;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);

    --shadow: 
        0 1px 3px 0 rgb(0 0 0 / 0.1),
        0 1px 2px -1px rgb(0 0 0 / 0.1);

    --shadow-md: 
        0 4px 6px -1px rgb(0 0 0 / 0.1),
        0 2px 4px -2px rgb(0 0 0 / 0.1);

    --shadow-lg: 
        0 10px 15px -3px rgb(0 0 0 / 0.1),
        0 4px 6px -4px rgb(0 0 0 / 0.1);

    --shadow-xl: 
        0 20px 25px -5px rgb(0 0 0 / 0.1),
        0 8px 10px -6px rgb(0 0 0 / 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--cream);
}

/* ======================= */
/* LAYOUT PRINCIPAL */
/* ======================= */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ======================= */
/* PANEL IZQUIERDO - FORMULARIO */
/* ======================= */
.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--cream);
}

.login-content {
  width: 100%;
  max-width: 420px;
}

/* Logo */
.logo-container {
  margin-bottom: 40px;
}

.login-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Títulos */
.login-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* ======================= */
/* FORMULARIO */
/* ======================= */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:hover {
    border-color: var(--accent-light);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 77, 50, 0.12);
}

.input-icon {
    position: absolute;
    right: 16px;
    color: var(--gray-400);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password {
    cursor: pointer;
    transition: color 0.2s ease;
}

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

/* Mensajes de error */
.error-message {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--error);
  font-weight: 500;
}

/* ======================= */
/* BOTÓN DE LOGIN */
/* ======================= */
.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    margin-top: 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);

    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );

    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;

    box-shadow: 0 4px 14px 0 rgba(31, 77, 50, 0.35);
}

.btn-login:hover {
    transform: translateY(-2px);

    box-shadow: 0 6px 20px 0 rgba(31, 77, 50, 0.45);

    background: linear-gradient(
        135deg,
        var(--primary-light) 0%,
        var(--primary) 100%
    );
}

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

.btn-login i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-login:hover i {
    transform: translateX(4px);
}

/* ======================= */
/* FOOTER */
/* ======================= */
.login-footer {
  margin-top: 48px;
  text-align: center;
}

.login-footer p {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ======================= */
/* PANEL DERECHO - DECORATIVO */
/* ======================= */
.login-right {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        135deg,
        #1F4D32 0%,
        #123522 55%,
        #0D2819 100%
    );

    overflow: hidden;
}

/* Fondo decorativo con formas abstractas */
.decorative-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;

    background: linear-gradient(
        135deg,
        #356B48 0%,
        #C49A3A 100%
    );

    top: -20%;
    right: -10%;

    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;

    background: linear-gradient(
        135deg,
        #4F7D5E 0%,
        #DDBB68 100%
    );

    bottom: -15%;
    left: -10%;

    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;

    background: linear-gradient(
        135deg,
        #DDBB68 0%,
        #C49A3A 100%
    );

    top: 40%;
    right: 30%;

    animation-delay: -10s;
}

.shape-4 {
    width: 200px;
    height: 200px;

    background: linear-gradient(
        135deg,
        #F1D99A 0%,
        #DDBB68 100%
    );

    bottom: 30%;
    right: 10%;

    animation-delay: -15s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(20px, 30px) rotate(3deg);
  }
}

/* Contenido del panel derecho */
.right-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px;
}

.brand-text h2 {
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    letter-spacing: -1px;
}

.brand-text p {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ======================= */
/* RESPONSIVE DESIGN */
/* ======================= */
@media (max-width: 1024px) {
    .login-right {
        display: none;
    }

    .login-left {
        flex: 1;

        background: linear-gradient(
            135deg,
            var(--cream) 0%,
            var(--white) 100%
        );
    }

    .login-content {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
  .login-left {
    padding: 30px 24px;
  }

  .login-title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  .login-logo {
    height: 50px;
  }

  .logo-container {
    margin-bottom: 32px;
  }

  .form-input {
    padding: 12px 44px 12px 14px;
    font-size: 16px; /* Evita zoom en iOS */
  }

  .btn-login {
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 24px 20px;
  }

  .login-title {
    font-size: 24px;
    margin-bottom: 28px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-label {
    font-size: 13px;
  }

  .login-footer {
    margin-top: 36px;
  }

  .login-footer p {
    font-size: 12px;
  }
}

/* ======================= */
/* ANIMACIONES DE ENTRADA */
/* ======================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-content {
  animation: fadeInUp 0.6s ease-out;
}

.form-group {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.form-group:nth-child(1) {
  animation-delay: 0.1s;
}

.form-group:nth-child(2) {
  animation-delay: 0.2s;
}

.btn-login {
  animation: fadeInUp 0.6s ease-out 0.3s;
  animation-fill-mode: both;
}
