/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-width: 320px;
    font-family: 'Arial', sans-serif;
    background-color: #030353;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* Site Header */
#arsc-header {
    width: 100%;
    height: 60px; /* Reduced height */
    background-color: #030353;
    color: #ffffff;
    padding: 5px 0; /* Less padding */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap; /* Prevents elements from stacking */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

#arsc-header .header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    max-width: 100%;
    padding: 0 15px;
    flex-wrap: nowrap; /* Prevent stacking */
}

#arsc-header .header-logo {
    width: 40px; /* Reduced size */
    height: auto;
}


#arsc-header h1 {
    font-size: 1.3em; /* Smaller font */
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap; /* Prevents wrapping */
    margin: 0;
}


/* Main Content Area */
.account-creation-container {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 90px 20px 40px;
    width: 100%;
    min-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

.account-form-box {
    background: linear-gradient(135deg, #1c3a57, #030353);
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.account-form-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Form Title and Description */
.account-form-box h2 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: clamp(1.5em, 3vw, 1.8em);
    font-weight: 600;
    text-align: center;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    min-width: calc(50% - 10px);
    margin-bottom: 20px;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

/* Input Fields */
.account-form-input,
.account-form-select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    font-size: 1.2em;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    outline: none;
}

/* Date Input Specific */
input[type="date"].account-form-input {
    padding: 10px 14px;
}

/* Fourth Row Specific Layout */
.fourth-row {
    display: flex;
    width: 100%;
    gap: 20px;
}

.fourth-row .form-group {
    flex: 1;
    min-width: calc(50% - 10px);
}

.button-group {
    display: flex;
    width: 100%;
    margin-bottom: 0;
    flex-direction: column; /* Stack buttons on mobile */
    gap: 15px;
}

.button-group .account-form-button {
    flex: 1;
    min-height: 55px;
    font-size: 1.4em;
    padding: 12px;
    font-weight: 600;
    color: #ffffff;
    border-radius: 6px;
    border: none;
    outline: none;
}

/* Submit button styles */
.button-group .account-form-button:not(.back-button) {
    background-color: #030353;
}

.button-group .account-form-button:not(.back-button):hover {
    background-color: #040474;
}

/* Back button styles */
.button-group .back-button {
    background-color: #850000;
}

.button-group .back-button:hover {
    background-color: #660000;
}

/* Focus States */
.account-form-input:focus,
.account-form-select:focus {
    border-color: #850000;
    box-shadow: 0 0 5px rgba(133, 0, 0, 0.5);
}

.account-form-button:hover {
    background-color: #a80000;
}

/* Footer */
#arsc-footer {
    flex-shrink: 0;
    background-color: #030353;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

/* --- RESPONSIVE HEADER FIX --- */
@media screen and (max-width: 768px) {
    #arsc-header {
        display: flex;
        align-items: center;
        justify-content: space-between; /* Keep logos aligned on edges */
        padding: 10px 15px;
        text-align: center;
        height: auto;
    }

    #arsc-header .header-logo {
        width: 35px; /* Keep logos consistent */
        height: auto;
    }

    #arsc-header h1 {
        font-size: 1em; /* Slightly smaller */
        line-height: 1.2;
        white-space: normal; /* Prevent text cutoff */
        text-align: center;
        flex: 1; /* Ensures text takes up remaining space */
        margin-top: 5px; 
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    #arsc-header {
       padding: 12px 10px;
    }

    #arsc-header .header-logo {
        width: 30px;
    }

    #arsc-header h1 {
        font-size: 0.9em; /* Even smaller for mobile */
        line-height: 1.1; 
        margin-top: 5px;
    }
}