/* ============================================================
   e-TASK v4 — Modern Login Form Styles & Aligned Controls
   ============================================================ */

.ta-auth-form .fi-simple-header,
.ta-auth-form .etask-login-brand {
    display: none !important;
}

.ta-auth-form .fi-fo-field-wrp {
    margin-bottom: 1.25rem !important;
}

/* Force dark, crisp typography on light auth panel regardless of system dark-mode */
.ta-auth-form label,
.ta-auth-form .fi-fo-field-wrp-label,
.ta-auth-form .fi-fo-field-wrp-label span,
.ta-auth-form .fi-fo-field-label,
.ta-auth-form .fi-checkbox-label,
.ta-auth-form span.fi-fo-field-wrp-label-text,
.ta-auth-form .fi-fo-field-wrp-label-text,
.ta-auth-form span,
.ta-auth-form p,
.dark .ta-auth-form label,
.dark .ta-auth-form .fi-fo-field-wrp-label,
.dark .ta-auth-form .fi-fo-field-wrp-label span,
.dark .ta-auth-form .fi-fo-field-label,
.dark .ta-auth-form .fi-checkbox-label,
.dark .ta-auth-form span.fi-fo-field-wrp-label-text,
.dark .ta-auth-form .fi-fo-field-wrp-label-text,
.dark .ta-auth-form span,
.dark .ta-auth-form p {
    color: #111827 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Asterisk in bright red */
.ta-auth-form sup,
.ta-auth-form .text-danger-600,
.ta-auth-form .fi-fo-field-wrp-label-required,
.dark .ta-auth-form sup,
.dark .ta-auth-form .text-danger-600,
.dark .ta-auth-form .fi-fo-field-wrp-label-required {
    color: #ef4444 !important;
    font-weight: 700 !important;
    display: inline !important;
}

/* Input container wrapper */
.ta-auth-form .fi-input-wrp,
.dark .ta-auth-form .fi-input-wrp {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 2.875rem !important;
    min-height: 2.875rem !important;
    width: 100% !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.75rem !important;
    background: #ffffff !important;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    padding: 0 !important;
    transition: all 200ms ease;
}

.ta-auth-form .fi-input-wrp:focus-within,
.dark .ta-auth-form .fi-input-wrp:focus-within {
    border-color: #15803d !important;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15) !important;
    outline: none !important;
}

/* Input element */
.ta-auth-form .fi-input,
.dark .ta-auth-form .fi-input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    color: #111827 !important;
    height: 100% !important;
    width: 100% !important;
    flex: 1 1 0% !important;
    outline: none !important;
}

.ta-auth-form .fi-input::placeholder,
.dark .ta-auth-form .fi-input::placeholder {
    color: #9ca3af !important;
}

/* Respect Alpine x-show for password reveal */
.ta-auth-form [style*="display: none"],
.ta-auth-form [style*="display:none"],
.ta-auth-form [style*="display: none;"],
.ta-auth-form [style*="display:none;"] {
    display: none !important;
}

/* Suffix and password reveal button */
.ta-auth-form .fi-input-wrp-suffix,
.ta-auth-form .fi-input-wrp-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-right: 0.75rem !important;
}

.ta-auth-form .fi-input-wrp button[type="button"],
.ta-auth-form .fi-input-wrp-action-btn,
.ta-auth-form .fi-icon-btn,
.dark .ta-auth-form .fi-input-wrp button[type="button"],
.dark .ta-auth-form .fi-input-wrp-action-btn,
.dark .ta-auth-form .fi-icon-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #6b7280 !important;
    padding: 0.25rem !important;
    cursor: pointer !important;
    transition: color 150ms ease;
}

.ta-auth-form .fi-input-wrp button[type="button"]:hover,
.ta-auth-form .fi-icon-btn:hover {
    color: #111827 !important;
}

/* Checkbox */
.ta-auth-form .fi-fo-field-wrp:has(input[type="checkbox"]),
.ta-auth-form .fi-fo-checkbox-wrp,
.ta-auth-form .fi-checkbox-input-wrp,
.dark .ta-auth-form .fi-fo-field-wrp:has(input[type="checkbox"]),
.dark .ta-auth-form .fi-fo-checkbox-wrp,
.dark .ta-auth-form .fi-checkbox-input-wrp {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

.ta-auth-form input[type="checkbox"] {
    border-radius: 0.375rem !important;
    border: 1px solid #d1d5db !important;
    color: #15803d !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
    cursor: pointer !important;
}

/* Submit Button — Premium Modern Corporate Button */
.ta-auth-form .fi-btn,
.ta-auth-form .fi-btn.fi-color,
.ta-auth-form button[type="submit"],
.dark .ta-auth-form .fi-btn,
.dark .ta-auth-form .fi-btn.fi-color,
.dark .ta-auth-form button[type="submit"] {
    width: 100% !important;
    min-height: 3rem !important;
    height: 3rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    border-radius: 0.75rem !important;
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px -1px rgba(21, 128, 61, 0.4), 0 2px 6px -1px rgba(21, 128, 61, 0.2) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-top: 0.5rem !important;
}

.ta-auth-form .fi-btn:hover,
.ta-auth-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 6px 20px -2px rgba(21, 128, 61, 0.5), 0 3px 8px -1px rgba(21, 128, 61, 0.25) !important;
    transform: translateY(-1px) !important;
}

.ta-auth-form .fi-btn:active,
.ta-auth-form button[type="submit"]:active {
    transform: translateY(0px) scale(0.99) !important;
    box-shadow: 0 2px 8px -1px rgba(21, 128, 61, 0.3) !important;
}

.ta-auth-form .fi-btn .fi-btn-label,
.ta-auth-form button[type="submit"] span,
.ta-auth-form button[type="submit"] {
    color: #ffffff !important;
    font-size: 0.9375rem !important; /* 15px */
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: capitalize !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* Cloudflare Turnstile — Full Width & Auto-Scaling for Any Screen */
.ta-auth-form .fi-fo-field-wrp:has([name="captcha"]),
.ta-auth-form .fi-fo-field-wrp:has([x-ref="turnstile"]),
.ta-auth-form .fi-fo-field-wrp:has(.cf-turnstile),
.ta-auth-form .fi-fo-field-wrp:has(iframe[src*="cloudflare"]) {
    margin-top: 0.75rem !important;
    margin-bottom: 1.25rem !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.ta-auth-form .fi-fo-field-wrp:has([name="captcha"]) .fi-fo-field-label,
.ta-auth-form .fi-fo-field-wrp:has([name="captcha"]) label[for="form.captcha"] {
    display: none !important;
}

.ta-auth-form div[x-ref="turnstile"],
.ta-auth-form .cf-turnstile,
.ta-auth-form .cf-turnstile iframe,
.ta-auth-form iframe[src*="challenges.cloudflare.com"],
.ta-auth-form iframe[src*="turnstile"] {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-radius: 0.75rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
    overflow: hidden !important;
}
