/* Faz 5: Test Statüsü bandı, geri bildirim butonu/formu ve admin geri bildirim ekranı.
   index.html ve gantt.html'de ortaktır; gantt.html app.css'i yüklemediği için
   değişkenler yedek değerlerle kullanılır. */

/* ---------- Test modu bandı ---------- */
.test-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    z-index: 180;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 12px;
    font-family: var(--font-sans, 'Segoe UI', Tahoma, sans-serif);
    font-size: 12px;
    color: #1f2937;
    background: repeating-linear-gradient(-45deg, #fbbf24 0 14px, #fcd34d 14px 28px);
    border-bottom: 1px solid #d97706;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    overflow: hidden;
}
.test-mode-banner[hidden] { display: none; }
.test-mode-badge {
    font-weight: 800;
    letter-spacing: 0.06em;
    background: #1f2937;
    color: #fde68a;
    padding: 2px 9px;
    border-radius: 999px;
}
.test-mode-text {
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.test-mode-exit {
    flex-shrink: 0;
    border: 1px solid #92400e;
    background: #fffbeb;
    color: #92400e;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.test-mode-exit:hover { background: #fff; }

/* Bant için yer açılır: index'te 30px bant + mevcut 14px boşluk, gantt'ta yalnızca bant. */
body.test-mode { padding-top: 44px; box-sizing: border-box; }
body.test-mode:has(> .gantt-container) { padding-top: 30px; }
body.test-mode .drawer-panel { top: 30px; height: calc(100vh - 30px); }

/* Test modunda kapalı "Buluta Kaydet" */
.btn-cloud-save:disabled {
    background: #cbd5e1;
    color: #475569 !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Giriş formundaki Test Statüsü seçeneği */
.login-testmode-toggle {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    text-align: left;
    margin: -4px 0 14px;
    padding: 9px 12px;
    border: 1.5px dashed #f59e0b;
    border-radius: 10px;
    background: #fffbeb;
    cursor: pointer;
    font-size: 12.5px;
    color: #78350f;
}
.login-testmode-toggle input { margin-top: 2px; width: 15px; height: 15px; accent-color: #d97706; cursor: pointer; }
.login-testmode-toggle b { display: block; font-size: 12.5px; }
.login-testmode-toggle small { display: block; font-size: 11px; color: #92400e; margin-top: 2px; }

/* ---------- Geri bildirim butonu ---------- */
.fb-launcher {
    position: fixed;
    right: 22px;
    bottom: 76px;
    z-index: 140;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: none;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-family: var(--font-sans, 'Segoe UI', Tahoma, sans-serif);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fb-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15, 23, 42, 0.34); }
.fb-launcher:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
.fb-launcher[hidden] { display: none; }
body.test-mode .fb-launcher { background: #b45309; }
body.dark-mode .fb-launcher { background: #7c3aed; }

/* ---------- Geri bildirim formu ---------- */
.fb-overlay {
    position: fixed;
    inset: 0;
    z-index: 170;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    font-family: var(--font-sans, 'Segoe UI', Tahoma, sans-serif);
}
.fb-overlay[hidden] { display: none; }
.fb-modal {
    width: 540px;
    max-width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-shell, #fff);
    color: var(--text-primary, #0f172a);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.fb-head, .fb-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
}
.fb-head { border-bottom: 1px solid var(--border-light, #e2e8f0); }
.fb-foot { justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border-light, #e2e8f0); background: var(--sidebar-bg, #f8fafc); }
.fb-title { font-size: 15px; font-weight: 700; }
.fb-close { border: none; background: transparent; font-size: 16px; color: var(--text-secondary, #475569); cursor: pointer; }
.fb-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fb-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-secondary, #475569); }
.fb-field select, .fb-field textarea {
    font: inherit;
    font-weight: 400;
    font-size: 13px;
    color: var(--text-primary, #0f172a);
    background: var(--bg-shell, #fff);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 9px;
}
.fb-field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.fb-field select:focus, .fb-field textarea:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.fb-counter { text-align: right; font-size: 11px; color: var(--text-muted, #94a3b8); margin-top: -6px; }
.fb-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; }
.fb-error[hidden] { display: none; }
.fb-context { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px 12px; background: var(--sidebar-bg, #f8fafc); }
.fb-context-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted, #94a3b8); margin-bottom: 6px; }
.fb-context dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 11.5px; }
.fb-context dt { color: var(--text-secondary, #475569); font-weight: 600; }
.fb-context dd { margin: 0; font-family: var(--font-mono, Consolas, monospace); word-break: break-all; color: var(--text-primary, #0f172a); }
.fb-btn {
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: var(--bg-shell, #fff);
    color: var(--text-primary, #0f172a);
    cursor: pointer;
}
.fb-btn-primary { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.fb-btn:disabled { opacity: 0.6; cursor: wait; }

/* Sayfanın kendi bildirimi yoksa (gantt) kullanılan küçük bildirim */
.fb-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    background: #0f172a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 12.5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    pointer-events: none;
}
.fb-toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Rozetler (form + admin ekranı) ---------- */
.fb-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    white-space: nowrap;
}
.fb-kind-bug { background: #fee2e2; color: #b91c1c; }
.fb-kind-missing_field { background: #ffedd5; color: #c2410c; }
.fb-kind-design { background: #e0e7ff; color: #4338ca; }
.fb-kind-suggestion { background: #dcfce7; color: #15803d; }
.fb-sev-low { background: #f1f5f9; color: #475569; }
.fb-sev-medium { background: #fef9c3; color: #a16207; }
.fb-sev-high { background: #fed7aa; color: #c2410c; }
.fb-sev-critical { background: #dc2626; color: #fff; }
.fb-status-new { background: #dbeafe; color: #1d4ed8; }
.fb-status-bugfix { background: #fee2e2; color: #b91c1c; }
.fb-status-development { background: #ede9fe; color: #6d28d9; }
.fb-status-rejected { background: #e5e7eb; color: #4b5563; }
.fb-status-closed { background: #d1fae5; color: #047857; }
.fb-test { background: #fbbf24; color: #1f2937; }

/* ---------- Admin: geri bildirim yönetimi ---------- */
.fba-box { width: 900px; max-width: 95vw; }
.fba-body { max-height: 66vh; gap: 12px; }
.fba-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fba-filters select, .fba-filters input {
    height: 32px;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font: inherit;
    font-size: 12.5px;
    background: var(--bg-shell, #fff);
    color: var(--text-primary, #0f172a);
}
.fba-filters input { width: 150px; }
.fba-spacer { flex: 1; }
.fba-list { display: flex; flex-direction: column; gap: 10px; }
.fba-empty { text-align: center; padding: 28px; color: var(--text-muted, #94a3b8); font-size: 13px; }
.fba-error { color: #b91c1c; }
.fba-item { border: 1px solid var(--border-light, #e2e8f0); border-radius: 12px; padding: 12px 14px; background: var(--bg-shell, #fff); display: flex; flex-direction: column; gap: 7px; }
.fba-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fba-id { font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 700; color: var(--text-secondary, #475569); }
.fba-meta { margin-left: auto; font-size: 11.5px; color: var(--text-muted, #94a3b8); }
.fba-desc { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; color: var(--text-primary, #0f172a); }
.fba-context { font-size: 11px; color: var(--text-muted, #94a3b8); font-family: var(--font-mono, monospace); word-break: break-all; }
.fba-note { font-size: 12px; background: var(--sidebar-bg, #f8fafc); border-left: 3px solid #7c3aed; padding: 5px 9px; border-radius: 4px; white-space: pre-wrap; }
.fba-item-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fba-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fba-actions select, .fba-actions input {
    height: 30px;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    font: inherit;
    font-size: 12px;
    background: var(--bg-shell, #fff);
    color: var(--text-primary, #0f172a);
}
.fba-actions input { width: 220px; }
.fba-actions [disabled] { opacity: 0.55; cursor: not-allowed; }
.fba-final, .fba-updated { font-size: 11.5px; color: var(--text-muted, #94a3b8); }
.fba-pager { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 12px; color: var(--text-secondary, #475569); }
.fba-pager button:disabled { opacity: 0.4; cursor: default; }
