/* =====================================================================
   E-DEFTER DENETLE — "SİCİL DEFTERİ" TASARIM SİSTEMİ
   style.css'ten SONRA yüklenir; sınıf sözleşmesi korunur, görünüm yenilenir.

   Dil: aktüeryal-editoryal. Sıcak kağıt zemin, mürekkep laciverti,
   kobalt vurgu, defter çizgisi dokusu, mono mali rakamlar.
   Tipografi: Bricolage Grotesque (başlık) · Hanken Grotesk (gövde)
              · IBM Plex Mono (rakam/kod) — tümü yerel barındırılır.
   ===================================================================== */
@import url('../fonts/fonts.css?v=sicil1');

:root {
    /* kağıt & mürekkep */
    --paper:      #f5f5ef;
    --paper-deep: #edeee6;
    --white:      #ffffff;
    --ink:        #0d2038;
    --ink-2:      #14294a;
    --ink-dim:    #46587280;
    --hairline:   rgba(13, 32, 56, .10);

    /* marka */
    --cobalt:      #2145e6;
    --cobalt-deep: #1733b8;
    --cobalt-wash: #e9edfd;
    --verdigris:   #0b8f6e;
    --verdi-wash:  #e4f5ef;

    /* nötr eşlemeler (style.css sözleşmesi) */
    --blue: var(--cobalt); --blue-dark: var(--cobalt-deep); --blue-50: var(--cobalt-wash);
    --slate-50: #f8f8f4; --slate-100: #f0f0ea; --slate-200: #e0e2da;
    --slate-300: #c8ccc2; --slate-400: #8d97a6; --slate-500: #5d6b80;
    --slate-600: #435672; --slate-700: #2c405e; --slate-800: #16304e; --slate-900: var(--ink);
    --green: var(--verdigris); --green-50: var(--verdi-wash);
    --red: #d5294b; --red-50: #fdeef1;
    --orange: #c77414; --orange-50: #fdf3e4;
    --indigo: #3b3bc4; --indigo-50: #ebebfa;
    --purple: #7d3bc4; --amber-50: #faf3df;

    --radius: 14px;
    --r-sm: 9px;
    --r-lg: 22px;
    --sh-1: 0 1px 2px rgba(13, 32, 56, .05);
    --sh-2: 0 1px 2px rgba(13, 32, 56, .05), 0 6px 18px -6px rgba(13, 32, 56, .10);
    --sh-3: 0 24px 48px -16px rgba(13, 32, 56, .25);
    --eo: cubic-bezier(.16, 1, .3, 1);

    --f-disp: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    --f-body: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
    --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

    font-size: 15px;
}

