/* Composer veya harici CDN gerektirmeyen cPanel arayüzü. */
:root {
  color-scheme: dark;
  --bg: #080b12;
  --surface: #101621;
  --surface-2: #151e2c;
  --line: #253148;
  --text: #edf3ff;
  --muted: #92a1b8;
  --brand: #62e6b0;
  --brand-2: #5aa7ff;
  --danger: #ff6b7a;
  --warning: #ffcc66;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(90, 167, 255, .12), transparent 34rem),
    radial-gradient(circle at 100% 20%, rgba(98, 230, 176, .09), transparent 30rem),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(8, 11, 18, .82);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #06120e;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 28px rgba(98, 230, 176, .18);
}

.header-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.container { width: min(1380px, calc(100% - 36px)); margin: 0 auto; padding: 40px 0 72px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 7px 0 10px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.045em; line-height: 1.06; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.65; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head p { max-width: 720px; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(21,30,44,.92), rgba(13,18,28,.95));
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.db-card { padding: 24px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { display: flex; gap: 13px; align-items: center; }
.db-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; background: rgba(90,167,255,.12); color: var(--brand-2); font-size: 20px; }
.status { display: inline-flex; align-items: center; gap: 7px; border: 1px solid; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.online { color: var(--brand); border-color: rgba(98,230,176,.24); background: rgba(98,230,176,.07); }
.offline { color: var(--danger); border-color: rgba(255,107,122,.24); background: rgba(255,107,122,.07); }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.meta-item { padding: 14px; background: rgba(8,11,18,.55); }
.meta-item small { display: block; color: var(--muted); margin-bottom: 6px; }
.meta-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error-box { margin: 18px 0; padding: 14px 16px; border: 1px solid rgba(255,107,122,.25); border-radius: 12px; color: #ffb1ba; background: rgba(255,107,122,.07); }
.success-box { margin: 18px 0; padding: 14px 16px; border: 1px solid rgba(98,230,176,.25); border-radius: 12px; color: #a9f6d5; background: rgba(98,230,176,.07); }
.test-mode-banner { position: sticky; top: 71px; z-index: 9; padding: 10px 18px; color: #211400; background: linear-gradient(90deg, #ffcc66, #ff9c66); text-align: center; font-size: 13px; font-weight: 850; letter-spacing: .01em; box-shadow: 0 8px 24px rgba(0,0,0,.18); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 750; transition: transform .15s, border-color .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { width: 100%; color: #05110d; background: linear-gradient(135deg, var(--brand), #78bfff); }
.btn-auto { width: auto; }
.btn-secondary { color: var(--text); border-color: var(--line); background: var(--surface-2); }
.btn-danger { color: #ffc3c9; border-color: rgba(255,107,122,.28); background: rgba(255,107,122,.08); }
.btn-ghost { min-height: 34px; padding: 0 10px; color: var(--muted); border-color: transparent; background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.login-shell { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(460px, 100%); padding: 32px; }
.login-card .brand { margin-bottom: 34px; }
.login-card h1 { font-size: 34px; }
.field { margin: 18px 0; }
.field label { display: block; margin-bottom: 8px; color: #c6d2e5; font-size: 14px; font-weight: 680; }
.input-wrap { position: relative; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #0b111b;
}
.field input:focus, .field select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(90,167,255,.12); }
.input-wrap input { padding-right: 80px; }
.input-action { position: absolute; right: 8px; top: 7px; }
.security-note { display: flex; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.breadcrumb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.breadcrumb a:hover { color: var(--brand); }
.table-card { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { max-width: 440px; padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(37,49,72,.72); }
th { position: sticky; top: 0; z-index: 2; color: #b9c7da; background: #111927; white-space: nowrap; }
td { color: #dce5f3; word-break: break-word; }
tbody tr:hover td { background: rgba(90,167,255,.035); }
.sort-link { display: inline-flex; gap: 6px; align-items: center; }
.sort-link:hover { color: var(--brand); }
.table-link { color: #bfe0ff; font-weight: 700; }
.table-link:hover { color: var(--brand); }
.cell-null, .cell-binary { color: var(--muted); font-style: italic; }
.cell-sensitive { color: var(--warning); font-weight: 750; letter-spacing: .04em; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 8px; color: #bcd7ff; background: rgba(90,167,255,.1); font-size: 12px; }
.badge-key { color: #ffe09e; background: rgba(255,204,102,.1); }
.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 20px; }
.pagination span { color: var(--muted); font-size: 14px; }
.schema-section { margin-top: 24px; }
.schema-section summary { padding: 18px 20px; cursor: pointer; font-weight: 750; }
.schema-section details[open] summary { border-bottom: 1px solid var(--line); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.muted { color: var(--muted); }
.footer { padding: 26px 18px; color: #637087; font-size: 12px; text-align: center; }
.header-link { color: #c5d2e5; font-weight: 700; }
.header-link:hover { color: var(--brand); }
.info-box { margin: 18px 0 24px; padding: 14px 16px; border: 1px solid rgba(90,167,255,.25); border-radius: 12px; color: #bcdcff; background: rgba(90,167,255,.07); line-height: 1.55; }
.narrow-container { max-width: 960px; }

.record-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 14px; margin-bottom: 30px; padding: 18px; }
.record-controls .field { margin: 0; }
.records-section { display: grid; gap: 18px; }
.records-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.records-heading p { margin: 5px 0 0; }
.records-list { display: grid; gap: 18px; }
.record-card { overflow: hidden; }
.record-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: rgba(8,11,18,.42); }
.record-card-head time { color: var(--muted); font-size: 13px; }
.record-number { color: var(--brand); font-weight: 850; }
.record-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.record-field { min-width: 0; padding: 16px 18px; border-right: 1px solid rgba(37,49,72,.72); border-bottom: 1px solid rgba(37,49,72,.72); }
.record-field dt { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.record-field dd { min-width: 0; margin: 0; color: var(--text); line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.record-field-veri, .record-field-isim_soyisim { grid-column: span 2; }
.records-section .pagination { border-radius: var(--radius); }
.schema-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.schema-item { display: grid; gap: 9px; min-width: 0; padding: 16px; background: var(--surface); }
.schema-item small { color: var(--muted); }
.schema-name { overflow-wrap: anywhere; }

.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.connection-card { padding: 22px; }
.connection-card h2 { margin-top: 5px; }
.connection-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 20px 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--line); }
.connection-meta > div { min-width: 0; padding: 13px; background: rgba(8,11,18,.55); }
.connection-meta dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.connection-meta dd { margin: 0; overflow-wrap: anywhere; }
.connection-actions { display: flex; align-items: center; gap: 10px; }
.connection-actions .btn { flex: 1; }
.connection-actions form { display: flex; }
.connection-actions form .btn { flex: none; }
.settings-form { padding: 24px; }
.settings-form .check-row { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 24px; }

.installer-shell { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 72px; }
.installer-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 58px; }
.installer-intro { max-width: 740px; margin-bottom: 28px; }
.installer-intro p { font-size: 17px; }
.requirement-card { margin-bottom: 24px; overflow: hidden; }
.requirements-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.requirement-item { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: var(--surface); }
.requirement-item strong, .requirement-item small { display: block; }
.requirement-item small { margin-top: 3px; color: var(--muted); }
.requirement-icon { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 900; }
.requirement-icon.ok { color: var(--brand); background: rgba(98,230,176,.1); }
.requirement-icon.bad { color: var(--danger); background: rgba(255,107,122,.1); }
.installer-form { display: grid; gap: 22px; }
.installer-section { padding: 25px; }
.section-title { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.section-title > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--brand); background: rgba(98,230,176,.09); font-weight: 900; }
.section-title p { margin: 4px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; padding-top: 4px; }
.field-wide { grid-column: 1 / -1; }
.installer-submit { padding: 24px; text-align: center; }
.installer-submit .btn { width: 100%; margin-top: 20px; }
.installer-submit > p { margin-bottom: 0; font-size: 13px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; text-align: left; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.check-row span, .check-row strong, .check-row small { display: block; }
.check-row small { margin-top: 4px; color: var(--muted); }
.installer-locked { max-width: 620px; margin: 9vh auto 0; padding: 34px; }
.installer-locked .btn { margin-top: 16px; }
.error-box ul { margin: 9px 0 0; padding-left: 20px; }

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .meta-grid { grid-template-columns: 1fr; }
  .header-user { display: none; }
  .container { width: min(100% - 24px, 1380px); padding-top: 28px; }
  .app-header { padding: 12px; }
  th { top: 0; }
  .test-mode-banner { top: 63px; }
  .requirements-grid, .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .installer-head { margin-bottom: 36px; }
  .record-controls { grid-template-columns: 1fr 1fr; }
  .record-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schema-grid, .connection-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .app-header .brand-title { display: none; }
  .record-controls, .record-fields, .connection-meta { grid-template-columns: 1fr; }
  .record-field-veri, .record-field-isim_soyisim { grid-column: auto; }
  .records-heading, .connection-actions, .form-actions { align-items: stretch; flex-direction: column; }
  .connection-actions form, .connection-actions form .btn, .connection-actions .btn, .form-actions .btn { width: 100%; }
}
