/* adminLogin.css - Import base styles and add page-specific styles */
@import url('./base.css');
* {
  font-family: 'Poppins', sans-serif !important;
}

body {
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background texture matching other pages */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

/* Login Container */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed from center to flex-start */
    padding: 4rem;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* Login Form Card - FIXED WIDTH NO EXPANSION */
.wrapper {
    width: 550px; /* FIXED WIDTH - CANNOT EXPAND */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box; /* Include padding in width */
     margin-top: 0; /* ENSURE NO TOP MARGIN */
}

/* Subtle gradient overlay for the form */
.wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    pointer-events: none;
    z-index: -1;
}

.wrapper form {
    position: relative;
    z-index: 2;
}

/* Login Title */
.wrapper h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6B7B5A;
    text-align: center;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #6B7B5A, #8B9A7A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Input Boxes */
.input-box {
    position: relative;
    margin-bottom: 2rem;
}

.input-box input {
    width: 100%;
    height: 55px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(107, 123, 90, 0.2);
    border-radius: 25px;
    font-size: 1.1rem;
    color: #333;
    padding: 0 50px 0 20px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: inherit;
}

.input-box input:focus {
    border-color: #6B7B5A;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(107, 123, 90, 0.1);
 
}

.input-box input::placeholder {
    color: #999;
    font-weight: 400;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center; /* This centers it vertically */
    font-size: 1.3rem;
    color: #6B7B5A;
    transition: all 0.3s ease;
}

.input-box input:focus + i {
    color: #5a6b49;
   
}

.error-container {
    height: 55px; /* FIXED SPACE - prevents vertical shifting */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin: 1rem 0; /* spacing between input fields and button */
    position: relative;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 15px;
    padding: 0.75rem 1rem;
    color: #e74c3c;
    font-size: 0.95rem;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
    overflow: hidden;
    white-space: normal;
    box-sizing: border-box;
    display: none; /* HIDDEN BY DEFAULT */
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Login Button - Extends base button styles */
.btn {
    width: 100%;
    height: 55px;
    background: linear-gradient(135deg, #6B7B5A, #8B9A7A);
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(107, 123, 90, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::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:hover {
    background: linear-gradient(135deg, #5a6b49, #7a8a69);
   
    box-shadow: 0 15px 40px rgba(107, 123, 90, 0.4);
}

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

.btn:active {

    box-shadow: 0 8px 25px rgba(107, 123, 90, 0.3);
}

/* Loading state for button */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
  

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Focus accessibility */
.wrapper:focus-within {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .wrapper {
        width: 100%; /* Use full width on mobile */
        max-width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .wrapper h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .input-box {
        margin-bottom: 1.5rem;
    }
    
    .input-box input {
        height: 50px;
        font-size: 1rem;
        padding: 0 45px 0 18px;
    }
    
    .input-box i {
        right: 18px;
        font-size: 1.2rem;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
    }
    
    .btn {
        height: 50px;
        font-size: 1.1rem;
    }
    
    .error-container {
        min-height: 60px; /* Smaller reserved space on mobile */
    }
    
    .back-link {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding: 1.5rem 1rem;
        /* Remove fixed height */
    }
    
    .wrapper h1 {
        font-size: 1.8rem;
    }
    
    .input-box input {
        height: 45px;
        padding: 0 40px 0 15px;
    }
    
    .input-box i {
        right: 15px;
        font-size: 1.1rem;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
    }
    
    .btn {
        height: 45px;
        font-size: 1rem;
    }
    
    .error-container {
        min-height: 55px; /* Even smaller reserved space */
    }
}