/* Bilimplant H-Kit web arayuzu.
   Marka: turkuaz #2AB4C0 + siyah, beyaz zemin. Mockup'a sadik modern gorunum. */

:root {
    --brand: #2AB4C0;
    --brand-dark: #1E98A3;
    --brand-pale: #E9F7F8;
    --ink: #17252A;
    --ink-soft: #5A6B72;
    --line: #E3EBEE;
    --card: #FFFFFF;
    --page: #F7FAFB;
    --danger: #C0392B;
    --warn-bg: #FFF6E5;
    --warn-border: #F0C36D;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", "Inter", Arial, sans-serif;
    background:
        radial-gradient(1100px 500px at -10% 20%, var(--brand-pale) 0%, rgba(233,247,248,0) 60%),
        radial-gradient(1100px 500px at 110% 70%, var(--brand-pale) 0%, rgba(233,247,248,0) 60%),
        var(--page);
    color: var(--ink);
    /* Dikey akis: ust bar - icerik - alt bilgi. Icerik esner, boylece kisa
       sayfalarda alt bilgi ekranin dibine oturur, uzun sayfalarda asagi iner.
       Ayrica calisma alaninin yuksekligi sabit piksel yerine bu esnemeden
       hesaplanir; tarayici yakinlastirmasinda tasma olusmaz.
       aurora-bg ve side-art-canvas position:fixed olduklari icin flex ogesi
       sayilmaz, bu duzeni etkilemezler. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Ust bar ---------- */

.topbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 8px rgba(23, 37, 42, 0.04);
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Logo pencerenin gercek sol kenarina yaslanir (ortalanmis kutu yok). */
.topbar-inner {
    padding: 0px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 76px; }
.brand-text {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #0B0B0B;
}
.brand-accent { color: var(--brand); }

.topbar-right { display: flex; align-items: center; gap: 22px; }

.lang-form { display: flex; align-items: center; gap: 8px; }
.lang-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 4px 2px;
}
.lang-btn:hover { color: var(--brand-dark); }
.lang-active { color: var(--brand); }
.lang-sep { color: var(--line); }

.login-pill, .account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 18px;
    background: #FFFFFF;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.login-pill:hover, .account-toggle:hover { border-color: var(--brand); color: var(--brand-dark); }
.account-icon { font-size: 15px; }
.chevron { font-size: 11px; color: var(--ink-soft); }

.account-menu { position: relative; }
.account-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(23, 37, 42, 0.10);
    padding: 8px;
    z-index: 30;
}
.account-dropdown.open { display: block; }
.account-dropdown a, .dropdown-logout {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.account-dropdown a:hover, .dropdown-logout:hover { background: var(--brand-pale); color: var(--brand-dark); }

/* ---------- Ana govde ---------- */

/* z-index: 1 SART. aurora-bg konumlandirilmis (position:fixed) ve z-index:0
   oldugundan, konumlandirilmamis icerigin UZERINE boyanir; kartlar bu yuzden
   saydammis gibi gorunuyordu. Icerigi kendi katmanina alarak arka planin
   ustune cikariyoruz. */
.page-main {
    position: relative;
    z-index: 1;
    /* width: 100% SART. body bir FLEX kapsayicidir (column) ve bu ogede
       "margin: 0 auto" var. Flex icinde otomatik kenar boslugu, ogeyi
       germe (stretch) davranisindan CIKARIR: oge icerigi kadar genis olur ve
       max-width hicbir ise yaramaz. Olculdu (Chrome, 1904px pencere):
       width olmadan max-width 1600px iken gercek genislik 511px cikiyordu -
       yani liste genisligini degistirmek icin yapilan tum max-width
       ayarlamalari etkisizdi. width: 100% ogeyi tekrar tam genislige oturtur,
       max-width ust sinir, margin auto da ortalama gorevini yapar. */
    width: 100%;
    max-width: min(1200px, 92vw);
    margin: 0 auto;
    padding: 22px 24px 40px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

/* Ana sayfa: icerik ust bar haric ekrani dikeyde doldurur ve ortalanir. */
.landing {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 146px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Kenarlardaki fareyi takip eden nokta-ag animasyonu (side-art.js cizer). */
.side-art-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: none;
}

/* Sayfa basligi: urun adi (fotograftaki gibi genis harf araliginda). */
.hero { text-align: center; margin-bottom: 22px; }
.hero-title {
    font-size: 34px;
    font-weight: 300;
    letter-spacing: 0.34em;
    text-indent: 0.34em; /* letter-spacing sondaki bosluk kaymasini dengeler */
    color: var(--ink);
}
.hero-accent { color: var(--brand); font-weight: 600; }
.hero-tagline {
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 13.5px;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
}

/* Bilgi bantlari */
.pending-banner, .login-banner, .error-banner, .info-banner {
    max-width: 760px;
    margin: 0 auto 24px;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    text-align: center;
}
.pending-banner { background: var(--warn-bg); border: 1px solid var(--warn-border); color: #7A5A17; }
.login-banner { background: var(--brand-pale); border: 1px solid #BFE7EA; color: #146770; }
.login-banner-link { color: var(--brand-dark); font-weight: 700; }
.error-banner { background: #FDEDEB; border: 1px solid #EFB4AC; color: var(--danger); }
.info-banner { background: var(--brand-pale); border: 1px solid #BFE7EA; color: #146770; }

/* Yukleme kartlari: kesikli cerceve kartin tamamini sarar;
   solda surukle-birak bolgesi, sagda dosya secme alani. */
.upload-card {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.05);
    padding: 16px 24px 18px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto 18px;
}

.upload-disabled .dropzone { pointer-events: none; }

/* Yukleme yetkisi yokken: kartlar ve baslat alani buzlanir, uzerine
   ortalanmis giris/onay paneli biner. Sayfa yuksekligi degismez. */
.upload-stack { position: relative; }
.upload-stack-locked > .upload-card,
.upload-stack-locked > .start-area {
    filter: blur(3px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}
.upload-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-lock-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(23, 37, 42, 0.14);
    padding: 26px 34px;
    max-width: 400px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}
.upload-lock-icon { font-size: 30px; margin-bottom: 10px; }
.upload-lock-btn { margin-top: 14px; }

.card-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }

.dropzone {
    border: 2px dashed #9FD9DE;
    border-radius: 12px;
    background: #FDFEFE;
    transition: border-color 0.15s, background-color 0.15s;
    cursor: pointer;
}
.dropzone:hover { border-color: var(--brand); }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-pale); }
.dropzone.has-file { border-style: solid; border-color: var(--brand); background: var(--brand-pale); }

.upload-split {
    display: flex;
    align-items: stretch;
    min-height: clamp(140px, 19vh, 220px);
}
/* Iki yarim da icerigini dikey/yatay tam ortalar; satirlar arasi bosluk
   "gap" ile sabit tutulur ki ogeler dagilmis gorunmesin. */
/* Iki yarim ayni satir duzenindedir (ikon / baslik / aciklama / alt satir);
   boylece basliklar ve metinler iki tarafta ayni hizada durur. */
.drop-left, .choose-side {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 16px 18px;
    min-height: 156px;
}
.choose-side {
    position: relative; /* "veya" rozeti ayirac cizgisine oturur */
    border-left: 1px dashed #BFE3E6;
}

/* Ayirac cizgisinin ortasindaki "veya" rozeti. */
.split-or {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    z-index: 1;
}

.dropzone-icon { line-height: 0; }
.dropzone-title { font-size: 15.5px; font-weight: 700; }
.dropzone-hint {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.35;
    max-width: 280px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chosen-file { font-size: 13px; font-weight: 600; color: var(--brand-dark); }

/* Kart alt bilgisi: secilen dosya adi + iki alan icin ORTAK format notu,
   TEK SATIRDA ortada (dosya secilince kart yukselmez, sayfa kaymaz).
   Ustteki yatay kesikli cizgi, dikey ayiracin "T" seklinde oturdugu sinirdir. */
.dropzone-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 16px;
    border-top: 1px dashed #BFE3E6;
    padding: 10px 0 12px;
}
.dropzone-footer .chosen-file:empty { display: none; }
.dropzone-footer .chosen-file {
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-input-hidden { display: none; }

.formats-note { text-align: center; color: var(--ink-soft); font-size: 12px; min-height: 18px; margin: 0; }
.formats-list { color: var(--brand-dark); font-weight: 700; }

/* Islemi baslat */
.start-area { text-align: center; margin-top: 18px; }

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--brand);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 13px 56px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(42, 180, 192, 0.35);
    transition: background-color 0.15s, transform 0.1s;
}
.start-btn:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); }
.start-btn:disabled { background: #A8D8DC; cursor: not-allowed; box-shadow: none; }
.start-icon { font-size: 17px; }

/* ---------- Uyelik kartlari ---------- */

.auth-card {
    max-width: 440px;
    margin: 30px auto 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.05);
    padding: 34px 36px 30px;
    text-align: center;
}

