/* Hayal Panel: bilesenler (kart, tablo, dugme, rozet, cekmece, bildirim, iskelet) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; min-height: 46px; flex-wrap: wrap; }
.card__head h2 { font-size: 14.5px; font-weight: 650; margin: 0; letter-spacing: -.05px; }
.card__head .muted { font-size: 12.5px; }
.card__body { padding: 14px 18px 18px; }
.card__body--flush { padding: 8px 0 4px; }
.card--ai { border-color: #D9E5DF; background: linear-gradient(180deg, #F4F8F5 0, var(--card) 140px); }

.kpi { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.kpi__label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi__value { font-size: 25px; font-weight: 650; letter-spacing: -.6px; line-height: 1.1; }
.kpi__foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-height: 18px; }
.delta { font-weight: 650; font-size: 12px; border-radius: 5px; padding: 1px 6px; }
.delta--up { color: var(--ok); background: var(--ok-soft); }
.delta--down { color: var(--bad); background: var(--bad-soft); }
.delta--flat { color: var(--muted); background: var(--surface); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font-weight: 550; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn--icon { width: 34px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.seg { display: inline-flex; background: var(--surface); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 33, 30, .12); }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input, .select, .textarea {
  height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); padding: 0 10px; font-size: 13.5px; color: var(--ink); min-width: 0;
}
.textarea { height: auto; padding: 9px 10px; line-height: 1.5; resize: vertical; }
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7672' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters .input { width: 240px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; background: var(--surface); color: var(--ink-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge--plain::before { display: none; }
.b-yeni { background: var(--info-soft); color: var(--info); }
.b-hazir { background: var(--warn-soft); color: var(--warn); }
.b-kargo { background: var(--brand-soft); color: var(--brand); }
.b-teslim { background: var(--ok-soft); color: var(--ok); }
.b-iade { background: var(--bad-soft); color: var(--bad); }
.b-tag { background: var(--tag-soft); color: #7A5A0E; }
.b-copper { background: var(--copper-soft); color: var(--copper); }
.chan { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.chan i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.is-click { cursor: pointer; }
.t tbody tr.is-click:hover td { background: #F7F8F4; }
.t tbody tr.is-sel td { background: #F1F6F3; }
.t th:first-child, .t td:first-child { padding-left: 18px; }
.t th:last-child, .t td:last-child { padding-right: 18px; }
.t input[type='checkbox'] { width: 15px; height: 15px; accent-color: var(--brand); }
.prod { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thumb { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; background: var(--surface); flex: none; border: 1px solid var(--line); }
.thumb--lg { width: 52px; height: 52px; border-radius: 9px; }
.thumb--ph { display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--brand); background: var(--brand-soft); }
.prod__name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod__meta { font-size: 12px; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

.bar { height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

.pager { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { font-size: 11px; background: var(--surface); border-radius: 999px; padding: 1px 7px; margin-left: 4px; color: var(--ink-2); }

/* Yan cekmece (siparis/musteri detayi, asistan) */
.scrim { position: fixed; inset: 0; background: rgba(20, 33, 30, .32); z-index: 50; opacity: 0; transition: opacity .18s; }
.scrim.is-on { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg); z-index: 60; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(102%); transition: transform .22s cubic-bezier(.2, .7, .2, 1);
}
.drawer.is-on { transform: none; }
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.drawer__head h2 { margin: 0; font-size: 17px; font-weight: 650; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 30px; display: flex; flex-direction: column; gap: 16px; }
.drawer__foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--card); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 7px 12px; font-size: 13px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.timeline li::after { content: ''; position: absolute; left: 4px; top: 16px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; font-size: 11.5px; color: var(--muted); }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: toast-in .2s ease; }
.toast svg { width: 16px; height: 16px; color: var(--tag); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.skel { background: linear-gradient(90deg, #ECEEE8 0, #F5F6F2 50%, #ECEEE8 100%); background-size: 200% 100%; animation: skel 1.2s infinite linear; border-radius: 6px; }
@keyframes skel { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--line-strong); margin: 0 auto 8px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

.ai-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.ai-tag svg { width: 12px; height: 12px; }
.insight { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); align-items: flex-start; }
.insight__dot { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.insight__dot svg { width: 16px; height: 16px; }
.insight__title { font-weight: 600; font-size: 13.5px; }
.insight__text { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.insight .btn { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
