/* Authentication Styles */

.auth-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    width: 90%;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    box-sizing: border-box;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#auth-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

#admin-dashboard, #customer-dashboard {
    min-height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #f4f6f8;
}

.auth-container h1 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-top: -20px;
}

.auth-container h2 {
    margin: 15px 0;
    color: #444;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.tab-toggle {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.tab-toggle button {
    flex: 1;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-toggle button:hover {
    background: #e8e8e8;
}

.tab-toggle .active-tab {
    background: #4CAF50;
    color: white;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.2);
}

.auth-form .form-group {
    margin-bottom: 15px;
    width: 100%;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    margin: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.auth-form input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
    outline: none;
}

.auth-form input:hover {
    border-color: #bdbdbd;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: #4CAF50;
    color: white;
    border: none;
    margin: 20px 0 10px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.auth-form button:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-form hr {
    margin: 25px 0;
    border: none;
    height: 1px;
    background: #ddd;
}

.text-btn {
    background: none;
    border: none;
    color: #4CAF50;
    padding: 0;
    margin: 0;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.text-btn:hover {
    color: #45a049;
    background: none;
}

.switch-auth {
    margin: 15px 0 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

#customer-orders-container ul,
#customer-payments-container ul {
    list-style: none;
    padding-left: 0;
}

#customer-orders-container li,
#customer-payments-container li {
    background: #f1f1f1;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 5px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 20px;
}

.balance-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    margin: 0 auto 25px auto;
    background-color: #f5f5f5;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#pay-now-btn {
    background: #4CAF50;
    color: white;
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#customer-profile-message {
    margin: 10px 0;
    font-weight: bold;
}

/* Mobile responsive styles for auth screens */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding: 0;
        margin: 0;
    }

    button {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;  /* For better touch targets */
    }

    input, select {
        font-size: 16px;  /* Prevent iOS zoom */
        padding: 12px;
        min-height: 44px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 10px 0;
        padding: 0 16px;
    }

    .dashboard-header button {
        width: 100%;
    }

    .balance-box {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        margin: 0 16px;
    }

    .balance-box h2 {
        font-size: 1.2em;
        margin: 0;
    }

    .service-type-section {
        flex-direction: column;
        gap: 8px;
    }

    .service-type-section label {
        width: 100%;
        margin: 4px 0;
    }
}

@media (max-width: 480px) {
    .auth-container {
        width: 100vw;
        max-width: 100%;
        padding: 30px 20px;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        transform: none;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: #fff;
        box-shadow: none;
        border: none;
        gap: 15px;
    }

    .auth-container h1 {
        font-size: 20px;
        margin: 0 0 25px;
        padding-top: 20px;
    }

    .auth-container h2 {
        font-size: 18px;
        margin: 10px 0;
    }

    .auth-container h3 {
        font-size: 16px;
        margin: 15px 0;
    }

    .tab-toggle {
        gap: 8px;
        margin-top: 20px;
    }

    .tab-toggle button {
        padding: 12px;
        font-size: 14px;
        min-width: auto;
    }

    .auth-form input {
        padding: 12px;
        font-size: 16px;
        margin: 12px 0;
    }

    .auth-form button:not(.text-btn) {
        padding: 14px;
        font-size: 14px;
        margin: 20px 0;
        width: 100%;
    }

    .switch-auth {
        margin: 15px 0 0;
        text-align: center;
        color: #666;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    #customer-login-section, 
    #customer-register-section {
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    #customer-login-section.hidden, 
    #customer-register-section.hidden {
        display: none;
        opacity: 0;
    }

    #customer-form:not(.hidden) {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #customer-form h3 {
        margin-top: 10px;
        color: #45a049;
    }

    h2, h3 {
        font-size: 1.2em;
        margin: 15px 0;
    }
}
