:root{
  --line:#dbe4ef; --line-strong:#c6d3e2; --soft:#f3f7fb; --text:#132238; --muted:#607086;
  --brand:#102a43; --primary:#0b7a75; --primary-dark:#075e5a; --accent:#e6a23c; --danger:#d64545;
  --surface:rgba(255,255,255,.92); --shadow:0 16px 40px rgba(26,46,70,.10);
}
*{ box-sizing:border-box; }
html{ min-height:100%; background:#eef4f8; }
body{ margin:0; min-height:100vh; font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; color:var(--text); background:radial-gradient(circle at 8% 2%,#dff4f2 0,transparent 30%),radial-gradient(circle at 92% 8%,#e6edf9 0,transparent 32%),#f5f8fb; line-height:1.5; }
a{ color:inherit; }
.wrap{ max-width:1240px; margin:28px auto; padding:0 22px; }
.top{ display:flex; gap:22px; align-items:center; justify-content:space-between; padding:14px 22px; border-bottom:1px solid rgba(255,255,255,.12); background:linear-gradient(115deg,#102a43,#153f5f 58%,#0b7a75); color:#fff; position:sticky; top:0; z-index:30; box-shadow:0 8px 26px rgba(16,42,67,.22); }
.brand{ font-size:17px; font-weight:800; letter-spacing:-.2px; white-space:nowrap; }
.badge{ display:inline-flex; align-items:center; margin-left:8px; padding:3px 9px; border:1px solid rgba(255,255,255,.28); background:rgba(255,255,255,.13); border-radius:999px; font-size:11px; color:#eaf7f6; text-transform:uppercase; letter-spacing:.5px; }
.nav{ display:flex; gap:4px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
.nav a{ text-decoration:none; padding:8px 10px; border-radius:9px; border:1px solid transparent; color:#eef7ff; font-size:13px; font-weight:650; transition:.18s ease; }
.nav a:hover{ border-color:rgba(255,255,255,.18); background:rgba(255,255,255,.12); transform:translateY(-1px); }
.logout{ margin:0; }
.logout button{ padding:8px 11px; border-radius:9px; border:1px solid rgba(255,255,255,.22); background:rgba(7,25,40,.22); color:#fff; cursor:pointer; font-weight:700; }
h1{ margin:8px 0 18px; font-size:clamp(23px,3vw,31px); line-height:1.2; letter-spacing:-.65px; color:var(--brand); }
h2{ margin:0 0 12px; font-size:17px; letter-spacing:-.2px; color:var(--brand); }
h3{ color:var(--brand); }
.card{ border:1px solid rgba(198,211,226,.82); border-radius:18px; padding:20px; background:var(--surface); box-shadow:var(--shadow); backdrop-filter:blur(10px); }
.card + .card{ margin-top:16px; }
.toolbar{ display:flex; gap:12px; align-items:center; justify-content:space-between; margin:14px 0; flex-wrap:wrap; }
.search{ display:flex; gap:8px; align-items:center; }
input,textarea,select{ width:100%; padding:11px 12px; border:1px solid var(--line-strong); border-radius:11px; background:#fff; color:var(--text); font:inherit; font-size:14px; outline:none; transition:border-color .18s,box-shadow .18s,background .18s; }
input:focus,textarea:focus,select:focus{ border-color:var(--primary); box-shadow:0 0 0 4px rgba(11,122,117,.12); }
input[readonly]{ background:#edf3f7; color:#66778a; }
textarea{ min-height:100px; resize:vertical; }
label{ display:block; font-size:12px; font-weight:750; color:#53667c; margin:10px 0 5px; letter-spacing:.08px; }
.btnRow{ display:flex; gap:9px; margin-top:16px; flex-wrap:wrap; align-items:center; }
.btn,button{ padding:10px 14px; border:1px solid var(--line-strong); background:#fff; color:#31465d; border-radius:10px; cursor:pointer; font-weight:750; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 2px 7px rgba(28,49,73,.05); transition:.18s ease; }
.btn:hover,button:hover{ transform:translateY(-1px); border-color:#9fb1c5; box-shadow:0 6px 14px rgba(28,49,73,.10); }
.primary{ background:linear-gradient(135deg,var(--primary),#11958e); border-color:var(--primary); color:#fff; box-shadow:0 7px 16px rgba(11,122,117,.24); }
.primary:hover{ background:linear-gradient(135deg,var(--primary-dark),var(--primary)); border-color:var(--primary-dark); }
.danger{ background:#fff1f1; border-color:#f0b9b9; color:#b92e2e; }
.mini{ padding:7px 9px; font-size:12px; border-radius:8px; }
table{ width:100%; border-collapse:separate; border-spacing:0; }
thead th{ text-align:left; background:#edf3f8; border-bottom:1px solid var(--line); padding:11px 12px; font-size:11px; text-transform:uppercase; letter-spacing:.45px; color:#52677d; }
thead th:first-child{ border-radius:10px 0 0 0; }
thead th:last-child{ border-radius:0 10px 0 0; }
tbody td{ border-bottom:1px solid #e9eef4; padding:12px; vertical-align:top; background:rgba(255,255,255,.72); }
tbody tr:last-child td{ border-bottom:0; }
tbody tr:hover td{ background:#f2faf9; }
.actions{ display:flex; gap:7px; justify-content:flex-end; align-items:center; flex-wrap:wrap; }
.actions form{ margin:0; }
.num{ text-align:right; font-variant-numeric:tabular-nums; }
.center{ text-align:center; }
.muted{ color:var(--muted); }
.grid2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.grid3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.tableWrap{ overflow:auto; border:1px solid var(--line); border-radius:13px; background:#fff; }
.rowBetween{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.logoPrev{ width:160px; height:160px; object-fit:contain; border:1px solid var(--line); border-radius:16px; background:#fff; padding:12px; box-shadow:0 8px 20px rgba(28,49,73,.08); }
.logoPrev.empty{ display:flex; align-items:center; justify-content:center; color:var(--muted); font-weight:750; }
.footer{ margin:24px 0 36px; font-size:12px; text-align:center; opacity:.78; }
.container{ width:100%; min-height:100vh; padding:24px 14px; display:grid; place-items:start center; }
.container>.card{ width:min(440px,100%); margin:6vh auto 0!important; padding:28px; border-top:4px solid var(--primary); }
.account-card{ max-width:540px; margin:38px auto; }
@media (max-width: 860px){
  .grid2, .grid3{ grid-template-columns: 1fr; }
  .top{ position:sticky; display:block; padding:12px; }
  .brand{ margin-bottom:10px; }
  .nav{ display:flex; width:100%; justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; padding:2px 0 7px; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
  .nav a, .logout button{ white-space:nowrap; min-height:42px; }
  .wrap{ margin:16px auto; padding:0 10px; }
  .card{ padding:12px; border-radius:12px; }
  .rowBetween{ align-items:stretch; }
  .rowBetween > input, .rowBetween > select{ min-width:100%; }
  .tableWrap, .card{ max-width:100%; overflow-x:auto; }
  table{ min-width:680px; }
  .btnRow .btn, .btnRow button{ min-height:44px; }
  input, textarea, select{ font-size:16px; min-height:44px; }
  h1{ font-size:19px; }
}

@media (max-width: 520px){
  .btnRow{ display:grid; grid-template-columns:1fr; }
  .btnRow .btn, .btnRow button{ width:100%; text-align:center; }
  .logoPrev{ width:120px; height:120px; }
  .account-card{ margin:12px auto; }
  .container>.card{ margin:18px auto 0!important; padding:20px; }
}

/* --- Invoice edit table alignment tweaks (scoped) --- */
.invoice-edit table{ table-layout: fixed; }
.invoice-edit th, .invoice-edit td{ vertical-align: middle; }
.invoice-edit th{ white-space: nowrap; }
.invoice-edit td input, .invoice-edit td select{ width:100%; box-sizing:border-box; }
.invoice-edit td .mini{ white-space:nowrap; }
.invoice-edit thead th:nth-child(1){ width:32%; } /* açıklama */
.invoice-edit thead th:nth-child(2){ width:20%; } /* ürün seç */
.invoice-edit thead th:nth-child(3){ width:10%; } /* birim */
.invoice-edit thead th:nth-child(4){ width:10%; } /* miktar */
.invoice-edit thead th:nth-child(5){ width:16%; } /* fiyat */
.invoice-edit thead th:nth-child(6){ width:8%; }  /* kdv */
.invoice-edit thead th:nth-child(7){ width:4%; }  /* sil */
