:root{
  --navy:#020870; --text:#0B2540; --orange:#FF5722; --orange-text:#D84315;
  --bg:#F6F7F9; --surface:#FFFFFF; --line:#E4E7EC; --line2:#D5DAE1; --muted:#5B6676; --soft:#F1F3F6;
  --draft-bg:#FFF1E6; --draft-fg:#B3360F; --sent-bg:#E2F3EA; --sent-fg:#17663A; --sent-dot:#22A05A;
  --radius:14px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased}
body{min-height:100vh;padding-bottom:env(safe-area-inset-bottom)}
a{color:var(--text)}a:hover{color:var(--orange-text)}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
input[type=checkbox]{accent-color:var(--navy);width:18px;height:18px;margin:0;flex:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.boot{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}
.boot img{width:160px}
.boot-text{font-size:13px;color:var(--muted);letter-spacing:.04em}
.loadbar{width:120px;height:3px;border-radius:3px;background:#E6E8F0;overflow:hidden;position:relative}
.loadbar span{position:absolute;top:0;left:0;height:100%;width:40%;border-radius:3px;background:var(--orange);animation:slide 1.1s ease-in-out infinite}
@keyframes slide{0%{transform:translateX(-100%)}100%{transform:translateX(250%)}}
#progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:70;overflow:hidden;opacity:0;transition:opacity .2s;pointer-events:none}
#progress span{position:absolute;top:0;left:0;height:100%;width:30%;background:var(--orange);animation:slide 1s ease-in-out infinite}
body.busy #progress{opacity:1}
.btn .spin,.icon-btn .spin,.st .spin{width:15px;height:15px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:spin .7s linear infinite;flex:none;opacity:.8}
.is-loading{pointer-events:none;opacity:.75}
.skel{display:block;height:14px;border-radius:7px;background:linear-gradient(90deg,#EEF0F4 25%,#F7F8FA 50%,#EEF0F4 75%);background-size:200% 100%;animation:shimmer 1.2s linear infinite}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skel-row{display:flex;align-items:center;gap:16px;padding:18px 20px;border-top:1px solid #EEF0F3}
.skel-row:first-child{border-top:none}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:46px;padding:0 20px;border-radius:12px;border:1px solid var(--line2);background:#fff;color:var(--text);font-size:15px;font-weight:500;text-decoration:none;white-space:nowrap}
.btn:hover{color:var(--text);border-color:#B9C0CB}
.btn-primary{background:var(--navy);border-color:var(--navy);color:#fff}
.btn-primary:hover{color:#fff;background:#0A1590}
.btn-ghost{border:none;background:none;padding:0 6px;height:44px;text-decoration:underline;font-weight:400}
.btn-danger{color:var(--draft-fg)}
.btn[disabled]{opacity:.55;cursor:default}
.icon-btn{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#fff;display:inline-flex;align-items:center;justify-content:center;color:var(--text);text-decoration:none}
.icon-btn:hover{color:var(--text);border-color:#B9C0CB}

/* Layout */
.shell{display:flex;min-height:100vh}
.side{width:248px;flex:none;background:#fff;border-right:1px solid var(--line);padding:24px 18px;display:flex;flex-direction:column;gap:28px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:8px}
.brand img{width:104px;height:39px;object-fit:contain;object-position:left center;margin-left:-8px}
.badge{font-size:12px;font-weight:500;color:var(--muted);background:var(--soft);border-radius:6px;padding:3px 8px}
.nav{display:flex;flex-direction:column;gap:4px}
.nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:10px;text-decoration:none;font-size:15px}
.nav a.on{background:var(--navy);color:#fff;font-weight:500}
.me{margin-top:auto;display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;background:var(--bg)}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex:none}
.avatar.soft{background:#E8ECF2;color:var(--text)}
.me small{display:block;color:var(--muted);font-size:12px}
.main{flex:1;min-width:0;padding:36px 44px 80px}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:24px}
h1{margin:0;font-size:30px;letter-spacing:-.02em}
.sub{margin:6px 0 0;color:var(--muted);font-size:15px}
.tabbar{display:none}

/* Chips & status */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:14px}
.chip.on{background:var(--navy);border-color:var(--navy);color:#fff}
.st{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:500;padding:5px 10px;border-radius:999px;border:none;white-space:nowrap}
.st .dot{width:7px;height:7px;border-radius:50%}
.st.draft{background:var(--draft-bg);color:var(--draft-fg)}.st.draft .dot{background:var(--orange)}
.st.sent{background:var(--sent-bg);color:var(--sent-fg)}.st.sent .dot{background:var(--sent-dot)}
button.st.draft:hover{outline:2px solid #FFD2BD}

/* Toolbar */
.toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px}
.search{flex:1 1 260px;max-width:420px;display:flex;align-items:center;gap:10px;height:44px;padding:0 14px;background:#fff;border:1px solid var(--line);border-radius:12px}
.search input{border:none;outline:none;flex:1;min-width:0;background:transparent;font-size:15px}

/* Table */
.card{background:#fff;border:1px solid var(--line);border-radius:16px}
.table-wrap{overflow-x:auto}
table.list{width:100%;min-width:860px;border-collapse:collapse;font-size:14px}
table.list th{text-align:left;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em;font-weight:500;padding:14px 12px}
table.list th:first-child,table.list td:first-child{padding-left:20px}
table.list td{padding:16px 12px;border-top:1px solid #EEF0F3;vertical-align:middle}
table.list tr.row{cursor:pointer}
table.list tr.row:hover td{background:#FAFBFC}
.cell-main{display:flex;flex-direction:column;gap:3px}
.cell-main b{font-weight:500;font-size:15px}
.cell-main span,.muted{color:var(--muted);font-size:13px}
.lang{display:inline-block;min-width:26px;text-align:center;font-size:12px;font-weight:700;padding:4px 6px;border-radius:6px;background:var(--soft)}
.acts{display:flex;justify-content:flex-end;gap:6px}
.cards{display:none}
.empty{padding:48px 20px;text-align:center;color:var(--muted)}

/* Builder */
.bhead{background:#fff;border-bottom:1px solid var(--line);padding:14px 32px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;position:sticky;top:0;z-index:5}
.bhead .left{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.bhead .title{display:flex;flex-direction:column;gap:4px}
.bhead .title b{font-size:19px}
.total{display:flex;flex-direction:column;align-items:flex-end}
.total small{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.total b{font-size:24px;color:var(--orange);letter-spacing:-.01em}
.bhead .right{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.bbody{padding:28px 32px 120px;display:flex;flex-wrap:wrap;gap:28px;align-items:flex-start}
.form{flex:1 1 520px;min-width:0;max-width:700px;display:flex;flex-direction:column;gap:18px}
.form fieldset{border:none;margin:0;padding:0;display:flex;flex-direction:column;gap:18px;min-width:0}
.sec{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;display:flex;flex-direction:column;gap:16px}
.sec h2{margin:0;font-size:17px}
.sec h2 .n{color:var(--orange-text);margin-right:8px}
.sec-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.row2{display:flex;flex-wrap:wrap;gap:12px}
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
.row2>.field{flex:1 1 200px}
.field input,.field select,.field textarea{height:46px;border:1px solid var(--line2);border-radius:10px;padding:0 14px;font-size:15px;color:var(--text);background:#fff;width:100%}
.field textarea{height:auto;padding:12px 14px;resize:vertical;line-height:1.45}
.field input:focus,.field select:focus,.field textarea:focus,.search:focus-within{outline:2px solid #C7CBF5;border-color:var(--navy)}
.hint{font-size:13px;color:var(--muted);margin:0}
.seg{display:grid;gap:4px;background:var(--soft);padding:4px;border-radius:12px}
.seg.c2{grid-template-columns:repeat(2,minmax(0,1fr))}.seg.c3{grid-template-columns:repeat(3,minmax(0,1fr))}
.seg button{height:42px;border:none;border-radius:9px;background:transparent;font-size:15px}
.seg button.on{background:#fff;font-weight:700;box-shadow:0 1px 3px rgba(11,37,64,.12)}
.ptabs{display:flex;flex-wrap:wrap;gap:8px}
.ptab{min-height:52px;padding:8px 16px;border-radius:12px;border:1px solid var(--line2);background:#fff;text-align:left;display:flex;flex-direction:column;gap:2px}
.ptab b{font-size:14px}.ptab span{font-size:13px;opacity:.85}
.ptab.on{background:var(--navy);border-color:var(--navy);color:#fff}
.dashed{border:1px dashed #A9B2BF !important;background:#fff}
.item{border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:14px}
.item-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.item-head b{font-size:16px}
.item-head .price{font-size:17px;font-weight:700;white-space:nowrap}
.steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.step{background:var(--bg);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.step .top{display:flex;flex-wrap:wrap;gap:2px 8px;justify-content:space-between;align-items:baseline;font-size:15px;font-weight:500}
.step .top small{font-size:13px;color:var(--muted);font-weight:400}
.step .ctl{display:flex;align-items:center;justify-content:space-between}
.step .ctl b{font-size:28px;min-width:48px;text-align:center}
.pm{width:44px;height:44px;border-radius:12px;border:1px solid var(--line2);background:#fff;font-size:22px;line-height:1}
.pm.plus{background:var(--navy);border-color:var(--navy);color:#fff}
.checks{display:flex;flex-direction:column}
.check{display:flex;align-items:center;gap:12px;min-height:42px;font-size:15px;cursor:pointer}
.check .r{margin-left:auto;font-size:14px;color:var(--muted)}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 16px}
.grid2 .check{font-size:14px;min-height:40px}
.picker{border:1px solid var(--navy);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:12px}
.picker .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pick{min-height:56px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#fff;text-align:left;display:flex;flex-direction:column;gap:2px}
.pick b{font-size:14px;font-weight:500}.pick span{font-size:12px;color:var(--muted)}
.pick[disabled]{background:var(--bg);opacity:.6;cursor:default}
.formula{font-size:13px;color:var(--muted)}
.banner{border-radius:14px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:14px}
.banner.sent{background:var(--sent-bg);color:var(--sent-fg)}
.banner.info{background:#EEF0F8;color:var(--navy)}

/* Preview */
.preview{flex:1 1 460px;min-width:0;display:flex;flex-direction:column;gap:10px;position:sticky;top:96px}
.preview-head{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:500}
.sheet{background:#fff;border-radius:6px;box-shadow:0 1px 2px rgba(11,37,64,.06),0 12px 32px rgba(11,37,64,.08);padding:38px 44px 48px;max-width:640px;width:100%;font-family:Arial,Helvetica,sans-serif;font-size:12.5px;line-height:1.55;color:#1F2A37;display:flex;flex-direction:column;gap:16px;max-height:calc(100vh - 150px);overflow:auto}
.sheet .logo{display:flex;justify-content:flex-end}.sheet .logo img{width:96px;height:36px;object-fit:contain;object-position:right center;margin-right:-8px}
.sheet h3{margin:0;font-size:23px;color:var(--navy)}
.sheet h4{margin:0 0 4px;font-size:14px;color:var(--navy)}
.sheet ul{margin:0;padding-left:18px}
.sheet table{width:100%;border-collapse:collapse;font-size:11.5px;margin-top:4px}
.sheet th{background:var(--navy);color:#fff;text-align:left;padding:7px 8px}
.sheet td{padding:8px;border:1px solid var(--line);vertical-align:top}
.sheet .pkg{font-weight:700;font-size:13px;margin-top:6px}
.sheet .note b{display:block;margin-top:6px}
.sheet .addl-note{font-style:italic;font-size:11.5px;color:var(--muted);margin-top:6px}
.filepath{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.mobile-bar,.preview-toggle{display:none}

/* Settings */
.stabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid var(--line);margin-bottom:22px}
.stabs button{height:46px;padding:0 16px;border:none;background:none;font-size:15px;border-bottom:3px solid transparent;margin-bottom:-1px}
.stabs button.on{font-weight:700;border-bottom-color:var(--orange)}
.price-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:20px}
.price-cards .card{padding:20px;display:flex;flex-direction:column;gap:10px}
.money{display:flex;align-items:center;gap:8px;height:52px;border:1px solid var(--line2);border-radius:12px;padding:0 14px}
.money input{border:none;outline:none;font-size:24px;font-weight:700;width:100%;min-width:0}
.list-rows .lr{display:flex;align-items:center;gap:14px;padding:14px 20px;border-top:1px solid #EEF0F3;flex-wrap:wrap}
.list-rows .lr:first-child{border-top:none}
.lr .grow{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:3px}
.lr .grow b{font-weight:500;font-size:15px}
.pill{font-size:12px;font-weight:500;padding:4px 10px;border-radius:999px;background:var(--soft)}
.pill.warn{background:var(--draft-bg);color:var(--draft-fg)}
.pill.ok{background:var(--sent-bg);color:var(--sent-fg)}

/* Login */
.login{min-height:100vh;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;padding:32px 24px}
.login-in{width:100%;max-width:380px;display:flex;flex-direction:column;gap:56px}
.login img{width:190px;margin-left:-22px}
.login .tag{color:#B9C1F0;font-size:15px;margin-top:6px;letter-spacing:.04em}
.login h1{font-size:32px;line-height:1.15;color:#fff}
.login p{color:#D3D8F5;font-size:16px;line-height:1.5;margin:14px 0 0}
.login .gbtn{min-height:44px;display:flex;justify-content:center}
.login .note{color:#B9C1F0;font-size:13px;text-align:center;margin:12px 0 0}
.login .err{background:#fff;color:var(--draft-fg);border-radius:12px;padding:12px 14px;font-size:14px}

/* Modal & toast */
.overlay{position:fixed;inset:0;background:rgba(2,8,112,.35);display:flex;justify-content:center;align-items:flex-start;padding:12vh 16px 16px;z-index:50;overflow:auto}
.modal{width:100%;max-width:520px;background:#fff;border-radius:20px;padding:28px;display:flex;flex-direction:column;gap:18px;box-shadow:0 24px 64px rgba(2,8,112,.25)}
.modal h3{margin:0;font-size:20px}
.modal .done-head{display:flex;align-items:center;gap:14px}
.ok-circle{width:44px;height:44px;border-radius:50%;background:var(--orange);display:inline-flex;align-items:center;justify-content:center;flex:none}
.spinner{width:28px;height:28px;border-radius:50%;border:3px solid #FFE1D6;border-top-color:var(--orange);animation:spin .9s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}
.stack{display:flex;flex-direction:column;gap:10px}
.sentbox{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px;background:var(--bg);cursor:pointer}
#toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:var(--text);color:#fff;padding:12px 18px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:60;max-width:90vw}
#toast.show{opacity:1}
#toast.err{background:var(--draft-fg)}

/* Mobile */
@media (max-width:860px){
  .side{display:none}
  .main{padding:calc(20px + env(safe-area-inset-top)) 18px 110px}
  .tabbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:6px 0 calc(8px + env(safe-area-inset-bottom));z-index:20}
  .tabbar a{display:flex;flex-direction:column;align-items:center;gap:3px;text-decoration:none;font-size:12px;color:var(--muted);padding:4px 0}
  .tabbar a.on{color:var(--navy);font-weight:700}
  .mtop{display:flex !important;justify-content:space-between;align-items:center;margin-bottom:14px}
  .mtop img{width:92px;height:34px;object-fit:contain;object-position:left center;margin-left:-10px}
  .page-head .btn-primary.new{display:none}
  .fab{display:flex !important}
  .table-wrap{display:none}
  .cards{display:flex;flex-direction:column;gap:10px}
  .card.lcard{padding:16px;display:flex;flex-direction:column;gap:10px;text-decoration:none}
  .lcard .r1,.lcard .r2{display:flex;justify-content:space-between;align-items:center;gap:10px}
  .lcard b{font-size:16px}
  .chips{flex-wrap:nowrap;overflow-x:auto}
  .chip{flex:none}
  .bhead{padding:calc(10px + env(safe-area-inset-top)) 16px 10px}
  .bhead .right{display:none}
  .bbody{padding:16px 14px 130px}
  .sec{padding:18px}
  .steps{gap:10px}
  .grid2,.picker .grid{grid-template-columns:1fr}
  .preview{display:none;position:static}
  .preview.open{display:flex}
  .sheet{padding:26px 22px;max-height:none}
  .preview-toggle{display:flex}
  .mobile-bar{display:flex;position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:12px 16px calc(12px + env(safe-area-inset-bottom));align-items:center;justify-content:space-between;gap:12px;z-index:20}
  .mobile-bar .total b{font-size:20px}
  .mobile-bar .total{align-items:flex-start}
  .overlay{padding-top:8vh}
}
.mtop,.fab{display:none}
.fab{position:fixed;right:18px;bottom:calc(86px + env(safe-area-inset-bottom));width:60px;height:60px;border-radius:20px;background:var(--orange);align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(255,87,34,.35);z-index:21}

/* ---------------- Finans ---------------- */
:root{--fok-ink:#1B6631;--fwarn-ink:#8A5300;--fbad-ink:#A3261E}
.tabbar.c4{grid-template-columns:repeat(4,minmax(0,1fr))}
.fsub{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:-8px 0 22px;overflow-x:auto}
.fsub a{flex:none;height:44px;display:flex;align-items:center;padding:0 14px;text-decoration:none;font-size:15px;color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-1px}
.fsub a.on{color:var(--navy);font-weight:700;border-bottom-color:var(--navy)}
.fhead{align-items:center}
.fmonth{display:flex;align-items:center;gap:10px}
.fmonth h1{font-size:26px;min-width:170px;text-align:center}
.fmonth .icon-btn{width:44px;height:44px;font-size:20px}
.fbtns{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.fpad{padding:20px 22px}
.fh2{margin:0;font-size:16px;font-weight:600}
.fsec-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.fsec-head a{font-size:14px;font-weight:600;color:var(--navy);text-decoration:none}
.frow{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:20px}
.fkasa{flex:2 1 380px;padding:20px 24px;display:flex;flex-direction:column;gap:12px}
.flabel{font-size:13px;color:var(--muted);font-weight:500;display:flex;align-items:center;gap:8px}
.fbig{font-size:36px;font-weight:700;letter-spacing:-.02em;color:var(--navy)}
.fbar{display:flex;gap:2px;height:12px;border-radius:999px;overflow:hidden;background:#EEF0F4}
.fbar span{display:block;height:100%}
.flegend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;font-size:13px;color:var(--muted)}
.flegend span{display:inline-flex;align-items:center;gap:8px}
.fdot{display:inline-block;width:10px;height:10px;border-radius:3px;flex:none}
.fwarn,.fwarn-t{color:var(--fwarn-ink)}
.fok-t{color:var(--fok-ink)}
.fkpi{flex:1 1 180px;padding:20px;display:flex;flex-direction:column;gap:8px;justify-content:space-between}
.fkpi b{font-size:25px;letter-spacing:-.01em}
.fsubt{font-size:12px;color:var(--muted);font-weight:500}
.fsubt.warn{color:var(--fwarn-ink)}.fsubt.bad{color:var(--fbad-ink)}
.fcols{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start;margin-bottom:20px}
.fmaincol{flex:999 1 460px;min-width:0}
.fsidecol{flex:1 1 280px;min-width:0;display:flex;flex-direction:column;gap:12px}
.fpartner{display:flex;align-items:center;gap:14px;padding:14px 16px;text-decoration:none;color:var(--text)}
.fpartner:hover{border-color:#B9C0CB;color:var(--text)}
.fpartner .grow{flex:1;display:flex;flex-direction:column;gap:2px}
.fpartner small{font-size:12px;color:var(--muted)}
.famt{font-size:18px}
.favatar{border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;flex:none}
.fpill{display:inline-block;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;white-space:nowrap}
.fpill.ok{background:#E3F3E8;color:var(--fok-ink)}.fpill.warn{background:#FFF1DB;color:var(--fwarn-ink)}
.fpill.bad{background:#FDE6E4;color:var(--fbad-ink)}.fpill.neu{background:#EFF0F4;color:#4A4A55}
.ftx{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #EEF0F3;cursor:pointer}
.ftx:last-child{border-bottom:none}
.ftx:hover .grow b{text-decoration:underline}
.ftx:focus-visible{outline:2px solid #C7CBF5;border-radius:8px}
.ficon{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none}
.ficon.in{background:#E4EEFB;color:#2a78d6}.ficon.out{background:#FDEBE3;color:#C2501F}
.ftx .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ftx .grow b{font-weight:600;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ftx .grow small{font-size:12px;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;gap:2px 4px}
.ftx .grow small .fdot{width:8px;height:8px;margin-right:2px}
.fright{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.fright b{font-size:15px;white-space:nowrap}
.fpills{display:flex;gap:6px;align-items:center}
.fquick{height:28px;padding:0 10px;border-radius:999px;border:1px solid var(--line2);background:#fff;font-size:12px;font-weight:600;color:var(--navy)}
.fday{font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.06em;text-transform:uppercase;padding:14px 0 2px}
.fday:first-child{padding-top:0}
.ftotals{display:flex;flex-wrap:wrap;gap:12px 36px;padding:16px 22px;margin-bottom:16px}
.ftotals div{display:flex;flex-direction:column;gap:4px}
.ftotals small{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
.ftotals b{font-size:20px}
.ftodo{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #EEF0F3;font-size:14px}
.ftodo:last-child{border-bottom:none}
.ftodo a{font-weight:600;color:var(--navy);text-decoration:none;white-space:nowrap}
.fseg{display:inline-flex;background:var(--soft);border-radius:10px;padding:3px;gap:2px}
.fseg button{height:34px;padding:0 12px;border:none;border-radius:8px;background:transparent;font-size:13px;font-weight:600;color:var(--muted)}
.fseg button.on{background:#fff;color:var(--navy);box-shadow:0 1px 3px rgba(11,37,64,.12)}
.freadout{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:var(--muted);margin:6px 0 10px;min-height:20px}
.freadout>b{color:var(--text);font-size:14px}.freadout span b{color:var(--text)}
.fplot{position:relative}
.fgrid{position:absolute;left:0;right:0;top:0;border-bottom:1px solid #C3C2B7;pointer-events:none}
.fgl{position:absolute;left:0;right:0;border-top:1px solid #EEEEF2}
.fgl i{position:absolute;right:0;top:-16px;font-style:normal;font-size:11px;color:var(--muted)}
.fcols6{position:relative;display:flex;gap:6px;height:100%;padding-right:30px}
.fcol{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;border:none;background:transparent;border-radius:10px;padding:0}
.fcol.on .fbars{background:#F0F1F8}
.fbars{height:170px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px;border-radius:8px 8px 0 0}
.fbars span{display:block;width:16px;border-radius:4px 4px 0 0}
.fcol small{font-size:12px;color:var(--muted);height:18px}
.ftable{width:100%;border-collapse:collapse;font-size:14px}
.ftable th{text-align:left;color:var(--muted);font-size:12px;font-weight:600;padding:10px 12px;border-bottom:1px solid var(--line)}
.ftable td{padding:11px 12px;border-bottom:1px solid #EEF0F3;vertical-align:top}
.ftable tr:last-child td{border-bottom:none}
.fx{margin:0 -4px}
.fclick{cursor:pointer}.fclick:hover td{background:#FAFBFC}
.fw5{font-weight:500}
.fdel{width:32px;height:32px;border:none}
.fmodal-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.fmodal-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.fform{border:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;min-width:0}
.flab{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fauto{font-size:10px;font-weight:700;color:var(--navy);background:#EBEDF7;padding:2px 7px;border-radius:999px;letter-spacing:.04em}
.fbusy{display:flex;align-items:center;gap:12px;font-size:14px;color:var(--muted);background:var(--bg);border-radius:12px;padding:12px 14px}
.fbusy .spinner{width:22px;height:22px;border-width:3px;border-color:#D7DAF2;border-top-color:var(--navy)}
.frc{display:flex;flex-wrap:wrap;gap:8px}
.frc .btn{height:42px;font-size:14px}
.fchips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fchip{min-height:44px;border-radius:12px;border:1px solid var(--line2);background:#fff;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--text)}
.fchip.on{border:2px solid var(--navy);background:#EBEDF7;color:var(--navy)}
.finfo{display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.5;background:var(--bg);border-radius:12px;padding:12px 14px;min-height:20px}
.fgrid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.fcari{padding:18px;display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--text);border-width:2px;border-color:var(--line)}
.fcari:hover{color:var(--text)}
.fcari.on{box-shadow:0 4px 14px rgba(2,8,112,.08)}
.fcari-top{display:flex;align-items:center;gap:10px}
.fcari-top b{font-size:16px;flex:1}
.fcari-top small{font-size:12px;color:var(--muted)}
.fcari .fbig{font-size:30px}
.fkv{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
.fkv>span:first-child{color:var(--muted);display:flex;align-items:center;gap:8px}
.finfo-box{margin-top:16px;background:#EEF0F8;border-color:#EEF0F8;font-size:14px;line-height:1.5}
.finfo-box p{margin:8px 0 0}
.fclose{display:flex;flex-direction:column;gap:14px;max-width:640px;margin-bottom:20px}
.fclose .fkv{font-size:15px}
.ftotal{border-top:1px solid var(--line);padding-top:14px;font-weight:700}
.ftotal b{font-size:20px;color:var(--navy)}
.fper{font-size:20px}
.fmoney{display:flex;align-items:center;height:44px;border:1px solid var(--line2);border-radius:10px;padding:0 12px;width:150px}
.fmoney input{border:none;outline:none;width:100%;font-size:16px;font-weight:700;text-align:right}
.fwarnlist{margin:0;padding:12px 14px 12px 32px;background:#FFF6E8;border-radius:12px;color:var(--fwarn-ink);font-size:13px;line-height:1.5}
.fappr{display:flex;flex-wrap:wrap;gap:10px}
.fappr-i{display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;border-radius:999px;background:var(--bg);font-size:13px;opacity:.75}
.fappr-i.ok{opacity:1;background:#E3F3E8}
.fappr-i span{display:flex;flex-direction:column}
.fappr-i small{color:var(--muted);font-size:12px}
.fprow{align-items:flex-end}
.fprow .favatar{margin-bottom:6px}
.fpad.stack{margin-bottom:16px}
@media (max-width:860px){
  .fmonth h1{font-size:21px;min-width:0}
  .fhead{flex-direction:column;align-items:stretch}
  .fhead .fbtns .btn{flex:1}
  .fbig{font-size:30px}
  .fsub{margin-top:0}
  .fcols6{padding-right:24px}
  .fbars span{width:11px}
  .fmoney{width:120px}
}

/* Finans: gelir ve giderler tablosu */
.fmb{overflow:hidden}
.fmb-head{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:16px 20px;border:none;background:#fff;text-align:left;font-size:17px;color:var(--text)}
.fmb-head b{font-size:17px}
button.fmb-head:hover{background:#FAFBFC}
.fmb-head .fchev{transition:transform .15s;color:var(--muted);flex:none}
.fmb-head[aria-expanded="true"] .fchev{transform:rotate(90deg)}
.fmb-sum{margin-left:auto;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:14px;color:var(--muted)}
.fmb-sum span{display:inline-flex;align-items:center;gap:6px}
.fmb-sum b{color:var(--text);font-size:15px}
.fmb-link{font-size:14px;font-weight:600;color:var(--navy);text-decoration:none}
.fmb.open .fmb-head{border-bottom:1px solid var(--line)}
.fmb-body{padding:16px 20px 12px;display:flex;flex-direction:column;gap:14px}
.fmb-cols{display:flex;flex-wrap:wrap;gap:20px}
.fmb-col{flex:1 1 680px;min-width:0}
.fmb-colhead{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px;font-size:15px}
.fmb-colhead > span:not(.fdot){font-size:13px;color:var(--muted);margin-left:auto}
.fscroll{overflow-x:auto}
.fsheet{width:100%;min-width:500px;border-collapse:collapse;table-layout:fixed;font-size:14px}
.fsheet th{text-align:left;font-size:12px;font-weight:600;color:var(--muted);padding:6px 6px;border-bottom:1px solid var(--line)}
.fsheet td{padding:3px 4px;border-bottom:1px solid #F0F1F4;vertical-align:middle}
.fsheet tr.fadd td{border-bottom:none;padding-top:8px}
.fcell{width:100%;height:36px;border:1px solid transparent;border-radius:8px;background:transparent;padding:0 8px;font-size:14px;color:var(--text);font-family:inherit}
.fcell:hover{border-color:var(--line)}
.fcell:focus{outline:none;border-color:var(--navy);background:#fff;box-shadow:0 0 0 2px #E3E6F8}
select.fcell{padding:0 4px;cursor:pointer}
.fcell:disabled{color:var(--text);opacity:1;cursor:default}
.fcell:disabled:hover{border-color:transparent}
.fnum{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.fadd .fcell{border-color:var(--line);background:#fff}
.fadd input.fcell::placeholder{color:#8A93A3}
.fst{font-weight:600;font-size:13px}
.fst.st-odendi{background:#E3F3E8;color:var(--fok-ink)}
.fst.st-kesildi,.fst.st-odenecek{background:#FFF1DB;color:var(--fwarn-ink)}
.fst.st-beklenen{background:#EFF0F4;color:#4A4A55}
.fact{text-align:right;white-space:nowrap}
.fmini{width:30px;height:30px;border:none;background:transparent;color:var(--muted);border-radius:8px}
.fmini:hover{background:var(--soft);color:var(--text)}
.fmini svg{width:16px;height:16px}
.fadd-btn{height:36px;padding:0 12px;font-size:13px;border-radius:9px}
.fempty{color:var(--muted);font-size:13px;padding:10px 8px !important}
.fsheet tr.saving td{opacity:.6}
.fsheet tr.saved td{background:#F2FAF4;transition:background .6s}
.fmb-foot{display:flex;gap:18px;font-size:13px}
.fmb-foot a{color:var(--navy);font-weight:600;text-decoration:none}
.fstats{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:14px;margin:10px 0 18px}
.fstats div{display:flex;flex-direction:column;gap:4px}
.fstats small{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
.fstats b{font-size:20px}
.fh3{margin:0 0 8px;font-size:14px;font-weight:600}
.ftop{display:grid;grid-template-columns:minmax(90px,160px) 1fr auto;align-items:center;gap:12px;padding:6px 0;font-size:14px}
.ftop-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ftop-bar{height:8px;background:#EEF0F4;border-radius:4px;overflow:hidden}
.ftop-bar span{display:block;height:100%;background:#2a78d6;border-radius:4px}
.ftop-v{font-weight:600;white-space:nowrap}.ftop-v small{color:var(--muted);font-weight:400}
.fplot.r12 .fbars span{width:9px}
.fplot.r12 .fcols6{gap:2px}
.fnm{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #F0F1F4;font-size:14px;cursor:pointer}
.fnm .grow{flex:1;display:flex;flex-direction:column;gap:2px}
.fnm small{font-size:12px;color:var(--muted)}
.fnm .fcell{width:110px;border-color:var(--line)}
.fnm-h{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px;margin-top:6px}
.fnm-h small{font-weight:400;color:var(--muted)}
@media (max-width:860px){
  .fmb-head{padding:14px 16px}
  .fmb-sum{margin-left:0;width:100%}
  .fmb-body{padding:12px 12px 10px}
  .fplot.r12 .fbars span{width:6px}
}
@media (max-width:860px){ .fsheet{min-width:640px} }

/* Gelir ve gider bölümleri arasında belirgin ayrım */
.fmb-cols{flex-direction:column;gap:0}
.fmb-col{flex:1 1 auto}
.fmb-col + .fmb-col{border-top:2px solid var(--line);margin-top:20px;padding-top:20px}
.fmb-colhead{font-size:16px;margin-bottom:10px}
.fsheet thead th{background:#FAFBFC}
.fsheet th:nth-child(2){text-align:right;padding-right:14px}
.fsheet tbody tr:not(.fadd):hover td{background:#FAFBFC}