.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 20px; }

.field-label { display: block; text-align: left; font-size: 13.5px; font-weight: 600; margin: 14px 0 6px; color: var(--ink-soft); }
.field-hint { text-align: left; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.field-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 15px;
    outline: none;
}
.field-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42, 180, 192, 0.15); }

.field-password-wrap { position: relative; }
.field-password-wrap .field-input { padding-right: 42px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.password-toggle:hover { color: var(--ink); background: rgba(0, 0, 0, 0.04); }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 4px;
    font-size: 14px;
    color: var(--ink-soft);
    cursor: pointer;
}

.auth-btn {
    display: inline-block;
    width: 100%;
    margin-top: 18px;
    background: var(--brand);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.auth-btn:hover { background: var(--brand-dark); }
.auth-btn-link { width: auto; padding: 12px 34px; }
.auth-btn-small { width: auto; margin-top: 0; padding: 7px 16px; font-size: 13px; white-space: nowrap; }

.auth-links { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.auth-links a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links-sep { margin: 0 8px; }

.register-note { text-align: left; font-size: 13px; color: var(--ink-soft); margin-top: 14px; line-height: 1.5; }

.pending-big-icon { font-size: 44px; margin-bottom: 8px; }
.pending-text { font-size: 15.5px; line-height: 1.55; margin-bottom: 8px; }
.pending-subtext { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 8px; }

/* ---------- Tablolar (Islerim, Admin) ---------- */

/* Is listesi genis ekranda dar bir serit gibi duruyordu (once 980, sonra 1240px).
   Sabit piksel yerine ekranla olceklenen bir sinir kullanilir: genis monitorde
   liste ekrani doldurur, kucuk ekranda kenar boslugu korunur.
   Sayfa icindeki diger kartlar kendi max-width'lerini tasidigi icin
   (.upload-card 900, .legal-page 820, .auth-card 440) bu genisletme yalnizca
   is listesini etkiler. */
.table-page { max-width: min(1200px, 92vw); margin: 0 auto; }
.table-title { font-size: 28px; font-weight: 800; margin-bottom: 20px; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.05);
}
.data-table th {
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ink-soft);
    background: #FBFDFD;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}
.data-table td { padding: 13px 16px; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #FBFDFD; }

.badge { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-queued { background: var(--warn-bg); color: #7A5A17; border: 1px solid var(--warn-border); }
.badge-running { background: var(--brand-pale); color: #146770; border: 1px solid #BFE7EA; }
.badge-done { background: #E8F7EE; color: #1E7A43; border: 1px solid #B4E3C6; }
.badge-failed { background: #FDEDEB; color: var(--danger); border: 1px solid #EFB4AC; }
/* Suresi dolmus (islem hic baslatilmamis) is: hata degil, notr gri. */
.badge-expired { background: #F1F4F5; color: var(--ink-soft); border: 1px solid var(--line); }

/* ---------- Islerim: guncel calisma karti + kompakt gecmis ---------- */

.workspace-card {
    display: block;
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.06);
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}
.workspace-card:hover { border-color: var(--brand); }
/* Baslik ve durum rozeti: dar kartta yan yana sikisiyordu. Aralik buyutuldu ve
   sarma acildi; yer kalmayinca rozet alt satira gecer, uzerine binmez.
   padding-right, sag ustteki silme dugmesine yer birakir. */
.workspace-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
    padding-right: 34px;
}
.workspace-card-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-soft); }
.workspace-card-body { margin: 14px 0 18px; }
.workspace-card-file { font-size: 19px; font-weight: 700; }
.workspace-card-date { color: var(--ink-soft); font-size: 13.5px; margin-top: 4px; }
.workspace-card-progress { color: var(--brand-dark); font-size: 13.5px; margin-top: 8px; font-weight: 600; }
.workspace-card-open { display: inline-flex; padding: 11px 28px; font-size: 14px; }
.workspace-card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.workspace-history-title { font-size: 15px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.4px; margin: 26px 0 10px; }
.history-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.history-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    padding: 12px 48px 12px 16px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}
.history-row:hover { background: #FBFDFD; }
.history-row-link {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.history-date { color: var(--ink-soft); font-size: 13px; flex: 0 0 auto; min-width: 120px; }

/* Saklama suresi dolmus is: dosyalari silindigi icin acilamaz. Satir listede
   kalir ama SOLUK gorunur ve tiklanamaz; kullanici isin var oldugunu ve neden
   acilamadigini gorsun (bkz. Jobs/Index.cshtml.cs -> IsDataDeleted). */
.history-row-expired { background: #FAFBFB; }
.history-row-expired:hover { background: #FAFBFB; }
.history-row-expired .history-row-link { cursor: default; opacity: 0.55; }
.workspace-card-expired .workspace-card-body { opacity: 0.55; }
/* Rozetin bosalttigi yerde isin yasi ("6 gun once"). Rozet gibi kutu degil,
   duz gri metin: satirin geri kalani zaten soluk, kutu dikkat cekerdi. */
.history-age {
    color: var(--ink-soft);
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
}
.start-btn.is-expired {
    background: #C9D4D6;
    cursor: default;
    box-shadow: none;
    pointer-events: none;
}

.history-file { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-delete-form { margin: 0; }
.job-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #EFB4AC;
    background: #FDEDEB;
    color: var(--danger);
    border-radius: 999px;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.job-delete-btn:hover { background: #F9D8D4; }
.job-delete-btn-small { width: 26px; height: 26px; font-size: 18px; }
.workspace-delete-form {
    position: absolute;
    top: 14px;
    right: 14px;
}
.history-delete-form {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
}

/* ---------- Mastar atama ekrani ---------- */

/* Atama sayfasi tam genislik calisir; page-main kutusu devre disi kalir. */
.page-main-wide {
    max-width: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Tam ekran 3D calisma alani: ust barin altindaki tum alani kaplar.
   Sekmeler + gorunum araclari sol ustte, atama paneli sagda yuzer. */
/* Yukseklik ARTIK sabit piksele dayanmiyor. Onceden "calc(100vh - 77px)" ile
   ust barin yuksekligi elle yaziliyordu; tarayici yakinlastirmasi %100'un
   uzerine cikinca ust bar bu degerden yuksek kaliyor, calisma alani ekrandan
   tasip arkadaki zemin gorunuyordu. Artik alan, kalan bosluga gore esner. */
.assign-workspace {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.assign-workspace.viewer-fullscreen-css {
    position: fixed;
    inset: 0;
    z-index: 9999;
    height: auto;
    background: var(--page);
}

.assign-file-name {
    color: var(--ink-soft);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.assign-new-link {
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 12px;
}
.assign-new-link:hover { border-color: var(--brand); background: var(--brand-pale); }

/* Sag ust bindirme: gorunum araclari. */
.viewer-overlay-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 6;
}

/* Sag alt bindirme: Tarama / Ikinci Dosya / Sonuc / Sapma Haritasi. */
.viewer-overlay-tabs {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 6;
    display: flex;
    justify-content: flex-end;
    max-width: 48vw;
}

.assign-error-float {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 7;
    max-width: 60%;
}

/* Veri kumesi sekmeleri: Tarama / Ikinci Dosya / Sonuc / Sapma Haritasi. */
.dataset-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dataset-tab {
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.dataset-tab:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-dark); }
.dataset-tab-active { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.dataset-tab:disabled { opacity: 0.45; cursor: not-allowed; }

/* Gorunum araclari: sifirla/tam-ekran/ayarlar. */
.viewer-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(23, 37, 42, 0.07);
    padding: 6px 8px;
}
.viewer-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #F7FAFB;
    color: var(--ink);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.viewer-tool:hover { border-color: var(--brand); color: var(--brand-dark); }
.viewer-tool-icon { font-size: 14px; line-height: 1; }
.viewer-tool-active, .viewer-tool[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #FFFFFF;
}
.viewer-tool-primary { font-weight: 700; }

/* Sadece ikon gosteren kucuk araclar; islev title/ipucuyla anlasilir. */
.viewer-tool-icononly {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    line-height: 1;
}
.viewer-tool-svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.toolbar-new-link { margin-left: 4px; font-size: 12.5px; padding: 7px 10px; background: #FFFFFF; }

/* Ayarlar penceresi (disli butonun altina acilir). */
.viewer-settings { position: relative; display: inline-flex; }
.settings-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 210px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(23, 37, 42, 0.14);
    padding: 12px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: none;
    background: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}
.settings-switch {
    flex: 0 0 auto;
    width: 34px;
    height: 19px;
    border-radius: 999px;
    background: #D5DEE1;
    position: relative;
    transition: background-color 0.15s;
}
.settings-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(23, 37, 42, 0.25);
    transition: left 0.15s;
}
.settings-row[aria-pressed="true"] .settings-switch { background: var(--brand); }
.settings-row[aria-pressed="true"] .settings-switch-knob { left: 17px; }
.settings-label { font-size: 13px; color: var(--ink); font-weight: 600; }
.model-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.model-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 1px var(--line);
    cursor: pointer;
    padding: 0;
}
.model-color-active { box-shadow: 0 0 0 2px var(--brand); }
.viewer-tool-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 2px; }
.viewer-tool-flex { flex: 1 1 auto; }
.viewer-tool-disabled, .viewer-tool:disabled { opacity: 0.45; cursor: not-allowed; }

/* Viewer calisma alaninin tamamini kaplar (kenarliksiz, tam genislik). */
.assign-viewer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: radial-gradient(900px 520px at 25% -10%, #FFFFFF 0%, #F2F5F6 60%);
}
/* Tuvalin OLCUSUNU CSS belirler, three.js degil (renderer.setSize'a
   updateStyle=false gecilir). Onceden three.js satir ici width/height px
   yaziyordu; tarayici yakinlastirmasinda kapsayici kesirli bir genislige
   gecince tuval eski olcude kalip kenarlarda zemin serit halinde goruluyordu.
   %100 ile tuval her zaman kapsayiciyi doldurur, yakinlastirma ne olursa olsun. */
.assign-viewer canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.assign-viewer canvas.dragging { cursor: grabbing; }
.assign-viewer canvas.picking { cursor: crosshair; }

.viewer-status {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
}
.viewer-mode-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 5;
    display: none;
    max-width: min(560px, 44vw);
    background: rgba(23, 37, 42, 0.82);
    color: #FFFFFF;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 8px;
    pointer-events: none;
}
.viewer-mode-hint.mode-hint-active { background: rgba(30, 152, 163, 0.92); }

/* Is kuyrukta/calisirken viewer'in uzerine binen ilerleme karti. */
.viewer-progress-overlay {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(242, 245, 246, 0.72);
}
.viewer-progress-card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(23, 37, 42, 0.12);
    padding: 22px 28px;
    width: 320px;
    max-width: 90%;
    text-align: center;
}
.viewer-progress-title { font-size: 15.5px; font-weight: 700; margin-bottom: 12px; }
.viewer-progress-message { margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }

/* Sol yuzen panel: dosya adi, Yuzey Sec, lejant, atama listesi, Hesapla. */
.assign-panel {
    position: absolute;
    top: 14px;
    left: 14px;
    bottom: 14px;
    width: 340px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(23, 37, 42, 0.10);
    padding: 14px;
    /* Panelin TEK yazi olcegi. Alt ogeler kendi boyutunu tanimlamaz; yalnizca
       ikincil bilgiler (sayac, durum, olcum) bir tik kucuk kalir. Onceden
       12.5 / 13 / 13.5 px karisik kullaniliyordu ve satirlar birbirine gore
       kaymis gorunuyordu. */
    font-size: 13px;
}
.assign-panel-head { display: flex; align-items: center; min-width: 0; }
.panel-select-btn { width: 100%; justify-content: center; padding: 11px 12px; font-size: 14px; }
.panel-picking { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1 1 auto; }
.panel-new-link { text-align: center; margin-top: auto; }
.panel-result { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1 1 auto; }
.result-socket-list { flex: 1 1 auto; overflow-y: auto; min-height: 140px; }
.panel-failed { display: flex; flex-direction: column; gap: 10px; }
.assignment-list-head { display: flex; justify-content: flex-end; padding: 0 2px; }
.assignment-count { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.assignment-list { flex: 1 1 auto; overflow-y: auto; min-height: 140px; }
.assignment-empty { color: var(--ink-soft); padding: 12px; }
.assignment-row {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #FFFFFF;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.assignment-row:hover { border-color: #BFE7EA; }
.assignment-row-active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(42, 180, 192, 0.18); }
.assignment-row-head { display: flex; align-items: center; gap: 8px; }
.assignment-dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; }
/* flex:1 1 auto SART: atama listesinde basligin genislemesi silme dugmesini
   satirin sagina iter. Sonuc listesinde bu istenmez, asagida ezilir. */
.assignment-title { font-weight: 700; flex: 1 1 auto; }
/* Sonuc durumu (Eslesti / Eslesmedi) basligin hemen yaninda durur. */
.assignment-row-head-result .assignment-title { flex: 0 1 auto; }
.assignment-status { color: var(--ink-soft); font-size: 12px; flex: 1 1 auto; }
.assignment-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    background: #F1F4F5;
    color: var(--ink-soft);
    border-radius: 8px;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
}
.assignment-remove:hover { background: #FDEDEB; color: var(--danger); border-color: #EFB4AC; }
.assignment-options { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.assignment-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 3px 6px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}
.assignment-option:hover { background: var(--brand-pale); }
/* Mastar ORNEGI secimi (L1/L2/L3). Tip radyolarinin altinda, daha kucuk ve
   sessiz dururlar: bugun zorunlu degiller ve hesabi etkilemiyorlar
   (bkz. MASTAR_SECIMI_PLANI.md). */
/* Sol kenar tip radyolariyla ayni hizada baslar: .assignment-option'in 6px ic
   boslugu burada padding olarak tekrarlanir, yoksa "Parca No" satiri radyolara
   gore 6px sola kaymis gorunuyor. */
.assignment-master {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-left: 6px;
    flex-wrap: wrap;
}
/* Etiket ve dugmeler panelin olcegini kullanir; ayrim RENKLE ve cerceveyle
   yapilir, font boyutuyla degil. Farkli boyut kullanildiginda satir tip
   radyolarina gore kaymis gorunuyordu. */
.assignment-master-label {
    color: var(--ink-soft);
    margin-right: 2px;
}
.master-btn {
    /* Sabit olcu: numaralar tek hane oldugu icin ucu de birebir ayni kutuda
       durur, satir hizasi tipten tipe kaymaz. */
    width: 28px;
    height: 24px;
    padding: 0;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--card);
    color: var(--ink-soft);
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}
.master-btn:hover { border-color: var(--brand); color: var(--ink); }
.master-btn-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.assignment-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}
.assignment-measure { margin-top: 6px; color: var(--ink-soft); font-size: 12px; }
.assign-warning {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    color: #7A5A17;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
}

/* Hesaplama sapmasi uyarisi: gozden kacmamasi icin daha belirgin
   (sonuc panelinin en ustunde durur ve kullaniciyi yeniden taramaya yonlendirir). */
.assign-warning-strong {
    background: #FDEDEB;
    border-color: #EFB4AC;
    color: var(--danger);
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 10px;
}
.assign-form-footer { flex: 0 0 auto; }
.assign-send-btn { width: 100%; justify-content: center; }

/* Cikti satiri: format secici + indirme butonu yan yana. */
.export-row { display: flex; gap: 8px; align-items: stretch; }
.export-row .assign-send-btn { flex: 1 1 auto; width: auto; }
.export-format {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    padding: 0 10px;
    cursor: pointer;
}
.export-format:hover { border-color: var(--brand); }

@media (max-width: 900px) {
    /* Dar ekranda panel yuzmek yerine viewer'in altina iner. */
    .assign-workspace { height: auto; overflow: visible; }
    .assign-viewer { position: relative; inset: auto; height: 55vh; }
    .viewer-overlay-toolbar { top: 10px; right: 10px; }
    .viewer-overlay-tabs { right: 10px; bottom: 10px; max-width: calc(100% - 20px); }
    .viewer-mode-hint { bottom: 58px; max-width: calc(100% - 20px); }
    .assign-panel {
        position: static;
        width: auto;
        margin: 10px;
        box-shadow: none;
    }
}

.assign-link { text-decoration: none; display: inline-block; }
.retry-form { margin-top: 6px; }

/* KVKK onay satirlari ve aydinlatma metni sayfasi */
.consent-row { font-size: 13.5px; text-align: left; }
/* Metin baglantisi: tiklanabilir oldugu belli olsun (kilitli kapida bile). */
.consent-row a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; }
.consent-row a:hover { color: var(--brand); }
/* Kayit ekraninda metni sonuna kadar okutan onay blogu. */
.consent-gate { text-align: left; margin-top: 14px; }
.consent-scroll-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* Hukuki metin penceresi: sayfanin ortasinda acilir. */
.legal-modal {
    /* margin:auto SART. Tarayici <dialog>'u inset:0 + margin:auto ile ortalar;
       dosyanin basindaki "* { margin: 0 }" sifirlamasi bunu eziyor ve pencere
       ekranin sol ust kosesine yapisiyordu. */
    margin: auto;
    width: min(720px, calc(100vw - 32px));
    max-height: min(80vh, 760px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(23, 37, 42, 0.22);
    background: var(--card);
    color: var(--ink);
    overflow: hidden;
}
.legal-modal::backdrop { background: rgba(23, 37, 42, 0.45); }
/* Dikey duzen: baslik ve alt satir sabit kalir, yalnizca govde kayar. */
.legal-modal[open] { display: flex; flex-direction: column; }

.legal-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.legal-modal-title { font-size: 17px; font-weight: 800; flex: 1 1 auto; }
.legal-modal-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #F1F4F5;
    color: var(--ink-soft);
    cursor: pointer;
}
.legal-modal-close:hover { background: var(--brand-pale); color: var(--brand-dark); }

.legal-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    /* overscroll-behavior olmazsa metnin sonuna gelince kaydirma arkadaki
       sayfaya gecer ve kullanici okumayi bitirdigini fark etmez. */
    overscroll-behavior: contain;
    padding: 16px 20px;
}
.legal-modal-body .legal-content {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}
.legal-modal-body h2 { font-size: 14.5px; }
.legal-modal-body p, .legal-modal-body .legal-list { font-size: 13.5px; }

.legal-modal-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: #FBFDFD;
}
.legal-modal-foot .consent-scroll-hint { margin-top: 0; flex: 1 1 auto; }
.legal-modal-foot button[disabled] { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 560px) {
    .legal-modal { max-height: 88vh; }
    .legal-modal-foot { flex-wrap: wrap; }
}
.consent-gate-read .consent-scroll-hint { color: var(--brand-dark); font-weight: 600; }

