*{box-sizing:border-box}html{font-family:Inter,Arial,sans-serif;color:#15212b;background:#f4f6f8}body{margin:0}.container{width:min(1180px,calc(100% - 32px));margin:auto}.topbar{background:#fff;border-bottom:1px solid #dde3e8}.brand{display:flex;align-items:center;gap:14px;padding:18px 0}.brand strong{display:block;font-size:18px;letter-spacing:.04em}.brand span{display:block;color:#6b7780;font-size:13px;margin-top:3px}.logo-box{width:64px;height:64px;display:flex;align-items:center;justify-content:center;flex:0 0 64px}.brand-logo{display:block;max-width:64px;max-height:64px;width:auto;height:auto;object-fit:contain}.logo-mark{width:46px;height:46px;border-radius:14px;background:#183c64;color:#fff;display:grid;place-items:center;font-weight:800}.logo-fallback{display:none}.auth-logo{display:flex;justify-content:center;margin-bottom:18px}.page-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr);gap:22px;padding:30px 0 50px}.card{background:#fff;border:1px solid #e0e5e9;border-radius:18px;padding:26px;box-shadow:0 12px 30px rgba(24,60,100,.06)}.section-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.eyebrow{font-size:12px;font-weight:800;color:#55708c;letter-spacing:.12em}h1{font-size:30px;margin:6px 0 22px}h2{margin:6px 0 18px}label{font-weight:700;font-size:14px;display:block;margin:18px 0 8px}select,input{width:100%;border:1px solid #cbd4dc;background:#fff;border-radius:12px;padding:13px 14px;font-size:15px;outline:none}select:focus,input:focus{border-color:#55708c;box-shadow:0 0 0 3px rgba(85,112,140,.12)}small{display:block;color:#6b7780;line-height:1.5;margin-top:7px}.primary,.secondary{border:0;border-radius:12px;padding:13px 18px;font-weight:800;font-size:14px;cursor:pointer}.primary{background:#183c64;color:#fff;width:100%;margin-top:22px}.secondary{width:100%;background:#eef2f5;color:#183c64;margin-top:18px}.primary:disabled,.secondary:disabled{opacity:.5;cursor:not-allowed}.status{font-size:11px;padding:7px 10px;border-radius:99px;font-weight:800;white-space:nowrap}.status-active{background:#e9f7ef;color:#237a49}.status-draft{background:#fff4df;color:#9b6811}.status-archived{background:#eee;color:#666}.alert{padding:12px 14px;border-radius:12px;margin:4px 0 18px;font-size:13px;line-height:1.5}.warning{background:#fff6e4;border:1px solid #f1d28b;color:#76500b}.error{background:#fff0f0;border:1px solid #efb3b3;color:#9f2929;margin-top:14px}.hidden{display:none!important}.result-card dl{margin:0}.result-card dl div{display:flex;justify-content:space-between;gap:18px;border-bottom:1px solid #edf0f2;padding:13px 0}.result-card dt{color:#6b7780;font-size:13px}.result-card dd{margin:0;font-weight:700;text-align:right;font-size:14px}.result-card .total{padding:18px 0}.result-card .total dd{font-size:22px;color:#183c64}.print-sheet{grid-column:1/-1;background:#fff;border:1px solid #d5d9dd;padding:34px;margin-top:8px}.print-header{display:flex;gap:16px;align-items:center;border-bottom:2px solid #183c64;padding-bottom:18px}.print-header .logo-box{width:82px;height:82px;flex-basis:82px}.print-header .brand-logo{max-width:82px;max-height:82px}.print-header h2{margin:0}.print-header p{margin:5px 0 0;color:#667}.print-sheet h3{text-align:center;margin:28px 0}.print-sheet table{width:100%;border-collapse:collapse}.print-sheet th,.print-sheet td{border:1px solid #bac3ca;padding:10px;text-align:left;font-size:13px}.print-sheet th{background:#f2f5f7}.legal-note{font-size:11px;line-height:1.6;color:#59656e;margin-top:22px}@media(max-width:820px){.page-grid{grid-template-columns:1fr}.section-head{display:block}.status{display:inline-block;margin-bottom:10px}}@media print{body{background:#fff}.topbar,.page-grid>.card{display:none!important}.container{width:100%}.page-grid{display:block;padding:0}.print-sheet{display:block!important;border:0;padding:0}.print-sheet .logo-mark{background:#fff;color:#000;border:1px solid #000}.print-sheet .brand-logo{display:block!important} }
textarea{width:100%;border:1px solid #cbd4dc;background:#fff;border-radius:12px;padding:13px 14px;font:inherit;outline:none;resize:vertical}textarea:focus{border-color:#55708c;box-shadow:0 0 0 3px rgba(85,112,140,.12)}
.info{background:#eefaf3;border:1px solid #b9e8c9;color:#245f3b}.legal-info{margin-top:18px;margin-bottom:0}.exemption-panel{margin-top:22px;border:1px dashed #c8d5df;background:#f8fafc;border-radius:14px;padding:16px}.exemption-title{font-size:12px;font-weight:800;letter-spacing:.08em;color:#40566b;margin-bottom:8px}.choice-row,.toggle-row{display:flex;align-items:flex-start;gap:10px;padding:10px 8px;margin:0;border-radius:10px;font-weight:400;cursor:pointer}.choice-row:hover{background:#eef3f7}.choice-row input,.toggle-row input,.check-card input{width:auto;margin:3px 0 0;flex:0 0 auto}.choice-row span,.toggle-row span{display:block;min-width:0}.choice-row strong,.toggle-row strong{display:block;font-size:14px}.choice-row small,.toggle-row small{margin-top:2px}.exemption-help{margin:8px 8px 0}.button-link{display:inline-block;text-decoration:none;background:#183c64;color:#fff;padding:11px 14px;border-radius:10px;font-size:13px;font-weight:800}.table-wrap{overflow-x:auto}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #e7ebee;vertical-align:top;font-size:14px}.admin-table th{color:#52616d;font-size:12px;text-transform:uppercase;letter-spacing:.04em}.admin-table td small{margin-top:4px}.actions-cell{white-space:nowrap;text-align:right!important}.actions-cell form{display:inline}.link-danger{border:0;background:none;color:#a52b2b;cursor:pointer;padding:0;margin-left:12px;font:inherit;text-decoration:underline}.category-checks{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.check-card{display:flex;align-items:flex-start;gap:9px;margin:0;border:1px solid #dce3e8;border-radius:10px;padding:10px;font-weight:500;font-size:13px;background:#fff}.toggle-row{border:1px solid #dce3e8;margin-top:20px;background:#f8fafc}.result-card .total dt{font-weight:800;color:#183c64}
@media(max-width:700px){.category-checks{grid-template-columns:1fr}.button-link{margin-top:10px}.admin-table{min-width:720px}}

/* V3 - Resmî Hesap Dökümü */
.print-sheet{grid-column:1/-1;background:#fff;border:1px solid #cfd8e2;border-radius:2px;padding:26px 28px;margin-top:8px;color:#132c4a;box-shadow:0 8px 24px rgba(18,44,74,.04)}
.document-topline{display:grid;grid-template-columns:1fr 2.2fr 1fr;align-items:start;gap:12px;font-size:10px;font-weight:700;color:#111;margin-bottom:8px}
.document-portal-title{text-align:center}
.document-no-box{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:2px}.document-no-box span{font-size:10px}.document-no-box strong{font-size:11px;font-weight:500}
.document-brand-row{display:grid;grid-template-columns:92px 1fr 92px;align-items:center;min-height:78px}.document-logo-wrap{width:78px;height:78px;display:flex;align-items:center;justify-content:center}.document-logo{max-width:78px;max-height:78px;display:block;object-fit:contain}.document-logo-fallback{width:62px;height:62px;border-radius:50%;background:#173d67;color:#fff;place-items:center;font-weight:800}
.document-heading{text-align:center;grid-column:2}.document-heading h2{font-size:22px;line-height:1.15;margin:0 0 5px;color:#132c4a;letter-spacing:-.015em}.document-heading h3{font-size:16px;line-height:1.2;margin:0 0 5px;color:#34465e}.document-heading p{font-size:11px;margin:0;color:#4c5561}
.document-rule{height:3px;background:#173d67;margin:10px 0 18px}
.document-meta-table,.document-calc-table,.document-payment-table{width:100%;border-collapse:collapse;table-layout:fixed}.document-meta-table th,.document-meta-table td{border:1px solid #bac8d8;padding:9px 10px;font-size:11.5px;line-height:1.35;vertical-align:middle}.document-meta-table th{width:25%;font-weight:800;color:#17314f;background:#fbfcfe}.document-meta-table td{width:25%;color:#202a35}
.document-section-title{font-size:15px;margin:23px 0 18px;color:#17314f}
.document-calc-table th{border-bottom:1px solid #d3dce6;padding:8px 10px;text-align:left;color:#8a8f95;font-size:11px;font-weight:700;line-height:1.25}.document-calc-table td{border:1px solid #c8d3df;padding:10px;font-size:11.5px;line-height:1.4;color:#222}.document-calc-table th:nth-child(1){width:40%}.document-calc-table th:nth-child(2){width:16%}.document-calc-table th:nth-child(3),.document-calc-table th:nth-child(4),.document-calc-table th:nth-child(5){width:14.66%}.document-net{font-weight:800;color:#111!important}.document-total-row td{font-size:13px;font-weight:800;color:#08745f!important;border-top:3px solid #08a07f}.document-total-row td:last-child{font-size:14px;text-align:left}
.document-payment-table{margin-top:18px}.document-payment-table th,.document-payment-table td{border:1px solid #bac8d8;padding:9px 10px;font-size:11.5px}.document-payment-table th{font-weight:800;background:#fbfcfe;color:#17314f}.document-payment-table td:last-child{font-size:13px;font-weight:800;color:#079574}
.document-legal-note{border:1px dashed #c9d4df;border-radius:4px;padding:11px 12px;margin-top:20px;font-size:9.5px;line-height:1.45;color:#536174;background:#fff}.document-legal-note strong{color:#34465e}
.document-signatures{display:grid;grid-template-columns:1fr 1fr;gap:110px;margin-top:38px;padding:0 56px}.signature-box{text-align:center;color:#111;font-size:11px}.signature-box strong{font-size:11px}.signature-space{height:38px}.signature-line{border-bottom:1px solid #5e7ea5;margin-bottom:6px}.signature-box span{font-size:10px}
.document-footer{display:flex;justify-content:space-between;gap:20px;border-top:1px solid #c8d3df;margin-top:32px;padding-top:9px;font-size:8.5px;color:#4b5562}.document-footer strong{color:#243a56}
.settings-card{max-width:900px;margin:auto}

@media(max-width:820px){.print-sheet{overflow-x:auto}.document-topline,.document-brand-row,.document-signatures{min-width:720px}.document-meta-table,.document-calc-table,.document-payment-table,.document-footer{min-width:720px}}

@page{size:A4 portrait;margin:0}
@media print{
  html,body{background:#fff!important;color:#000!important;width:210mm;min-height:297mm;margin:0!important;padding:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .topbar,.page-grid>.card{display:none!important}
  .container{width:100%!important;max-width:none!important;margin:0!important}
  .page-grid{display:block!important;padding:0!important;margin:0!important}
  .print-sheet{display:block!important;width:210mm!important;min-height:297mm!important;margin:0!important;padding:8mm 10mm 7mm!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}
  .document-topline{font-size:8pt;margin-bottom:2mm}
  .document-brand-row{grid-template-columns:24mm 1fr 24mm;min-height:20mm}
  .document-logo-wrap{width:20mm;height:20mm}.document-logo{max-width:20mm;max-height:20mm}.document-logo-fallback{width:17mm;height:17mm}
  .document-heading h2{font-size:17pt}.document-heading h3{font-size:12.5pt}.document-heading p{font-size:8.5pt}
  .document-rule{margin:2.5mm 0 5mm;height:.7mm}
  .document-meta-table th,.document-meta-table td{font-size:8.5pt;padding:2.5mm 2.8mm}
  .document-section-title{font-size:11pt;margin:6mm 0 4mm}
  .document-calc-table th{font-size:8pt;padding:2mm 2.5mm}.document-calc-table td{font-size:8.5pt;padding:2.7mm}.document-total-row td{font-size:9.5pt}.document-total-row td:last-child{font-size:10pt}
  .document-payment-table{margin-top:5mm}.document-payment-table th,.document-payment-table td{font-size:8.5pt;padding:2.5mm}.document-payment-table td:last-child{font-size:9.5pt}
  .document-legal-note{font-size:7pt;padding:2.8mm 3mm;margin-top:5mm}
  .document-signatures{gap:30mm;margin-top:10mm;padding:0 15mm}.signature-box{font-size:8pt}.signature-box strong{font-size:8.5pt}.signature-space{height:12mm}.signature-box span{font-size:7.5pt}
  .document-footer{font-size:6.5pt;margin-top:8mm;padding-top:2.5mm}
  .hidden{display:none!important}
  #printArea.print-sheet{display:block!important}
}

/* V4.1 - Dinamik kategori ve tarife satırı yönetimi */
.admin-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0}.admin-toolbar>div{display:flex;gap:10px;flex-wrap:wrap}.button-secondary-link{background:#eef2f5;color:#183c64}.actions-cell a{margin-left:10px}.actions-cell a:first-child{margin-left:0}.used-badge{display:inline-block;margin-left:10px;padding:4px 8px;border-radius:999px;background:#f1f3f5;color:#66717b;font-size:11px;font-weight:700}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.admin-table code{background:#f3f5f7;padding:3px 6px;border-radius:6px;font-size:12px}.link-danger{font-weight:600}.alert.info{margin-top:14px}
@media(max-width:700px){.form-grid-2{grid-template-columns:1fr}.admin-toolbar{align-items:stretch}.admin-toolbar>div{display:grid;width:100%}.admin-toolbar .button-link{text-align:center;margin:0}}
