/* =====================================================================
   Cloudo Portal — kurumsal tasarım sistemi
   Yazı tipi: Inter · Kenar menü: lacivert · İçerik: açık gri-mavi
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --sb-w: 248px;
  --tb-h: 60px;

  /* Marka tonları (#004298 tabanlı) */
  --navy-900: #061a3a;
  --navy-800: #0a2552;
  --navy-700: #0d2f69;
  --navy-600: #004298;

  --brand: #004298;
  --brand-600: #003b88;
  --brand-700: #003478;
  --brand-50: #eef3fb;
  --brand-100: #d9e4f5;
  --brand-25: #f6f9fe;

  --bg: #f3f5f9;
  --surface: #ffffff;
  --line: #e4e8ef;
  --line-strong: #cfd6e2;

  --text: #15213a;
  --text-2: #3b4a66;
  --muted: #6b7a93;
  --muted-2: #9aa6b9;

  --ok: #157347;   --ok-bg: #e6f4ec;   --ok-line: #bfe0cc;
  --warn: #9a5b00; --warn-bg: #fff5e3; --warn-line: #f2dcae;
  --err: #b42318;  --err-bg: #fdecea;  --err-line: #f3c2bd;
  --info: #004298; --info-bg: #eef3fb; --info-line: #cfdcf0;

  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --sh-sm: 0 1px 2px rgba(21, 33, 58, .05);
  --sh: 0 1px 2px rgba(21, 33, 58, .04), 0 10px 28px -14px rgba(21, 33, 58, .16);
  --sb-grad: linear-gradient(170deg, #061a3a 0%, #072a60 50%, #004298 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 15px; color: var(--text); }
code { font-family: "JetBrains Mono", Consolas, "Courier New", monospace; font-size: 12px; background: #f1f4f9; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
svg:not([class]) { width: 18px; height: 18px; }
::selection { background: var(--brand-100); }

/* ---------------------------------------------------------------- Kabuk */
.shell { display: flex; min-height: 100vh; }

/* Kenar menü */
.sidebar {
  width: var(--sb-w); flex: 0 0 var(--sb-w); position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; padding: 0 14px 14px; color: #dfe6f2;
  background: var(--sb-grad);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 6px; }
.sb-brand { min-height: 80px; display: flex; align-items: center; padding: 18px 6px 12px; margin: 0 -2px 2px; }
.sb-brand img { height: 50px; width: auto; max-width: 100%; display: block; }
.sb-brand:hover { text-decoration: none; }

.sb-company {
  margin: 4px 0 10px; padding: 10px 12px; border-radius: var(--r); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09);
}
.sb-company .lbl { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(223,230,242,.6); }
.sb-company .nm { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.3; margin-top: 2px; }
.sb-company .sw { font-size: 11px; color: #a9c4ee; margin-top: 4px; display: inline-block; }
.sb-company .sw:hover { color: #fff; text-decoration: none; }

.sb-nav { display: flex; flex-direction: column; }
.sb-section { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: rgba(223,230,242,.5); padding: 14px 12px 6px; }
.sidebar .item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 1px 0; border-radius: 8px; width: 100%; text-align: left;
  color: #c9d4e6; font-weight: 500; font-size: 13.5px; line-height: 1.3; position: relative; border: 0; background: none; cursor: pointer; font-family: inherit;
  transition: background .12s, color .12s;
}
.sidebar .item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar .item.current { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.sidebar a.item.current::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #8fb6f0; }
.sidebar .item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .8; }
.sidebar .item.current svg { opacity: 1; color: #a9c4ee; }
.sidebar .item .chev { margin-left: auto; width: 14px; height: 14px; opacity: .55; transition: transform .15s; }
.sidebar .item.open .chev { transform: rotate(180deg); }
.sidebar .group { margin: 2px 0 6px; padding: 2px 0 2px 25px; position: relative; }
.sidebar .group::before { content: ""; position: absolute; left: 20px; top: 6px; bottom: 6px; width: 1px; background: rgba(255,255,255,.12); }
.sidebar .sub { display: block; padding: 6px 12px; margin: 1px 0; border-radius: 6px; color: #9fb0ca; font-size: 13px; }
.sidebar .sub:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar .sub.current { color: #fff; font-weight: 600; background: rgba(255,255,255,.09); }
.sidebar .meta { margin-top: auto; padding: 12px 12px 0; font-size: 11px; color: var(--muted-2); line-height: 1.5; }
.sidebar .meta .dot { vertical-align: middle; }
.sidebar .me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 2px; margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar .me .avatar { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: 0 0 34px; }
.sidebar .me .n { font-weight: 600; font-size: 13px; color: #fff; line-height: 1.2; }
.sidebar .me .r { font-size: 11px; color: rgba(223,230,242,.6); }
.sidebar .me .out { margin-left: auto; color: #c9d4e6; background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; }
.sidebar .me .out:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar .me .out svg { width: 16px; height: 16px; }

/* Ana sütun */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--tb-h); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumb .sep { color: var(--line-strong); }
.crumb .cur { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.env { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; }
.env.test { background: var(--warn-bg); color: var(--warn); border: 1px solid #f3dcae; }
.env.live { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe6cc; }
.tenant-switch select { height: 34px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font: inherit; font-size: 13px; padding: 0 10px; max-width: 260px; color: var(--text); }
.user { display: flex; align-items: center; gap: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.user .av { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px; }
.user .n { font-weight: 600; font-size: 13px; line-height: 1.2; }
.user .s { font-size: 11.5px; color: var(--muted); }
.credit-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); font-size: 12.5px; }
.credit-pill:hover { text-decoration: none; background: var(--brand-100); }
.credit-pill svg { width: 15px; height: 15px; }
.credit-pill .lbl { color: var(--brand-600); font-weight: 500; }
.credit-pill strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.credit-pill.low { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); } .credit-pill.low .lbl { color: var(--warn); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--text-2); cursor: pointer; }
.iconbtn:hover { background: var(--bg); text-decoration: none; }
.iconbtn svg { width: 16px; height: 16px; }

.content { padding: 28px 28px 48px; flex: 1; }
.content > * { max-width: 1360px; }

/* Sayfa başlığı */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.hero .badge-top { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.hero h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.hero .sub { margin-top: 4px; font-size: 13.5px; color: var(--muted); max-width: 820px; }
.hero .sub .badge { vertical-align: middle; }
.hero .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- Kartlar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 20px; margin-bottom: 18px; }
.card.tight { padding: 0; overflow: hidden; overflow-x: auto; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.card-head h2 { font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; }
.card-head h2 svg { width: 16px; height: 16px; color: var(--brand); }
.card-head .muted { font-size: 12.5px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-title { display: flex; align-items: center; gap: 10px; margin: -2px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card-title svg { width: 17px; height: 17px; color: var(--brand); }
.card-title h2 { font-size: 14.5px; }
.card-title .muted { font-size: 12.5px; margin-left: auto; }
.card-title .btn { margin-left: auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; }
.grid > .card { margin-bottom: 0; }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .grid.two { grid-template-columns: 1fr; } .grid[style*="2fr"] { grid-template-columns: 1fr !important; } }

.stat { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; }
.stat > div:last-child { order: -1; }
.stat .ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand); flex: 0 0 40px; }
.stat .ico svg { width: 19px; height: 19px; }
.stat .ico.warn { background: var(--warn-bg); color: var(--warn); }
.stat .ico.ok { background: var(--ok-bg); color: var(--ok); }
.stat .ico.err { background: var(--err-bg); color: var(--err); }
.stat .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------------------------------------------------------------- Filtre */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.filters + .card.tight { border-top-left-radius: 0; border-top-right-radius: 0; }
.filters form { display: contents; }
.filters input[type=text] { flex: 1 1 240px; min-width: 200px; }
.filters .search { flex: 1 1 260px; min-width: 220px; position: relative; display: flex; align-items: center; }
.filters .search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--muted-2); pointer-events: none; }
.filters .search input { width: 100%; padding-left: 32px; }
.filters .spacer { flex: 1; }
.filters .count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------------------------------------------------------------- Form */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=time], input:not([type]), select, textarea {
  height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: 13.5px; background: #fff; color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 8px 11px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 66, 152, .14); }
input::placeholder { color: var(--muted-2); }
input[readonly] { background: #f8fafc; color: var(--text-2); }
input:disabled, select:disabled { background: #f4f6fa; color: var(--text-2); border-color: var(--line); cursor: not-allowed; }
label { font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.form-grid label, .field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-grid label .muted { font-weight: 500; }
.form-grid input, .form-grid select, .form-grid textarea, .field input, .field select { width: 100%; }
.form-grid .span2 { grid-column: span 2; }
.form-grid.readonly label { color: var(--muted); }
.form-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 16px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 -6px 20px -14px rgba(21,33,58,.25); z-index: 5; }
.check { display: inline-flex !important; align-items: center; gap: 8px; font-size: 13px !important; font-weight: 500 !important; text-transform: none !important; color: var(--text) !important; margin: 0 !important; cursor: pointer; }
.check input { width: 16px !important; height: 16px; accent-color: var(--brand); }
.help { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(0,66,152,.3); }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { color: var(--err); border-color: var(--err-line); }
.btn.danger:hover { background: var(--err-bg); }
.btn.ghost.danger { border-color: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
form.inline { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
td.actions { display: table-cell; white-space: nowrap; width: 1%; text-align: right; }
td.actions .inline, td.actions form, td.actions .dd { display: inline-block; vertical-align: middle; }
td.actions > * + * { margin-left: 4px; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--text-2); cursor: pointer; padding: 0; vertical-align: middle; transition: background .12s, border-color .12s; }
.ibtn:hover { background: var(--brand-25); border-color: var(--brand-100); text-decoration: none; color: var(--brand); }
.ibtn svg { width: 15px; height: 15px; }
.ibtn.green { color: var(--ok); } .ibtn.green:hover { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.ibtn.red { color: var(--err); } .ibtn.red:hover { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.ibtn.gray { color: var(--muted); }

/* ---------------------------------------------------------------- Tablo */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; background: #fafbfd; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: var(--brand-25); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.mono, .mono { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12.5px; color: var(--text-2); }
td .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
td .sub.mono { font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; }
td.strong, .strong { font-weight: 600; }
td.type { white-space: nowrap; font-weight: 600; }
td.party { max-width: 280px; } td.party > .name { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.data-table td { padding: 12px 14px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 18px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-state svg { width: 36px; height: 36px; color: var(--muted-2); margin-bottom: 6px; }
.empty-state h3 { font-size: 15px; color: var(--text); }
.empty-state p { margin: 0 0 10px; font-size: 13.5px; max-width: 460px; }
.code-table td { padding: 9px 14px; }
.nowrap { white-space: nowrap; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1500px) { .hide-md { display: none !important; } }

/* ---------------------------------------------------------------- Rozet / mesaj */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: var(--text-2); white-space: nowrap; line-height: 1.4; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #f1f5f9; color: var(--muted); }
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); margin-bottom: 14px; border: 1px solid; background: #fff; font-size: 13.5px; }
.flash > svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.flash > div { flex: 1; }
.flash.ok { border-color: var(--ok-line); background: var(--ok-bg); color: #0f4d2f; }
.flash.warn { border-color: var(--warn-line); background: var(--warn-bg); color: #6b3f00; }
.flash.err { border-color: var(--err-line); background: var(--err-bg); color: #7a1a12; }
.flash.info { border-color: var(--info-line); background: var(--info-bg); color: var(--brand-700); }
.errlist { margin: 0 0 14px; padding: 12px 16px 12px 32px; border: 1px solid var(--err-line); background: var(--err-bg); border-radius: var(--r); color: #7a1a12; font-size: 13.5px; }

/* ---------------------------------------------------------------- Detay */
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; color: var(--text); }
.muted { color: var(--muted); }
.warnlist { margin: 10px 0; padding-left: 18px; font-size: 13px; }
.warnlist li { color: var(--warn); margin: 2px 0; }
pre { background: var(--navy-900); color: #dbe4f3; padding: 16px; border-radius: var(--r); overflow: auto; font-size: 12px; line-height: 1.55; max-height: 560px; margin: 0; font-family: "JetBrains Mono", Consolas, monospace; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }
.sendbox { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: 16px; }
.sendbox form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
details.card > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "›"; display: inline-block; transition: transform .15s; color: var(--muted); }
details.card[open] > summary::before { transform: rotate(90deg); }

/* ---------------------------------------------------------------- Giriş */
.login-body { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 52%) 1fr; }
.login-side { position: relative; overflow: hidden; background: var(--sb-grad); color: #fff; }
.login-side-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.login-side-glow { position: absolute; right: -220px; bottom: -260px; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(closest-side, rgba(77,127,196,.35), transparent 70%); pointer-events: none; }
.login-side-inner { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 64px; }
.login-logo { height: 56px; width: auto; align-self: flex-start; }
.login-copy { max-width: 520px; }
.login-copy .eyebrow { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #a9c4ee; margin-bottom: 14px; }
.login-copy h2 { font-size: 32px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; color: #fff; }
.login-copy p { margin: 16px 0 0; font-size: 15px; line-height: 1.65; color: #b6c2d6; }
.login-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.login-points li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: #dbe4f3; line-height: 1.5; }
.login-points svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; color: #fff; background: rgba(96,165,250,.25); border: 1px solid rgba(147,197,253,.4); border-radius: 50%; padding: 3px; }
.login-foot { font-size: 12.5px; color: #8392ad; display: flex; gap: 8px; align-items: center; }
.login-foot .sep { opacity: .5; }

.login-form { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login-card { width: 100%; max-width: 420px; }
.login-card-head { margin-bottom: 28px; }
.login-card h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.login-card .lead { color: var(--muted); font-size: 14.5px; margin: 0; }
.login-card .field { margin-bottom: 18px; }
.login-card .field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.login-card .field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.login-card .field-row label { margin: 0; }
.login-card .link-muted { font-size: 12.5px; color: var(--muted); }
.login-card .link-muted:hover { color: var(--brand); }
.login-card input[type=email], .login-card input[type=password], .login-card input[type=text] { width: 100%; height: 46px; font-size: 14.5px; padding: 0 14px; border-radius: 10px; background: #fff; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted-2); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pw-toggle:hover, .pw-toggle.on { color: var(--brand); background: var(--brand-50); }
.pw-toggle svg { width: 17px; height: 17px; }
.login-card .remember { margin: 2px 0 22px !important; color: var(--text-2) !important; }
.login-submit { width: 100%; height: 46px; justify-content: center; font-size: 15px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(37,99,235,.55); }
.login-card-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.login-card-foot .secure { display: inline-flex; align-items: center; gap: 6px; }
.login-card-foot .secure svg { width: 14px; height: 14px; color: var(--ok); }
.login-card .flash { margin-bottom: 20px; }
@media (max-width: 960px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } .login-form { padding: 32px 20px; } }
/* ---------------------------------------------------------------- Diğer */
.pagination { display: flex; gap: 4px; padding: 12px 16px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13px; }
.pagination span[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination a:hover { background: var(--bg); text-decoration: none; }
.lines-table input, .lines-table select { width: 100%; min-width: 60px; height: 32px; padding: 0 8px; font-size: 13px; }
.lines-table td { padding: 6px 8px; }
.lines-table .num input { text-align: right; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; max-width: 380px; margin-left: auto; font-size: 13.5px; padding: 14px 18px; border-top: 1px solid var(--line); }
.totals .grand { font-weight: 700; font-size: 16px; color: var(--text); }
.token-box { font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; background: var(--navy-900); color: #dbe4f3; padding: 12px 14px; border-radius: 8px; word-break: break-all; user-select: all; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-right: 6px; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.off { background: #ef4444; }

@media (max-width: 960px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex: none; height: auto; position: static; }
  .content { padding: 18px; }
  .kv { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
}

/* ---------------------------------------------------------------- Gösterge panosu KPI grupları */
[hidden] { display: none !important; }
.kpi-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 18px; }
.kpi-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.kpi-group > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--brand-25); }
.kpi-group > header h2 { font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; color: var(--brand-700); }
.kpi-group > header h2 svg { width: 16px; height: 16px; }
.kpi-group > header a { font-size: 12.5px; font-weight: 500; }
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-right: 1px solid var(--line); color: var(--text); position: relative; transition: background .12s; }
.kpi:last-child { border-right: 0; }
.kpi:hover { background: var(--brand-25); text-decoration: none; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .n { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--muted-2); }
.kpi .s.warn { color: var(--warn); }
.kpi.ok .n { color: var(--ok); } .kpi.err .n { color: var(--err); } .kpi.warn .n { color: var(--warn); }
.kpi::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.kpi.ok::after { background: var(--ok-line); } .kpi.err::after { background: var(--err-line); } .kpi.warn::after { background: var(--warn-line); }
@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } .kpi { border-bottom: 1px solid var(--line); } }
@media (max-width: 700px) { .kpi-row { grid-template-columns: 1fr 1fr; } }

.credit-card-mini { display: inline-flex; align-items: center; gap: 12px; padding: 6px 8px 6px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.credit-card-mini .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.credit-card-mini .ico svg { width: 17px; height: 17px; }
.credit-card-mini .l { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.credit-card-mini .n { font-size: 17px; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }

/* Belge türü etiketi */
.doc-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); white-space: nowrap; }
.doc-chip.despatch { background: #eef7f1; color: #1d6b43; border-color: #cbe6d5; }
.doc-chip.producer { background: #f6f0e6; color: #7a4f0b; border-color: #ead9bd; }

/* Açılır menü */
.dd { position: relative; display: inline-block; }
.dd .dd-btn .chev { width: 13px; height: 13px; margin-left: 2px; transition: transform .15s; }
.dd.open .dd-btn .chev { transform: rotate(180deg); }
.dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px -12px rgba(21,33,58,.28); padding: 6px; z-index: 50; text-align: left; }
.dd-menu.right { left: auto; right: 0; }
.dd.open .dd-menu { display: block; }
.dd-menu a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 13.5px; }
.dd-menu a:hover { background: var(--brand-25); text-decoration: none; }
.dd-menu a svg { width: 17px; height: 17px; color: var(--brand); flex: 0 0 17px; }
.dd-menu a span { display: flex; flex-direction: column; line-height: 1.25; }
.dd-menu a b { font-weight: 600; }
.dd-menu a small { color: var(--muted); font-size: 11.5px; }

/* Sekme benzeri segment */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.seg a:hover { text-decoration: none; background: var(--bg); }
.seg a.on { background: var(--brand); color: #fff; font-weight: 600; }

.lines-table th.ded-h { font-size: 10px; letter-spacing: .02em; text-transform: none; }
.help svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--warn); }
.recent-table td { padding: 12px 14px; }
/* ---------------------------------------------------------------- Belge listeleri (CRS benzeri) */
.list-table th, .list-table td { padding: 8px 8px; font-size: 12.5px; white-space: nowrap; }
.list-table th { white-space: normal; line-height: 1.2; font-size: 10.5px; letter-spacing: .04em; vertical-align: bottom; }
.list-table th.chk, .list-table td.chk { width: 34px; text-align: center; padding-left: 12px; }
.list-table td.chk input, .list-table th.chk input { width: 15px; height: 15px; accent-color: var(--brand); vertical-align: middle; }
.list-table th.ops, .list-table td.ops { width: 1%; }
.list-table td.ops { display: table-cell; }
.list-table td.ops > * { vertical-align: middle; }
.list-table td.ops > * + * { margin-left: 3px; }
.list-table td.ops .inline, .list-table td.ops .dd { display: inline-block; }
.list-table .ibtn { width: 28px; height: 28px; }
.list-table td.party { max-width: 170px; } .list-table td.party .name { max-width: 170px; }
.list-table td.ettn { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: var(--muted); }
.list-table .type-link { color: var(--brand); font-weight: 600; }
.list-table td .sub { white-space: nowrap; }
.list-table th.st-cell, .list-table td.st-cell { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -8px 0 10px -8px rgba(21,33,58,.18); }
.list-table th.st-cell { background: #fafbfd; }
.list-table tbody tr:hover td.st-cell { background: var(--brand-25); }
.list-table td.st-cell { padding: 4px 8px 4px 6px; }
.st-sub { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; text-align: center; color: var(--muted); }
.st-sub.ok { color: var(--ok); } .st-sub.err { color: var(--err); } .st-sub.warn { color: var(--warn); }
.st { display: block; padding: 6px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.25; min-width: 110px; max-width: 170px; white-space: normal; background: #eef1f6; color: var(--text-2); }
.st.ok { background: #d9f2e3; color: #0f5a33; }
.st.warn { background: #fff3b0; color: #6b4a00; }
.st.err { background: #d9534f; color: #fff; }
.st.info { background: var(--brand-100); color: var(--brand-700); }
.st.muted { background: #eef1f6; color: var(--muted); }
.list-table tbody tr:hover td { background: var(--brand-25); }
/* ---------------------------------------------------------------- Kontör satın alma */
.buy-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1350px) { .buy-layout { grid-template-columns: 1fr; } .summary { position: static; } }
.pkg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .pkg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pkg-grid { grid-template-columns: 1fr; } }
.pkg { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 16px 16px; overflow: visible; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.pkg:hover { border-color: var(--brand-400); box-shadow: var(--sh); }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; box-shadow: 0 4px 10px -4px rgba(217,119,6,.6); }
.pkg-badge::before { content: "★"; font-size: 11px; line-height: 1; }
.pkg-credits { font-size: 13px; color: var(--muted); font-weight: 500; }
.pkg-credits b { font-size: 22px; color: var(--text); font-weight: 700; letter-spacing: -.02em; margin-right: 4px; }
.pkg-price { font-size: 17px; font-weight: 700; color: var(--brand-700); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pkg-price small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.pkg-unit { font-size: 11.5px; color: var(--muted-2); }
.pkg-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; display: flex; align-items: center; justify-content: center; color: transparent; transition: all .12s; }
.pkg-check svg { width: 13px; height: 13px; }
.pkg:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,66,152,.12), var(--sh); background: var(--brand-25); }
.pkg:has(input:checked) .pkg-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.pkg.popular { border-color: #f3c66b; background: linear-gradient(180deg, #fffaf0 0%, #fff 60%); }
.pkg.popular:has(input:checked) { border-color: var(--brand); background: var(--brand-25); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.pay { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.pay:hover { border-color: var(--brand-400); }
.pay input { position: absolute; opacity: 0; pointer-events: none; }
.pay-ico { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: 0 0 42px; }
.pay-ico svg { width: 20px; height: 20px; }
.pay > span:nth-child(3) { display: flex; flex-direction: column; gap: 2px; padding-right: 30px; }
.pay b { font-size: 14px; font-weight: 600; }
.pay small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pay:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,66,152,.12); background: var(--brand-25); }
.pay:has(input:checked) .pkg-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.pay .pkg-check { top: 50%; transform: translateY(-50%); right: 14px; }
.summary { position: sticky; top: calc(var(--tb-h) + 20px); margin: 0; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; margin: 0; font-size: 13.5px; }
.sum dt { color: var(--muted); } .sum dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sum-total span { color: var(--text-2); font-weight: 600; }
.sum-total strong { font-size: 22px; letter-spacing: -.02em; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.sum-firm { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--bg); display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.sum-firm .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sum-firm b { font-size: 13px; }
.sum-method { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-700); }
.sum-method svg { width: 16px; height: 16px; }
.kv.iban { grid-template-columns: 140px 1fr; }
.iban-no { font-family: "JetBrains Mono", Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: .04em; color: var(--brand-700); background: var(--brand-25); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--brand-100); display: inline-block; margin-right: 8px; }
.ref-box { font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; background: #fff; border: 1px dashed var(--warn-line); border-radius: 6px; padding: 8px 12px; margin: 8px 0; color: var(--text); }
.cc-preview { background: var(--sb-grad); color: #fff; border-radius: 14px; padding: 22px 24px; margin-bottom: 18px; max-width: 420px; box-shadow: var(--sh); }
.cc-chip { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #e8c86a, #b58a2b); margin-bottom: 20px; }
.cc-num { font-family: "JetBrains Mono", Consolas, monospace; font-size: 20px; letter-spacing: .12em; margin-bottom: 18px; }
.cc-row { display: flex; justify-content: space-between; gap: 16px; }
.cc-row span { display: flex; flex-direction: column; } .cc-row small { font-size: 9.5px; letter-spacing: .1em; color: rgba(255,255,255,.6); } .cc-row b { font-size: 13px; font-weight: 600; letter-spacing: .04em; }