/* Kilitliyken YALNIZCA kutu soluklasir. Satirin tamamini soluklastirmak,
   tiklanmasi gereken metin baglantilarini da pasifmis gibi gosteriyordu. */
.consent-gate-locked input[type=checkbox] { opacity: 0.45; cursor: not-allowed; }

/* Metin okunmadan onaylanmaya calisilirsa cikan uyari. */
.consent-error {
    font-size: 12.5px;
    color: var(--danger);
    font-weight: 600;
    margin-top: 4px;
}
.consent-hint-flash { animation: consentHintFlash 1.1s ease-out 1; }
@keyframes consentHintFlash {
    0%, 100% { opacity: 1; }
    25%, 60% { opacity: 0.25; }
}

.consent-optional-heading {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    text-align: left;
}
.upload-consent {
    max-width: 640px;
    margin: 0 auto 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: center;
    color: var(--ink-soft);
}
.upload-consent input { margin-top: 3px; flex: 0 0 auto; }
/* Beyan ve baglantilar ayri satirlarda, ortalanmis. */
.upload-consent-text { display: block; text-align: center; }
.upload-consent-line { display: block; }
.upload-consent-links { display: block; margin-top: 3px; }
.upload-consent-links a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; }
.upload-consent-links a:hover { color: var(--brand); }
.upload-consent-sep { margin: 0 6px; opacity: 0.6; }

