/* =============================================
   LOGIN PAGE STYLES
   For Smart Mudhra Samadhan Login Page
   ============================================= */

/* ========== LOGIN PAGE LAYOUT ========== */
.login-page {
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 50%, #A5D6A7 100%);
    padding: 25px 0;
}

.login-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .login-container {
        padding: 0 20px;
    }
    
    .login-grid {
        grid-template-columns: 32% 68%;
        gap: 25px;
    }
}

@media (min-width: 992px) {
    .login-container {
        padding: 0 25px;
    }
    
    .login-grid {
        grid-template-columns: 30% 70%;
        gap: 30px;
    }
}

@media (min-width: 1400px) {
    .login-container {
        padding: 0 30px;
    }
}

/* ========== INFO SECTION (Right Side - 70%) ========== */
.info-section {
    display: flex;
    flex-direction: column;
}

/* Safety Precautions Card */
.safety-card {
    background: white;
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 4px 20px rgba(27, 94, 32, 0.1);
    border-left: 4px solid var(--primary-green);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.safety-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.safety-icon {
    font-size: 1.8rem;
}

.safety-header h2 {
    color: var(--primary-green);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Safety List */
.safety-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.safety-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 14px 16px;
    background: var(--bg-light);
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1;
}

.safety-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.safety-item.warning {
    background: #FFF8E1;
    border-left: 3px solid #FFC107;
}

.safety-item.danger {
    background: #FFEBEE;
    border-left: 3px solid #F44336;
}

.safety-item .item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.safety-item .item-content {
    flex: 1;
}

.safety-item .item-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.safety-item .item-content p {
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.5;
    margin: 0;
}

/* ========== LOGIN SECTION (Left Side - 30%) ========== */
.login-section {
    display: flex;
    flex-direction: column;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(27, 94, 32, 0.12);
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    padding: 22px 20px;
    text-align: center;
    color: white;
}

.login-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.login-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.login-body {
    padding: 22px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-footer {
    padding: 0 20px 18px;
    text-align: center;
    margin-top: auto;
}

.terms-text {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.5;
}

.terms-text a {
    color: var(--primary-green);
    text-decoration: underline;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.input-prefix {
    background: var(--bg-light);
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-medium);
    border-right: 2px solid var(--border-color);
}

.input-wrapper input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 0.95rem;
    outline: none;
    min-width: 0;
}

.input-wrapper input::placeholder {
    color: #aaa;
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 6px;
}

.otp-hint {
    color: var(--primary-green);
}

/* ========== OTP INPUTS ========== */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.otp-input {
    width: 50px;
    height: 55px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-green);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.otp-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.15);
}

/* ========== OTP SENT INFO ========== */
.otp-sent-info {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 18px;
    text-align: center;
}

.otp-sent-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.mobile-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-display span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-green);
}

.btn-edit {
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: var(--primary-green);
    color: white;
}

/* ========== RESEND SECTION ========== */
.resend-section {
    text-align: center;
    margin-bottom: 18px;
    min-height: 28px;
}

.resend-section .timer {
    color: var(--primary-green);
    font-weight: 600;
}

#timerSection {
    font-size: 0.8rem;
    color: var(--text-light);
}

.btn-resend {
    background: transparent;
    border: none;
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.btn-resend:hover {
    color: var(--primary-green-dark);
}

/* ========== BUTTONS ========== */
.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 94, 32, 0.3);
}

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

.btn-arrow {
    font-size: 1.1rem;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.toast-success {
    background: #1B5E20;
    color: white;
}

.toast-error {
    background: #C62828;
    color: white;
}

.toast-icon {
    font-size: 1.1rem;
}

.toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ========== UTILITY CLASSES ========== */
.hidden {
    display: none !important;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 767px) {
    .login-page {
        padding: 15px 0;
    }
    
    .login-container {
        padding: 0 12px;
    }
    
    .login-grid {
        gap: 15px;
    }
    
    /* On mobile, show login first (already in HTML order) */
    .login-card {
        border-radius: 14px;
    }
    
    .login-header {
        padding: 20px 16px;
    }
    
    .login-icon {
        font-size: 1.8rem;
    }
    
    .login-header h3 {
        font-size: 1.1rem;
    }
    
    .login-header p {
        font-size: 0.75rem;
    }
    
    .login-body {
        padding: 20px 16px;
    }
    
    .login-footer {
        padding: 0 16px 16px;
    }
    
    .safety-card {
        padding: 18px;
        border-radius: 14px;
        height: auto;
    }
    
    .safety-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .safety-icon {
        font-size: 1.6rem;
    }
    
    .safety-header h2 {
        font-size: 1.1rem;
    }
    
    .safety-list {
        gap: 10px;
    }
    
    .safety-item {
        padding: 12px;
        gap: 12px;
        flex: none;
    }
    
    .safety-item .item-icon {
        font-size: 1.2rem;
        width: 32px;
        height: 32px;
    }
    
    .safety-item .item-content strong {
        font-size: 0.85rem;
    }
    
    .safety-item .item-content p {
        font-size: 0.75rem;
    }
    
    .otp-input {
        width: 50px;
        height: 52px;
        font-size: 1.3rem;
    }
    
    .otp-inputs {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .login-header {
        padding: 18px 14px;
    }
    
    .login-body {
        padding: 18px 14px;
    }
    
    .safety-card {
        padding: 15px;
    }
    
    .safety-item {
        padding: 10px;
        gap: 10px;
    }
    
    .safety-item .item-icon {
        font-size: 1.1rem;
        width: 28px;
        height: 28px;
    }
    
    .safety-item .item-content strong {
        font-size: 0.8rem;
    }
    
    .safety-item .item-content p {
        font-size: 0.7rem;
    }
    
    .otp-input {
        width: 45px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .otp-inputs {
        gap: 8px;
    }
}
