/* ============================================================
   EasyPDKS Panel — lavanta SaaS teması
   ============================================================ */
:root {
  --bg: #f3f3fb;
  --surface: #ffffff;
  --surface-2: #f8f8fe;
  --line: #e8e8f4;
  --ink: #1d2130;
  --ink-soft: #5b6172;
  --muted: #9aa0b4;
  --violet: #7c68ee;
  --violet-deep: #6853e0;
  --violet-soft: #efecfe;
  --good: #16a34a;      --good-bg: #e7f6ee;
  --warn: #d97706;      --warn-bg: #fdf1e0;
  --bad:  #dc2626;      --bad-bg: #fdecec;
  --info: #2563eb;      --info-bg: #e8f0fe;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(40, 40, 90, .07);
  --shadow-lift: 0 10px 30px rgba(60, 50, 150, .14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14.5px;
}
a { color: inherit; text-decoration: none; }
small { color: var(--muted); }

/* ---------- iskelet ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex: 0 0 232px; background: var(--surface);
  border-right: 1px solid var(--line); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.main { flex: 1; padding: 26px 30px; min-width: 0; animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- marka + kullanıcı ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-chip {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--violet), #a78bfa);
  color: #fff; font-weight: 800; font-size: 18px; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(124, 104, 238, .4);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.me {
  display: flex; gap: 10px; align-items: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.me b { display: block; font-size: 13.5px; }
.me small { font-size: 12px; }

/* ---------- menü ---------- */
.menu-label { font-size: 11px; letter-spacing: 1.4px; color: var(--muted); padding: 10px 10px 4px; font-weight: 700; }
.menu { display: flex; flex-direction: column; gap: 3px; }
.menu-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 11px;
  color: var(--ink-soft); font-weight: 600; transition: background .18s, color .18s, transform .18s;
}
.menu-item:hover { background: var(--violet-soft); color: var(--violet-deep); transform: translateX(2px); }
.menu-item.active {
  background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff;
  box-shadow: 0 6px 16px rgba(124, 104, 238, .35);
}
.mi-icon { width: 20px; text-align: center; font-size: 15px; }
.logout { margin-top: auto; color: var(--muted); }

/* ---------- sayfa başlığı ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-sub { color: var(--ink-soft); margin-top: 4px; font-size: 13.5px; }
.page-actions { display: flex; gap: 10px; }

/* ---------- kartlar / stat ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } .sidebar { display: none; } .main { padding: 16px; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; animation: cardIn .45s ease both;
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-lift); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.grid > .card:nth-child(1) { animation-delay: .02s; }
.grid > .card:nth-child(2) { animation-delay: .08s; }
.grid > .card:nth-child(3) { animation-delay: .14s; }
.grid > .card:nth-child(4) { animation-delay: .20s; }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .num { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .lbl { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.stat .ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; margin-bottom: 4px;
}
.ico-violet { background: var(--violet-soft); color: var(--violet-deep); }
.ico-good   { background: var(--good-bg); color: var(--good); }
.ico-warn   { background: var(--warn-bg); color: var(--warn); }
.ico-info   { background: var(--info-bg); color: var(--info); }

.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff;
  font-weight: 700; font-size: 13.5px; padding: 10px 18px; border-radius: 11px;
  box-shadow: 0 6px 16px rgba(124, 104, 238, .3);
  transition: transform .15s, box-shadow .15s, filter .15s; font-family: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(124, 104, 238, .42); filter: brightness(1.04); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: var(--surface); color: var(--violet-deep); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--violet-soft); }
.btn.danger { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 6px 16px rgba(220, 38, 38, .25); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }

/* ---------- tablo ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); }
.tbl th {
  text-align: left; font-size: 12px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700;
  white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
tr.row-new { animation: rowNew 1.6s ease both; }
@keyframes rowNew { 0% { background: #ddd4ff; } 100% { background: transparent; } }

/* ---------- rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-good { background: var(--good-bg); color: var(--good); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad  { background: var(--bad-bg);  color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-gray { background: #eef0f5; color: var(--ink-soft); }
.b-violet { background: var(--violet-soft); color: var(--violet-deep); }
.badge.no-dot::before { display: none; }

.pulse { position: relative; }
.pulse::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

/* ---------- avatar ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12.5px; font-weight: 800; color: #fff; flex: 0 0 34px;
}
.av-violet { background: linear-gradient(135deg, #8b7cf0, #6853e0); }
.av-gray   { background: linear-gradient(135deg, #9aa0b4, #6b7280); }

/* ---------- form ---------- */
.frm { display: grid; gap: 14px; }
.frm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .frm-row { grid-template-columns: 1fr; } }
label.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.fld input, .fld select {
  font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.fld input:focus, .fld select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 104, 238, .15); }

