/* MY&HU -- Hanedan Konsol temasi: koyu zemin, sicak altin vurgu, sakin yesil durum rengi. */
:root {
  color-scheme: dark;
  --bg: #101316; --side: #13171b; --card: #1a2025; --card2: #1f262c; --line: #293137;
  --text: #e8edef; --muted: #929fa9; --accent: #c8ae7d; --accent-hover: #dbc494; --green: #8dbba7;
  --warn: #e0b45a; --danger: #e07a6b; --info: #7fa8d6;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Devanagari', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
[hidden], .hidden { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-weight: 450; margin: 0; }
h1 { font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.5px; line-height: 1.25; margin: 10px 0 18px; }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.8px; margin-top: 8px; }
h3 { font-size: 15px; font-weight: 550; margin-bottom: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
p { margin: 0 0 10px; }
b { font-weight: 600; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--accent); font-weight: 600; text-transform: uppercase; }

/* --- marka --- */
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: 2px; font-weight: 650; font-size: 16px; }
.brand small { display: block; font-size: 8px; color: var(--muted); letter-spacing: 1.5px; margin-top: 5px; font-weight: 500; }
.monogram { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; height: 42px; padding: 0 6px; border: 1px solid var(--accent);
  border-radius: 10px; color: var(--accent); font: 19px Georgia, 'Times New Roman', serif; letter-spacing: 0; white-space: nowrap; }
.monogram i { font-style: normal; font-size: 13px; margin: 0 1px; opacity: .8; }
.brand-mark { display: block; flex: none; width: 42px; height: 42px; }

