/* ============ E-Defter Denetle — genel stil ============ */
:root {
    --blue: #2563eb; --blue-dark: #1d4ed8; --blue-50: #eff6ff;
    --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
    --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
    --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
    --green: #16a34a; --green-50: #f0fdf4; --red: #dc2626; --red-50: #fef2f2;
    --orange: #f97316; --orange-50: #fff7ed; --indigo: #4f46e5; --indigo-50: #eef2ff;
    --purple: #9333ea; --amber-50: #fffbeb;
    --radius: 10px;
    font-size: 15px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--slate-800); background: var(--slate-100);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
    font-size: 0.92rem; font-weight: 600; cursor: pointer; transition: all .15s;
    background: white; color: var(--slate-700); text-decoration: none !important;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue-50); }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover { background: var(--slate-200); }
.btn-dark { background: var(--slate-700); color: var(--slate-100); }
.btn-dark:hover { background: var(--slate-600); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(1.1); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { border-color: var(--red); }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-block { width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- form elemanlari ---------- */
input, select, textarea {
    padding: 8px 10px; border: 1px solid var(--slate-300); border-radius: 7px;
    font-size: 0.92rem; font-family: inherit; background: #fff; color: var(--slate-800);
    outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--slate-600); margin-bottom: 14px; }
label input { margin-top: 5px; font-weight: 400; }
.hint { color: var(--slate-400); font-size: 0.8rem; font-weight: 400; }

/* ---------- landing ---------- */
.landing { background: #fff; }
.landing-header { border-bottom: 1px solid var(--slate-200); background: #fff; position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--slate-800); }
.brand-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; background: var(--blue); color: #fff;
    border-radius: 8px; font-weight: 800;
}
.landing-nav { display: flex; gap: 10px; }
.hero { padding: 90px 0 70px; text-align: center; background: linear-gradient(180deg, var(--blue-50), #fff); }
.hero h1 { font-size: 2.6rem; line-height: 1.2; color: var(--slate-900); }
.hero .accent { color: var(--blue); }
.hero-sub { max-width: 640px; margin: 22px auto 0; color: var(--slate-500); font-size: 1.1rem; line-height: 1.65; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; }
.features { padding: 60px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.feature-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.feature-icon { font-size: 1.9rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; color: var(--slate-800); }
.feature-card p { color: var(--slate-500); font-size: .93rem; line-height: 1.6; }
.security-band { background: var(--slate-900); color: var(--slate-200); padding: 55px 0; }
.security-band h2 { margin-bottom: 20px; color: #fff; }
.security-list { list-style: none; display: grid; gap: 12px; }
.security-list li { padding-left: 26px; position: relative; line-height: 1.55; }
.security-list li::before { content: "✓"; position: absolute; left: 0; color: #4ade80; font-weight: 800; }
.landing-footer { padding: 26px 0; text-align: center; color: var(--slate-400); font-size: .85rem; border-top: 1px solid var(--slate-200); }

/* ---------- auth sayfalari ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--slate-900), var(--slate-700)); padding: 20px; }
.auth-card { background: #fff; border-radius: 14px; padding: 36px; width: 100%; max-width: 430px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 20px; color: var(--slate-800); }
.auth-alt { margin-top: 18px; font-size: .9rem; color: var(--slate-500); text-align: center; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.alert-error { background: var(--red-50); color: var(--red); border: 1px solid #fecaca; }
.alert-success { background: var(--green-50); color: var(--green); border: 1px solid #bbf7d0; }

/* ---------- app duzeni ---------- */
.app-body { height: 100vh; overflow: hidden; }
.screen { height: 100vh; overflow: auto; }
#screen-app { display: flex; overflow: hidden; }

/* sirket secim ekrani */
.companies-screen { padding: 40px 20px; }
.companies-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.companies-head h1 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; color: var(--slate-800); }
.user-box { display: flex; align-items: center; gap: 10px; color: var(--slate-600); font-weight: 600; }
.inline-form { display: inline; }
.card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.add-company-card { margin-bottom: 26px; }
.add-company-card h3 { margin-bottom: 14px; }
.form-row { display: flex; gap: 10px; margin-bottom: 8px; }
.form-row input { flex: 1; }
.company-card { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.company-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); border-color: var(--blue); }
.company-card h3 { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-card .vkn { color: var(--slate-500); font-size: .85rem; margin-top: 4px; font-family: Consolas, monospace; }
.company-card .card-foot { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--slate-100); font-size: .88rem; }
.company-card .go { color: var(--blue); font-weight: 700; }

/* sidebar */
.sidebar {
    width: 260px; flex-shrink: 0; background: var(--slate-900); color: var(--slate-300);
    display: flex; flex-direction: column; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--slate-800); }
.sidebar-brand strong { color: #fff; display: block; }
.sidebar-brand small { color: var(--slate-500); font-size: .75rem; }
.active-firm-box { margin: 10px; padding: 12px; background: rgba(30,41,59,.6); border: 1px solid var(--slate-700); border-radius: 9px; }
.active-firm-box .label { font-size: .68rem; font-weight: 800; color: #60a5fa; letter-spacing: .5px; margin-bottom: 4px; }
.firm-title { color: #fff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 10px; }
.sidebar-filters { padding: 8px 14px 12px; border-bottom: 1px solid var(--slate-800); }
.filter-group { margin-bottom: 12px; }
.filter-group .label { font-size: .68rem; font-weight: 800; color: var(--slate-500); letter-spacing: .5px; margin-bottom: 5px; }
.sidebar-filters input, .sidebar-filters select {
    background: var(--slate-800); border-color: var(--slate-700); color: #fff; font-size: .82rem; padding: 6px 8px;
}
.date-pair { display: flex; gap: 5px; }
.mini-note { font-size: .68rem; margin-top: 4px; }
.mini-note.success { color: #4ade80; }
.mini-note.warn { color: #fb923c; }
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%;
    background: transparent; border: none; color: var(--slate-400); text-align: left;
    padding: 10px 12px; border-radius: 7px; font-size: .9rem; font-weight: 600; cursor: pointer; margin-bottom: 2px;
}
.nav-item:hover { background: var(--slate-800); color: #fff; }
.nav-item.active { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.4); }
.nav-section { font-size: .68rem; font-weight: 800; color: var(--slate-600); letter-spacing: .5px; padding: 14px 12px 6px; border-top: 1px solid var(--slate-800); margin-top: 10px; }
.badge { background: var(--red); color: #fff; font-size: .7rem; padding: 1px 8px; border-radius: 99px; margin-left: auto; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--slate-800); }

/* ana alan */
.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid var(--slate-200); padding: 15px 24px; display: flex; justify-content: space-between; align-items: center; }
.topbar h2 { font-size: 1.2rem; color: var(--slate-800); }
.topbar-period { color: var(--slate-500); font-size: .88rem; }
.topbar-period b { color: var(--slate-700); }
.topbar-period .exclude-note { color: var(--orange); margin-left: 8px; }
.view-container { flex: 1; overflow-y: auto; padding: 22px; }
.view-container.fixed { overflow: hidden; display: flex; flex-direction: column; }

/* ---------- genel bakis ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 18px 0; }
.stat-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.stat-card .num { font-size: 1.9rem; font-weight: 800; margin-top: 4px; }
.stat-card .num.blue { color: var(--blue); } .stat-card .num.orange { color: var(--orange); } .stat-card .num.green { color: var(--green); }
.stat-card .icon { font-size: 1.6rem; background: var(--slate-50); border-radius: 50%; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.info-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; }
.info-card .head { background: var(--slate-900); color: #fff; padding: 13px 20px; font-weight: 700; }
.info-card .body { padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.info-card .k { font-size: .7rem; font-weight: 800; color: var(--slate-400); text-transform: uppercase; }
.info-card .v { font-weight: 600; color: var(--slate-800); margin-top: 2px; word-break: break-word; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 18px; }
.quick-btn { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 16px; font-weight: 700; color: var(--slate-700); cursor: pointer; transition: all .15s; }
.quick-btn:hover { border-color: var(--blue); box-shadow: 0 3px 10px rgba(0,0,0,.06); color: var(--blue); }

/* ---------- tablolar ---------- */
.table-panel { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; }
.table-toolbar { padding: 14px; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); flex-shrink: 0; }
.table-scroll { flex: 1; overflow: auto; min-height: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; white-space: nowrap; }
table.data thead th {
    background: var(--slate-100); color: var(--slate-600); text-align: left;
    padding: 10px 13px; position: sticky; top: 0; z-index: 5; font-size: .8rem;
    border-bottom: 1px solid var(--slate-200);
}
table.data th.r, table.data td.r { text-align: right; }
table.data td { padding: 8px 13px; border-bottom: 1px solid var(--slate-100); color: var(--slate-700); }
table.data tbody tr:hover { background: var(--blue-50); }
table.data tr.marked { background: var(--orange-50); }
table.data tr.dup { background: var(--red-50); }
table.data tfoot td { background: var(--slate-800); color: #fff; font-weight: 700; padding: 11px 13px; position: sticky; bottom: 0; }
.mono { font-family: Consolas, monospace; }
.txt-trunc { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.clickable-code { color: var(--blue); cursor: pointer; font-weight: 600; }
.clickable-code:hover { text-decoration: underline; }
.flag-btn { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: .25; }
.flag-btn.on { opacity: 1; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; align-items: end; }
.filter-grid .fl { font-size: .72rem; font-weight: 700; color: var(--slate-500); display: block; margin-bottom: 3px; }
.toolbar-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.toolbar-row .left { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--slate-500); }
.toolbar-row select { width: auto; padding: 4px 8px; font-size: .8rem; }
.pager { padding: 9px; border-top: 1px solid var(--slate-200); background: var(--slate-50); display: flex; justify-content: center; gap: 10px; align-items: center; flex-shrink: 0; font-size: .88rem; }
.tag { padding: 2px 9px; border-radius: 6px; font-size: .74rem; font-weight: 700; }
.tag.blue { background: #dbeafe; color: var(--blue-dark); }
.tag.green { background: #d1fae5; color: #047857; }
.tag.amber { background: #fef3c7; color: #b45309; }

/* seviye girintileri (mizan) */
.lvl-1 td:first-child { padding-left: 13px; } .lvl-1 { background: rgba(226,232,240,.5); font-weight: 800; }
.lvl-2 td:first-child { padding-left: 22px; } .lvl-2 { background: rgba(241,245,249,.5); font-weight: 700; }
.lvl-3 td:first-child { padding-left: 32px; } .lvl-3 { font-weight: 700; }
.lvl-4 td:first-child { padding-left: 46px; }
.lvl-5 td:first-child { padding-left: 60px; } .lvl-5 { font-size: .8rem; color: var(--slate-500); }
.level-btns { display: flex; border: 1px solid var(--slate-300); border-radius: 7px; overflow: hidden; }
.level-btns button { flex: 1; border: none; background: #fff; padding: 8px 10px; font-size: .78rem; font-weight: 700; cursor: pointer; color: var(--slate-600); border-right: 1px solid var(--slate-200); }
.level-btns button:last-child { border-right: none; }
.level-btns button.active { background: var(--blue); color: #fff; }

/* sekmeler (fatura) */
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn { padding: 8px 15px; border-radius: 7px; border: 1px solid var(--slate-200); background: #fff; font-size: .86rem; font-weight: 600; color: var(--slate-600); cursor: pointer; }
.tab-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.tab-btn.danger { background: var(--red-50); color: var(--red); border-color: #fecaca; }
.tab-btn.danger.active { background: var(--red); color: #fff; }
.tab-btn.indigo { background: var(--indigo-50); color: var(--indigo); border-color: #c7d2fe; }
.tab-btn.indigo.active { background: var(--indigo); color: #fff; }
.seri-filter { display: flex; gap: 14px; align-items: center; background: var(--indigo-50); border: 1px solid #c7d2fe; padding: 8px 12px; border-radius: 7px; margin-top: 10px; width: fit-content; font-size: .85rem; }
.seri-filter input { width: auto; }
.seri-filter label { margin: 0; display: flex; gap: 5px; align-items: center; font-weight: 500; cursor: pointer; }

/* ---------- defter & beratlar ---------- */
.berat-head-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.upload-btns { display: flex; gap: 8px; }
.period-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; margin-top: 16px; }
.period-head { background: var(--slate-50); border-bottom: 1px solid var(--slate-200); padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; }
.period-head .year-tag { background: var(--blue); color: #fff; font-size: .75rem; font-weight: 800; padding: 3px 8px; border-radius: 5px; margin-right: 10px; }
.period-head .right { display: flex; align-items: center; gap: 12px; font-size: .78rem; color: var(--slate-400); }
.period-body { padding: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 13px; }
.file-group { border-radius: 9px; min-height: 130px; padding: 13px; }
.file-group.empty { border: 2px dashed var(--slate-200); background: var(--slate-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--slate-400); font-size: .8rem; }
.file-group.full { border: 1px solid #bbf7d0; background: rgba(240,253,244,.6); position: relative; }
.file-group.full .g-title { font-size: .74rem; font-weight: 800; color: #166534; margin-bottom: 8px; }
.file-chip { background: #fff; border: 1px solid #d1fae5; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-size: .72rem; }
.file-chip .fn { font-family: Consolas, monospace; color: #15803d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .68rem; }
.file-chip .actions { margin-top: 4px; }
.file-chip button { width: 100%; background: var(--green-50); border: 1px solid #bbf7d0; color: #15803d; border-radius: 5px; padding: 3px; font-size: .7rem; cursor: pointer; }
.file-list-scroll { max-height: 150px; overflow-y: auto; }

/* ---------- gelir tablosu / bilanco ---------- */
.report-sheet { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 30px; max-width: 900px; margin: 0 auto; }
.report-sheet h2 { text-align: center; margin-bottom: 24px; }
.sheet-row { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--slate-50); font-size: .92rem; }
.sheet-row:hover { background: var(--slate-50); }
.sheet-row.bold { font-weight: 700; }
.sheet-row.indent { padding-left: 30px; font-size: .85rem; cursor: pointer; }
.sheet-row.indent:hover { background: var(--blue-50); }
.sheet-row.red { color: var(--red); }
.sheet-row.total { border-top: 2px solid var(--slate-200); margin-top: 10px; padding-top: 12px; font-weight: 800; }
.sheet-row.grand { border-top: 4px double var(--slate-300); margin-top: 18px; padding-top: 14px; font-weight: 800; font-size: 1.15rem; }
.pos { color: #047857; } .neg { color: var(--red); }
.notes-card { max-width: 900px; margin: 18px auto 0; background: var(--amber-50); border: 1px solid #fde68a; border-radius: var(--radius); padding: 18px; }
.notes-card.blue { background: var(--blue-50); border-color: #bfdbfe; }
.notes-card h3 { font-size: .95rem; margin-bottom: 10px; }
.notes-card textarea { min-height: 90px; resize: vertical; }
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 1150px; margin: 0 auto; }
@media (max-width: 900px) { .balance-grid { grid-template-columns: 1fr; } }
.balance-col { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.balance-col .col-title { text-align: center; padding: 11px; border-radius: 8px; font-weight: 800; font-size: 1.05rem; margin-bottom: 18px; }
.balance-col .col-title.aktif { background: var(--blue-50); color: #1e3a8a; border: 1px solid #bfdbfe; }
.balance-col .col-title.pasif { background: var(--orange-50); color: #7c2d12; border: 1px solid #fed7aa; }
.bs-section h4 { font-size: .95rem; margin: 14px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--slate-200); }
.bs-item { display: flex; justify-content: space-between; font-size: .86rem; padding: 4px 2px; cursor: pointer; }
.bs-item:hover { background: var(--slate-50); }
.bs-total { display: flex; justify-content: space-between; font-weight: 700; border-top: 1px solid var(--slate-200); margin-top: 7px; padding-top: 7px; font-size: .9rem; }
.bs-grand { margin-top: 18px; padding: 15px; border-radius: 8px; display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; }
.bs-grand.aktif { background: var(--blue-50); color: #1e3a8a; }
.bs-grand.pasif { background: var(--orange-50); color: #7c2d12; }

/* ---------- AI sohbet ---------- */
.chat-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden; }
.chat-head { background: linear-gradient(90deg, #7c3aed, var(--indigo)); color: #fff; padding: 15px 20px; font-weight: 700; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; background: var(--slate-50); display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 78%; padding: 13px 16px; border-radius: 16px; font-size: .9rem; line-height: 1.55; white-space: pre-line; }
.chat-msg.user { align-self: flex-end; background: var(--indigo); color: #fff; border-top-right-radius: 4px; }
.chat-msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--slate-200); border-top-left-radius: 4px; }
.chat-msg.ai .who { font-size: .7rem; font-weight: 800; color: var(--indigo); margin-bottom: 5px; }
.chat-input { display: flex; gap: 8px; padding: 13px; border-top: 1px solid var(--slate-200); }
.chat-input button { flex-shrink: 0; }

/* ---------- modallar ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
    z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal-box { background: #fff; border-radius: 14px; box-shadow: 0 25px 70px rgba(0,0,0,.35); width: 100%; display: flex; flex-direction: column; overflow: hidden; max-height: 92vh; }
.modal-box.md { max-width: 900px; }
.modal-box.lg { max-width: 1200px; height: 90vh; }
.modal-head { background: var(--slate-800); color: #fff; padding: 13px 18px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.modal-head h3 { font-size: 1rem; }
.modal-head .actions { display: flex; gap: 8px; }
.modal-close { background: none; border: none; color: var(--slate-300); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #f87171; }
.modal-body { flex: 1; overflow: auto; padding: 18px; background: var(--slate-50); min-height: 0; display: flex; flex-direction: column; }

/* berat resmi format */
.berat-doc { background: #fff; color: #000; padding: 40px; font-family: Arial, sans-serif; }
.berat-doc .gib-logo { text-align: center; margin-bottom: 26px; }
.berat-doc h1 { text-align: center; font-size: 1.2rem; letter-spacing: 1px; margin-bottom: 30px; }
.berat-doc .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 26px; }
.berat-sec { border-top: 1px solid #000; text-align: center; margin: 22px 0 14px; position: relative; }
.berat-sec span { position: relative; top: -11px; background: #fff; padding: 0 10px; font-weight: 700; font-size: .8rem; }
.berat-kv { width: 100%; font-size: .8rem; border-collapse: collapse; }
.berat-kv td { padding: 3px 4px; vertical-align: top; }
.berat-kv td.k { text-align: right; font-weight: 700; width: 40%; }
.berat-table { width: 100%; border-collapse: collapse; font-size: .78rem; text-align: center; }
.berat-table th, .berat-table td { border: 1px solid #000; padding: 7px; }
.berat-table td.l { text-align: left; } .berat-table td.r { text-align: right; }
.sig-box { border: 1px solid #9ca3af; padding: 9px; font-size: .62rem; font-family: Consolas, monospace; word-break: break-all; max-height: 130px; overflow-y: auto; text-align: justify; line-height: 1.4; background: #fff; }

/* yazdirma */
@media print {
    body * { visibility: hidden; }
    #berat-print, #berat-print * { visibility: visible; }
    #berat-print { position: absolute; inset: 0; width: 100%; overflow: visible; }
}

/* ---------- toast & loader ---------- */
.toast {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    background: var(--slate-900); color: #fff; padding: 12px 22px; border-radius: 9px;
    font-size: .9rem; z-index: 100; box-shadow: 0 8px 25px rgba(0,0,0,.3); max-width: 90vw;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
.loader-box {
    position: fixed; bottom: 22px; right: 22px; background: #fff; border: 1px solid #bfdbfe;
    border-radius: 12px; padding: 16px 20px; z-index: 90; display: flex; gap: 14px; align-items: center;
    box-shadow: 0 12px 35px rgba(0,0,0,.15); min-width: 260px;
}
.spinner {
    width: 30px; height: 30px; border: 4px solid var(--blue-50);
    border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* denetim listesi fis ayirici */
tr.group-end td { border-bottom: 4px solid var(--slate-300); }
.note-input { border-color: #fdba74 !important; font-size: .78rem !important; padding: 4px 8px !important; }

/* bos durum */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--slate-400); text-align: center; gap: 8px; }
.empty-state .big { font-size: 2.4rem; opacity: .5; }

/* ---------- fis turu & rapor haric tutma ---------- */
.exclude-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: .86rem; }
.exclude-row label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; color: var(--slate-600); cursor: pointer; }
.exclude-row input[type="checkbox"] { width: auto; }
select.fis-select { padding: 3px 6px; font-size: .74rem; width: auto; max-width: 150px; border-radius: 5px; font-weight: 600; }
select.fis-select.ft-normal { color: var(--slate-500); }
select.fis-select.ft-acilis { color: #047857; border-color: #6ee7b7; background: #ecfdf5; }
select.fis-select.ft-kapanis { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }
select.fis-select.ft-yansitma { color: #6d28d9; border-color: #c4b5fd; background: #f5f3ff; }
select.fis-select.ft-kdv { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
select.fis-select.ft-yansitma7 { color: #6d28d9; border-color: #c4b5fd; background: #f5f3ff; }
select.fis-select.ft-yansitma6 { color: #7c3aed; border-color: #ddd6fe; background: #faf5ff; }
select.fis-select.ft-maliyet { color: #0e7490; border-color: #a5f3fc; background: #ecfeff; }
select.fis-select.ft-ozel1 { color: #be185d; border-color: #fbcfe8; background: #fdf2f8; }
select.fis-select.ft-ozel2 { color: #a16207; border-color: #fde68a; background: #fefce8; }
input.kdv-mini { width: 76px; padding: 3px 6px; font-size: .76rem; margin-left: 8px; border-radius: 5px; }
details > summary { user-select: none; }

/* ===== Landing v2: modüller, güvenlik, paketler ===== */
.hero-badge { display:inline-block; background:var(--blue-50); color:var(--blue-dark); font-weight:700; font-size:.82rem; padding:6px 14px; border-radius:999px; margin-bottom:20px; }
.hero-note { margin-top:16px; font-size:.85rem; color:var(--slate-400); }
.section-head { text-align:center; max-width:640px; margin:0 auto 36px; }
.section-head h2 { font-size:1.9rem; color:var(--slate-900); }
.section-head p { color:var(--slate-500); margin-top:8px; font-size:1.05rem; }
.section-head.light h2 { color:#fff; }
.section-head.light p { color:var(--slate-300); }
.modules-section { padding:70px 0; background:#fff; }
.module-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; }
.module-card { background:var(--slate-50); border:1px solid var(--slate-200); border-radius:var(--radius); padding:24px; transition:transform .15s, box-shadow .15s; }
.module-card:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,.08); border-color:var(--blue-200,#bfdbfe); }
.module-icon { font-size:2rem; margin-bottom:12px; }
.module-card h3 { font-size:1.08rem; color:var(--slate-800); margin-bottom:8px; }
.module-card p { color:var(--slate-500); font-size:.9rem; line-height:1.6; }
.security-band { padding:70px 0; background:linear-gradient(160deg,var(--slate-900),#1a2744); color:var(--slate-200); }
.security-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; }
.sec-item { background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:var(--radius); padding:20px; }
.sec-item h4 { color:#fff; margin-bottom:8px; font-size:1rem; }
.sec-item h4::before { content:"🛡 "; }
.sec-item p { font-size:.88rem; line-height:1.6; color:var(--slate-300); }
.sec-item b { color:#fff; }
.packages-section { padding:70px 0; background:var(--slate-50); }
.package-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:18px; }
.package-card { background:#fff; border:1px solid var(--slate-200); border-radius:14px; padding:26px 20px; text-align:center; display:flex; flex-direction:column; gap:14px; transition:transform .15s, box-shadow .15s; }
.package-card:hover { transform:translateY(-4px); box-shadow:0 12px 30px rgba(37,99,235,.14); border-color:var(--blue); }
.package-card.demo { background:linear-gradient(180deg,var(--blue-50),#fff); }
.pkg-name { font-size:1.3rem; font-weight:800; color:var(--slate-900); }
.pkg-metrics { display:flex; justify-content:center; gap:22px; }
.pkg-metrics > div { display:flex; flex-direction:column; }
.pkg-num { font-size:1.4rem; font-weight:800; color:var(--blue); }
.pkg-lbl { font-size:.72rem; color:var(--slate-400); text-transform:uppercase; letter-spacing:.5px; }
.pkg-price { font-weight:700; color:var(--slate-700); min-height:24px; }
.pkg-contact { text-align:center; margin-top:26px; color:var(--slate-500); }
.cta-band { padding:60px 0; text-align:center; background:var(--blue); color:#fff; }
.cta-band h2 { font-size:1.7rem; margin-bottom:8px; }
.cta-band p { opacity:.9; margin-bottom:22px; }
.cta-band .btn-primary { background:#fff; color:var(--blue); }

/* Hesap: limit cubuklari + ilk ekran upload hero */
.lim-bar { height:10px; background:var(--slate-200); border-radius:6px; overflow:hidden; }
.lim-fill { height:100%; border-radius:6px; transition:width .3s; }
.upload-hero { text-align:center; border:2px dashed var(--blue-200,#bfdbfe); background:var(--blue-50); }
.upload-hero .upload-btns { justify-content:center; flex-wrap:wrap; }

/* ============ HAMBURGER MENÜ & RESPONSIVE ============ */
.menu-toggle {
    display: none; background: none; border: 1px solid var(--slate-300);
    border-radius: 8px; font-size: 1.3rem; line-height: 1; cursor: pointer;
    padding: 6px 12px; color: var(--slate-700); flex-shrink: 0;
}
.menu-toggle:hover { background: var(--slate-100); }
.sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5);
    z-index: 55; backdrop-filter: blur(1px);
}
.sidebar-backdrop.show { display: block; }

@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; align-items: center; }

    /* Sol menü artık kayan çekmece */
    .sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; width: 280px; max-width: 85vw;
        transform: translateX(-100%); transition: transform .25s ease;
        z-index: 60; box-shadow: 4px 0 24px rgba(0,0,0,.35);
    }
    .sidebar.open { transform: translateX(0); }
    .main-area { width: 100%; }

    .topbar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
    .topbar h2 { font-size: 1.05rem; flex: 1; }
    .topbar-period { width: 100%; order: 3; font-size: .8rem; }
    .view-container { padding: 12px; }

    /* Filtre ızgaraları tek/az sütuna insin */
    .filter-grid { grid-template-columns: 1fr 1fr !important; }
    .stat-grid, .quick-grid, .grid-3 { grid-template-columns: 1fr !important; }
    .balance-grid { grid-template-columns: 1fr !important; }
    .report-sheet { padding: 16px; }
    .companies-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .form-row { flex-direction: column; }
    .modal-box.lg, .modal-box.md { max-width: 96vw; }
}

@media (max-width: 560px) {
    .filter-grid { grid-template-columns: 1fr !important; }
    .tab-row { gap: 6px; }
    .tab-btn { padding: 7px 10px; font-size: .8rem; }
    .hero h1 { font-size: 1.7rem; }
    .section-head h2 { font-size: 1.4rem; }
    .user-box { flex-wrap: wrap; }
}

/* ============ KVKK / SSS sayfalari ============ */
.legal-section { padding: 50px 0 70px; background: #fff; }
.legal-doc { max-width: 820px; }
.legal-doc h1 { font-size: 1.7rem; color: var(--slate-900); margin-bottom: 6px; }
.legal-doc h2 { font-size: 1.1rem; color: var(--slate-800); margin: 26px 0 8px; }
.legal-doc p, .legal-doc li { color: var(--slate-600); line-height: 1.75; font-size: .95rem; }
.legal-doc ul { padding-left: 22px; margin: 8px 0; }
.legal-doc li { margin-bottom: 6px; }
.legal-updated { color: var(--slate-400); font-size: .85rem; margin-bottom: 20px; }
.faq-item { border: 1px solid var(--slate-200); border-radius: 10px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--slate-800); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font-size: 1.3rem; color: var(--blue); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--slate-100); }
.faq-answer { padding: 14px 20px; color: var(--slate-600); line-height: 1.7; font-size: .93rem; }
.footer-links { margin-bottom: 12px; }
.footer-links a { color: var(--slate-500); margin: 0 2px; }
.footer-links a:hover { color: var(--blue); }

/* ============ Tam Tasdik Raporu editoru ============ */
.tsk-newform { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr auto; gap: 12px; align-items: end; }
.tsk-newform label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--slate-600); }
.tsk-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tsk-report-card { border: 1px solid var(--slate-200); border-radius: 12px; padding: 16px; background: linear-gradient(180deg, #fffdf5, #fff); box-shadow: 0 1px 4px rgba(15,23,42,.06); }
.trc-name { font-weight: 800; color: var(--slate-800); margin-bottom: 4px; }
.trc-period { font-size: .85rem; color: var(--blue); font-weight: 600; }
.trc-date { font-size: .75rem; color: var(--slate-400); margin: 6px 0 10px; }
.trc-actions { display: flex; gap: 8px; }
.tsk-tpl-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--slate-200); }

/* --- editor kabugu: koyu masa + A4 kagit --- */
.tsk-editor { display: flex; flex-direction: column; gap: 0; margin: -22px; }
.tsk-toolbar { background: #1e293b; padding: 8px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.25); z-index: 4; position: sticky; top: -22px; }
.tsk-tb-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tsk-tb-flex { flex: 1; }
.tsk-name { flex: 0 1 340px; background: #0f172a; border: 1px solid #334155; color: #f1f5f9; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: .85rem; }
.tsk-period-badge { color: #94a3b8; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.tsk-tb-tools select { background: #0f172a; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; padding: 4px 6px; font-size: .78rem; }
.tsk-tb-sep { width: 1px; height: 20px; background: #334155; margin: 0 3px; }
.tsk-tool { background: #0f172a; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; min-width: 30px; height: 28px; cursor: pointer; font-size: .8rem; }
.tsk-tool:hover { background: #334155; }
.tsk-toolbar .btn { border-color: #334155; background: #0f172a; color: #e2e8f0; }
.tsk-toolbar .btn:hover { background: #334155; }
.tsk-toolbar .btn.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.tsk-toolbar .btn.btn-primary.attn { background: #f59e0b; border-color: #f59e0b; animation: tskpulse 1.6s infinite; }
@keyframes tskpulse { 50% { opacity: .75; } }

.tsk-workspace { flex: 1; display: flex; min-height: calc(100vh - 190px); align-items: stretch; background: #334155; background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 22px 22px; }
.tsk-outline { width: 230px; flex-shrink: 0; background: #1e293b; color: #cbd5e1; overflow-y: auto; border-right: 1px solid #0f172a; position: sticky; top: 44px; align-self: flex-start; max-height: calc(100vh - 150px); }
.tsk-outline-head { padding: 12px 14px 8px; font-size: .68rem; letter-spacing: .12em; color: #64748b; font-weight: 800; }
.tsk-ol-item { padding: 7px 14px; font-size: .78rem; cursor: pointer; border-left: 3px solid transparent; line-height: 1.35; }
.tsk-ol-item:hover { background: #0f172a; border-left-color: var(--blue); }
.tsk-ol-item.lvl2 { padding-left: 28px; color: #94a3b8; }
.tsk-ol-no { color: var(--blue); font-weight: 700; margin-right: 4px; }

.tsk-desk { flex: 1; padding: 34px 20px 80px; }
.tsk-page { width: 794px; max-width: 100%; min-height: 1123px; margin: 0 auto; background: #fffef9; color: #111;
    padding: 76px 76px 90px; box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 18px 50px rgba(0,0,0,.35); border-radius: 2px;
    line-height: 1.55; outline: none; caret-color: var(--blue); }
.tsk-page p { margin: 0 0 8px; text-align: justify; }
.tsk-page h2.tsk-h { font-size: 1.06em; margin: 20px 0 8px; color: #111; }
.tsk-page h2.tsk-h.lvl2 { margin-left: 14px; font-size: 1.02em; }
.tsk-page .tsk-no { color: #8b6b1f; }
.tsk-page section.tsk-sec { display: block; }
.tsk-page table.tsk-table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: .93em; }
.tsk-page table.tsk-table td, .tsk-page table.tsk-table th { border: 1px solid #9a9a8f; padding: 4px 8px; vertical-align: top; }

/* dinamik + doldurulacak alanlar */
.tsk-page .dyn { background: #dbeafe; color: #1e40af; border: 1px dashed #60a5fa; border-radius: 5px;
    padding: 0 5px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.tsk-page .dyn:hover { background: #bfdbfe; }
.tsk-page .fill, .fill { background: #fef3c7; color: #92400e; border-bottom: 1px dashed #d97706; padding: 0 4px; border-radius: 3px; }

/* --- tsk modal --- */
.tsk-modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 58;
    display: flex; align-items: center; justify-content: center; padding: 18px; backdrop-filter: blur(2px); }
.tsk-modal { background: #fff; border-radius: 14px; width: 480px; max-width: 96vw; max-height: 88vh;
    display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.4); overflow: hidden; }
.tsk-modal.wide { width: 780px; }
.tsk-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px;
    background: #1e293b; color: #f1f5f9; font-weight: 700; font-size: .9rem; }
.tsk-modal-x { background: none; border: none; color: #94a3b8; font-size: 1rem; cursor: pointer; }
.tsk-modal-body { padding: 16px 18px; overflow-y: auto; }
.tsk-modal-body label { display: block; font-size: .8rem; font-weight: 600; color: var(--slate-600); margin-bottom: 10px; }
.tsk-modal-body input, .tsk-modal-body select { width: 100%; margin-top: 4px; }

.tsk-lib-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--slate-100); }
.tsk-lib-row.sub { padding-left: 22px; background: #fafaf5; }
.tsk-lib-info { flex: 1; min-width: 0; }
.tsk-lib-title { font-weight: 700; font-size: .82rem; color: var(--slate-800); }
.tsk-lib-acc { font-size: .7rem; color: var(--slate-400); }
.tsk-lib-variant { max-width: 210px; font-size: .78rem; }

@media (max-width: 1100px) { .tsk-outline { display: none; } }
@media (max-width: 860px) {
    .tsk-newform { grid-template-columns: 1fr 1fr; }
    .tsk-editor { margin: -12px; }
    .tsk-toolbar { top: -12px; }
    .tsk-desk { padding: 16px 6px 60px; }
    .tsk-page { padding: 34px 22px 50px; min-height: 500px; }
}

/* ============ Tasdik: kutuphane duzenleme + ekler + byn alanlar ============ */
.tsk-mini { background: #f1f5f9; border: 1px solid var(--slate-200); border-radius: 6px; min-width: 26px; height: 26px;
    cursor: pointer; font-size: .72rem; color: var(--slate-600); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.tsk-mini:hover { background: var(--slate-200); }
.tsk-lib-move { display: flex; flex-direction: column; gap: 2px; }
.tsk-lib-move .tsk-mini { height: 18px; min-width: 22px; font-size: .55rem; }

.lib-ed-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.lib-ed-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0; border-bottom: 2px solid var(--slate-200); padding-bottom: 6px; }
.lib-ed-tab { background: #f1f5f9; border: 1px solid var(--slate-200); border-radius: 8px 8px 0 0; padding: 5px 12px;
    font-size: .78rem; cursor: pointer; font-weight: 600; color: var(--slate-600); }
.lib-ed-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.lib-ed-tab.add { border-style: dashed; color: var(--blue); }
.lib-ed-toolbar { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; background: #1e293b; padding: 6px 8px; border-radius: 8px 8px 0 0; margin-top: 8px; }
.lib-ed-toolbar .btn { border-color: #334155; background: #0f172a; color: #e2e8f0; }
.tsk-lib-edit { border: 1px solid var(--slate-300); border-top: none; border-radius: 0 0 8px 8px; background: #fffef9;
    min-height: 260px; max-height: 45vh; overflow-y: auto; padding: 18px 22px; outline: none;
    font-family: 'Times New Roman', serif; font-size: 11pt; line-height: 1.5; color: #111; }
.tsk-lib-edit p { margin: 0 0 8px; text-align: justify; }
.tsk-lib-edit table.tsk-table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: .92em; }
.tsk-lib-edit table.tsk-table td { border: 1px solid #9a9a8f; padding: 3px 7px; vertical-align: top; }
.tsk-lib-edit .dyn { background: #dbeafe; color: #1e40af; border: 1px dashed #60a5fa; border-radius: 5px; padding: 0 5px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.tsk-lib-edit .dyn[data-src="byn"], .tsk-page .dyn[data-src="byn"] { background: #ede9fe; color: #5b21b6; border-color: #a78bfa; }

.dyn-src-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.dyn-src { flex: 1; padding: 8px; border-radius: 8px; border: 2px solid var(--slate-200); background: #f8fafc;
    font-weight: 700; font-size: .82rem; cursor: pointer; color: var(--slate-500); }
.dyn-src.active { border-color: var(--blue); color: var(--blue); background: #eff6ff; }

.ek-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--slate-100); }
.ek-no { font-weight: 800; color: var(--blue); font-size: .78rem; min-width: 42px; }
.ek-title { flex: 1; font-size: .85rem; font-weight: 600; color: var(--slate-700); }
.ek-type { font-size: .7rem; color: var(--slate-400); white-space: nowrap; }
.ek-pick { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px dashed var(--slate-100); font-size: .85rem; cursor: pointer; }
.ek-pick input { width: auto; }

/* ============ Tasdik: madde haritasi siralama ============ */
.tsk-ol-item { display: flex; align-items: center; gap: 5px; }
.tsk-ol-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-ol-drag { color: #475569; cursor: grab; font-size: .7rem; flex-shrink: 0; }
.tsk-ol-actions { display: none; gap: 2px; flex-shrink: 0; }
.tsk-ol-item:hover .tsk-ol-actions { display: inline-flex; }
.tsk-ol-actions .tsk-mini { background: #0f172a; border-color: #334155; color: #94a3b8; height: 18px; min-width: 20px; font-size: .55rem; }
.tsk-ol-actions .tsk-mini:hover { background: #334155; color: #fff; }
.tsk-ol-item.dragging { opacity: .4; }
.tsk-ol-item.dragover { border-top: 2px solid var(--blue); background: #0f172a; }

/* ============ Beyanname kontrol: sekmeler + tahakkuk ============ */
.byn-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.byn-tab { background: #f8fafc; border: 1px solid var(--slate-200); border-radius: 9px; padding: 7px 12px;
    font-size: .8rem; font-weight: 700; color: var(--slate-500); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.byn-tab:hover { background: var(--slate-100); }
.byn-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.byn-tab-n { background: rgba(0,0,0,.08); border-radius: 8px; padding: 0 7px; font-size: .7rem; }
.byn-tab.active .byn-tab-n { background: rgba(255,255,255,.25); }
.thk-info { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: .8rem; color: var(--slate-600); }
.byn-duzeltme { margin-top: 6px; background: #fef3c7; border: 1px solid #fcd34d; color: #92400e;
    border-radius: 7px; padding: 6px 10px; font-size: .82rem; }

/* ============ Tasdik: modul ici menu + bolum ekranlari ============ */
.tsk-shell { margin: -22px; min-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.tsk-shell .tsk-editor { margin: 0; }
.tsk-submenu { background: #0f172a; padding: 8px 14px; display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; position: sticky; top: -22px; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tsk-submenu .btn { border-color: #334155; background: #1e293b; color: #e2e8f0; }
.tsk-sub-name { color: #94a3b8; font-weight: 800; font-size: .82rem; max-width: 200px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
.tsk-submenu-items { display: flex; gap: 5px; flex-wrap: wrap; }
.tsk-sub-btn { background: #1e293b; border: 1px solid #334155; color: #94a3b8; border-radius: 8px;
    padding: 6px 11px; font-size: .76rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tsk-sub-btn:hover { background: #334155; color: #fff; }
.tsk-sub-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tsk-section-wrap { padding: 20px 22px 60px; background: var(--slate-50); flex: 1; }
.tsk-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tsk-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--slate-600); }
.tsk-section-wrap table.data input, .tsk-section-wrap table.data select { width: 100%; font-size: .82rem; padding: 5px 7px; }
.tsk-section-wrap .tsk-lib-edit { border-radius: 0 0 8px 8px; }
@media (max-width: 860px) { .tsk-shell { margin: -12px; } .tsk-submenu { top: -12px; } .tsk-section-wrap { padding: 12px 10px 50px; } }

/* ============ Kullanici yonetimi (yetki editoru) ============ */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 16px; }
.perm-chk { display: flex; align-items: center; gap: 7px; font-size: .82rem; padding: 3px 0; cursor: pointer; }
.perm-chk input { width: auto; }
.perm-list { max-height: 180px; overflow-y: auto; border: 1px solid var(--slate-200); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.perm-list.dim { opacity: .45; pointer-events: none; }
@media (max-width: 860px) { .perm-grid { grid-template-columns: 1fr; } }

/* ============ Şirket seçim ekranı — uygulama kabuğu ============ */
#screen-companies { display: flex; overflow: hidden; }
#screen-companies .view-container { padding: 24px; }

/* sol menü: kullanıcı kimliği */
.hs-user {
    display: flex; align-items: center; gap: 11px;
    padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.hs-avatar {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
    background: linear-gradient(145deg, #3b82f6, var(--blue));
    color: #fff; font-weight: 700; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.hs-user-info { min-width: 0; }
.hs-name {
    color: #e8edf7; font-weight: 700; font-size: .85rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hs-role { color: #7c8aa8; font-size: .7rem; font-weight: 600; margin-top: 1px; }

/* sol menü: lisans bloğu */
.hs-block { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.hs-label {
    font-size: .62rem; font-weight: 800; letter-spacing: .14em;
    color: #64748b; margin-bottom: 9px;
}
.hs-lic { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 11px 12px; }
.hs-lic-plan {
    display: inline-block; background: var(--blue); color: #fff;
    font-size: .64rem; font-weight: 800; letter-spacing: .06em;
    padding: 3px 9px; border-radius: 99px; margin-bottom: 9px;
}
.hs-lic-plan.expired { background: var(--red); }
.hs-lic-row { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; margin-bottom: 5px; }
.hs-lic-row span:first-child { color: #7c8aa8; }
.hs-lic-row span:last-child { color: #d7dfee; font-weight: 700; }
.hs-lic .lim-bar { height: 6px; background: rgba(255,255,255,.09); margin-top: 8px; }
.hs-lic .lim-bar > div { height: 100%; background: var(--blue); border-radius: 6px; transition: width .3s; }
.hs-lic .lim-bar > div.full { background: var(--red); }
.hs-lic-note { font-size: .68rem; color: #7c8aa8; margin-top: 8px; line-height: 1.5; }

/* sol menüde bağlantı biçimindeki öğeler */
.sidebar-nav a.nav-item { text-decoration: none !important; }

/* içerik başlıkları */
#screen-companies .section-title {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 22px 2px 12px;
}
#screen-companies .section-title h3 { font-size: 1.05rem; color: var(--slate-700); }

@media (max-width: 860px) {
    #screen-companies .view-container { padding: 14px; }
    #screen-companies .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
        transform: translateX(-100%); transition: transform .25s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.35);
    }
    #screen-companies .sidebar.open { transform: translateX(0); }
}

/* ============ Ortak sayfa kabuğu (account.php / admin.php) ============ */
body.shell-body { background: var(--slate-100); margin: 0; }
.shell { display: flex; height: 100vh; overflow: hidden; }
.shell .sidebar { flex-shrink: 0; }
.shell .main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.shell-content { flex: 1; overflow-y: auto; padding: 24px; }
.shell-content > .card,
.shell-content > .alert,
.shell-content > form,
.shell-content > table { max-width: 1180px; }
.shell .topbar h2 { font-size: 1.15rem; }

@media (max-width: 860px) {
    .shell .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
        transform: translateX(-100%); transition: transform .25s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.35);
    }
    .shell .sidebar.open { transform: translateX(0); }
    .shell-content { padding: 14px; }
}
