/* ═══════════════════════════════════════════════════
   firma-ekle.css — Firma Ekle Sayfası Stilleri
   ═══════════════════════════════════════════════════ */

:root {
    --kb-primary: #16a085;
    --radius: 16px;
}

.kb-firm-main { flex: 1 0 auto; }

.kb-firm-hero {
    background: linear-gradient(180deg, #ffffff, #eefcf7);
    border: 1px solid #e7f5ee;
    border-radius: var(--radius);
    padding: 18px 18px 14px;
    margin-bottom: 16px;
}
.kb-firm-hero h1 { font-size: 1.5rem; }

.kb-firm-identity { display: flex; align-items: center; gap: .75rem; margin-top: .4rem; }

.kb-firm-hero-cta {
    width: 100%; padding-top: 14px; margin-top: 18px; position: relative;
}
.kb-firm-hero-cta::before {
    content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; border-radius: 999px;
    background: linear-gradient(to right, rgba(15, 118, 110, .45), rgba(15, 118, 110, 0));
}

/* ── Adım göstergesi ── */
.kb-firm-steps {
    margin-top: 12px; display: flex; align-items: center; gap: .75rem;
    padding-top: 6px; border-top: 1px dashed #d1fae5;
}
.kb-firm-step { flex: 1 1 0; display: flex; align-items: center; gap: .45rem; min-width: 0; }
.kb-firm-step-circle {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 999px;
    border: 1px solid #bae6fd; display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 600; color: #0f766e; background: #eff6ff;
}
.kb-firm-step-label { font-size: .75rem; color: #6b7280; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

.kb-firm-step.is-active .kb-firm-step-circle {
    background: linear-gradient(135deg, #16a085, #0f766e); border-color: rgba(22, 160, 133, .85);
    color: #ecfdf5; box-shadow: 0 6px 14px rgba(22, 160, 133, .35);
}
.kb-firm-step.is-active .kb-firm-step-label { color: #0f766e; font-weight: 600; }
.kb-firm-step.is-completed .kb-firm-step-circle { background: #ecfdf5; border-color: rgba(22, 160, 133, .6); color: #0f766e; }
.kb-firm-step.is-completed .kb-firm-step-label { color: #047857; }

/* ── Avatar & Badge ── */
.kb-firm-identity-avatar {
    width: 44px; height: 44px; border-radius: 16px; background: linear-gradient(135deg, #16a085, #0f766e);
    display: flex; align-items: center; justify-content: center; color: #ecfdf5;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .25);
}
.kb-firm-identity-avatar i { font-size: 1.4rem; }

.kb-firm-badge {
    display: inline-flex; align-items: center; gap: .4rem; padding: 4px 10px; border-radius: 999px;
    background: #ecfdf5; color: #047857; font-size: 0.8rem; font-weight: 600;
}

/* ── Kart & Başlık ── */
.kb-firm-card { border-radius: var(--radius); }
.kb-firm-card .card-body { padding: 18px; }

.kb-section-title {
    display: flex; align-items: center; flex-direction: row-reverse; justify-content: flex-start;
    gap: .5rem; font-weight: 700; margin: 18px 0 12px; font-size: .95rem; color: #111827;
}
.kb-section-title-icon {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ecfdf5; color: var(--kb-primary); box-shadow: 0 0 0 1px rgba(22, 160, 133, .12);
}
.kb-section-title-text { white-space: nowrap; }
.kb-section-title-line { flex: 1 1 auto; height: 1px; background: linear-gradient(to right, rgba(15, 118, 110, .35), rgba(15, 118, 110, 0)); margin-right: .5rem; }

.kb-section-subtitle {
    display: flex; align-items: center; gap: .4rem; margin: 1.25rem 0 .6rem;
    font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6b7280;
}
.kb-section-subtitle::before {
    content: ""; width: 14px; height: 2px; border-radius: 999px;
    background: linear-gradient(90deg, var(--kb-primary), #0ea5e9);
}

/* ── Form elemanları ── */
.kb-required, .zorunlu { color: #dc2626; }

.kb-firm-form .form-label { font-size: .9rem; font-weight: 500; color: #374151; }
.kb-field-label-row { display: flex; align-items: center; gap: .5rem; }
.kb-label-icon {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: #ecfdf5; color: var(--kb-primary); font-size: 1rem; box-shadow: 0 0 0 1px rgba(22, 160, 133, .12);
}

.kb-input-icon-wrap { position: relative; }
.kb-input-icon {
    position: absolute; inset-inline-start: .75rem; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; color: #9ca3af; pointer-events: none;
}
.kb-input-icon-wrap.is-invalid .kb-input-soft { border-color: #dc2626; box-shadow: 0 0 0 1px rgba(220, 38, 38, .16); }
.kb-input-icon-wrap.is-invalid + .invalid-feedback { display: block; }

.kb-firm-form .form-control, .kb-firm-form .form-select { border-radius: 10px; border-color: #d1d5db; font-size: .95rem; padding: .55rem .75rem; }
.kb-firm-form .kb-input-soft {
    background-color: #f9fafb; border-radius: 12px; border-color: #d1d5db; padding: .65rem .9rem;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .12s ease-out;
}
.kb-input-icon-wrap .kb-input-soft { padding-left: 2.4rem; }
.kb-firm-form .kb-input-soft:focus {
    background-color: #ffffff; border-color: var(--kb-primary);
    box-shadow: 0 0 0 1px rgba(22, 160, 133, .25), 0 8px 18px rgba(15, 118, 110, .16); transform: translateY(-1px);
}
.kb-firm-form .kb-input-soft.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 1px rgba(220, 38, 38, .16); }
.kb-firm-form .kb-input-soft.is-invalid:focus { border-color: #dc2626; box-shadow: 0 0 0 1px rgba(220, 38, 38, .18), 0 8px 18px rgba(220, 38, 38, .1); }
.kb-firm-form .form-control::placeholder { color: #9ca3af; }
.kb-firm-form textarea.form-control { min-height: 90px; resize: vertical; }

/* ── Kategori Arama ── */
.kb-kategori-search { position: relative; }
.kb-kategori-search-control {
    width: 100%; border-radius: 12px; border: 1px solid #d1d5db; background-color: #f9fafb;
    padding: .55rem .9rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    font-size: .95rem; color: #111827; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.kb-kategori-search-control span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-kategori-search-control i { font-size: .95rem; color: #9ca3af; }
.kb-kategori-search-control:hover { background-color: #f3f4f6; border-color: #cbd5e1; }
.kb-kategori-search.is-open .kb-kategori-search-control {
    background-color: #ffffff; border-color: var(--kb-primary);
    box-shadow: 0 0 0 1px rgba(22, 160, 133, .25), 0 8px 18px rgba(15, 118, 110, .16);
}
.kb-kategori-search.is-invalid .kb-kategori-search-control { border-color: #dc2626; box-shadow: 0 0 0 1px rgba(220, 38, 38, .16); }

.kb-kategori-search-dropdown {
    position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: calc(100% + 4px); z-index: 1050;
    background: #ffffff; border-radius: 14px; box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    border: 1px solid #e5e7eb; padding: 6px 0; max-height: 320px; display: none;
}
.kb-kategori-search-header { display: none; align-items: center; justify-content: space-between; padding: 6px 12px 4px; border-bottom: 1px solid #e5e7eb; }
.kb-kategori-search-title { font-size: .82rem; font-weight: 600; color: #111827; }
.kb-kategori-search-close { border: none; background: transparent; padding: 4px; border-radius: 999px; color: #6b7280; display: inline-flex; align-items: center; justify-content: center; }
.kb-kategori-search-close i { font-size: .9rem; }
.kb-kategori-search-close:hover { background-color: rgba(148, 163, 184, .14); color: #111827; }
.kb-kategori-search.is-open .kb-kategori-search-dropdown { display: block; }

.kb-kategori-search-input-wrap { display: flex; align-items: center; gap: .4rem; padding: 4px 10px 6px; border-bottom: 1px solid #e5e7eb; }
.kb-kategori-search-input-wrap i { font-size: .9rem; color: #9ca3af; }
.kb-kategori-search-input { border: none; outline: none; width: 100%; font-size: .85rem; padding: 4px 0; }
.kb-kategori-search-list { max-height: 260px; overflow-y: auto; padding: 4px 0; }
.kb-kategori-search-group {
    font-size: .8rem; font-weight: 700; color: #111827; padding: 6px 14px 4px; text-transform: uppercase;
    letter-spacing: .06em; background-color: #f9fafb; border-top: 1px solid #e5e7eb;
}
.kb-kategori-search-group:first-child { border-top: none; padding-top: 4px; }
.kb-kategori-search-item {
    width: 100%; text-align: left; padding: 6px 18px 6px 26px; border: none; background: transparent;
    font-size: .87rem; color: #111827; cursor: pointer; display: block;
}
.kb-kategori-search-item:hover { background: #f3f4f6; }
.kb-kategori-search-item.is-active { background: #ecfdf5; color: var(--kb-primary); font-weight: 600; }
.kb-kategori-search-empty { padding: 8px 14px 10px; font-size: .8rem; color: #9ca3af; }

.kb-label-help {
    margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 999px; font-size: .9rem; color: #9ca3af; cursor: pointer;
}
.kb-label-help:hover { color: var(--kb-primary); background-color: rgba(148, 163, 184, .08); }

/* ── Bilgi kutucukları ── */
.kb-kategori-hint {
    border-radius: 12px; border: 1px solid #bfdbfe; background-color: #eff6ff; color: #1e3a8a;
    padding: 8px 10px; font-size: .82rem; display: flex; align-items: flex-start; gap: .6rem; margin-top: .5rem;
}
.kb-kategori-hint .kb-kategori-hint-icon {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; background-color: #dbeafe; color: #1d4ed8;
}

/* ── Uyarı kutuları ── */
.kb-firm-alert { border-radius: 12px; border-width: 1px; font-size: .85rem; }
.kb-firm-alert.alert-success { background-color: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.kb-firm-alert.alert-danger { background-color: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.kb-firm-alert.alert-warning { background-color: #fffbeb; border-color: #fef3c7; color: #92400e; }

/* ── Başarı özeti ── */
.kb-firm-summary-card {
    border-radius: 12px; border: 1px solid #bbf7d0; background-color: #ecfdf3;
    padding: 10px 12px; display: flex; align-items: flex-start; gap: .65rem; font-size: .85rem; color: #166534;
}
.kb-firm-summary-icon {
    flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
    background: #22c55e; color: #ecfdf5; box-shadow: 0 6px 12px rgba(22, 163, 74, .35);
}
.kb-firm-summary-body { flex: 1 1 auto; }
.kb-firm-summary-title { font-weight: 600; margin-bottom: 2px; }
.kb-firm-summary-meta { font-size: .8rem; color: #15803d; }
.kb-firm-summary-status { font-size: .8rem; margin-top: 4px; color: #166534; }

/* ── Yükleme kutusu ── */
.kb-upload-box {
    border-radius: 12px; border: 1px dashed #cbd5e1; background: #f9fafb;
    padding: 18px 14px; display: flex; align-items: center; gap: 14px;
    cursor: pointer; transition: .15s background-color, .15s border-color;
}
.kb-upload-box:hover { background: #f3f4f6; border-color: #94a3b8; }
.kb-upload-icon {
    width: 40px; height: 40px; border-radius: 12px; background: rgba(22, 160, 133, .06);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--kb-primary);
}
.kb-upload-text-title { font-size: .9rem; font-weight: 600; color: #111827; }
.kb-upload-text-sub { font-size: .8rem; color: #6b7280; }
.kb-upload-filename { font-size: .78rem; color: #4b5563; margin-top: 4px; }
.kb-upload-preview { margin-top: 6px; }
.kb-upload-preview-box {
    width: 96px; height: 96px; border-radius: 14px; border: 1px solid #e5e7eb; background: #f9fafb;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.kb-upload-preview-box img { max-width: 100%; max-height: 100%; object-fit: cover; display: block; }
.kb-upload-status { font-size: .8rem; color: #6b7280; display: flex; align-items: center; gap: .4rem; }

/* ── KVKK ── */
.kb-kvkk { font-size: .8rem; color: #4b5563; }
.kb-kvkk a { color: var(--kb-primary); text-decoration: none; }
.kb-kvkk a:hover { text-decoration: underline; }

/* ── Submit butonu ── */
.kb-firm-main-inner { max-width: 1120px; margin-left: auto; margin-right: auto; }

.kb-firm-submit-btn {
    border-radius: 18px; background: linear-gradient(135deg, #16a085, #0f766e); border: none;
    color: #ecfdf5; font-weight: 700; padding: .7rem 1.6rem; min-height: 52px;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    box-shadow: 0 6px 16px rgba(22, 160, 133, .28); transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
    font-size: .95rem;
}
.kb-firm-submit-btn i { font-size: 1.1rem; }
.kb-firm-submit-btn:hover {
    background: linear-gradient(135deg, #0f766e, #0b5f56); transform: scale(1.03);
    box-shadow: 0 10px 24px rgba(22, 160, 133, .30); color: #ecfdf5;
}
.kb-firm-submit-btn:active { transform: scale(0.99); box-shadow: 0 4px 12px rgba(22, 160, 133, .30); color: #ecfdf5; }
.kb-firm-submit-btn:disabled { opacity: .85; cursor: wait; transform: none; box-shadow: 0 4px 10px rgba(22, 160, 133, .25); color: #ecfdf5; }

.kb-firm-submit-badge {
    display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; border-radius: 999px;
    font-size: .7rem; text-transform: uppercase; letter-spacing: .03em;
    background: rgba(236, 253, 245, .16); border: 1px solid rgba(236, 253, 245, .55);
}
.kb-firm-submit-wrapper { margin-top: .75rem; }

/* ── Responsive ── */
@media (max-width: 767.98px) {
    html { scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
    .kb-firm-main { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
    .kb-firm-card { margin-bottom: calc(96px + env(safe-area-inset-bottom)); }
    .kb-firm-submit-wrapper {
        position: fixed; inset-inline: 0; bottom: calc(60px + env(safe-area-inset-bottom));
        padding: 8px 16px 24px; background: linear-gradient(to top, rgba(15, 23, 42, .68), rgba(15, 23, 42, 0));
        z-index: 1000;
    }
    .kb-firm-submit-wrapper .kb-firm-submit-btn { max-width: 640px; margin-left: auto; margin-right: auto; display: flex; }
}

@media (max-width: 575.98px) {
    .kb-field-label-row { gap: .4rem; font-size: .85rem; }
    .kb-label-icon { width: 28px; height: 28px; font-size: .9rem; }
    .kb-firm-form .form-select { font-size: .85rem; }
    .kb-kategori-search-control { font-size: .85rem; padding-inline: .7rem; }
    .kb-kategori-search-dropdown {
        position: fixed; inset-inline: 12px; bottom: calc(70px + env(safe-area-inset-bottom));
        top: auto; max-height: 70vh;
    }
    .kb-kategori-search-header { display: flex; }
    .kb-kategori-search-input-wrap { padding-inline: 12px; }
}
