@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg-deep: #12151a;
  --bg-card: #1c2128;
  --bg-elevated: #252b33;
  --bg-hover: #2a313a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #e86c24;
  --accent-soft: #f08850;
  --accent-glow: rgba(232, 108, 36, 0.35);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --topbar-h: 72px;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 100% 60% at 50% -30%, rgba(232, 108, 36, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(240, 136, 80, 0.06) 0%, transparent 45%),
    var(--bg-deep);
  background-attachment: fixed;
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  width: 100%;
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-soft); text-decoration: none; transition: color 0.15s; }
a:hover { color: #ffb088; text-decoration: none; }

.shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 32px) clamp(24px, 4vw, 48px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 calc(-1 * clamp(16px, 2.5vw, 32px));
  margin-bottom: 28px;
  padding: 16px clamp(16px, 2.5vw, 32px);
  background: rgba(18, 21, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent) 0%, #b85518 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  font-family: inherit;
  line-height: 1.25;
  white-space: nowrap;
  appearance: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #c45a1a 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(232, 108, 36, 0.5);
  filter: brightness(1.05);
}
.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  border-color: rgba(240, 136, 80, 0.45);
  background: var(--bg-hover);
  color: var(--accent-soft);
}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; min-height: 30px; font-weight: 600; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 6px; min-height: 26px; }
.btn-danger {
  background: var(--danger-bg);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
  border-color: var(--danger);
}
.inline-form { display: inline; margin: 0; padding: 0; }

