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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Wider container for registration forms */
.auth-container.registration {
    max-width: 900px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #667eea;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Registration form layout - 2 columns */
.registration .auth-card form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    column-gap: 30px;
}

.registration .profile-upload {
    grid-column: 1 / -1;
}

.registration .auth-header {
    grid-column: 1 / -1;
}

.registration #alertContainer {
    grid-column: 1 / -1;
}

.registration .btn-primary,
.registration .loading {
    grid-column: 1 / -1;
}

.registration .form-row {
    grid-column: span 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 10px;
}

.loading.show {
    display: block;
}

/* Profile Picture Upload */
.profile-upload {
    text-align: center;
    margin-bottom: 25px;
}

.profile-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid #ddd;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
}

.upload-btn-wrapper {
    position: relative;
    display: inline-block;
}

.upload-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #5568d3;
}

.upload-btn-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-info {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.upload-progress {
    margin-top: 10px;
    display: none;
}

.upload-progress.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-icon.warning {
    color: #f39c12;
}

.modal-icon.success {
    color: #2ecc71;
}

.modal-icon.error {
    color: #e74c3c;
}

.modal-content h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.modal-content p {
    color: #666;
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-btn {
    padding: 12px 32px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn:hover {
    background: #5568d3;
}

/* Multi-select Dropdown Styles */
.multi-select-dropdown {
    position: relative;
    width: 100%;
}

.multi-select-button {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s;
}

.multi-select-button:hover {
    border-color: #667eea;
}

.multi-select-button span:first-child {
    flex: 1;
    text-align: left;
}

.multi-select-button span:last-child {
    color: #999;
    font-size: 12px;
}

.multi-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.multi-select-options label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0;
    font-weight: normal;
}

.multi-select-options label:hover {
    background: #f8f9fa;
}

.multi-select-options input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.multi-select-options span {
    font-size: 14px;
    color: #333;
}