/* ---------- modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(25, 20, 60, .45); backdrop-filter: blur(3px);
  display: none; place-items: center; z-index: 50; padding: 20px;
}
.modal-bg.open { display: grid; animation: fadeIn .2s ease; }
.modal {
  background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px rgba(20, 15, 60, .35);
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 26px;
  animation: modalIn .28s cubic-bezier(.2, 1.1, .4, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal h2 { font-size: 18px; margin-bottom: 18px; }
.modal .close-x { float: right; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; top: 18px; right: 18px; z-index: 99; padding: 13px 20px; border-radius: 12px;
  font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-lift);
  animation: toastIn .35s cubic-bezier(.2, 1.2, .4, 1) both, toastOut .4s ease 4s both;
}
.toast-ok  { background: #10321f; color: #7ce6a3; }
.toast-err { background: #3a1214; color: #ff9d9d; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px); visibility: hidden; } }

/* ---------- mini bar grafik ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; max-width: 34px; background: var(--violet); border-radius: 4px 4px 0 0;
  min-height: 2px; position: relative; transform-origin: bottom; animation: barGrow .7s cubic-bezier(.2, .9, .3, 1) both;
  transition: filter .15s;
}
.bar:hover { filter: brightness(1.15); }
.bar[data-v]:hover::after {
  content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-lbl { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------- canlı liste ---------- */
.live-item {
  display: flex; align-items: center; gap: 13px; padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.live-item:last-child { border-bottom: none; }
.live-item.fresh { animation: liveIn .5s cubic-bezier(.2, 1.1, .4, 1) both; }
@keyframes liveIn { from { opacity: 0; transform: translateX(-18px); background: var(--violet-soft); } to { opacity: 1; transform: none; } }
.live-item b { font-size: 14px; }
.live-item .meta { font-size: 12.5px; color: var(--muted); }
.live-empty { color: var(--muted); text-align: center; padding: 34px 10px; }

/* ---------- login ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #eef 0%, #f6f4ff 45%, #efeaff 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: blob 14s ease-in-out infinite alternate; }
.blob.b1 { width: 420px; height: 420px; background: #b7a6ff; top: -110px; left: -80px; }
.blob.b2 { width: 380px; height: 380px; background: #9fd0ff; bottom: -90px; right: -60px; animation-delay: -6s; }
@keyframes blob { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, 40px) scale(1.15); } }
.auth-card {
  position: relative; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 22px; padding: 38px 34px;
  width: 100%; max-width: 400px; box-shadow: 0 30px 70px rgba(80, 60, 200, .18);
  animation: modalIn .5s cubic-bezier(.2, 1.05, .4, 1) both;
}
.auth-card .brand { padding: 0 0 8px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card p.sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 20px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.flash-err {
  background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; animation: shake .4s ease;
}
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- yardımcı ---------- */
.muted { color: var(--muted); }
.mono { font-family: Consolas, Menlo, monospace; font-size: 13px; }
.mt { margin-top: 16px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.codebox {
  background: #1c1e2c; color: #cdd6ff; border-radius: 12px; padding: 14px 16px;
  font-family: Consolas, Menlo, monospace; font-size: 12.5px; overflow-x: auto; white-space: pre; line-height: 1.55;
}
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { font-weight: 600; word-break: break-all; }
