/* Yonetim paneli: app.css (durum paneli) uzerine eklenen duzen ve bilesenler */
body.panel { min-height: 100vh; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 16px; }
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 67px); }
.side { position: sticky; top: 67px; height: calc(100vh - 67px); padding: 18px 12px; border-right: 1px solid var(--line); background: rgba(7, 11, 20, .55); display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.side a i { width: 20px; text-align: center; font-style: normal; opacity: .8; }
.side a:hover { background: rgba(255, 255, 255, .03); color: var(--text); }
.side a.active { background: rgba(79, 140, 255, .12); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.side-foot { margin-top: auto; color: var(--dim); font-size: 12px; padding: 12px; border-top: 1px solid var(--line); }
.layout main#app { max-width: 1400px; width: 100%; padding: 26px 30px 40px; margin: 0; }
.view[hidden] { display: none !important; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 650; }
.page-head p { margin: 0; color: var(--muted); }
.subtabs { position: static; background: transparent; padding: 0; margin: -6px 0 18px; backdrop-filter: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 10px; padding: 9px 15px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(90deg, #4f8cff, #3a74ea); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.orange { background: #ff8c1e; border-color: transparent; color: #fff; }
.btn.danger { color: #ff9aa5; border-color: rgba(255, 77, 94, .4); background: rgba(255, 77, 94, .08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select, .modal-card input, .modal-card select {
  background: #0a1120; border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; min-width: 0;
}
.toolbar input { width: min(360px, 100%); }
.toolbar select { min-width: 280px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, .18); }

.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; border-top: 3px solid var(--c, var(--accent)); }
.stat small { display: block; }
.stat b { display: block; font-size: 26px; font-weight: 650; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.link { color: var(--accent); }

.dom b { display: block; }
.dom span { color: var(--dim); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.badge.on { color: var(--ok); background: rgba(47, 209, 139, .1); }
.badge.off { color: var(--warn); background: rgba(255, 201, 77, .1); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.meter { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.meter .bar { flex: 1; }
.meter span { color: var(--muted); font-size: 12px; white-space: nowrap; }

.srv-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.srv-mini div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.srv-mini span { color: var(--muted); font-size: 12px; display: block; }
.srv-mini b { font-size: 18px; }
.audit-list .it { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(29, 42, 66, .6); }
.audit-list .it:last-child { border-bottom: 0; }
.audit-list p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.audit-list time { color: var(--dim); font-size: 11px; white-space: nowrap; }

/* ---- modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 12, .72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.modal-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-card h2 { margin: 0; font-size: 19px; }
.modal-card .x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; }
.modal-card label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.modal-card label > input, .modal-card label > select { display: block; width: 100%; margin-top: 6px; }
.modal-card label small { display: block; margin-top: 5px; letter-spacing: 0; font-weight: 400; color: var(--dim); }
.modal-card p { color: var(--muted); margin: 0 0 14px; }
.modal-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw { display: flex; gap: 8px; margin-top: 6px; }
.pw input { flex: 1; width: 100%; font-family: Consolas, monospace; }
.form-err { background: rgba(255, 77, 94, .1); border: 1px solid rgba(255, 77, 94, .35); color: #ff9aa5; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.secret { display: flex; gap: 8px; align-items: center; background: #0a1120; border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; font-family: Consolas, monospace; margin: 6px 0 14px; word-break: break-all; }
.secret span { flex: 1; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--ok); border-radius: 10px; padding: 12px 16px; max-width: 380px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: tin .2s ease; }
.toast.err { border-left-color: var(--crit); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 1100px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .actions { flex-wrap: nowrap; }
  .side { position: fixed; z-index: 40; left: 0; top: 63px; width: 250px; height: calc(100vh - 63px); background: var(--bg); transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
  .layout main#app { padding: 18px 16px 30px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .toolbar select { min-width: 0; width: 100%; }
  .kv { grid-template-columns: 1fr; }
}

/* ---- basvurular */
.side a .count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: #ff8c1e; color: #fff; border-radius: 20px; padding: 1px 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.seg button.active { background: rgba(79, 140, 255, .14); color: var(--text); }
.apps { display: grid; gap: 14px; }
.app { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; border-left: 3px solid var(--st, var(--line-2)); }
.app-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.app-head h3 { margin: 0; font-size: 17px; }
.app-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; font-size: 13px; }
.app-meta a { color: var(--accent); }
.app-meta span { color: var(--muted); }
.app-msg { background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 12px; }
.app-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.app-tags b { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: rgba(79, 140, 255, .12); color: #9fbdff; }
.app-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.app-foot select, .app-foot input { background: #0a1120; border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 13px; }
.app-foot input { flex: 1; min-width: 180px; }
.st-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: color-mix(in srgb, var(--st) 16%, transparent); color: var(--st); white-space: nowrap; }
