/* ========= Global Styles & Variables ========= */
:root {
    --primary-blue: #3B82F6; /* A vibrant blue */
    --text-dark: #1A202C;
    --text-light: #5A6A85;
    --text-lighter: #8894A7;
    --border-color: #DCE1E9;
    --input-bg: #FFFFFF;
    --body-bg: #F8F9FE;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
}

/* ========= Header / Logo ========= */
.page-header {
    padding: 24px 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ========= Main Content ========= */
.main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.register-header {
    margin-bottom: 32px;
}

.register-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.register-header p {
    font-size: 16px;
    color: var(--text-light);
}

/* ========= Form Styling ========= */
form {
    text-align: left;
}

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

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

.form-group .label-optional {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: var(--text-lighter);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .eye-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
}

/* ========= Checkbox ========= */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.form-check label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 0;
}

/* ========= Submit Button ========= */
.btn-submit {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-blue);
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #2563EB; /* Darker blue */
}

/* ========= Login Link ========= */
.login-link {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-light);
}

.login-link a {
    font-weight: 600;
}

/* ========= Footer ========= */
.page-footer {
    width: 100%;
    padding: 24px 40px;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.page-footer .footer-links {
    margin-top: 4px;
}

.page-footer .footer-links a {
    color: var(--text-light);
    margin: 0 8px;
}

.page-footer .footer-links span {
    color: var(--text-lighter);
}
/* =============================
   GLOBAL LOADER STYLES
   ============================= */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent white */
    z-index: 10000; /* High z-index to cover Sidebar and Navbar */
    display: none; /* Hidden by default, toggled by JS */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* The Spinning Circle */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0; 
    border-top: 5px solid #007BFF; /* Admin Blue Theme */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}   
.error-msg {
    display: block;
    min-height: 18px; /* Prevents layout jumping when error appears */
    margin-top: 4px;
    font-weight: 500;
}

.input-error {
    border: 1px solid #ff4d4d !important;
    background-color: #fff2f2;
}