/* ===================================
   RESET Y VARIABLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4466bb;
  --primary-dark: #334d99;
  --primary-light: #5577cc;
  --secondary-color: #6688dd;
  --background: #0a0e1a;
  --surface: #151b2e;
  --surface-light: #1f2842;
  --text-primary: #ffffff;
  --text-secondary: #b8c5d6;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow: rgba(68, 102, 187, 0.3);
  --gradient: linear-gradient(135deg, #4466bb 0%, #6688dd 100%);
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

  background: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

.home-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--gradient);
  display: flex;
  align-items: left;
  z-index: 9999;
  animation: fadeIn 0.5s ease-in;
}

.contenido {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--gradient);
  display: flex;
  align-items: left;
  z-index: 9999;
  animation: fadeIn 0.5s ease-in;
}

.main {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background: #fff;
  color: #222;
  font-size: 14px;
  padding: 16px;
  overflow-y: auto;
  z-index: 50;
}

/* ===================================
   SPLASH SCREEN
   =================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.5s ease-in;
  overflow: hidden;
}

#splash-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
}

/* ===================================
   LOGIN SCREEN
   =================================== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--background);
  position: relative;
  overflow: hidden;
  min-width: 75% !important;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.1;
  animation: rotate 20s linear infinite;
}

.login-container {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-header {
  text-align: center;
  margin-bottom: 35px;
}

.login-logo {
  width: 230px;
  height: 170px;
  margin-bottom: 20px;
  filter: drop-shadow(0 5px 15px var(--shadow));
  border-radius: 12%;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===================================
   FORM STYLES
   =================================== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface-light);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.3s ease;
  outline: none;
}

.password-wrapper .form-input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary-color);
  background: rgba(68, 102, 187, 0.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.eye-icon {
  display: block;
  transition: opacity 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary-color);
  background: var(--background);
  box-shadow: 0 0 0 4px rgba(68, 102, 187, 0.1);
}

.form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ===================================
   BUTTON STYLES
   =================================== */
.btn-login {
  width: 100%;
  padding: 16px;
  background: var(--gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.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;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
#toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: 300px;
  max-width: 90vw;
  padding: 16px 20px;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  cursor: pointer;
  animation: toastIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
}

.toast.removing {
  animation: toastOut 0.3s ease-out forwards;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
}

.toast.success {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.toast.warning {
  background: linear-gradient(135deg, var(--warning) 0%, #ea580c 100%);
}

.toast.error {
  background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
}
.toast.pensando {
  background: linear-gradient(135deg, #ffff44, #b1afaf 100%);
  color:#222;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(400%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .login-title {
    font-size: 22px;
  }

  .splash-logo {
    width: 160px;
    height: 160px;
  }

  .splash-title {
    font-size: 24px;
  }

  .toast {
    min-width: 280px;
  }
}

@media (max-height: 600px) {
  .login-container {
    padding: 25px 20px;
  }

  .login-logo {
    width: 60px;
    height: 60px;
  }

  .form-group {
    gap: 6px;
  }
}

/* ===================================
   LANDSCAPE MODE
   =================================== */
@media (orientation: landscape) and (max-height: 500px) {
  .login-screen {
    padding: 15px;
  }

  .login-container {
    max-width: 600px;
    padding: 20px 25px;
  }

  .login-header {
    margin-bottom: 20px;
  }

  .login-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }

  .login-title {
    font-size: 20px;
  }

  .form-group {
    gap: 4px;
  }

  .form-input {
    padding: 10px 14px;
  }

  .btn-login {
    padding: 12px;
    margin-top: 5px;
  }
}


.toast-message {
  flex: 1;
}

.toast.success {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
}

.toast.warning {
  background: linear-gradient(135deg, var(--warning) 0%, #ea580c 100%);
}

.toast.error {
  background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(400%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .login-title {
    font-size: 22px;
  }

  .splash-logo {
    width: 190px;
    height: 190px;
  }

  .splash-title {
    font-size: 24px;
  }

  .toast {
    min-width: 280px;
  }
}

@media (max-height: 600px) {
  .login-container {
    padding: 25px 20px;
  }

  .login-logo {
    width: 60px;
    height: 60px;
  }

  .form-group {
    gap: 6px;
  }
}

/* ===================================
   LANDSCAPE MODE
   =================================== */
@media (orientation: landscape) and (max-height: 500px) {
  .login-screen {
    padding: 15px;
  }

  .login-container {
    max-width: 600px;
    padding: 20px 25px;
  }

  .login-header {
    margin-bottom: 20px;
  }

  .login-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }

  .login-title {
    font-size: 20px;
  }

  .form-group {
    gap: 4px;
  }

  .form-input {
    padding: 10px 14px;
  }

  .btn-login {
    padding: 12px;
    margin-top: 5px;
  }
}

#misdatos {
  position: absolute;
  top: 45px;
  right: 5%;
  max-width: 600px;
  color: white;
  font-size: 14px;
  background: rgba(20, 30, 50, 0.85);
  padding: 6px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 100;
}

#misdatos h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#misdatos .auth-item {
  margin: 15px 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  border-left: 4px solid var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#misdatos .auth-item strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 768px) {
  #misdatos {
    top: 70px;
    left: 10px;
    right: 10px;
    font-size: 16px;
    padding: 20px;
  }

  #misdatos h3 {
    font-size: 20px;
  }

  #misdatos .auth-item {
    padding: 12px;
  }

  #misdatos .auth-item strong {
    font-size: 14px;
  }
}
.ayudas{
  font-size:12px;
  width:100%;
  background:#f19a18;
  color:#222;
  padding:3px;
}