/* ==========================================
   APPLICATION / FORM PAGES
   ========================================== */

/* Additional tokens for form pages */
:root {
    --color-border: #E5E7EB;
    --surface-100: #F8F9FA;
    --surface-200: #E9ECEF;
    --text-muted: #6B7280;
}

/* ==========================================
   PAGE LAYOUT
   ========================================== */

.form-page-bg {
    width: 100%;
    background: var(--color-background);
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 24px 48px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    color: var(--blue-deep);
    transform: translateX(-3px);
}

.back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-2px);
}

.faceid-content {
    padding-bottom: calc(var(--safe-bottom) + 100px);
}

/* ==========================================
   PAGE HEADER
   ========================================== */

.form-page-header {
    margin-bottom: 36px;
    animation: fadeInUp 0.5s ease-out;
}

.form-icon-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.download-inline {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s, transform 0.15s;
    border-radius: var(--radius-sm);
}

.download-inline:active {
    opacity: 0.5;
    transform: translateY(-50%) scale(0.95);
}

.download-inline:hover {
    background: rgba(0, 0, 0, 0.04);
}

.form-icon-circle {
    width: 128px;
    height: 128px;
    margin-top: -24px;
    margin-bottom: -24px;
    margin-left: -12px;
    pointer-events: none;
    color: var(--color-text);
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.form-page-desc {
    font-size: 14px;
    color: var(--color-gray-dark);
    line-height: 1.5;
}

.form-subtitle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--color-gray-dark);
}

.form-subtitle-row a {
    color: var(--blue-mid);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.form-subtitle-row a:active {
    opacity: 0.6;
}

/* ==========================================
   SUBMIT BUTTON
   ========================================== */

.btn-primary-full {
    background-color: var(--blue-deep);
    color: var(--color-white);
    font-weight: 600;
    font-size: 1rem;
    padding: 16px;
    border-radius: var(--radius-pill);
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.25s var(--ease-out-expo, ease), opacity 0.2s, transform 0.15s, box-shadow 0.25s ease;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary-full:hover:not(:disabled) {
    background-color: var(--blue-hover, #1565b8);
    box-shadow: 0 4px 16px rgba(25, 116, 210, 0.25);
    transform: translateY(-1px);
}

.btn-primary-full:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
    box-shadow: none;
}

.btn-primary-full:disabled {
    background-color: var(--blue-deep);
    color: var(--color-white);
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
}

/* ==========================================
   FORM FIELDS
   ========================================== */

.register-form-area,
.login-form-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeInUp 0.5s ease-out 0.15s both;
}

.login-form-area {
    align-items: center;
    gap: 4px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.field-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-white, #fff);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.field-input:focus {
    border-color: var(--blue-deep);
    box-shadow: 0 0 0 3px rgba(25, 116, 210, 0.1);
    background: #fff;
}

.field-input:hover:not(:focus):not(:disabled) {
    border-color: #c0c0c0;
}

.field-input.valid {
    border-color: var(--color-olive);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

.field-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.field-input::placeholder {
    color: var(--color-gray);
    font-weight: 400;
}

.field-note {
    font-size: 12px;
    color: var(--color-gray);
    font-style: italic;
}

.field-error {
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
    background: #fef2f2;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
    animation: fadeInUp 0.2s ease-out;
}

.field-success {
    font-size: 12px;
    color: var(--color-olive);
    font-weight: 600;
}

/* ==========================================
   PORTFOLIO UPLOAD ZONE
   ========================================== */

.upload-zone {
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--blue-deep);
    background: rgba(25, 116, 210, 0.03);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.upload-zone.drag-over {
    border-color: var(--blue-deep);
    border-style: solid;
    background: rgba(25, 116, 210, 0.06);
    box-shadow: 0 0 0 3px rgba(25, 116, 210, 0.08);
    transform: scale(1.01);
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    text-align: center;
}

.upload-zone-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(25, 116, 210, 0.08), rgba(25, 116, 210, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-deep);
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.upload-zone:hover .upload-zone-icon {
    transform: scale(1.08);
}

.upload-zone-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.upload-zone-hint {
    font-size: 12px;
    color: var(--color-gray);
    margin: 0;
    line-height: 1.4;
    max-width: 240px;
}

.upload-zone-types {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.upload-type-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray);
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 8px;
    border-radius: 4px;
}

.upload-zone-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(22, 163, 74, 0.05);
    border-top: 1px solid rgba(22, 163, 74, 0.1);
}

.upload-preview-file {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-olive);
    min-width: 0;
}

.upload-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-preview-remove {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(220, 38, 38, 0.06);
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.upload-preview-remove:hover {
    background: rgba(220, 38, 38, 0.12);
    transform: scale(1.05);
}

/* ==========================================
   PHONE INPUT ROW
   ========================================== */

.phone-input-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.phone-prefix {
    font-size: 15px;
    font-weight: 700;
    color: var(--blue-deep);
    background: #e8e8e8;
    padding: 14px;
    border: 1.5px solid #e0e0e0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    white-space: nowrap;
    user-select: none;
}

.phone-field {
    border-radius: 0 12px 12px 0 !important;
}

/* ==========================================
   APPLICATION SUCCESS
   ========================================== */

.apply-success-wrap {
    text-align: center;
    padding: 40px 28px;
    max-width: 380px;
    animation: fadeInUp 0.6s ease-out;
}

.apply-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-olive);
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.apply-success-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.apply-success-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-deep);
    margin-bottom: 12px;
}

.apply-success-desc {
    font-size: 14px;
    color: var(--color-gray-dark);
    line-height: 1.6;
    margin-bottom: 20px;
}

.apply-success-info {
    background: var(--color-white);
    border-radius: var(--radius-md, 12px);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.apply-success-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
}

.apply-success-row svg {
    color: var(--color-gray-dark);
    flex-shrink: 0;
}

/* ==========================================
   SUCCESS PAGE (Full Screen)
   ========================================== */

.success-bg {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(170deg, #1974d2 0%, #145c99 40%, #0f406b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-content {
    text-align: center;
    padding: 40px 32px;
    max-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.success-check {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    margin: 0 auto 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.3);
    }

    50% {
        box-shadow: 0 0 0 16px rgba(74, 222, 128, 0);
    }
}

.success-title {
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 12px;
}

.success-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    top: calc(var(--safe-top, 0px) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--color-text);
    color: var(--color-white);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   HIRING BANNER
   ========================================== */

.apply-hiring-banner {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--color-border, #e5e7eb);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.apply-hiring-banner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 601px) {
    .apply-hiring-banner {
        border-color: rgba(25, 116, 210, 0.25);
    }
}

.apply-banner-icon {
    width: 38px;
    height: 38px;
    background: rgba(25, 116, 210, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-deep);
    flex-shrink: 0;
}

.apply-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apply-banner-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-deep);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.apply-banner-role {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

/* ==========================================
   FORM SECTION LABELS
   ========================================== */

.form-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-gray);
    margin-top: 4px;
}

.form-section-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 4px 0 0;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    font-family: var(--font-family);
}

select.field-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

select.field-input:hover:not(:focus):not(:disabled) {
    border-color: #c0c0c0;
}