:root {
    --primary-color: #1a237e;
    --secondary-color: #283593;
    --accent-color: #3949ab;
    --text-color: #333;
    --background-color: #f5f5f5;
    --form-background: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #2e7d32;
    --error-color: #c62828;
}

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

/* Reset form elements to ensure consistent styling */
input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.form-container {
    background-color: var(--form-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Phone input group styling */
.phone-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
}

.country-code-select {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
    cursor: pointer;
    font-family: inherit;
}

.country-code-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.2);
}

.country-code-select option {
    font-family: inherit;
    padding: 0.5rem;
}

.phone-input-group input[type="tel"] {
    flex: 1;
    min-width: 0;
    width: auto !important;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
    width: 100% !important;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.2);
}

/* Specific styling for password inputs to ensure consistent sizing */
input[type="password"] {
    width: 100% !important;
    min-width: 100%;
    box-sizing: border-box;
    height: auto;
    display: block;
}

/* Toggle switch styling */
.toggle-group {
    margin-top: 1rem;
}

.toggle-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
}

.info-icon {
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: help;
    font-weight: bold;
    transition: color 0.3s ease;
}

.info-icon:hover {
    color: var(--primary-color);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.toggle-input {
    display: none;
}

.toggle-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-label .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-text {
    font-weight: 500;
    color: var(--text-color);
    min-width: 30px;
}

.toggle-input:checked + .toggle-label .toggle-text {
    color: var(--primary-color);
}

/* Tooltip styling */
.info-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

.info-icon[title]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -0.5rem;
}

.checkbox-group,
.radio-group {
    margin-top: 1rem;
}

.checkbox-container,
.radio-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.checkbox-container label,
.radio-container label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
    }

    .phone-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .country-code-select {
        min-width: 100%;
    }

    .checkbox-container,
    .radio-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Ensure password fields maintain full width on mobile */
    input[type="password"] {
        width: 100% !important;
        min-width: 100%;
    }
}

/* Form Validation Styles */
input:invalid {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success Message */
.success-message {
    color: var(--success-color);
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: rgba(46, 125, 50, 0.1);
    border-radius: 4px;
}

/* Dashboard Button */
.dashboard-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.dashboard-btn:hover {
    background-color: var(--accent-color);
}

/* Logout Button */
.logout-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--error-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #b71c1c;
} 