* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #FEFAE0; color: #3B2A1A; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }

.sa-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: #FFFDF6; border-bottom: 2px solid #E8DFC6; }
.sa-brand { display: flex; align-items: center; gap: 12px; }
.sa-brand img { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #E8DFC6; background: #fff; padding: 3px; object-fit: contain; }
.sa-brand b { display: block; font-size: 1.15rem; }
.sa-brand span { font-size: 0.8rem; color: #6B5844; font-weight: 600; }
.sa-actions { display: flex; gap: 8px; }
.sa-actions .ju-btn { padding: 11px 16px; font-size: 0.92rem; border-radius: 14px; }

.sa-login { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.sa-card { background: #FFFDF6; border: 2px solid #E8DFC6; border-radius: 24px; padding: 22px; margin-top: 16px; }
.sa-login .sa-card { width: 100%; max-width: 400px; margin: 0; padding: 28px; }
.sa-login h1 { font-size: 1.6rem; }
.sa-login label { display: block; font-weight: 800; font-size: 0.92rem; margin: 14px 0 6px; }
.sa-muted { color: #6B5844; font-size: 0.92rem; font-weight: 600; }

.sa-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 80px; }
.sa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sa-stats article { background: #FFFDF6; border: 2px solid #E8DFC6; border-radius: 20px; padding: 16px 18px; }
.sa-stats small { display: block; color: #6B5844; font-weight: 700; font-size: 0.85rem; }
.sa-stats b { display: block; font-size: 2rem; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.sa-stats em { font-style: normal; color: #86735C; font-size: 0.78rem; font-weight: 600; }

.sa-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.sa-bar h2 { font-size: 1.4rem; }
.sa-bar-r { display: flex; gap: 10px; flex-wrap: wrap; }
.sa-bar-r .ju-input { width: 240px; padding: 12px 14px; font-size: 1rem; }
.sa-bar-r .ju-btn { padding: 13px 20px; border-radius: 14px; }

.sa-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.tn { background: #FFFDF6; border: 2px solid #E8DFC6; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.tn.bad { border-color: #FECACA; background: #FFF8F8; }
.tn.warn { border-color: #FFD3A0; background: #FFF9F0; }
.tn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tn-name { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.tn-code { font-size: 0.8rem; color: #86735C; font-weight: 600; }
.chip { display: inline-block; white-space: nowrap; padding: 5px 12px; border-radius: 99px; font-weight: 800; font-size: 0.8rem; }
.chip.ok { background: #ECFDF5; color: #047857; }
.chip.warn { background: #FFF0DC; color: #B85F10; }
.chip.bad { background: #FEE2E2; color: #B91C1C; }
.tn-meta { font-size: 0.9rem; color: #6B5844; font-weight: 600; line-height: 1.55; }
.tn-meta a { color: #B85F10; text-decoration: underline; }
.tn-meta .quiet { color: #B45309; font-weight: 800; }
.tn-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.tn-btns .ju-btn { padding: 12px 8px; font-size: 0.9rem; border-radius: 13px; }
.tn-btns .full { grid-column: 1 / -1; }
.tn-more { text-align: right; }
.tn-more button { border: 0; background: transparent; color: #A8977E; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; text-decoration: underline; }

.sa-empty { text-align: center; color: #6B5844; font-weight: 700; padding: 40px 10px; grid-column: 1 / -1; }
.sa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sa-row h3 { font-size: 1.15rem; margin-bottom: 4px; }
.sa-row .ju-btn { padding: 13px 20px; border-radius: 14px; }
.sa-fold summary, .sa-fold-in summary { cursor: pointer; font-weight: 800; }
.sa-fold-in { margin-top: 12px; }
.sa-fold-in summary { color: #6B5844; font-size: 0.9rem; }
.sa-table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #E8DFC6; white-space: nowrap; }
th { color: #6B5844; font-size: 0.78rem; text-transform: uppercase; }
.sa-btn-sm { border: 0; background: #F6EFD8; border-radius: 10px; padding: 8px 12px; font-family: inherit; font-weight: 700; cursor: pointer; color: #3B2A1A; }

/* Sonuç kartı (yeni işletme / şifre) */
.cred { background: #fff; border: 2px dashed #EE8A2B; border-radius: 16px; padding: 14px 16px; margin: 12px 0; font-size: 1rem; line-height: 2; }
.cred b { font-size: 1.15rem; letter-spacing: 0.04em; }
.cred span { color: #6B5844; display: inline-block; min-width: 110px; font-weight: 600; font-size: 0.9rem; }

@media (max-width: 760px) {
    .sa-stats { grid-template-columns: 1fr 1fr; }
    .sa-bar-r { width: 100%; }
    .sa-bar-r .ju-input { flex: 1; width: auto; }
    .sa-list { grid-template-columns: 1fr; }
}

/* Mesaj kutusu */
.inbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; max-height: 560px; overflow-y: auto; }
.msg { background: #fff; border: 2px solid #E8DFC6; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.msg.new { border-color: #EE8A2B; background: #FFF9F0; }
.msg.done { opacity: 0.65; }
.msg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.msg-head small { color: #86735C; font-weight: 600; }
.msg-contact { font-size: 0.9rem; font-weight: 600; color: #6B5844; }
.msg-contact a { color: #B85F10; text-decoration: underline; }
.msg-text { font-size: 0.92rem; color: #3B2A1A; white-space: pre-wrap; word-break: break-word; margin: 0; }
.msg-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.msg-btns .ju-btn { padding: 9px 12px; font-size: 0.85rem; border-radius: 12px; }

.msg-note { margin: 0; font-size: 0.88rem; font-weight: 700; color: #B85F10; background: #FFF0DC; border-radius: 10px; padding: 6px 10px; }

/* İstatistik ve risk listesi */
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.funnel article { background: #fff; border: 2px solid #E8DFC6; border-radius: 16px; padding: 12px 14px; }
.funnel small { display: block; color: #6B5844; font-weight: 700; font-size: 0.8rem; }
.funnel b { font-size: 1.7rem; font-weight: 800; }
.funnel em { display: block; font-style: normal; color: #86735C; font-size: 0.76rem; font-weight: 600; }
.chart { display: flex; gap: 6px; align-items: flex-end; height: 190px; margin-top: 8px; overflow-x: auto; }
.bar-col { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; width: 100%; justify-content: center; }
.bars i { display: block; width: 14px; border-radius: 5px 5px 0 0; min-height: 2px; }
.b-rev { background: #EE8A2B; }
.b-new { background: #10B981; }
.bar-col span { font-size: 0.78rem; font-weight: 800; color: #6B5844; margin-top: 4px; }
.bar-col small { font-size: 0.66rem; color: #86735C; font-weight: 600; height: 12px; }
.risk-list { display: grid; gap: 8px; margin-top: 12px; }
.risk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #FFF8F8; border: 2px solid #FECACA; border-radius: 14px; padding: 10px 14px; }
.risk-row small { display: block; color: #B91C1C; font-weight: 700; font-size: 0.82rem; }
.risk-row .ju-btn { padding: 9px 14px; font-size: 0.85rem; border-radius: 12px; white-space: nowrap; text-decoration: none; }
@media (max-width: 700px) { .funnel { grid-template-columns: 1fr 1fr; } }
