﻿/* ============================================
   PREMIUM ADMIN AUTHENTICATION MODAL
Modern Glassmorphism Design with Premium Feel
   ============================================ */

.admin-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: red;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(0px);
    padding: 1rem;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated particles background */
.admin-auth-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(230, 0, 0, 0.15) 0%, transparent 50%),
 radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-30px) scale(1.1); opacity: 0.6; }
}

.admin-auth-container {
  width: 100%;
    max-width: 480px;
    padding: 0;
    position: relative;
    z-index: 2;
    max-height: 100vh;
    overflow-y: auto;
 -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-auth-container::-webkit-scrollbar {
    display: none;
}

.admin-auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 32px;
    padding: 3.5rem 3rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 30px 70px rgba(230, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    margin: 1rem;
}

.admin-auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
  45deg,
        transparent 30%,
        rgba(230, 0, 0, 0.05) 50%,
        transparent 70%
    );
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
     transform: scale(0.9) translateY(40px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.admin-auth-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* Lock icon container - using Bootstrap Icon */
.admin-lock-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e60000, #b30000);
  border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  animation: lockBounce 2s ease-in-out infinite;
    box-shadow: 
        0 8px 24px rgba(230, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-lock-icon i {
  font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes lockBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.admin-auth-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a0000, #e60000, #b30000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.admin-auth-header p {
    font-size: 1.05rem;
    color: #666;
    font-weight: 500;
}

.admin-form-group {
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1;
}

.admin-form-group label {
    display: block;
    font-weight: 700;
    color: #1a0000;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-wrapper i {
    position: absolute;
    left: 1.25rem;
    color: #e60000;
    font-size: 1.3rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.admin-form-control {
 width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    border: 2px solid rgba(230, 0, 0, 0.2);
    border-radius: 16px;
    font-size: 1.05rem;
  color: #1a0000;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-form-control:focus {
    outline: none;
    border-color: #e60000;
    background: #ffffff;
 box-shadow: 
        0 0 0 4px rgba(230, 0, 0, 0.1),
  0 8px 24px rgba(230, 0, 0, 0.15);
    transform: translateY(-2px);
}

.admin-input-wrapper .admin-form-control:focus ~ i {
    transform: scale(1.1);
    color: #b30000;
}

.admin-form-control::placeholder {
    color: #999;
    font-weight: 500;
}

.admin-error-message {
    background: linear-gradient(135deg, rgba(230, 0, 0, 0.1), rgba(179, 0, 0, 0.15));
 border: 2px solid #e60000;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    color: #b30000;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: errorPulse 0.5s ease;
    box-shadow: 0 4px 16px rgba(230, 0, 0, 0.2);
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.admin-error-message::before {
  content: '⚠️';
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-btn-submit {
    width: 100%;
    padding: 1.4rem 2rem;
    background: linear-gradient(135deg, #e60000, #b30000, #990000);
    background-size: 200% 200%;
    color: #fff;
    border: none;
border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
    0 8px 24px rgba(230, 0, 0, 0.35),
 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
 overflow: hidden;
}

.admin-btn-submit::before {
 content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.admin-btn-submit:hover {
    background-position: 100% 0;
transform: translateY(-3px);
    box-shadow: 
    0 12px 32px rgba(230, 0, 0, 0.45),
   0 6px 16px rgba(0, 0, 0, 0.2);
}

.admin-btn-submit:hover::before {
    transform: translateX(100%);
}

.admin-btn-submit:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(230, 0, 0, 0.4),
   0 3px 10px rgba(0, 0, 0, 0.15);
}

.admin-btn-submit i {
    font-size: 1.4rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Decorative corner accents */
.admin-auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top right, rgba(230, 0, 0, 0.08), transparent);
    border-radius: 0 32px 0 0;
    pointer-events: none;
}

/* Premium glow effect on focus */
.admin-form-control:focus ~ .admin-input-wrapper::after {
  content: '';
    position: absolute;
inset: -4px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e60000, #b30000);
    opacity: 0.2;
    filter: blur(12px);
    z-index: -1;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZED
   ============================================ */

/* Large tablets and small laptops (768px - 991px) */
@media (max-width: 991px) {
    .admin-auth-container {
  max-width: 440px;
    }

    .admin-auth-card {
        padding: 3rem 2.5rem;
    }

    .admin-lock-icon {
        width: 85px;
 height: 85px;
    }

    .admin-lock-icon i {
        font-size: 2.8rem;
    }

    .admin-auth-header h2 {
        font-size: 2rem;
    }

    .admin-auth-header p {
        font-size: 1rem;
    }
}

/* Tablets Portrait (576px - 767px) */
@media (max-width: 767px) {
    .admin-auth-overlay {
    padding: 0.5rem;
    }

    .admin-auth-container {
        max-width: 100%;
    }

    .admin-auth-card {
        padding: 2.5rem 2rem;
      border-radius: 24px;
        margin: 0.5rem;
    }

    .admin-lock-icon {
        width: 75px;
        height: 75px;
        margin-bottom: 1rem;
    }

    .admin-lock-icon i {
        font-size: 2.5rem;
    }

    .admin-auth-header {
        margin-bottom: 2.5rem;
    }

    .admin-auth-header h2 {
        font-size: 1.8rem;
    }

    .admin-auth-header p {
        font-size: 0.95rem;
    }

    .admin-form-group {
        margin-bottom: 1.5rem;
    }

    .admin-form-control {
     padding: 1.1rem 1.1rem 1.1rem 3.2rem;
 font-size: 1rem;
    }

    .admin-input-wrapper i {
        left: 1.1rem;
        font-size: 1.2rem;
    }

    .admin-btn-submit {
        padding: 1.2rem 1.75rem;
      font-size: 1.05rem;
    }
}

/* Large Mobile Devices (414px - 575px) */
@media (max-width: 575px) {
    .admin-auth-card {
    padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .admin-lock-icon {
     width: 70px;
     height: 70px;
        margin-bottom: 1rem;
    }

    .admin-lock-icon i {
        font-size: 2.3rem;
  }

    .admin-auth-header {
        margin-bottom: 2rem;
    }

    .admin-auth-header h2 {
        font-size: 1.6rem;
        letter-spacing: -0.3px;
    }

    .admin-auth-header p {
        font-size: 0.9rem;
    }

    .admin-form-group label {
      font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }

    .admin-form-control {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 0.95rem;
        border-radius: 14px;
    }

  .admin-input-wrapper i {
left: 1rem;
        font-size: 1.15rem;
    }

    .admin-error-message {
        padding: 0.85rem 1rem;
     font-size: 0.85rem;
        border-radius: 12px;
    }

    .admin-error-message::before {
        font-size: 1.3rem;
    }

    .admin-btn-submit {
        padding: 1.1rem 1.5rem;
        font-size: 1rem;
        border-radius: 14px;
        margin-top: 1.5rem;
    }

    .admin-btn-submit i {
      font-size: 1.3rem;
    }
}

/* Standard Mobile Devices (375px - 413px) - iPhone SE, 12/13 mini, etc. */
@media (max-width: 413px) {
    .admin-auth-card {
        padding: 1.75rem 1.25rem;
    }

 .admin-lock-icon {
        width: 65px;
        height: 65px;
    }

    .admin-lock-icon i {
        font-size: 2.1rem;
    }

    .admin-auth-header h2 {
        font-size: 1.5rem;
    }

    .admin-auth-header p {
        font-size: 0.85rem;
    }

    .admin-form-group {
     margin-bottom: 1.25rem;
    }

    .admin-form-group label {
    font-size: 0.8rem;
    }

    .admin-form-control {
        padding: 0.95rem 0.95rem 0.95rem 2.8rem;
    font-size: 0.9rem;
    }

    .admin-input-wrapper i {
        left: 0.9rem;
    font-size: 1.1rem;
    }

    .admin-btn-submit {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Small Mobile Devices (320px - 374px) - iPhone SE 1st gen, small Android */
@media (max-width: 374px) {
    .admin-auth-overlay {
        padding: 0.25rem;
    }

    .admin-auth-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
     margin: 0.25rem;
    }

    .admin-lock-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 0.75rem;
    }

    .admin-lock-icon i {
     font-size: 2rem;
    }

  .admin-auth-header {
   margin-bottom: 1.5rem;
    }

    .admin-auth-header h2 {
  font-size: 1.35rem;
    }

    .admin-auth-header p {
        font-size: 0.8rem;
    }

    .admin-form-group {
        margin-bottom: 1rem;
 }

    .admin-form-group label {
   font-size: 0.75rem;
        margin-bottom: 0.5rem;
 }

    .admin-form-control {
  padding: 0.85rem 0.85rem 0.85rem 2.6rem;
     font-size: 0.85rem;
        border-radius: 12px;
 }

    .admin-input-wrapper i {
      left: 0.8rem;
     font-size: 1rem;
    }

    .admin-error-message {
        padding: 0.75rem 0.85rem;
        font-size: 0.8rem;
gap: 0.5rem;
    }

    .admin-error-message::before {
     font-size: 1.2rem;
    }

    .admin-btn-submit {
 padding: 0.9rem 1rem;
   font-size: 0.9rem;
        gap: 0.5rem;
        margin-top: 1.25rem;
    }

    .admin-btn-submit i {
  font-size: 1.2rem;
    }
}

/* Extra Small Devices (280px - 319px) - Galaxy Fold, very small devices */
@media (max-width: 319px) {
    .admin-auth-card {
padding: 1.25rem 0.85rem;
    }

  .admin-lock-icon {
        width: 55px;
height: 55px;
    }

    .admin-lock-icon i {
        font-size: 1.8rem;
    }

    .admin-auth-header h2 {
        font-size: 1.2rem;
  }

  .admin-auth-header p {
font-size: 0.75rem;
    }

    .admin-form-control {
        padding: 0.75rem 0.75rem 0.75rem 2.4rem;
   font-size: 0.8rem;
    }

    .admin-input-wrapper i {
    left: 0.7rem;
        font-size: 0.95rem;
    }

    .admin-btn-submit {
   padding: 0.8rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .admin-auth-overlay {
        padding: 0.5rem;
        align-items: flex-start;
   overflow-y: auto;
    }

    .admin-auth-container {
  margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }

    .admin-auth-card {
     padding: 1.5rem 2rem;
    }

    .admin-lock-icon {
    width: 50px;
        height: 50px;
   margin-bottom: 0.75rem;
    }

 .admin-lock-icon i {
        font-size: 1.8rem;
    }

 .admin-auth-header {
  margin-bottom: 1.25rem;
    }

    .admin-auth-header h2 {
    font-size: 1.4rem;
    }

    .admin-auth-header p {
        font-size: 0.85rem;
    }

    .admin-form-group {
 margin-bottom: 1rem;
    }

    .admin-form-control {
      padding: 0.85rem 0.85rem 0.85rem 2.6rem;
    }

    .admin-btn-submit {
  padding: 0.9rem 1.5rem;
        margin-top: 1rem;
    }
}

/* Prevent body scroll when modal is open */
body:has(.admin-auth-overlay) {
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .admin-auth-card {
        background: #ffffff;
        border: 3px solid #e60000;
    }

    .admin-form-control {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .admin-auth-overlay,
    .admin-auth-card,
 .admin-lock-icon,
    .admin-btn-submit,
    .admin-form-control {
     animation: none !important;
        transition: none !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .admin-btn-submit {
        -webkit-tap-highlight-color: transparent;
    }

    .admin-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