/* --- butonlar / formlar --- */
.btn { background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 9px 14px; transition: background .15s, border-color .15s; }
.btn:hover { background: #252e35; border-color: #56616a; }
.btn.primary { background: var(--accent); color: #171a1c; border: 0; font-weight: 650; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.small { padding: 6px 10px; font-size: 12px; } .btn.block { display: block; width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .5; cursor: wait; }
.quiet { background: transparent; border: 0; color: var(--muted); font-size: 11px; padding: 6px; }
.quiet:hover { color: var(--text); }
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 550; }
input, textarea, select { width: 100%; background: #0f1417; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.6; }
select { background: #242c31; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.error { color: var(--danger); font-size: 13px; margin: 10px 0; }
.notice { background: #2a2a20; border: 1px solid #4d5142; color: #e6dfc9; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 12.5px; line-height: 1.6; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.span2 { grid-column: span 2; } .end { align-self: end; }
.copy-row { display: flex; gap: 8px; } .copy-row input { font-family: Consolas, monospace; letter-spacing: 1px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #303737; color: #c7cdd0; }
.pill.ok { background: #1f3129; color: var(--green); } .pill.warn { background: #3a3120; color: var(--warn); }
.pill.danger { background: #3a2422; color: var(--danger); } .pill.info { background: #1f2c3a; color: var(--info); }
.stack > * { margin-bottom: 12px; }

/* --- tam ekran kartlar (giris, kurulum, kilit) --- */
.fullscreen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(ellipse at 60% 0%, #24302d66, transparent 55%), var(--bg); }
.fullscreen#lock-screen { position: fixed; inset: 0; z-index: 50; overflow: auto; }
.auth-card { width: 100%; max-width: 430px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 34px; box-shadow: 0 20px 60px #0006; }
.auth-card.wide { max-width: 700px; }
.lock-icon { font-size: 34px; margin: 18px 0 4px; }
.lang-inline { text-align: end; margin-bottom: 10px; } .lang-inline select, .hdr-right select { width: auto; padding: 6px 8px; font-size: 12px; }

/* --- uygulama kabugu --- */
.shell { display: flex; height: 100vh; overflow: hidden; }
.side { width: 258px; min-width: 258px; background: var(--side); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; padding: 26px 16px 0; }
nav { display: grid; gap: 4px; margin-top: 26px; overflow-y: auto; flex: 1; align-content: start; }
nav button { display: flex; align-items: center; gap: 12px; text-align: start; border: 0; background: transparent; color: var(--muted); padding: 11px 10px; border-radius: 9px; }
nav button:hover { background: #1c2329; color: var(--text); }
nav button.active { color: var(--accent); background: #252620; }
nav .ic { width: 18px; text-align: center; opacity: .85; }
.side-foot { margin: 12px -16px 0; padding: 16px 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; font-size: 12.5px; }
.side-foot small { display: block; color: var(--muted); font-size: 10px; }
.side-foot .quiet { margin-inline-start: auto; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #34352c; color: var(--accent); font-size: 12px; flex: none; }
main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: radial-gradient(ellipse at 60% 5%, #24302d55, transparent 55%); }
header { height: 60px; min-height: 60px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-size: 12px; gap: 12px; }
.hdr-left, .hdr-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hdr-company { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-note { color: #77858e; border-inline-start: 1px solid var(--line); padding-inline-start: 14px; margin-inline-start: 4px; white-space: nowrap; }
.dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; flex: none; }
.dot.warn { background: var(--warn); } .dot.critical, .dot.locked { background: var(--danger); }
.page { overflow: auto; padding: 32px 36px 48px; flex: 1; }
.page-heading { max-width: 760px; margin-bottom: 26px; }
.view > .notice, .view > p { max-width: 820px; }

/* --- lisans uyari bandi --- */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 28px; font-size: 12.5px; line-height: 1.5; }
.banner.info { background: #1f2c3a; color: #b8d2ee; } .banner.warn { background: #3a3120; color: #f0d59a; }
.banner.critical { background: #4a2622; color: #ffc9bf; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { background: #5a2d28; } }
@media (prefers-reduced-motion: reduce) { .banner.critical { animation: none; } }

/* --- kartlar --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; } .card-head h3 { margin: 0; }
.stat .num { font-size: 26px; letter-spacing: -1px; }
.stat .label { color: var(--muted); font-size: 12px; margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: 11px; margin-top: 8px; }
.stat.good .num { color: var(--green); } .stat.bad .num { color: var(--danger); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: start; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
tr.voided td { opacity: .5; text-decoration: line-through; }
td.mono, .mono { font-family: Consolas, monospace; font-size: 11.5px; }
.dropzone { border: 1px dashed #56616a; border-radius: var(--radius); padding: 26px; text-align: center; margin-bottom: 10px; cursor: pointer; background: #1a2024aa; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); }
.find { display: flex; gap: 12px; align-items: flex-start; }
.find .sev { flex: none; margin-top: 2px; } .find small { display: block; color: var(--muted); margin-top: 4px; }

/* --- grafik --- */
.chart { width: 100%; } .chart:empty { display: none; } .chart svg { width: 100%; height: auto; display: block; }
.chart .axis, .chart .grid-line { stroke: var(--line); } .chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .l-hist { stroke: var(--accent); } .chart .l-fc { stroke: var(--green); stroke-dasharray: 5 4; }
.chart .b-in { fill: var(--green); } .chart .b-out { fill: var(--accent); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 5px; vertical-align: -1px; }

/* --- ajan sohbeti --- */
.agent-tiles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.agent-tiles button { border: 1px solid var(--line); background: transparent; border-radius: 9px; padding: 8px 12px; font-size: 12.5px; color: var(--muted); }
.agent-tiles button.active { border-color: var(--accent); color: var(--accent); background: #252620; }
.chat-box { height: min(52vh, 460px); overflow-y: auto; padding: 4px 2px; margin-bottom: 12px; }
.msg { padding: 14px 16px; background: #192025; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; }
.msg.user { background: #242820; border-color: #383e30; margin-inline-start: auto; }
.msg .meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; white-space: normal; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.msg .meta button { border: 1px solid var(--line); background: transparent; border-radius: 7px; padding: 3px 8px; font-size: 12px; }
.msg .meta button.on { border-color: var(--accent); color: var(--accent); }
.msg .fix { margin-top: 8px; white-space: normal; } .msg .fix textarea { margin-bottom: 6px; }
.composer { display: flex; gap: 10px; align-items: flex-end; } .composer textarea { flex: 1; }

.copy-note { color: var(--green); font-size: 12px; }
.toast { position: fixed; inset-inline-end: 20px; bottom: 20px; background: #252e35; border: 1px solid #56616a; padding: 10px 16px; border-radius: 10px; z-index: 80; max-width: 80vw; }
.qr { background: #e8edef; padding: 8px; border-radius: 10px; display: inline-block; } .qr img { display: block; width: 180px; height: 180px; }

/* --- RTL --- */
[dir="rtl"] .brand, [dir="rtl"] input[type=number], [dir="rtl"] .mono { letter-spacing: 0; }
[dir="rtl"] td.mono, [dir="rtl"] .copy-row input, [dir="rtl"] input[name=license_key] { direction: ltr; text-align: left; }

/* --- responsive --- */
@media (max-width: 1000px) { .grid-4 { grid-template-columns: 1fr 1fr; } .page { padding: 24px 22px 40px; } }
@media (max-width: 820px) {
  .shell { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .side { width: 100%; min-width: 0; padding: 10px 12px 0; border-inline-end: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; position: sticky; top: 0; z-index: 20; }
  .side .brand { font-size: 14px; } .side .brand small { display: none; } .monogram { min-width: 38px; height: 34px; font-size: 16px; } .brand-mark { width: 34px; height: 34px; }
  nav { flex-direction: row; display: flex; overflow-x: auto; width: 100%; margin: 8px 0 0; order: 3; gap: 2px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  nav button { flex: none; padding: 8px 12px; white-space: nowrap; } nav .ic { display: none; }
  .side-foot { margin: 0; margin-inline-start: auto; padding: 0; border: 0; }
  .side-foot > div:nth-child(2), .side-foot .avatar { display: none; }
  main { overflow: visible; } header { padding: 0 16px; } .page { padding: 20px 16px 40px; overflow: visible; }
  .hdr-note { display: none; } .banner { padding: 10px 16px; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; } .card { padding: 16px; } .stat .num { font-size: 20px; }
  .auth-card { padding: 24px 20px; } .msg { max-width: 100%; }
}
@media print {
  body { background: #fff; color: #111; } .side, header, .no-print, .toast, #banner-slot { display: none !important; }
  .shell { display: block; height: auto; } .page { overflow: visible; padding: 0; }
  .card { background: #fff; border-color: #ccc; break-inside: avoid; } .muted, th { color: #555; }
  .view.hidden { display: none !important; }
}