.page-intro {
  margin-bottom: 24px;
}
.page-intro h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  position: relative;
  background: linear-gradient(165deg, var(--bg-card) 0%, rgba(28, 33, 40, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  opacity: 0.85;
}
.stat:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(232, 108, 36, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
}
.stat-icon svg { width: 18px; height: 18px; }
.stat span.label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.stat strong {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat strong.accent { color: var(--accent-soft); }

.search-bar { margin-bottom: 22px; max-width: 100%; }
.search-bar label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.search-input-wrap { position: relative; max-width: 520px; }
.search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: rgba(232, 108, 36, 0.5);
  box-shadow: 0 0 0 3px rgba(232, 108, 36, 0.15);
}
.search-input::placeholder { color: #6b7280; }
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.45;
  pointer-events: none;
  color: var(--muted);
}
.search-meta {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.search-empty {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 32px 16px;
  font-size: 14px;
}
.search-empty.is-visible { display: block; }
.license-row.is-hidden { display: none !important; }

.usage-table { min-width: 0; table-layout: auto; font-size: 13px; }
.activity-feed { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.activity-feed-single { max-height: none; overflow: visible; }
.activity-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
}
.activity-item time { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.activity-item strong { color: var(--accent-soft); margin-right: 8px; }
.activity-item span { color: var(--text); }
.activity-ip { font-size: 12px; color: var(--muted); margin-left: 6px; font-family: ui-monospace, Consolas, monospace; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card h2 .muted-title { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.alert-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--success-bg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert-success::before {
  content: "✓";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.alert-warn {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.12);
  color: var(--text);
}

.cell-loc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.cell-loc .loc-primary {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-loc .loc-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
a.loc-link {
  color: inherit;
  text-decoration: none;
}
a.loc-link:hover .loc-primary {
  color: var(--accent);
  text-decoration: underline;
}

.key-display {
  font-family: ui-monospace, Consolas, "Cascadia Mono", monospace;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  color: var(--success);
  margin: 10px 0 0;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(34, 197, 94, 0.4);
  word-break: break-all;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--radius) var(--radius);
  width: 100%;
}
.table-wrap.table-fill { border: none; box-shadow: none; border-radius: 0; }

table.data-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  background: transparent;
  font-size: 13px;
  table-layout: fixed;
}
table.data-table th,
table.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #161a20;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  white-space: nowrap;
}
table.data-table tbody tr {
  transition: background 0.12s;
}
table.data-table tbody tr:hover td {
  background: rgba(232, 108, 36, 0.04);
}
table.data-table tr:last-child td { border-bottom: none; }

table.data-table col.col-id { width: 4%; }
table.data-table col.col-key { width: 11%; }
table.data-table col.col-name { width: 13%; }
table.data-table col.col-email { width: 14%; }
table.data-table col.col-status { width: 7%; }
table.data-table col.col-online { width: 8%; }
table.data-table col.col-ip { width: 8%; }
table.data-table col.col-location { width: 14%; }
table.data-table col.col-vehicle { width: 11%; }
table.data-table col.col-device { width: 6%; }
table.data-table col.col-expires { width: 8%; }
table.data-table col.col-actions { width: 18%; }

td.col-actions { overflow: visible; text-overflow: unset; }
.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}
.cell-actions .inline-form { flex: 0 0 auto; }

td .cell-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td code.key-mask {
  color: var(--accent-soft);
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
  word-break: break-all;
  white-space: normal;
  background: rgba(232, 108, 36, 0.08);
  padding: 3px 6px;
  border-radius: 4px;
}

.card-table-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.card-table-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.card-table-head .sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.card-table { padding: 0; overflow: hidden; width: 100%; }

table { width: 100%; border-collapse: collapse; background: var(--bg-elevated); font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: #161a20;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(232, 108, 36, 0.04); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-ok { background: var(--success-bg); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.25); }
.badge-off { background: var(--danger-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.form-grid { display: grid; gap: 16px; max-width: 560px; width: 100%; }
.form-grid .form-full { grid-column: 1 / -1; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(232, 108, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 108, 36, 0.12);
}
textarea { min-height: 96px; resize: vertical; }
.readonly { opacity: 0.7; cursor: not-allowed; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(232, 108, 36, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(240, 136, 80, 0.06) 0%, transparent 35%);
  pointer-events: none;
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(165deg, var(--bg-card) 0%, rgba(28, 33, 40, 0.95) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.login-card .brand { margin-bottom: 28px; }
.login-card h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.login-card .sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; font-weight: 500; }
.login-card .btn-primary { width: 100%; margin-top: 12px; min-height: 48px; font-size: 15px; }
.err {
  color: #fca5a5;
  font-size: 13px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--danger-bg);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

.danger-zone {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}
.danger-zone-title { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #fca5a5; }
.danger-zone-text { margin: 0 0 14px; font-size: 13px; color: var(--muted); max-width: 520px; line-height: 1.5; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 48px 24px;
  font-size: 14px;
}
.empty-state a { font-weight: 600; }

.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.layout-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 960px) {
  .layout-two-col.has-sidebar {
    grid-template-columns: 1fr 340px;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  table.data-table col.col-email { width: 12%; }
  table.data-table col.col-actions { width: 20%; }
}

@media (max-width: 720px) {
  .shell {
    padding-top: 0;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .topbar {
    position: sticky;
    top: 0;
    margin: 0 -12px 16px;
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    gap: 12px;
  }
  .brand { flex: 1; min-width: 0; }
  .brand h1 { font-size: 1rem; line-height: 1.2; }
  .brand p { font-size: 0.75rem; }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .nav .btn {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    padding: 10px 12px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stat { padding: 14px 12px; }
  .stat strong { font-size: 1.35rem; }
  .stat .label { font-size: 11px; }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .search-bar label { font-size: 13px; }
  .search-input-wrap { max-width: none; width: 100%; }
  .search-input {
    min-height: 48px;
    font-size: 16px;
  }
  .search-meta { font-size: 12px; }

  .card { padding: 14px; margin-bottom: 14px; border-radius: 12px; }
  .card-table { padding: 0; overflow: hidden; }
  .card-table-head {
    padding: 14px 14px 10px;
  }
  .card-table-head h2 { font-size: 0.95rem; }
  .card-table-head .sub { font-size: 12px; }

  .table-wrap.table-fill {
    padding: 0 10px 12px;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
  }

  table.data-table { min-width: 0; table-layout: auto; width: 100%; }
  table.data-table colgroup { display: none; }
  table.data-table thead { display: none; }
  table.data-table tbody { display: block; }

  table.data-table tr.license-row {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    margin-bottom: 14px;
    padding: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  table.data-table tr.license-row:last-child { margin-bottom: 0; }

  table.data-table tr.license-row td {
    display: block;
    width: 100%;
    flex: 1 1 100%;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    box-sizing: border-box;
  }
  table.data-table tr.license-row td:last-child {
    border-bottom: none;
  }

  table.data-table tr.license-row td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 5px;
  }

  /* Kart başlığı: müşteri adı */
  table.data-table tr.license-row td[data-label="Müşteri"] {
    order: 1;
    padding-top: 14px;
    padding-bottom: 8px;
    border-bottom: none;
    background: linear-gradient(180deg, rgba(232, 108, 36, 0.08) 0%, transparent 100%);
  }
  table.data-table tr.license-row td[data-label="Müşteri"]::before { display: none; }
  table.data-table tr.license-row td[data-label="Müşteri"] strong {
    font-size: 1.12rem;
    line-height: 1.3;
    word-break: break-word;
  }

  table.data-table tr.license-row td[data-label="Lisans"],
  table.data-table tr.license-row td[data-label="Uygulama"] {
    order: 2;
    flex: 1 1 50%;
    width: 50%;
    border-bottom: 1px solid var(--border);
  }
  table.data-table tr.license-row td[data-label="Uygulama"] {
    border-left: 1px solid var(--border);
  }

  table.data-table tr.license-row td[data-label="Konum"] {
    order: 3;
    background: rgba(0, 0, 0, 0.15);
  }
  table.data-table tr.license-row td[data-label="Konum"]::before {
    color: var(--accent-soft);
  }

  table.data-table tr.license-row td[data-label="IP"] { order: 4; }
  table.data-table tr.license-row td[data-label="Marka / model"] { order: 5; }
  table.data-table tr.license-row td[data-label="Anahtar"] { order: 6; }
  table.data-table tr.license-row td[data-label="İşlem"] {
    order: 99;
    padding: 12px 14px 14px;
    background: rgba(0, 0, 0, 0.12);
  }
  table.data-table tr.license-row td[data-label="İşlem"]::before { display: none; }

  /* Mobilde gereksiz alanlar (masaüstünde var) */
  table.data-table tr.license-row td[data-label="ID"],
  table.data-table tr.license-row td[data-label="E-posta"],
  table.data-table tr.license-row td[data-label="Cihaz"],
  table.data-table tr.license-row td[data-label="Bitiş"] {
    display: none;
  }

  table.data-table tr.license-row td .cell-ellipsis,
  table.data-table tr.license-row td code.key-mask {
    display: block;
    width: 100%;
    text-align: left !important;
    white-space: normal;
    word-break: break-word;
    font-size: 14px;
  }
  table.data-table tr.license-row td code.key-mask {
    font-size: 12px;
    padding: 8px 10px;
    background: var(--bg-deep);
    border-radius: 8px;
    border: 1px solid var(--border);
  }

  .cell-loc {
    width: 100%;
    max-width: 100%;
  }
  .cell-loc .loc-primary {
    font-size: 0.95rem;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  .cell-loc .loc-sub {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.8rem;
    margin-top: 6px;
  }

  .badge {
    font-size: 12px;
    padding: 6px 10px;
  }

  .cell-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cell-actions .btn,
  .cell-actions .inline-form .btn {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }
  .cell-actions .inline-form { display: block; width: 100%; }

  .actions-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .actions-row .btn { width: 100%; min-height: 48px; }

  .form-grid { max-width: none; }
  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .login-page {
    padding: 12px;
    align-items: center;
    min-height: 100dvh;
    padding-top: max(16px, env(safe-area-inset-top, 16px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  }
  .login-card {
    padding: 24px 18px;
    border-radius: 16px;
    max-width: 100%;
  }

  .layout-two-col.has-sidebar { grid-template-columns: 1fr; }
  .usage-table { display: block; overflow-x: auto; }
  .activity-feed { max-height: none; }

  .key-display {
    font-size: 0.88rem;
    word-break: break-all;
    padding: 12px;
  }
  .danger-zone { padding: 16px; }
  .danger-zone-text { max-width: none; }
  .alert-warn,
  .alert-success { font-size: 14px; line-height: 1.45; }
}

@media (max-width: 380px) {
  .brand-mark { width: 36px; height: 36px; font-size: 10px; }
  .nav { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  table.data-table tr.license-row td[data-label="Lisans"],
  table.data-table tr.license-row td[data-label="Uygulama"] {
    flex: 1 1 100%;
    width: 100%;
    border-left: none;
  }
}
