/* Base styles with box-sizing applied to all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, rgb(152, 100, 207), rgb(96, 153, 252));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    flex-direction: column;
    padding: 10px;
}

.navbar {
    position: relative;
    margin-top: 45px;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    font-size: clamp(18px, 5vw, 24px);
}

.company-name {
    background: linear-gradient(to right, #00c6ff, #0072ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sms {
    color: red; 
} 

.login-container {
    background: white;
    padding: clamp(15px, 5vw, 25px);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-in-out;
    margin-top: max(70px, 15vh);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 18px;
    text-align: left;
}

.input-group label {
    font-weight: 600;
    color: #555;
    font-size: clamp(12px, 3vw, 14px);
    margin-bottom: 6px;
    display: block;
}

.input-group input {
    width: 100%;
    padding: clamp(8px, 2vw, 10px);
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: clamp(12px, 3vw, 14px);
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #00c6ff;
    box-shadow: 0 0 5px rgba(0, 198, 255, 0.5);
}

.login-btn {
    width: 100%;
    padding: clamp(10px, 3vw, 12px);
    background: #0072ff;
    border: none;
    color: white;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn:hover {
    background: #0052cc;
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

.error {
    color: red;
    font-size: clamp(12px, 3vw, 14px);
    margin-top: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media screen and (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 15px;
    }
}

@media screen and (max-height: 600px) {
    .navbar {
        position: relative;
        margin-top: 45px;
        padding: 10px;
    }
    
    .login-container {
        margin-top: 60px;
        padding: 15px;
    }
    
    .input-group {
        margin-bottom: 12px;
    }
}

/* For very small devices */
@media screen and (max-width: 320px) {
    .login-container {
        padding: 10px;
    }
    
    .input-group {
        margin-bottom: 10px;
    }
}

/* For large screens */
@media screen and (min-width: 1200px) {
    .login-container {
        max-width: 450px;
    }
}

/* For print media */
@media print {
    body {
        background: white;
    }
    
    .login-container {
        box-shadow: none;
        margin: 0 auto;
    }
    
    .navbar {
        position: relative;
        box-shadow: none;
    }
}

/* Ensure touch targets are large enough on mobile */
@media (pointer: coarse) {
    .login-btn {
        min-height: 44px;
    }
    
    .input-group input {
        min-height: 44px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .login-container {
        background: #222;
    }
    
    .input-group label {
        color: #ddd;
    }
    
    .input-group input {
        background: #333;
        border-color: #555;
        color: white;
    }
}