.legal-page { max-width: 820px; margin: 0 auto; }
.legal-content { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 30px; }
.legal-content h2 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 10px; }
.legal-version { font-size: 12px; margin-top: 18px; }
.legal-content a { color: var(--brand-dark); font-weight: 600; }

.legal-list { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 12px 20px; }
.legal-list li { margin-bottom: 7px; }

/* Genis tablolar dar ekranda sayfayi degil kendi kutusunu kaydirir. */
.legal-table {
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 12px 0 16px;
}
.legal-table th, .legal-table td {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    color: var(--ink-soft);
    line-height: 1.5;
}
.legal-table th { font-weight: 700; color: var(--ink); }
.legal-signature td:first-child { width: 45%; font-weight: 600; }

.legal-identity { border-left: 3px solid var(--line); padding-left: 12px; }
.legal-separator { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
.legal-page-intro { margin-bottom: 14px; }

/* Opsiyonel riza vurgusu: rizanin hizmet sartina bagli OLMADIGINI belirtir. */
.consent-highlight {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand-dark);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}
.consent-note { font-size: 13px; font-style: italic; }
.consent-form-list { list-style: none; margin-left: 0; }
.consent-box { font-size: 16px; margin-right: 6px; }

/* Her sayfanin altindaki ince hukuki metin seridi. */
.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 40px;
    padding: 16px 24px;
    font-size: 12.5px;
    color: var(--ink-soft);
}
.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    justify-content: center;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--brand-dark); text-decoration: underline; }

