/* ===================================
   Authentication Pages Styles
   JobTermin - auth.css
   =================================== */

/* Reset & Base */
.auth-page {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1425 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40rem;
    height: 40rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40rem;
    height: 40rem;
    background: rgba(34, 211, 238, 0.06);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

/* Container */
.auth-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.4) 0%, rgba(30, 41, 59, 0.4) 100%);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 2rem;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* ===================================
   Left Side - Branding
   =================================== */

.auth-branding {
    padding: 4rem 3rem;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-right: 1px solid rgba(34, 211, 238, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-branding-content {
    max-width: 420px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-logo svg {
    width: 3rem;
    height: 3rem;
    color: #22d3ee;
}

.auth-logo span {
    font-size: 1.75rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.auth-branding h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 1.125rem;
    color: #cffafe;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 300;
}

.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.auth-benefit {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #cffafe;
    font-size: 1rem;
}

.auth-benefit svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #22d3ee;
    flex-shrink: 0;
    stroke: #22d3ee;
}

.auth-trust {
    padding-top: 2rem;
    border-top: 1px solid rgba(34, 211, 238, 0.2);
}

.auth-trust p {
    color: rgba(207, 250, 254, 0.8);
    font-size: 0.875rem;
    margin: 0;
}

/* ===================================
   Right Side - Form
   =================================== */

.auth-form-wrapper {
    padding: 4rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    max-height: 90vh;
}

.auth-form-container {
    width: 100%;
    max-width: 480px;
}

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

.auth-form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.auth-form-header p {
    color: #cffafe;
    font-size: 1rem;
    font-weight: 300;
}

/* Messages */
.auth-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

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

.auth-message svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.auth-message div {
    flex: 1;
}

.auth-message strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.auth-message p {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.auth-success svg {
    color: #22c55e;
    stroke: #22c55e;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-error svg {
    color: #ef4444;
    stroke: #ef4444;
}

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

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #cffafe;
    display: block;
}

.required {
    color: #f87171;
    margin-left: 0.25rem;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    color: rgba(34, 211, 238, 0.5);
    stroke: rgba(34, 211, 238, 0.5);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: rgba(207, 250, 254, 0.4);
}

.input-wrapper input:focus {
    border-color: #22d3ee;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.input-wrapper input:focus + .input-icon {
    color: #22d3ee;
    stroke: #22d3ee;
}

.input-wrapper input.error {
    border-color: #ef4444;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: rgba(34, 211, 238, 0.5);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #22d3ee;
}

.toggle-password svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
}

/* Field Hints & Errors */
.field-hint {
    font-size: 0.75rem;
    color: rgba(207, 250, 254, 0.6);
    margin-top: 0.25rem;
}

.field-error {
    font-size: 0.75rem;
    color: #f87171;
    margin-top: 0.25rem;
    display: none;
}

.field-error.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Role Selector */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.role-option {
    cursor: pointer;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    height: 100%;
}

.role-option:hover .role-card {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(15, 23, 42, 0.8);
}

.role-option.active .role-card {
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

.role-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.role-option.active .role-icon {
    background: rgba(34, 211, 238, 0.2);
    transform: scale(1.1);
}

.role-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: #22d3ee;
    stroke: #22d3ee;
}

.role-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.role-content p {
    font-size: 0.875rem;
    color: #cffafe;
    margin: 0;
    opacity: 0.8;
}

/* Checkbox */
.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(34, 211, 238, 0.5);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-color: #06b6d4;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
}

.checkbox-text {
    color: #cffafe;
    line-height: 1.5;
    flex: 1;
}

.checkbox-text a {
    color: #22d3ee;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.checkbox-text a:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.5);
    transform: translateY(-2px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-loader svg {
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(34, 211, 238, 0.2);
}

.auth-footer p {
    color: #cffafe;
    font-size: 0.95rem;
    margin: 0;
}

.auth-link {
    color: #22d3ee;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-branding {
        border-right: none;
        border-bottom: 1px solid rgba(34, 211, 238, 0.2);
        padding: 3rem 2rem;
    }

    .auth-branding-content {
        text-align: center;
    }

    .auth-logo {
        justify-content: center;
    }

    .auth-benefits {
        align-items: center;
    }

    .auth-benefit {
        justify-content: center;
    }

    .auth-form-wrapper {
        padding: 3rem 2rem;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 1rem;
    }

    .auth-container {
        border-radius: 1rem;
    }

    .auth-branding {
        padding: 2rem 1.5rem;
    }

    .auth-branding h1 {
        font-size: 2rem;
    }

    .auth-subtitle {
        font-size: 1rem;
    }

    .auth-form-wrapper {
        padding: 2rem 1.5rem;
        max-height: none;
    }

    .auth-form-header h2 {
        font-size: 1.5rem;
    }

    .role-selector {
        grid-template-columns: 1fr;
    }

    .role-card {
        flex-direction: row;
        text-align: left;
        padding: 1.25rem;
    }

    .role-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .role-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}