/* ---------------- temel ---------------- */
body {
    font-family: var(--f-body);
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    letter-spacing: .002em;
}
h1, h2, h3, h4 { font-family: var(--f-disp); letter-spacing: -.02em; color: var(--ink); }
a { color: var(--cobalt); font-weight: 600; }
a:hover { text-decoration: none; color: var(--cobalt-deep); }
::selection { background: #cdd8ff; color: var(--ink); }
.mono, code, kbd, td.mono, .mono * { font-family: var(--f-mono); font-size: .87em; letter-spacing: -.01em; }

* { scrollbar-width: thin; scrollbar-color: #b9beb2 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #b9beb2; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }

/* ---------------- butonlar ---------------- */
.btn {
    font-family: var(--f-body); font-weight: 700; font-size: .89rem; letter-spacing: .002em;
    padding: 10px 18px; border-radius: 10px;
    border: 1px solid #d4d7cc; background: var(--white); color: var(--ink);
    box-shadow: var(--sh-1);
    transition: transform .16s var(--eo), box-shadow .16s var(--eo),
                background .16s var(--eo), border-color .16s var(--eo);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); border-color: #bcc0b3; }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: var(--cobalt); border-color: var(--cobalt-deep); color: #fff;
    box-shadow: 0 2px 4px rgba(23, 51, 184, .25), 0 8px 20px -8px rgba(33, 69, 230, .55);
}
.btn-primary:hover { background: var(--cobalt-deep); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; box-shadow: none; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--slate-600); }
.btn-ghost:hover { background: rgba(13, 32, 56, .06); box-shadow: none; }
.btn-dark { background: var(--ink-2); border-color: #0a1930; color: #dfe6f2; }
.btn-dark:hover { background: #1b3560; }
.btn-green { background: var(--verdigris); border-color: #07724f; color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c2cc; }
.btn-danger:hover { background: var(--red-50); border-color: var(--red); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: .78rem; border-radius: 8px; }

/* ---------------- form ---------------- */
input, select, textarea {
    font-family: var(--f-body); font-size: .9rem;
    background: var(--white); color: var(--ink);
    border: 1px solid #d4d7cc; border-radius: 10px; padding: 10px 12px;
    transition: border-color .16s, box-shadow .16s;
}
input:hover, select:hover, textarea:hover { border-color: #b6bbac; }
input:focus, select:focus, textarea:focus {
    border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(33, 69, 230, .14); outline: none;
}
input[type=checkbox], input[type=radio] { accent-color: var(--cobalt); }
label { font-weight: 600; font-size: .82rem; color: var(--slate-600); }
.hint { color: var(--slate-500); }

/* ---------------- kart & yüzey ---------------- */
.card, .info-card, .stat-card, .module-card, .package-card, .tsk-report-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    box-shadow: var(--sh-2);
}
.card > .head, .info-card .head {
    font-family: var(--f-disp); font-weight: 700; font-size: .98rem;
    border-bottom: 1px solid var(--slate-100);
}
.stat-card:hover, .module-card:hover { box-shadow: var(--sh-3); transform: translateY(-3px); transition: all .2s var(--eo); }
.stat-card .num { font-family: var(--f-mono); font-weight: 600; letter-spacing: -.03em; }

.tag {
    font-family: var(--f-mono); font-size: .66rem; font-weight: 600; letter-spacing: .05em;
    padding: 3px 9px; border-radius: 6px; text-transform: uppercase;
    background: var(--slate-100); color: var(--slate-600); border: 1px solid var(--slate-200);
}
.tag.blue  { background: var(--cobalt-wash); color: var(--cobalt-deep); border-color: #ccd7fb; }
.tag.green { background: var(--verdi-wash); color: #076a51; border-color: #bfe8da; }
.tag.amber { background: var(--amber-50); color: #8a6510; border-color: #ecd9a4; }

/* ---------------- tablolar: defter satırları ---------------- */
table.data { border-collapse: separate; border-spacing: 0; font-size: .86rem; }
table.data thead th {
    font-family: var(--f-mono); font-size: .68rem; font-weight: 600;
    letter-spacing: .09em; text-transform: uppercase;
    background: var(--slate-50); color: var(--slate-500);
    border-bottom: 2px solid var(--ink);
    padding: 10px 12px; position: sticky; top: 0; z-index: 2; text-align: left;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); }
table.data tbody tr:hover { background: var(--cobalt-wash); }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--f-mono); font-size: .82rem; }
table.data .neg { color: var(--red); font-weight: 600; }
table.data tr.dup { background: var(--red-50); }

/* ---------------- uyarılar ---------------- */
.alert { border-radius: 10px; border: 1px solid transparent; font-size: .87rem; line-height: 1.65; }
.alert-error   { background: var(--red-50); color: #a01c39; border-color: #f3c2cc; }
.alert-success { background: var(--verdi-wash); color: #076a51; border-color: #bfe8da; }
.alert-info    { background: var(--cobalt-wash); color: var(--cobalt-deep); border-color: #ccd7fb; }

/* ---------------- kenar çubuğu: mürekkep cilt ---------------- */
.sidebar {
    background:
        linear-gradient(160deg, #102440 0%, #0b1a30 60%, #081426 100%);
    border-right: 1px solid #06101f;
}
.sidebar-brand .brand, .sidebar-brand strong { font-family: var(--f-disp); font-weight: 800; letter-spacing: -.02em; color: #fff; }
.brand-icon {
    background: var(--cobalt); border-radius: 9px;
    font-family: var(--f-disp); font-weight: 800;
    box-shadow: 0 4px 14px -4px rgba(33, 69, 230, .8);
}
.nav-section {
    font-family: var(--f-mono); font-size: .6rem; font-weight: 600;
    letter-spacing: .22em; color: #4d5f80; text-transform: uppercase;
    padding: 16px 12px 6px;
}
.nav-item {
    font-family: var(--f-body); font-weight: 600; font-size: .855rem;
    color: #9fb0cd; border-radius: 9px; border-left: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(33, 69, 230, .32), rgba(33, 69, 230, .10));
    border-left-color: #6d8bff; color: #fff;
}
.sidebar input, .sidebar select {
    background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #e8edf7;
}
.sidebar .fl, .sidebar .label { color: #63739200; }
.sidebar-filters .label, .active-firm-box .label, .filter-group .label {
    font-family: var(--f-mono); font-size: .6rem; letter-spacing: .18em; color: #556686;
}
.active-firm-box, .sidebar .active-firm {
    background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px;
}
.hs-avatar { background: var(--cobalt); border-radius: 9px; font-family: var(--f-disp); }
.hs-lic-plan { background: var(--cobalt); font-family: var(--f-mono); letter-spacing: .08em; }
.hs-lic .lim-bar > div { background: #6d8bff; }
.hs-name { font-family: var(--f-disp); }

/* ---------------- üst çubuk ---------------- */
.topbar {
    background: rgba(245, 245, 239, .85);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--hairline);
}
.topbar h1, .topbar h2, #topbar-title { font-family: var(--f-disp); font-weight: 800; letter-spacing: -.025em; font-size: 1.22rem; }
.topbar-period { font-family: var(--f-mono); font-size: .74rem; color: var(--slate-500); }
.view-container { background: var(--paper); }
.view-container > * { animation: uiRise .34s var(--eo) both; }
@keyframes uiRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------- modal ---------------- */
.modal-overlay, .tsk-modal-overlay { background: rgba(9, 20, 38, .5); backdrop-filter: blur(5px); }
.modal-box, .tsk-modal { border-radius: var(--r-lg); box-shadow: var(--sh-3); border: 1px solid var(--slate-200); }
.modal-box { animation: uiPop .2s var(--eo) both; }
@keyframes uiPop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { font-family: var(--f-disp); }

/* ---------------- auth sayfaları ---------------- */
body.auth-page, body.auth {
    background:
        radial-gradient(700px 420px at 85% -5%, #dfe6fb 0%, transparent 55%),
        var(--paper);
}
.auth-card { border-radius: var(--r-lg); box-shadow: var(--sh-3); border: 1px solid var(--slate-200); }
.auth-card h1 { font-family: var(--f-disp); font-weight: 800; }

/* =====================================================================
   LANDING — "sicil defteri" editoryal sayfa
   ===================================================================== */
.landing { background: var(--paper); }
.landing-header {
    background: rgba(245, 245, 239, .82);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--hairline);
}
.landing-header .brand { font-family: var(--f-disp); font-weight: 800; letter-spacing: -.02em; }

/* -------- hero -------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 460px at 88% -10%, #dbe3fb 0%, transparent 55%),
        var(--paper);
    padding: 76px 0 70px;
}
/* defter çizgisi dokusu */
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: repeating-linear-gradient(
        to bottom, transparent 0 31px, rgba(13, 32, 56, .045) 31px 32px);
    mask-image: linear-gradient(#000 30%, transparent 90%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em;
    background: var(--white); border: 1px solid var(--slate-200); border-radius: 99px;
    padding: 7px 14px; color: var(--slate-600); box-shadow: var(--sh-1);
    animation: uiRise .5s var(--eo) both;
}
.hero h1 {
    font-family: var(--f-disp); font-weight: 800;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.04; letter-spacing: -.035em;
    margin: 20px 0 18px;
    animation: uiRise .5s var(--eo) .06s both;
}
.hero h1 .accent { position: relative; color: var(--cobalt); white-space: nowrap; }
.hero h1 .accent::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: .04em; height: .14em;
    background: linear-gradient(90deg, var(--cobalt), var(--verdigris));
    border-radius: 3px; opacity: .3;
}
.hero-sub {
    font-size: 1.02rem; line-height: 1.8; color: var(--slate-600); max-width: 56ch;
    animation: uiRise .5s var(--eo) .12s both;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; animation: uiRise .5s var(--eo) .18s both; }
.hero-note { font-family: var(--f-mono); font-size: .74rem; color: var(--slate-500); margin-top: 14px; animation: uiRise .5s var(--eo) .24s both; }

/* canlı denetim kartı (mock) */
.hero-ledger {
    background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--r-lg);
    box-shadow: var(--sh-3); padding: 22px; position: relative;
    animation: uiRise .6s var(--eo) .2s both;
}
.hero-ledger::before {
    content: 'CANLI DENETİM'; position: absolute; top: -11px; left: 20px;
    font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em;
    background: var(--ink); color: #cfe0ff; padding: 4px 10px; border-radius: 6px;
}
.hl-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 11px 2px; border-bottom: 1px dashed var(--hairline);
    font-size: .87rem;
}
.hl-row:last-child { border-bottom: 0; }
.hl-row .k { color: var(--slate-600); }
.hl-row .v { font-family: var(--f-mono); font-weight: 600; font-size: .82rem; }
.hl-ok { color: var(--verdigris); }
.hl-warn { color: var(--orange); }
.hl-bar { height: 7px; border-radius: 99px; background: var(--slate-100); overflow: hidden; flex: 1; max-width: 130px; }
.hl-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--verdigris), var(--cobalt)); animation: hlFill 1.4s var(--eo) .5s both; }
@keyframes hlFill { from { width: 0; } }

/* -------- istatistik şeridi -------- */
.stat-strip { border-block: 1px solid var(--hairline); background: var(--white); }
.stat-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-cell { padding: 22px 16px; text-align: center; border-left: 1px solid var(--hairline); }
.stat-cell:first-child { border-left: 0; }
.stat-cell b { display: block; font-family: var(--f-mono); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.stat-cell span { font-size: .78rem; color: var(--slate-500); }

/* -------- süreç adımları -------- */
.flow-section { padding: 74px 0; }
.flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.flow-card { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 20px; position: relative; }
.flow-card .no {
    font-family: var(--f-mono); font-weight: 600; font-size: .72rem; letter-spacing: .1em;
    color: var(--cobalt); display: block; margin-bottom: 10px;
}
.flow-card h3 { font-size: .98rem; margin-bottom: 7px; }
.flow-card p { font-size: .84rem; line-height: 1.7; color: var(--slate-500); }

/* -------- modüller -------- */
.modules-section { padding: 74px 0; background: var(--paper-deep); border-block: 1px solid var(--hairline); }
.section-head h2 { font-family: var(--f-disp); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.section-head p { color: var(--slate-500); margin-top: 8px; }
.module-grid { margin-top: 34px; }
.module-card { padding: 22px; position: relative; transition: transform .2s var(--eo), box-shadow .2s var(--eo); }
.module-card .m-no {
    position: absolute; top: 18px; right: 18px;
    font-family: var(--f-mono); font-size: .68rem; font-weight: 600; letter-spacing: .12em;
    color: var(--slate-400);
}
.module-card .module-icon { font-size: 1.55rem; }
.module-card h3 { font-size: .99rem; margin: 12px 0 7px; }
.module-card p { font-size: .85rem; line-height: 1.72; color: var(--slate-500); }
.module-card.is-addon { border: 1.5px solid var(--cobalt); }
.module-card.is-addon .m-no { color: var(--cobalt); }
.module-card .addon-tag {
    display: inline-block; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em;
    background: var(--cobalt-wash); color: var(--cobalt-deep); border-radius: 6px;
    padding: 3px 8px; margin-bottom: 8px;
}

/* -------- güvenlik: mürekkep bant -------- */
.security-band {
    background:
        repeating-linear-gradient(to bottom, transparent 0 35px, rgba(255, 255, 255, .035) 35px 36px),
        linear-gradient(165deg, #102440 0%, #0b1a30 65%, #081426 100%);
    padding: 74px 0;
}
.security-band .section-head h2 { color: #fff; }
.security-band .section-head p { color: #8fa2c4; }
.sec-item {
    background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius); padding: 20px;
    transition: background .2s, transform .2s var(--eo);
}
.sec-item:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
.sec-item h4 { color: #fff; font-size: .96rem; margin-bottom: 8px; }
.sec-item p { color: #9db0d0; font-size: .84rem; line-height: 1.72; }

/* -------- paketler -------- */
.packages-section { padding: 74px 0; }
.package-card { padding: 26px 22px; text-align: center; }
.pkg-name { font-family: var(--f-disp); font-weight: 800; font-size: 1.1rem; }
.pkg-num { font-family: var(--f-mono); font-weight: 600; font-size: 1.5rem; color: var(--ink); }
.package-card.demo { border: 1.5px solid var(--verdigris); box-shadow: 0 0 0 4px var(--verdi-wash), var(--sh-2); }

/* -------- CTA & footer -------- */
.cta-band {
    background: linear-gradient(120deg, var(--cobalt-deep), var(--cobalt) 55%, #4463f0);
    padding: 64px 0; text-align: center;
}
.cta-band h2 { color: #fff; font-family: var(--f-disp); font-weight: 800; letter-spacing: -.03em; }
.cta-band p { color: #cdd9ff; margin: 10px 0 22px; }
.cta-band .btn-primary { background: #fff; color: var(--cobalt-deep); border-color: #fff; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.landing-footer { background: #081426; color: #7d8fb0; }
.landing-footer a { color: #a9b8d6; }

/* ---------------- duyarlılık ---------------- */
@media (max-width: 1000px) {
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .flow-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-strip .container { grid-template-columns: repeat(2, 1fr); }
    .stat-cell:nth-child(3) { border-left: 0; }
}
@media (max-width: 860px) {
    :root { font-size: 14.5px; }
    input, select, textarea { font-size: 16px; }  /* iOS zoom engeli */
    .btn { padding: 11px 16px; }
    .btn-sm { padding: 8px 12px; }
    .hero { padding: 48px 0 44px; }
    .landing-nav .btn-ghost[href^="#"] { display: none; }
    .flow-section, .modules-section, .security-band, .packages-section { padding: 48px 0; }
    .card { overflow-x: auto; }
}
@media (max-width: 560px) {
    .flow-grid { grid-template-columns: 1fr; }
    .stat-strip .container { grid-template-columns: repeat(2, 1fr); }
    .hero-actions .btn { width: 100%; }
}
@media (hover: none) {
    .btn:hover, .stat-card:hover, .module-card:hover { transform: none; }
}
@media print {
    .sidebar, .topbar, .btn, .sidebar-backdrop { display: none !important; }
    body, .view-container { background: #fff !important; }
    .card { box-shadow: none !important; break-inside: avoid; }
}

/* =====================================================================
   KONTRAST DÜZELTMESİ — koyu zeminli alanlarda başlık/metin daima açık.
   (Genel h1–h4 mürekkep rengi kuralı bu bağlamlarda geçersiz kılınır.)
   ===================================================================== */
.modal-head, .modal-head h1, .modal-head h2, .modal-head h3, .modal-head h4,
.modal-head span, .modal-head .head-note,
.tsk-modal-head, .tsk-modal-head span, .tsk-modal-head h3,
.info-card .head, .info-card .head h3, .info-card .head h4,
.sidebar h1, .sidebar h2, .sidebar h3, .sidebar h4,
.sidebar-brand strong, .sidebar-brand div,
.security-band h2, .security-band h3, .security-band h4,
.cta-band h2, .cta-band h3,
.tsk-toolbar, .tsk-toolbar span, .tsk-submenu, .tsk-submenu span {
    color: #fff;
}
.modal-head .hint, .tsk-modal-head .hint, .info-card .head .hint { color: #b9c6e2; }
/* Koyu başlıktaki kapatma (✕) düğmeleri */
.modal-head .btn-ghost, .modal-close, .tsk-modal-x { color: #cdd8ef; }
.modal-head .btn-ghost:hover, .modal-close:hover, .tsk-modal-x:hover { color: #fff; background: rgba(255,255,255,.12); }
/* Tablo alt toplam satırı (koyu zemin) */
table.data tfoot td { color: #fff; }