/* Landing kendi alt bilgisini kullanir; hukuki baglantilar oraya gomulur. */
.landing-legal-links { display: inline-block; margin-bottom: 6px; }
.landing-legal-links a { color: inherit; text-decoration: none; }
.landing-legal-links a:hover { text-decoration: underline; }

/* Admin istatistik kutulari (KPI satiri). Degerler metin renginde kalir;
   renk sadece durum noktasinda ve daima etiketle birlikte kullanilir. */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
}
.stat-label {
    color: var(--ink-soft);
    font-size: 12.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-value { font-size: 26px; font-weight: 600; color: var(--ink); }
.stat-value-sub { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.stat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.stat-dot-done { background: #1E7A43; }
.stat-dot-failed { background: var(--danger); }

.section-title { font-size: 17px; font-weight: 700; margin: 22px 0 12px; }

/* Genis tablolar kucuk ekranda kendi icinde kaydirilir. */
.table-scroll { overflow-x: auto; }
.table-scroll .data-table { min-width: 640px; }

/* Yukleme ilerleme cubugu */
.upload-progress { margin-top: 14px; }
.upload-progress-bar {
    width: 320px;
    max-width: 100%;
    height: 10px;
    margin: 0 auto 6px;
    background: #E4EAEC;
    border-radius: 999px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0;
    background: var(--brand);
    border-radius: 999px;
    transition: width 0.2s ease;
}
.upload-progress-text { font-size: 13px; color: var(--ink-soft); }

/* Atama ekrani tip lejanti */
.type-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* lejant ogeleri kutuda tam ortalanir */
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #FFFFFF;
}
.type-legend-item { display: inline-flex; align-items: center; gap: 6px; }

/* "2. veride karsilik yok" gibi olcum yapilamayan durumlar; sayisal degerden
   ayirt edilsin diye uyari renginde. */
.assignment-measure-warn {
    color: #7A5A17;
    background: var(--warn-bg);
    border-radius: 6px;
    padding: 4px 8px;
}

/* Sapma haritasi gorunum secimi: "1. Veri" / "Silindir" ikili butonu.
   Bitisik iki parca halinde, secili olan marka renginde. */
.deviation-mode-row {
    display: flex;
    margin: 2px 0 12px;
}

.mode-btn {
    flex: 1 1 0;
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-soft);
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.mode-btn:first-child { border-radius: 8px 0 0 8px; }
.mode-btn:last-child { border-radius: 0 8px 8px 0; border-left: none; }
.mode-btn:hover:not(:disabled):not(.mode-btn-active) { background: var(--brand-pale); color: var(--brand-dark); }

.mode-btn-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #FFFFFF;
}

.mode-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

/* ---------- 3D goruntu uzerindeki dikey renk olcegi ---------- */

.viewer-scale {
    position: absolute;
    /* Sagda durur: sol kenarda atama paneli viewer'in uzerine biniyor ve
       olcegi tamamen ortuyordu. Dikeyde ortalandigi icin sag ustteki
       arac cubugu ile cakismaz. */
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(23, 37, 42, 0.10);
    padding: 10px 12px;
    pointer-events: none; /* modeli dondurmeyi engellemesin */
}

.viewer-scale-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Renk kutulari dikeyde bitisik bir seride gorunsun diye satirlar arasi
   bosluk yoktur; kutu yuksekligi sabittir. */
.viewer-scale-swatch {
    width: 20px;
    height: 22px;
    flex: 0 0 auto;
    border-left: 1px solid rgba(23, 37, 42, 0.10);
    border-right: 1px solid rgba(23, 37, 42, 0.10);
}

.viewer-scale-row:first-child .viewer-scale-swatch {
    border-top: 1px solid rgba(23, 37, 42, 0.10);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.viewer-scale-row:last-child .viewer-scale-swatch {
    border-bottom: 1px solid rgba(23, 37, 42, 0.10);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.viewer-scale-label {
    font-size: 12px;
    color: var(--ink-soft);
    white-space: nowrap;
}

.viewer-scale-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.job-progress-message { color: var(--ink-soft); font-size: 13px; }
.job-error { color: var(--danger); font-size: 13px; }
.result-summary {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: #F6F8F9;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
}

.actions-cell { white-space: nowrap; }
.inline-form { display: inline-block; margin-right: 6px; }
.small-btn {
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.small-btn-approve { background: var(--brand); color: #FFFFFF; }
.small-btn-approve:hover { background: var(--brand-dark); }
.small-btn-suspend { background: #F1F4F5; color: var(--ink-soft); border: 1px solid var(--line); }
.small-btn-suspend:hover { background: #FDEDEB; color: var(--danger); border-color: #EFB4AC; }

/* ---------- Admin kullanici listesi: arama / filtre / sayfalama ---------- */

.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.admin-filter-input,
.admin-filter-select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #FFFFFF;
}

.admin-filter-input { flex: 1 1 260px; min-width: 0; }
.admin-filter-input:focus,
.admin-filter-select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }

.admin-result-info {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.admin-pager {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

/* Sayfalama baglantilari buton gibi gorunur (a etiketi oldugu icin) */
.admin-pager .small-btn {
    background: #F1F4F5;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    text-decoration: none;
    display: inline-block;
}
.admin-pager .small-btn:hover { background: var(--brand-pale); color: var(--brand-dark); }

/* ---------- Kisa ekranlar: ana sayfa tek ekrana sigacak sekilde sikisir ---------- */

@media (max-height: 900px) {
    /* :not(.page-main-wide) SART. Bu kural dosyada .page-main-wide'dan SONRA
       geldigi ve ayni ozgullukte oldugu icin wide surumun "padding: 0"ini
       eziyordu. Tarayici yakinlastirilinca CSS yuksekligi 900'un altina duser
       (1080 / 1.25 = 864) ve tam ekran 3D calisma alani ice cekilip kenarlarda
       zemin gorunurdu. OLCULDU (Chrome): once workspace sol=24 ust=88,
       duzeltmeden sonra sol=0 ust=76. */
    .page-main:not(.page-main-wide) { padding: 12px 24px 16px; }
    .landing { min-height: calc(100vh - 108px); }
    .hero { margin-bottom: 10px; }
    .hero-title { font-size: 26px; }
    .hero-tagline { font-size: 12px; margin-top: 4px; }
    .pending-banner, .login-banner { margin-bottom: 12px; padding: 10px 14px; font-size: 14px; }
    .upload-card { padding: 10px 18px 12px; margin-bottom: 12px; }
    .card-title { font-size: 15px; margin-bottom: 6px; }
    .upload-split { min-height: 0; }
    .drop-left, .choose-side { min-height: 108px; padding: 10px 14px; gap: 5px; }
    .dropzone-icon svg { width: 32px; height: 32px; }
    .dropzone-title { font-size: 14px; }
    .dropzone-hint { font-size: 12.5px; min-height: 0; }
    .dropzone-footer { padding: 6px 0 8px; }
    .start-area { margin-top: 10px; }
    .start-btn { padding: 10px 44px; font-size: 15px; }
    .upload-consent { margin-bottom: 8px; }
}

/* ---------- Kucuk ekranlar ---------- */

@media (max-width: 640px) {
    .hero-title { font-size: 22px; letter-spacing: 0.2em; text-indent: 0.2em; }
    .topbar-inner { padding: 10px 14px; }
    /* Ayni gerekce: wide surum bu ic bosluk kuralinin disindadir. */
    .page-main:not(.page-main-wide) { padding: 20px 14px 40px; }
    .upload-card { padding: 14px 14px 12px; }
    .upload-split { flex-direction: column; }
    .choose-side { border-left: none; border-top: 1px dashed #BFE3E6; }
    .split-or { left: 50%; top: 0; } /* dikey duzende rozet ust cizgiye oturur */
    .start-btn { width: 100%; justify-content: center; }
    .auth-card { padding: 26px 20px 24px; }
    .history-row { align-items: flex-start; flex-wrap: wrap; }
    .history-row-link { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- Tanitim (Landing) sayfasi ---------- */
/* site.css sonuna ekleyin. */

/* Aurora arka plan: bol blur'lu turkuaz/mavi isik dalgalari. */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.aurora-layer { position: absolute; inset: -14%; will-change: transform; }
.aurora-blob { position: absolute; border-radius: 50%; }
.aurora-blob-1 {
    top: -18%; left: -12%; width: 65vw; height: 60vw;
    background: radial-gradient(ellipse at center, rgba(42,180,192,0.34) 0%, rgba(42,180,192,0) 62%);
    filter: blur(55px);
    animation: aurora1 16s ease-in-out infinite;
}
.aurora-blob-2 {
    bottom: -22%; left: 16%; width: 60vw; height: 55vw;
    background: radial-gradient(ellipse at center, rgba(111,214,222,0.28) 0%, rgba(111,214,222,0) 62%);
    filter: blur(60px);
    animation: aurora3 18s ease-in-out infinite;
}
.aurora-blob-3 {
    top: 18%; right: -18%; width: 70vw; height: 62vw;
    background: radial-gradient(ellipse at center, rgba(64,145,222,0.26) 0%, rgba(64,145,222,0) 60%);
    filter: blur(60px);
    animation: aurora2 20s ease-in-out infinite;
}
.aurora-blob-4 {
    top: 42%; left: -16%; width: 55vw; height: 50vw;
    background: radial-gradient(ellipse at center, rgba(30,152,163,0.22) 0%, rgba(30,152,163,0) 60%);
    filter: blur(60px);
    animation: aurora4 22s ease-in-out infinite;
}
@keyframes aurora1 {
    0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
    33%  { transform: translate(6%, 10%) scale(1.18) rotate(12deg); }
    66%  { transform: translate(-4%, 4%) scale(0.94) rotate(-8deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}
@keyframes aurora2 {
    0%   { transform: translate(0, 0) scale(1.1) rotate(0deg); }
    33%  { transform: translate(-8%, -6%) scale(0.92) rotate(-14deg); }
    66%  { transform: translate(5%, -10%) scale(1.22) rotate(10deg); }
    100% { transform: translate(0, 0) scale(1.1) rotate(0deg); }
}
@keyframes aurora3 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(10%, -8%) scale(1.28); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes aurora4 {
    0%   { transform: translate(0, 0) scale(1.15); }
    50%  { transform: translate(-10%, 8%) scale(0.9); }
    100% { transform: translate(0, 0) scale(1.15); }
}

/* Sabit ust bar altina tam oturan capa kaydirmasi. */
html { scroll-behavior: smooth; }
.landing-section { scroll-margin-top: 84px; }

.landing-page { position: relative; z-index: 1; }

/* Sayfa ici menu (hero ustunde). */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 16px 24px 0;
    font-size: 14.5px;
    font-weight: 600;
}
.landing-nav a { color: var(--ink-soft); text-decoration: none; }
.landing-nav a:hover { color: var(--brand-dark); }
.landing-nav-auth { display: flex; align-items: center; gap: 12px; }
.landing-btn-primary {
    display: inline-block;
    font-weight: 700;
    color: #FFFFFF !important;
    background: var(--brand);
    padding: 10px 22px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(42, 180, 192, 0.28);
    text-decoration: none;
}
.landing-btn-primary:hover { background: var(--brand-dark); color: #FFFFFF; }
.landing-btn-outline {
    display: inline-block;
    font-weight: 600;
    color: var(--ink);
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #FFFFFF;
    text-decoration: none;
}
.landing-btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }

/* Hero */
.landing-hero { max-width: 900px; margin: 0 auto; padding: 32px 24px 16px; text-align: center; }
.landing-badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--brand-dark);
    background: var(--brand-pale);
    border: 1px solid #BFE7EA;
    border-radius: 999px;
    padding: 6px 16px;
    margin-bottom: 12px;
}
.landing-hero-title {
    font-size: 46px;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    line-height: 1.25;
    margin: 0;
}
.landing-hero-lead { font-size: 18px; color: var(--ink-soft); line-height: 1.6; max-width: 640px; margin: 14px auto 0; }
.landing-hero-cta {
    display: inline-block;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--brand);
    padding: 17px 48px;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(42, 180, 192, 0.4);
    text-decoration: none;
}
.landing-hero-cta:hover { background: var(--brand-dark); }

/* Demo goruntusu cercevesi */
.landing-demo { max-width: 1040px; margin: 0 auto; padding: 0 24px 80px; }
.landing-demo-frame {
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: 0 20px 60px rgba(23, 37, 42, 0.10);
    overflow: hidden;
    background: #FFFFFF;
}
.landing-demo-bar { background: #FBFDFD; border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 8px; }
.landing-demo-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: inline-block; }
.landing-demo-frame img { display: block; width: 100%; }

/* Bolum baslik duzeni: buyuk turkuaz baslik + koyu alt baslik + aciklama */
.landing-section { max-width: 1040px; margin: 0 auto; padding: 90px 24px; }
.landing-section-head { text-align: center; margin-bottom: 48px; }
.landing-title { font-size: 30px; font-weight: 800; letter-spacing: 0.06em; margin: 0 0 8px; color: var(--brand-dark); }
.landing-subtitle { font-size: 18px; font-weight: 600; color: var(--ink); margin: 0; }
.landing-desc { color: var(--ink-soft); font-size: 15.5px; margin-top: 10px; }

/* Surec kartlari */
.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.landing-step-card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.05);
}
.landing-step-no {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--brand-pale);
    color: var(--brand-dark);
    font-weight: 800; font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.landing-step-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.landing-step-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 0; }

/* Ozellik kartlari: ikon + baslik ayni satirda ortali */
.landing-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.landing-feature-card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.05);
}
.landing-feature-head { display: flex; align-items: center; gap: 16px; }
.landing-feature-icon {
    flex: none;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--brand-pale);
    display: flex; align-items: center; justify-content: center;
}
.landing-feature-card h3 { font-size: 17px; font-weight: 700; margin: 0; }
.landing-feature-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 12px 0 0; }

/* Guvenlik */
.landing-security { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.landing-security border { display: none; }
.landing-security ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.landing-security li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }
.landing-check {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    border: 1.6px solid var(--brand);
    border-radius: 50%;
    color: var(--brand);
    font-size: 11px;
    margin-top: 1px;
}
.landing-security-panel {
    background: var(--brand-pale);
    border: 1px solid #BFE7EA;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}
.landing-security-panel p { color: #146770; font-size: 15px; line-height: 1.6; margin: 0; }
.landing-security-icon { font-size: 46px; margin-bottom: 12px; }

/* Iletisim formu */
/* Tam genislikte koyu zeminli bolumler (bu ve .landing-footer): tarayici
   yakinlastirmasinda (zoom / ekran olcekleme) subpixel yuvarlama, kenarlarda
   arka planla (aurora-bg) araya ince bir bosluk birakabiliyordu. box-shadow
   (bulanikliksiz, yayilma degeri kadar) yerlesimi etkilemeden zemin rengini
   kenarlarin biraz disina tasirip bu bosluk cizgisini kapatir. */
.landing-contact { max-width: 720px; box-shadow: 0 0 0 1px var(--ink); }
.landing-contact-form {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 6px 24px rgba(23, 37, 42, 0.05);
    display: flex; flex-direction: column; gap: 16px;
}
.landing-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.landing-contact-form label { display: block; font-size: 15px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.landing-contact-form input {
    width: 100%; height: 42px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 0 13px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
}
.landing-contact-form textarea {
    width: 100%; height: 110px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 15px;
    outline: none;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.landing-contact-form input:focus, .landing-contact-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(42, 180, 192, 0.15);
}
.landing-contact-submit {
    margin-top: 6px;
    background: var(--brand);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
}
.landing-contact-submit:hover { background: var(--brand-dark); }
.landing-contact-done {
    background: #E8F7EE;
    border: 1px solid #B4E3C6;
    color: #1E7A43;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    font-size: 15.5px;
    font-weight: 600;
}

/* Hakkimizda (koyu) + landing footer */
.landing-about {
    background: var(--ink);
    color: #FFFFFF;
    padding: 90px 24px 70px;
}
.landing-about-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.landing-about-inner p {
    margin-bottom: 24px;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--ink-soft);
    text-align: center;
}
.landing-about-inner p:last-child {
    margin-bottom: 0;
}
.landing-about .landing-title { color: #6FD6DE; }
.landing-about .landing-subtitle { color: #FFFFFF; margin-bottom: 14px; }
.landing-about p { font-size: 15.5px; color: #B7C4C8; line-height: 1.7; margin: 0; }
.landing-footer {
    background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 34px 28px;
    color: #B7C4C8;
    font-size: 13.5px;
    box-shadow: 0 0 0 1px var(--ink);
}
.landing-footer-inner {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 24px; flex-wrap: wrap;
    line-height: 1.7;
}
.landing-footer strong { color: #FFFFFF; }
.landing-footer a { color: #6FD6DE; }

/* 3D CAD Viewer Panel */
.cad-models-flex {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 30px auto 0;
    max-width: 1200px;
    padding: 0 16px;
    width: 100%;
}
.cad-model-card {
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    text-align: center;
}
.cad-canvas-container {
    width: 100%;
    height: 240px;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: grab;
    transition: transform 0.3s ease;
}
.cad-canvas-container:hover {
    transform: scale(1.05);
}
.cad-canvas-container canvas {
    outline: none;
}

@media (max-width: 768px) {
    .cad-models-flex {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .cad-model-card {
        max-width: 360px;
        margin: 0 auto;
    }
}

@media (max-width: 860px) {
    .landing-steps, .landing-features, .landing-security, .landing-form-row { grid-template-columns: 1fr; }
    .landing-nav { flex-wrap: wrap; gap: 14px; }
    .landing-hero-title { font-size: 32px; }
}

/* Sayfa ici baglanti (#iletisim vb.) gecisleri yumusak kaydirilir; */
/* inline onclick scroll kodu CSP nedeniyle kaldirildi (site.js/CSP). */
html {
    scroll-behavior: smooth;
}

