/* Login Page - Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.login-logo i {
    font-size: 2rem;
    color: #ffffff;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.login-header p {
    color: #6b7280;
    font-size: 0.9375rem;
    margin: 0;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    animation: slideDown 0.3s ease;
    line-height: 1.5;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.form-group label i {
    color: #FF0000;
    width: 18px;
    text-align: center;
    font-size: 0.9375rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.5;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

.form-input:focus-visible {
    outline: none;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.password-toggle:hover {
    color: #FF0000;
    background: rgba(255, 0, 0, 0.1);
}

.password-toggle:focus {
    outline: none;
}

.password-toggle i {
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #1f2937;
    user-select: none;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF0000;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.forgot-link {
    color: #FF0000;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    margin-top: 0.5rem;
    font-family: inherit;
    line-height: 1.5;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login span {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
}

.btn-login i {
    font-size: 1rem;
}

/* Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.register-link-text {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    color: #1f2937;
    line-height: 1.6;
    padding: 0 0.5rem;
}

.register-link {
    color: #FF0000;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 0.25rem;
}

.register-link:hover {
    color: #CC0000;
    text-decoration: underline;
}

.back-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.back-link:hover {
    color: #FF0000;
}

.back-link i {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 480px) {
    .login-page {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    .login-logo i {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-link {
        align-self: flex-end;
    }
    
    .register-link-text {
        font-size: 0.875rem;
        padding: 0;
        margin-bottom: 1.25rem;
        display: block;
        width: 100%;
    }
    
    .register-link {
        display: inline;
        word-break: break-word;
    }
    
    .login-footer {
        padding-top: 1.25rem;
    }
}

/* Register Page Styles */
.register-page {
    padding: var(--spacing-lg) 0;
    min-height: 70vh;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-lg);
    font-size: 0.9375rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--gray);
}

.register-section {
    max-width: 950px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-light);
}

.register-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--gray-light);
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--gray);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.alert ul {
    margin: 0.75rem 0 0 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.alert li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--gray-lighter);
    border-radius: 12px;
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.form-section:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.75rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
    order: -1;
}

.section-title i {
    font-size: 1.125rem;
    color: var(--primary);
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.section-description {
    color: var(--gray);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.form-section-highlight {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.03) 0%, rgba(255, 0, 0, 0.01) 100%);
    border-color: rgba(255, 0, 0, 0.2);
}

/* Person Type Toggle */
.person-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.toggle-option {
    position: relative;
    cursor: pointer;
}

.toggle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-card {
    padding: 2rem 1.5rem;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.toggle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.toggle-card i {
    font-size: 2.5rem;
    color: var(--gray);
    transition: all 0.3s ease;
    background: var(--gray-lighter);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toggle-card span {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.0625rem;
    transition: var(--transition);
}

.toggle-option input[type="radio"]:checked + .toggle-card {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(255, 0, 0, 0.02) 100%);
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 0, 0, 0.1);
    transform: translateY(-3px);
}

.toggle-option input[type="radio"]:checked + .toggle-card::before {
    transform: scaleX(1);
}

.toggle-option input[type="radio"]:checked + .toggle-card i {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    transform: scale(1.1);
}

.toggle-option input[type="radio"]:checked + .toggle-card span {
    color: var(--primary);
}

.toggle-option:hover .toggle-card {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 2px 12px rgba(255, 0, 0, 0.15);
}

.toggle-option:hover .toggle-card i {
    transform: scale(1.05);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.625rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.required {
    color: var(--primary);
    font-weight: 700;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 1rem 1.125rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    font-family: inherit;
    color: var(--dark);
    line-height: 1.5;
}

.form-input::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1), 0 2px 8px rgba(255, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-input:focus:valid {
    border-color: var(--secondary);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.form-input select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231f2937' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.125rem;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(255, 0, 0, 0.1);
}

/* Form Actions */
.form-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-light);
    text-align: center;
}

.btn-large {
    padding: 1.125rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    min-width: 240px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    font-family: inherit;
    text-decoration: none;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-large:active {
    transform: translateY(0);
}

.btn-large i {
    transition: var(--transition);
}

.btn-large:hover i {
    transform: translateX(3px);
}

.form-footer-text {
    margin-top: 1.75rem;
    color: var(--gray);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.form-footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.form-footer-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.form-footer-text a:hover::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .register-page {
        padding: var(--spacing-md) 0;
    }

    .register-section {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        margin: 0 1rem;
    }

    .register-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 0.9375rem;
    }

    .form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .person-type-toggle {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .toggle-card {
        padding: 1.5rem 1.25rem;
    }

    .toggle-card i {
        font-size: 2rem;
        width: 56px;
        height: 56px;
    }

    .form-input {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .form-actions {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .btn-large {
        width: 100%;
        min-width: auto;
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .register-section {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
        border-radius: 8px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .register-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .form-section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 8px;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .toggle-card {
        padding: 1.25rem 1rem;
        gap: 0.75rem;
    }

    .toggle-card i {
        font-size: 1.75rem;
        width: 48px;
        height: 48px;
    }

    .toggle-card span {
        font-size: 0.9375rem;
    }

    .form-grid {
        gap: 1rem;
    }

    .form-input {
        padding: 0.75rem 0.875rem;
    }
}
