/* ==============================================================================
   KEYWALA - MODERN AUTHENTICATION & LOGIN/REGISTER STYLES
   ============================================================================== */

/* --- 1. Page Background & Breadcrumb Wrapper --- */
.kw-auth-page-wrap {
    background: #f8fafc;
    min-height: calc(100vh - 200px);
    padding: 24px 0 60px;
}

.kw-auth-breadcrumb-wrap {
    background: transparent;
    padding: 0 0 16px;
}

.kw-auth-breadcrumb {
    background: transparent !important;
    padding: 0;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.kw-auth-breadcrumb .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.kw-auth-breadcrumb .breadcrumb-item a:hover {
    color: #008746;
}

.kw-auth-breadcrumb .breadcrumb-item.active {
    color: #0f172a;
    font-weight: 600;
}

.kw-auth-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #cbd5e1;
    content: "›";
    font-size: 15px;
    line-height: 1;
    padding: 0 8px;
}

/* --- 2. Hero Header --- */
.kw-auth-hero {
    text-align: center;
    margin-bottom: 32px;
}

.kw-auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.kw-auth-hero-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .kw-auth-hero-title {
        font-size: 32px;
    }
}

.kw-auth-hero-sub {
    font-size: 14.5px;
    color: #64748b;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- 3. Auth Cards Grid --- */
.kw-auth-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.kw-auth-col-login {
    width: 100%;
    padding: 0 12px;
    margin-bottom: 24px;
}

.kw-auth-col-register {
    width: 100%;
    padding: 0 12px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .kw-auth-col-login {
        width: 42%;
        margin-bottom: 0;
    }
    .kw-auth-col-register {
        width: 58%;
        margin-bottom: 0;
    }
}

/* --- 4. Card Box --- */
.kw-auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    padding: 32px 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kw-auth-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.08), 0 10px 14px -6px rgba(15, 23, 42, 0.04);
}

.kw-login-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    border-top: 4px solid #008746;
}

.kw-register-card {
    background: #ffffff;
    border-top: 4px solid #0284c7;
}

/* --- 5. Card Header --- */
.kw-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.kw-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #008746;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kw-icon-blue {
    background: #f0f9ff;
    color: #0284c7;
}

.kw-card-head-text {
    flex: 1;
}

.kw-badge-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
}

.kw-badge-green {
    background: #ecfdf5;
    color: #065f46;
}

.kw-badge-blue {
    background: #f0f9ff;
    color: #0369a1;
}

.kw-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px;
    letter-spacing: -0.3px;
}

.kw-card-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* --- 6. Form Inputs & Groups --- */
.kw-auth-card .form-group {
    margin-bottom: 16px;
}

.kw-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.kw-field-label .required {
    color: #dc2626;
    margin-left: 2px;
}

.kw-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.kw-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    z-index: 3;
    transition: color 0.15s ease;
}

.kw-input-field {
    width: 100%;
    height: 46px;
    padding: 10px 14px 10px 42px;
    font-size: 14px;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease !important;
}

.kw-input-field:focus {
    border-color: #008746 !important;
    box-shadow: 0 0 0 3.5px rgba(0, 135, 70, 0.14) !important;
    outline: none !important;
    background-color: #ffffff !important;
}

.kw-input-field:focus + .kw-input-icon,
.kw-input-wrap:focus-within .kw-input-icon {
    color: #008746;
}

/* Chrome/Edge Autofill Fix (Prevents bright blue/yellow background) */
.kw-input-field:-webkit-autofill,
.kw-input-field:-webkit-autofill:hover,
.kw-input-field:-webkit-autofill:focus,
.kw-input-field:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Password Toggle Button */
.kw-pwd-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 6px;
    cursor: pointer;
    font-size: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.kw-pwd-toggle-btn:hover {
    color: #008746;
    background-color: #f1f5f9;
}

.kw-pwd-toggle-btn:focus {
    outline: none;
}

/* Select Dropdown Styling */
select.kw-input-field {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
    padding-right: 40px;
    cursor: pointer;
}

/* Textarea Styling */
textarea.kw-input-field {
    height: auto !important;
    min-height: 80px;
    resize: vertical;
    padding-left: 42px;
}

/* Section Header in Register Form */
.kw-form-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 12px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.kw-form-section-head:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.kw-form-section-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    margin: 0;
}

.kw-form-section-pill {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0369a1;
}

/* Utility Row (Remember me & Forgot Password) */
.kw-auth-utility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 18px;
    font-size: 13px;
}

.kw-remember-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.kw-remember-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #008746;
    cursor: pointer;
}

.kw-forgot-link {
    color: #008746 !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

.kw-forgot-link:hover {
    color: #006835 !important;
    text-decoration: underline !important;
}

/* --- 7. Buttons --- */
.kw-auth-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #008746 0%, #006b37 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 135, 70, 0.22);
    transition: all 0.2s ease;
}

.kw-auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 135, 70, 0.32);
    background: linear-gradient(135deg, #00964e 0%, #00783d 100%);
    color: #ffffff !important;
    text-decoration: none !important;
}

.kw-auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 135, 70, 0.2);
}

.kw-auth-btn-blue {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}

.kw-auth-btn-blue:hover {
    background: linear-gradient(135deg, #0396e3 0%, #0274b3 100%);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.32);
}

/* --- 8. Error / Success Alerts --- */
.kw-auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kw-auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.kw-auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.kw-input-error-msg {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    margin-top: 5px;
}

/* --- 9. Benefits & Trust Highlights --- */
.kw-benefits-box {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

.kw-benefits-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kw-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 575.98px) {
    .kw-benefits-grid {
        grid-template-columns: 1fr;
    }
}

.kw-benefit-item {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.kw-benefit-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #008746;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.kw-security-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.kw-security-badge-row i {
    color: #008746;
}

/* --- 10. Bottom Global Trust Banner --- */
.kw-auth-trust-banner {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    padding: 20px 24px;
    margin-top: 36px;
}

.kw-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.kw-trust-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #008746;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kw-trust-text-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.kw-trust-text-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

