/* Project layout corrections.
 *
 * Loaded after adminlte.min.css so these win. Deliberately NOT edited into the
 * vendored tree: tests/test_frontend_asset_contract.py guards those files, and
 * an AdminLTE upgrade would silently drop anything patched in there.
 */

/* 1. The accessibility live region sits one pixel past the bottom of the page.
 *
 * adminlte.min.js appends <div class="live-region"> to the document for screen
 * reader announcements. The vendored rule is
 *
 *     .live-region { position:absolute; left:-10000px; width:1px; height:1px }
 *
 * with no `top`, so `top: auto` puts the box at its static position -- the end
 * of the flow, which in a shell sized to exactly 100vh is the bottom edge. The
 * box then spans 100vh..100vh+1px. Measured in headless Chrome at 1440x900:
 * viewport 813px, live-region bottom 814px.
 *
 * Chrome did not count that pixel as document overflow in the sizes tested, but
 * an element deliberately parked off-screen has no business being placed by the
 * flow at all. Anchoring it removes the ambiguity.
 */
.live-region {
    top: 0;
}

/* 2. `100vw` counts the vertical scrollbar gutter.
 *
 * AdminLTE caps .app-wrapper, .app-header, .app-main and .app-footer at
 * `max-width: 100vw`. Viewport units are defined against a viewport with no
 * scrollbars, so wherever the platform draws classic (space-taking) scrollbars
 * instead of overlay ones, 100vw is about one scrollbar wider than the content
 * box -- and a horizontal scrollbar of exactly that width appears. Paired with
 * `min-height: 100vh` on the shell this can feed back: each scrollbar shrinks
 * the content box along the other axis and provokes the second one.
 *
 * 100% measures the containing block, which is what these elements want. This
 * is hardening on correctness grounds; it was NOT reproduced locally, because
 * headless Chrome uses overlay scrollbars.
 */
.app-wrapper,
.app-header,
.app-main,
.app-footer {
    max-width: 100%;
}

/* Bootstrap'ın varsayılan outline-primary metni açık kart zemininde küçük
   düğmeler için 4.26:1'de kalır. Koyu primary tonu normal metinde AA eşiğini
   aşar; hover/focus davranışı Bootstrap değişkenlerinden devam eder. */
.btn-outline-primary {
    --bs-btn-color: #0a58ca;
    --bs-btn-border-color: #0a58ca;
}

/* ---------------------------------------------------------------------------
   Rapor gövdesinin ekrandaki hâli.

   Aynı gövde iki yerde gösteriliyor: WeasyPrint'in bastığı A4 sayfa ve
   uygulama içindeki modal. Baskı düzeninin kuralları `reports/base.html`
   içinde ve `@page` ile birlikte duruyor; ekranda onlar yüklenmediği için
   modal biçimsiz kalıyordu -- kenarlıksız tablolar, sayfa başlığı boyunda
   bölüm başlıkları.

   Vendor CSS düzenlenmez; proje düzeltmeleri buraya yazılır ve AdminLTE'den
   sonra yüklenir (docs/wiki/UI_Shell_and_HTMX.md).
   --------------------------------------------------------------------------- */
.report-view {
    font-size: 0.9rem;
}

.report-view h1 { font-size: 1.15rem; margin: 0 0 .25rem; }

/* Bölüm başlığı, gövde metninden ayrılsın diye çizgili; modalda h2
   varsayılanı sayfa başlığı boyundaydı. */
.report-view h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 .5rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.report-view table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: .75rem;
}

.report-view th,
.report-view td {
    border: 1px solid var(--bs-border-color);
    padding: .35rem .5rem;
    text-align: left;
    vertical-align: top;
}

.report-view thead th {
    background: var(--bs-tertiary-bg);
    font-size: .85rem;
}

/* Künye listesi: etiket solda sabit genişlikte, değer yanında. Baskıda
   `float` ile yapılıyor; ekranda grid daha az sürprizli. */
.report-view dl.card {
    display: grid;
    grid-template-columns: minmax(8rem, 14rem) 1fr;
    gap: .15rem .75rem;
    margin: 0 0 1rem;
    border: 0;
    background: none;
}

.report-view dl.card dt { font-weight: 600; }
.report-view dl.card dd { margin: 0; }

.report-view .legal { font-size: .82rem; color: var(--bs-secondary-color); }
.report-view .muted { color: var(--bs-secondary-color); }

/* Geç kaydedilmiş ön değerlendirme, süresi geçmiş termin gibi işaretler. */
.report-view .flag {
    display: inline-block;
    border: 1px solid var(--bs-danger);
    color: var(--bs-danger);
    border-radius: .2rem;
    padding: 0 .3rem;
    font-size: .75rem;
}

/* İmza blokları ekranda basılmaz ama raporun neye benzediğini gösterir. */
.report-view table.signatures { margin-top: 2rem; }
.report-view table.signatures td {
    border: 0;
    border-top: 1px solid var(--bs-emphasis-color);
    padding-top: 2.5rem;
    font-size: .85rem;
    width: 50%;
}

.report-view .provisional {
    margin-top: 1.25rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: .25rem;
    padding: .5rem .75rem;
}

/* --- Tablo araç çubuğu ----------------------------------------------------
   Tablonun üstündeki ekleme düğmeleri beş ayrı biçimde yazılmıştı: kimi
   `d-flex justify-content-end mb-2`, kimi `p-3 pb-2`, kimi `gap-2`, kimi kart
   başlığında, kimi hiç. Sonuç, düğmenin tabloya ait olmadığı izlenimiydi:
   boşlukta duruyor ve tablonun ortasında yüzüyor gibi görünüyordu.

   Kural tek: araç çubuğu tabloya **bitişiktir**. Alt kenarlığı tablonun üst
   kenarlığıyla birleşir, dolgusu kart gövdesiyle aynıdır, eylemler her zaman
   sağdadır. Açıklama metni varsa solda kalır ve düğmeleri iter.

   Kullanımı:
       <div class="table-toolbar">
           <p class="table-toolbar-note">...</p>   {# isteğe bağlı #}
           <div class="table-toolbar-actions"> ...düğmeler... </div>
       </div>
       <table class="table table-sm mb-0 align-middle"> ... </table>
*/
.table-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.table-toolbar-note {
    margin: 0;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

/* `margin-left: auto`, açıklama olmadığında da eylemleri sağa yapıştırır;
   böylece not olan ve olmayan tablolar aynı hizada durur.

   `flex-shrink: 0` bilinçlidir: sıkışması gereken taraf açıklamadır, düğme
   değil. Aksi hâlde uzun bir not düğmenin etiketini iki satıra kırıyor ve
   düğme kendi yüksekliğini bozarak satırın hizasını kaçırıyordu. */
.table-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.table-toolbar-actions .btn { white-space: nowrap; }

/* Dar ekranda düğmeler nota bindirmesin. */
@media (max-width: 575.98px) {
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-toolbar-actions { margin-left: 0; }
}

/* --- Firma ve personel çalışma alanı ----------------------------------- */
.firm-workspace { max-width: 100%; }
.firm-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1.1rem 1.2rem; border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, var(--bs-border-color)); border-radius: .9rem; background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg)), var(--bs-body-bg) 68%); }
.firm-hero-mark { display: grid; place-items: center; flex: 0 0 3.4rem; height: 3.4rem; overflow: hidden; border-radius: .8rem; color: var(--bs-primary); background: var(--bs-body-bg); box-shadow: 0 1px 4px rgba(15, 23, 42, .1); font-size: 1.45rem; }
.firm-hero-mark img { width: 100%; height: 100%; padding: .35rem; object-fit: contain; }
.firm-hero-copy { min-width: 0; flex: 1; }
.firm-hero-copy > span, .firm-section-heading > div > span, .firm-table-heading > span { color: color-mix(in srgb, var(--bs-primary) 72%, var(--bs-body-color)); font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.firm-hero-copy h2 { margin: .1rem 0 .35rem; overflow-wrap: anywhere; font-size: 1.3rem; font-weight: 750; }
.firm-hero-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--bs-secondary-color); font-size: .8rem; }
.firm-card { overflow: hidden; border: 1px solid var(--bs-border-color); border-radius: .9rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.firm-tabs-wrap { padding: .55rem .65rem 0; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.firm-tabs { gap: .25rem; border: 0; }
.firm-tabs .nav-link { min-height: 2.75rem; border: 0; border-radius: .6rem .6rem 0 0; color: var(--bs-secondary-color); font-weight: 650; }
.firm-tabs .nav-link:hover { color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 5%, transparent); }
.firm-tabs .nav-link.active { color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 9%, var(--bs-body-bg)); box-shadow: inset 0 -2px 0 var(--bs-primary); }
.firm-tab-content { min-height: 24rem; padding: 0; background: color-mix(in srgb, var(--bs-tertiary-bg) 48%, var(--bs-body-bg)); }
.firm-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem; }
.firm-profile-section { min-width: 0; padding: 1.15rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; background: var(--bs-body-bg); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.firm-section-heading { display: flex; align-items: center; gap: .7rem; margin-bottom: .75rem; }
.firm-section-heading h3, .firm-table-heading h2 { margin: .08rem 0 0; font-size: 1rem; font-weight: 750; }
.firm-section-icon { display: grid; place-items: center; flex: 0 0 2.35rem; height: 2.35rem; border-radius: .65rem; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 10%, transparent); }
.firm-data-list { display: grid; grid-template-columns: minmax(9rem, .8fr) minmax(0, 1.2fr); margin: 0; }
.firm-data-list > .col-sm-5, .firm-data-list > .col-sm-7 { width: auto; }
.firm-data-list dt, .firm-data-list dd { margin: 0; padding: .65rem 0; border-top: 1px solid color-mix(in srgb, var(--bs-border-color) 72%, transparent); }
.firm-data-list dt { padding-right: 1rem; color: var(--bs-secondary-color); font-size: .78rem; font-weight: 650; }
.firm-data-list dd { overflow-wrap: anywhere; font-size: .88rem; }
.firm-data-list dt:first-of-type, .firm-data-list dt:first-of-type + dd { border-top: 0; }
.firm-tab-toolbar { padding: 1.15rem 1.25rem; background: var(--bs-body-bg); }
.firm-table-heading p { max-width: 50rem; margin: .28rem 0 0; color: var(--bs-secondary-color); font-size: .82rem; }
.firm-table { background: var(--bs-body-bg); }
.firm-table > thead > tr > th { padding: .7rem 1rem; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); font-size: .72rem; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
.firm-table > tbody > tr > td { padding: .85rem 1rem; border-color: color-mix(in srgb, var(--bs-border-color) 75%, transparent); vertical-align: middle; }
.firm-table > tbody > tr:hover { background: color-mix(in srgb, var(--bs-primary) 3.5%, var(--bs-body-bg)); }
.firm-person { display: flex; align-items: center; gap: .65rem; min-width: 11rem; }
.firm-person-avatar { display: grid; place-items: center; flex: 0 0 2.15rem; height: 2.15rem; border-radius: 50%; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 10%, transparent); font-size: .72rem; font-weight: 750; }
.firm-person > span:last-child { display: grid; }
.firm-person small { color: var(--bs-secondary-color); font-size: .72rem; }
.firm-row-actions { display: flex; flex-wrap: nowrap; gap: .35rem; min-width: max-content; }
.firm-empty-cell { height: 11rem; padding: 2rem !important; color: var(--bs-secondary-color) !important; text-align: center; }
.firm-empty-cell > i { display: block; margin-bottom: .5rem; color: color-mix(in srgb, var(--bs-primary) 65%, var(--bs-secondary-color)); font-size: 1.7rem; }
.firm-qualification-section { background: var(--bs-body-bg); }

@media (max-width: 991.98px) { .firm-profile-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575.98px) {
    .firm-hero { align-items: stretch; flex-wrap: wrap; }
    .firm-hero-copy { flex-basis: calc(100% - 4.4rem); }
    .firm-hero > .btn { width: 100%; }
    .firm-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .firm-tabs .nav-link { white-space: nowrap; }
    .firm-profile-grid { padding: .8rem; }
    .firm-profile-section { padding: 1rem; }
    .firm-data-list { grid-template-columns: minmax(0, 1fr); }
    .firm-data-list dt { padding-bottom: .12rem; }
    .firm-data-list dd { padding-top: .12rem; border-top: 0; }
    .firm-tab-toolbar { padding: 1rem; }
}

/* --- Personel izin ve özlük çalışma alanı ------------------------------ */
.hr-workspace { display: grid; gap: 1rem; }
.hr-hero, .hr-person-hero { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, var(--bs-border-color)); border-radius: .9rem; background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg)), var(--bs-body-bg) 68%); }
.hr-hero-icon, .hr-person-avatar { display: grid; place-items: center; flex: 0 0 3.4rem; height: 3.4rem; border-radius: .8rem; color: var(--bs-primary); background: var(--bs-body-bg); box-shadow: 0 1px 4px rgba(15, 23, 42, .1); font-size: 1.4rem; font-weight: 750; }
.hr-person-avatar { border-radius: 50%; font-size: .9rem; }
.hr-hero-copy { min-width: 0; flex: 1; }
.hr-hero-copy > span, .hr-section-heading > span { color: color-mix(in srgb, var(--bs-primary) 72%, var(--bs-body-color)); font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.hr-hero-copy h2 { margin: .08rem 0 .25rem; overflow-wrap: anywhere; font-size: 1.3rem; font-weight: 750; }
.hr-hero-copy p { max-width: 48rem; margin: 0; color: var(--bs-secondary-color); font-size: .84rem; }
.hr-person-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; color: var(--bs-secondary-color); font-size: .8rem; }
.hr-person-meta span:not(.badge) { display: inline-flex; align-items: center; gap: .3rem; }
.hr-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.hr-metric { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; padding: .9rem 1rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.hr-metric span { display: flex; align-items: center; gap: .4rem; min-width: 0; color: var(--bs-secondary-color); font-size: .78rem; }
.hr-metric strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.hr-metric-pending { border-color: color-mix(in srgb, var(--bs-warning) 34%, var(--bs-border-color)); }
.hr-metric-approved { border-color: color-mix(in srgb, var(--bs-success) 28%, var(--bs-border-color)); }
.hr-panel { overflow: hidden; margin: 0; border: 1px solid var(--bs-border-color); border-radius: .85rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.hr-panel-toolbar, .hr-panel-header { padding: 1rem 1.15rem; background: var(--bs-body-bg); }
.hr-panel-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hr-panel-header::after { content: none; }
.hr-panel-header > .btn { margin-left: auto; }
.hr-section-heading h3 { margin: .08rem 0 0; font-size: 1rem; font-weight: 750; }
.hr-table > thead > tr > th { padding: .7rem 1rem; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); font-size: .72rem; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
.hr-table > tbody > tr > td { padding: .85rem 1rem; border-color: color-mix(in srgb, var(--bs-border-color) 75%, transparent); vertical-align: middle; }
.hr-table > tbody > tr:hover { background: color-mix(in srgb, var(--bs-primary) 3.5%, var(--bs-body-bg)); }
.hr-person-link { display: flex; align-items: center; gap: .65rem; min-width: 11rem; color: var(--bs-body-color); text-decoration: none; }
.hr-person-link:hover strong { color: var(--bs-primary); text-decoration: underline; text-underline-offset: .18em; }
.hr-avatar { display: grid; place-items: center; flex: 0 0 2.15rem; height: 2.15rem; border-radius: 50%; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 10%, transparent); font-size: .7rem; font-weight: 750; }
.hr-person-link > span:last-child { display: grid; }
.hr-person-link small { color: var(--bs-secondary-color); font-size: .7rem; }
.hr-row-actions { display: flex; align-items: center; flex-wrap: nowrap; gap: .35rem; min-width: max-content; }
.hr-own-request-note { max-width: 12rem; color: var(--bs-secondary-color); font-size: .75rem; line-height: 1.25; text-align: right; white-space: normal; }
.hr-status { padding: .38rem .55rem; border: 1px solid transparent; }
.hr-status-pending { color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); background: var(--bs-warning-bg-subtle); }
.hr-status-approved { color: var(--bs-success-text-emphasis); border-color: var(--bs-success-border-subtle); background: var(--bs-success-bg-subtle); }
.hr-status-rejected, .hr-status-cancelled { color: var(--bs-secondary-text-emphasis); border-color: var(--bs-secondary-border-subtle); background: var(--bs-secondary-bg-subtle); }
.hr-balance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.hr-balance-grid > div { display: grid; gap: .25rem; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: .7rem; background: var(--bs-tertiary-bg); }
.hr-balance-grid span { color: var(--bs-secondary-color); font-size: .76rem; font-weight: 650; }
.hr-balance-grid strong { font-size: 1.55rem; line-height: 1; font-variant-numeric: tabular-nums; }
.hr-balance-grid .hr-balance-total { border-color: color-mix(in srgb, var(--bs-primary) 28%, var(--bs-border-color)); background: color-mix(in srgb, var(--bs-primary) 6%, var(--bs-body-bg)); }
.hr-inline-empty { display: flex; align-items: center; gap: .65rem; color: var(--bs-secondary-color); }
.hr-inline-empty .btn { margin-left: auto; }
.hr-empty-cell { height: 10rem; padding: 2rem !important; color: var(--bs-secondary-color) !important; text-align: center; }
.hr-empty-cell > i { display: block; margin-bottom: .5rem; color: color-mix(in srgb, var(--bs-primary) 65%, var(--bs-secondary-color)); font-size: 1.7rem; }

@media (max-width: 991.98px) { .hr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .hr-hero, .hr-person-hero { align-items: stretch; flex-wrap: wrap; }
    .hr-hero-copy { flex-basis: calc(100% - 4.4rem); }
    .hr-hero > .btn, .hr-person-hero > .btn { width: 100%; }
    .hr-metrics, .hr-balance-grid { grid-template-columns: minmax(0, 1fr); }
    .hr-panel-header { align-items: stretch; flex-direction: column; }
    .hr-panel-header .btn { width: 100%; }
    .hr-inline-empty { align-items: flex-start; flex-direction: column; }
    .hr-inline-empty .btn { width: 100%; margin-left: 0; }
}

/* --- Kart başlığındaki hayalet flex öğesi ---------------------------------
   AdminLTE'nin `.card-header`'ı float düzeni için bir `::after` clearfix
   taşır: `content: ""` ve `display: block`.

   Başlık `d-flex justify-content-between` yapıldığında bu pseudo-element
   **üçüncü bir flex öğesi** olur. `space-between` üç öğeyi dağıtır ve düğme
   sağ kenara değil **ortaya** düşer — dokuz ekranda birden. Ekranı okuyan
   kişiye düğme tablonun ortasında yüzüyormuş gibi görünür ve hangi şeye ait
   olduğu belirsizleşir.

   Clearfix yalnız float düzeni içindir; başlık zaten flex ise işlevsizdir.
   Bu yüzden ölçüt `d-flex`: yalnız flex yapılmış başlıklarda kaldırılır,
   float'a dayanan bir başlık kalırsa bozulmaz.

   Çözümü şablonlarda tek tek `ms-auto` dizerek aramak da mümkündü; kök sebebi
   dokuz yerde tedavi etmek yerine bir yerde kaldırmak tercih edildi. */
.card-header.d-flex::after { content: none; }

/* --- Belge şablonu çalışma alanı --------------------------------------- */
.template-editor-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1.2rem 1.3rem; border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, var(--bs-border-color)); border-radius: 1rem; background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg)), var(--bs-body-bg) 68%); box-shadow: 0 8px 24px rgba(15, 23, 42, .04); }
.template-editor-hero-icon, .template-editor-section-icon { display: grid; place-items: center; flex: 0 0 auto; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg)); }
.template-editor-hero-icon { width: 3.25rem; height: 3.25rem; border-radius: .85rem; font-size: 1.45rem; }
.template-editor-hero-copy { min-width: 0; }
.template-editor-eyebrow, .template-editor-card-header > div > span { color: color-mix(in srgb, var(--bs-primary) 72%, var(--bs-body-color)); font-size: .68rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.template-editor-hero h2 { margin: .12rem 0 .38rem; font-size: 1.2rem; font-weight: 750; text-wrap: balance; }
.template-editor-meta { display: flex; flex-wrap: wrap; gap: .45rem 1rem; color: var(--bs-secondary-color); font-size: .78rem; }
.template-editor-meta > span { display: inline-flex; align-items: center; gap: .3rem; }
.template-editor-status { color: var(--bs-warning-text-emphasis); }
.template-editor-hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.template-editor-hero-actions .btn, .template-editor-savebar .btn, .template-editor-readiness .btn { min-height: 2.65rem; }
.template-editor-hero-actions .btn, .template-editor-savebar .btn, .template-editor-readiness .btn { transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out; }
.template-editor-hero-actions .btn:active, .template-editor-savebar .btn:active, .template-editor-readiness .btn:active { transform: scale(.97); }

.template-editor-notice { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid var(--bs-info-border-subtle); border-radius: .75rem; color: var(--bs-info-text-emphasis); background: var(--bs-info-bg-subtle); }
.template-editor-notice > i { margin-top: .08rem; font-size: 1.1rem; }
.template-editor-notice > div { display: grid; gap: .12rem; }
.template-editor-notice strong { font-size: .84rem; }
.template-editor-notice span { font-size: .78rem; text-wrap: pretty; }
.template-editor-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem); align-items: start; gap: 1rem; }
.template-editor-main { display: grid; min-width: 0; gap: 1rem; }
.template-editor-sidebar { display: grid; gap: 1rem; position: sticky; top: 1rem; }
.template-editor-card { overflow: hidden; margin: 0; border: 1px solid var(--bs-border-color); border-radius: .9rem; box-shadow: 0 2px 10px rgba(15, 23, 42, .035); }
.template-editor-card-header { display: flex; align-items: center; gap: .7rem; min-height: 4.1rem; padding: .75rem 1rem; background: color-mix(in srgb, var(--bs-tertiary-bg) 65%, var(--bs-body-bg)); }
.template-editor-card-header::after { content: none; }
.template-editor-section-icon { width: 2.35rem; height: 2.35rem; border-radius: .68rem; }
.template-editor-card-header h3 { margin: .08rem 0 0; font-size: .98rem; font-weight: 750; }
.template-editor-count { margin-left: auto; padding: .3rem .5rem; border: 1px solid var(--bs-border-color); border-radius: 999px; color: var(--bs-secondary-color); background: var(--bs-body-bg); font-size: .7rem; font-variant-numeric: tabular-nums; }
.template-editor-card .form-label { margin-bottom: .38rem; font-size: .78rem; font-weight: 700; }
.template-editor-card .form-control, .template-editor-card .form-select { min-height: 2.65rem; }
.template-editor-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.template-editor-config-grid > #docxSourceField, .template-editor-note-field { grid-column: 1 / -1; width: auto; }
.template-editor-field { min-width: 0; padding: 1rem; border: 1px solid color-mix(in srgb, var(--bs-border-color) 82%, transparent); border-radius: .78rem; background: color-mix(in srgb, var(--bs-tertiary-bg) 42%, var(--bs-body-bg)); }
.template-editor-field-heading { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.template-editor-field-icon { display: grid; place-items: center; flex: 0 0 2.2rem; height: 2.2rem; border-radius: .62rem; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg)); }
.template-editor-field-heading > div { display: grid; min-width: 0; gap: .08rem; }
.template-editor-field-heading label, .template-editor-field-heading legend { width: auto; float: none; margin: 0; padding: 0; font-size: .8rem; font-weight: 750; line-height: 1.2; }
.template-editor-field-heading small { color: var(--bs-secondary-color); font-size: .7rem; line-height: 1.3; text-wrap: pretty; }
.template-editor-code-input .input-group-text { color: var(--bs-primary); border-color: color-mix(in srgb, var(--bs-primary) 24%, var(--bs-border-color)); background: color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg)); font-weight: 800; }
.template-editor-code-input .form-control { border-left: 0; font-family: var(--bs-font-monospace); font-size: .84rem; letter-spacing: .02em; }
.template-editor-code-input:focus-within { border-radius: var(--bs-border-radius); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--bs-primary) 18%, transparent); }
.template-editor-code-input:focus-within .input-group-text, .template-editor-code-input:focus-within .form-control { border-color: var(--bs-primary); box-shadow: none; }
.template-editor-engine-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.template-editor-engine-option { display: grid; grid-template-columns: auto 2rem minmax(0, 1fr) auto; align-items: center; gap: .55rem; min-height: 4.2rem; padding: .65rem; position: relative; border: 1px solid var(--bs-border-color); border-radius: .68rem; background: var(--bs-body-bg); cursor: pointer; transition: border-color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out; }
.template-editor-engine-option:hover { border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--bs-border-color)); background: color-mix(in srgb, var(--bs-primary) 3%, var(--bs-body-bg)); }
.template-editor-engine-option:active { transform: scale(.985); }
.template-editor-engine-option > input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--bs-primary); }
.template-editor-engine-option:has(input:checked) { border-color: color-mix(in srgb, var(--bs-primary) 62%, var(--bs-border-color)); background: color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bs-primary) 18%, transparent); }
.template-editor-engine-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); }
.template-editor-engine-option:has(input:checked) .template-editor-engine-mark { color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-body-bg)); }
.template-editor-engine-option > span:nth-of-type(2) { display: grid; min-width: 0; gap: .1rem; }
.template-editor-engine-option strong { font-size: .76rem; }
.template-editor-engine-option small { color: var(--bs-secondary-color); font-size: .65rem; line-height: 1.2; text-wrap: pretty; }
.template-editor-engine-check { color: var(--bs-primary); opacity: 0; transition: opacity 150ms ease-out, transform 150ms ease-out; transform: scale(.75); }
.template-editor-engine-option:has(input:checked) .template-editor-engine-check { opacity: 1; transform: scale(1); }
.template-editor-note-field textarea { min-height: 6.5rem; padding: .75rem .85rem; line-height: 1.45; resize: vertical; }
.template-editor-character-count { align-self: flex-start; min-width: 2rem; margin-left: auto; padding: .2rem .42rem; border-radius: 999px; color: var(--bs-secondary-color); background: var(--bs-secondary-bg); font-size: .66rem; font-variant-numeric: tabular-nums; text-align: center; }
.template-editor-upload { padding: .65rem; border: 1px dashed color-mix(in srgb, var(--bs-primary) 35%, var(--bs-border-color)); border-radius: .7rem; background: color-mix(in srgb, var(--bs-primary) 3%, var(--bs-body-bg)); }
.template-editor-saved-file { display: flex; align-items: center; gap: .65rem; margin-top: .65rem; padding: .65rem .75rem; border-radius: .65rem; background: var(--bs-tertiary-bg); }
.template-editor-saved-file > i { color: var(--bs-success); font-size: 1.1rem; }
.template-editor-saved-file > span { display: grid; min-width: 0; }
.template-editor-saved-file small { color: var(--bs-secondary-color); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.template-editor-saved-file code { overflow: hidden; color: var(--bs-body-color); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.template-editor-help { margin-bottom: 1rem; color: var(--bs-secondary-color); font-size: .84rem; text-wrap: pretty; }
.template-editor-loop { display: grid; gap: .55rem; margin-bottom: 1rem; padding: .85rem; border: 1px solid var(--bs-border-color); border-radius: .7rem; background: var(--bs-tertiary-bg); }
.template-editor-loop > span { font-size: .78rem; font-weight: 750; }
.template-editor-loop > div { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.template-editor-loop code, .template-editor-fields code { color: var(--bs-primary-text-emphasis); background: color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg)); }
.template-editor-loop code { padding: .4rem .55rem; border-radius: .45rem; }
.template-editor-loop small { color: var(--bs-secondary-color); font-size: .75rem; }
.template-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; max-height: 21rem; overflow: auto; padding: .15rem .35rem .15rem .15rem; }
.template-editor-field-guide { display: grid; gap: .22rem; min-width: 0; padding: .65rem; border: 1px solid color-mix(in srgb, var(--bs-primary) 14%, var(--bs-border-color)); border-radius: .58rem; background: var(--bs-body-bg); }
.template-editor-field-guide code { overflow: hidden; padding: .32rem .42rem; border-radius: .4rem; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.template-editor-field-guide strong { font-size: .74rem; line-height: 1.25; }
.template-editor-field-guide small { color: var(--bs-secondary-color); font-size: .68rem; line-height: 1.25; }
.template-editor-savebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent); box-shadow: 0 -4px 16px rgba(15, 23, 42, .04); }
.template-editor-savebar > span { color: var(--bs-secondary-color); font-size: .76rem; }
.template-editor-result { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: 1rem; padding: .8rem; border: 1px solid; border-radius: .7rem; }
.template-editor-result > i { margin-top: .05rem; font-size: 1.1rem; }
.template-editor-result > div { display: grid; gap: .15rem; }
.template-editor-result strong { font-size: .82rem; }
.template-editor-result span { font-size: .73rem; line-height: 1.35; text-wrap: pretty; }
.template-editor-result.is-ready { color: var(--bs-success-text-emphasis); border-color: var(--bs-success-border-subtle); background: var(--bs-success-bg-subtle); }
.template-editor-result.is-error { color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger-border-subtle); background: var(--bs-danger-bg-subtle); }
.template-editor-result.is-pending { color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); background: var(--bs-warning-bg-subtle); }
.template-editor-steps { display: grid; gap: 0; margin: 0 0 1rem; padding: 0; list-style: none; }
.template-editor-steps li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: .6rem; min-height: 3.25rem; position: relative; }
.template-editor-steps li:not(:last-child)::after { width: 1px; position: absolute; top: 1.75rem; bottom: .1rem; left: .88rem; content: ''; background: var(--bs-border-color); }
.template-editor-steps li > span { display: grid; place-items: center; align-self: start; width: 1.8rem; height: 1.8rem; border: 1px solid var(--bs-border-color); border-radius: 50%; color: var(--bs-secondary-color); background: var(--bs-body-bg); font-size: .7rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.template-editor-steps li.is-complete > span { color: #fff; border-color: var(--bs-success); background: var(--bs-success); }
.template-editor-steps li > div { display: grid; align-content: start; gap: .08rem; padding-top: .05rem; }
.template-editor-steps strong { font-size: .78rem; }
.template-editor-steps small { color: var(--bs-secondary-color); font-size: .7rem; }
.template-editor-details { display: grid; gap: .75rem; }
.template-editor-details > div { display: grid; gap: .15rem; min-width: 0; }
.template-editor-details span { color: var(--bs-secondary-color); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.template-editor-details strong { font-size: .82rem; }
.template-editor-details code { display: block; overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991.98px) { .template-editor-workspace { grid-template-columns: minmax(0, 1fr); } .template-editor-sidebar { position: static; grid-row: 1; } }
@media (max-width: 575.98px) { .template-editor-hero { align-items: flex-start; flex-wrap: wrap; } .template-editor-hero-copy { flex: 1 1 calc(100% - 4.25rem); } .template-editor-hero-actions { width: 100%; margin-left: 0; } .template-editor-hero-actions .btn { flex: 1 1 100%; } .template-editor-config-grid, .template-editor-engine-options, .template-editor-fields { grid-template-columns: minmax(0, 1fr); } .template-editor-config-grid > #docxSourceField, .template-editor-note-field { grid-column: auto; } .template-editor-savebar { align-items: stretch; flex-direction: column; } .template-editor-savebar .btn { width: 100%; } }

/* --- İşletme çalışma alanı ---------------------------------------------- */
.facility-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 16%, var(--bs-border-color));
    border-radius: .9rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg)), var(--bs-body-bg) 68%);
}
.facility-detail-identity { display: grid; gap: .45rem; }
.facility-detail-eyebrow,
.facility-profile-heading > div > span,
.facility-table-heading > span {
    color: color-mix(in srgb, var(--bs-primary) 72%, var(--bs-body-color));
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.facility-detail-status { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.facility-detail-location { display: inline-flex; align-items: center; gap: .3rem; margin-left: .25rem; color: var(--bs-secondary-color); font-size: .82rem; }
.facility-detail-hero .btn { min-height: 2.5rem; padding-inline: .9rem; }
.facility-detail-hero .btn:active { transform: scale(.97); }

.facility-tab-panel { min-height: 20rem; background: color-mix(in srgb, var(--bs-tertiary-bg) 46%, var(--bs-body-bg)); }
.facility-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem; }
.facility-profile-section,
.facility-scope-summary { border: 1px solid var(--bs-border-color); border-radius: .85rem; background: var(--bs-body-bg); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.facility-profile-section { min-width: 0; padding: 1.15rem; }
.facility-profile-heading { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.facility-profile-heading h2,
.facility-table-heading h2 { margin: .08rem 0 0; font-size: 1rem; font-weight: 750; line-height: 1.25; }
.facility-profile-icon { display: grid; place-items: center; flex: 0 0 2.35rem; height: 2.35rem; border-radius: .65rem; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 10%, transparent); }
.facility-data-list { display: grid; grid-template-columns: minmax(9rem, .85fr) minmax(0, 1.15fr); margin: 0; }
.facility-data-list > .col-sm-5,
.facility-data-list > .col-sm-7 { width: auto; }
.facility-data-list dt,
.facility-data-list dd { margin: 0; padding: .65rem 0; border-top: 1px solid color-mix(in srgb, var(--bs-border-color) 72%, transparent); }
.facility-data-list dt { padding-right: 1rem; color: var(--bs-secondary-color); font-size: .78rem; font-weight: 650; }
.facility-data-list dd { overflow-wrap: anywhere; font-size: .88rem; }
.facility-data-list dt:first-of-type,
.facility-data-list dt:first-of-type + dd { border-top: 0; }
.facility-scope-summary { grid-column: 1 / -1; margin: 0 1.25rem 1.25rem; padding: 1.15rem; }

.facility-tab-panel > .table-toolbar { padding: 1.2rem 1.25rem; background: var(--bs-body-bg); }
.facility-table-heading { min-width: 0; }
.facility-table-heading p { max-width: 48rem; margin: .28rem 0 0; color: var(--bs-secondary-color); font-size: .82rem; }
.facility-tab-panel .table { background: var(--bs-body-bg); }
.facility-tab-panel .table > thead > tr > th { padding: .7rem 1rem; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); font-size: .72rem; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.facility-tab-panel .table > tbody > tr > td { padding: .85rem 1rem; border-color: color-mix(in srgb, var(--bs-border-color) 75%, transparent); vertical-align: middle; }
.facility-tab-panel .table > tbody > tr { transition: background-color .15s ease; }
.facility-tab-panel .table > tbody > tr:hover { background: color-mix(in srgb, var(--bs-primary) 3.5%, var(--bs-body-bg)); }
.facility-empty-cell { height: 13rem; padding: 2rem !important; color: var(--bs-secondary-color) !important; text-align: center; }
.facility-empty-cell > i { display: block; margin-bottom: .55rem; color: color-mix(in srgb, var(--bs-primary) 65%, var(--bs-secondary-color)); font-size: 1.8rem; }
.facility-contract-pricing { padding: 1.2rem 1.25rem; border-bottom: 1px solid var(--bs-border-color); background: linear-gradient(135deg, color-mix(in srgb, var(--bs-success) 6%, var(--bs-body-bg)), var(--bs-body-bg) 72%); }
.facility-contract-pricing-heading { display: flex; align-items: center; gap: .7rem; margin-bottom: .85rem; }
.facility-contract-pricing-heading > div > span { color: color-mix(in srgb, var(--bs-success) 72%, var(--bs-body-color)); font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.facility-contract-pricing-heading h2 { margin: .08rem 0 0; font-size: 1rem; font-weight: 750; }
.facility-contract-pricing > p { padding: .75rem 1rem; border: 1px solid color-mix(in srgb, var(--bs-success) 22%, var(--bs-border-color)); border-radius: .65rem; background: var(--bs-body-bg); }
.facility-contract-pricing .alert { border-radius: .65rem; }
.facility-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; min-width: 13rem; }
.facility-row-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; margin: 0; }
.facility-account-link { display: inline-flex; align-items: center; gap: .65rem; color: var(--bs-body-color); text-decoration: none; }
.facility-account-link:hover strong { color: var(--bs-primary); text-decoration: underline; text-underline-offset: .18em; }
.facility-account-link-icon { display: grid; place-items: center; flex: 0 0 2.15rem; height: 2.15rem; border-radius: .55rem; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 9%, transparent); }
.facility-account-link span:last-child { display: grid; gap: .08rem; }
.facility-account-link small { color: var(--bs-secondary-color); font-size: .72rem; }

@media (max-width: 991.98px) {
    .facility-profile-grid { grid-template-columns: minmax(0, 1fr); }
    .facility-scope-summary { grid-column: auto; }
}
@media (max-width: 575.98px) {
    .facility-detail-hero { align-items: stretch; }
    .facility-detail-hero .btn { width: 100%; }
    .facility-profile-grid { padding: .85rem; }
    .facility-profile-section { padding: 1rem; }
    .facility-scope-summary { margin: 0 .85rem .85rem; padding: 1rem; }
    .facility-data-list { grid-template-columns: minmax(0, 1fr); }
    .facility-data-list dt { padding-bottom: .12rem; border-top: 1px solid var(--bs-border-color); }
    .facility-data-list dd { padding-top: .12rem; border-top: 0; }
    .facility-tab-panel > .table-toolbar { padding: 1rem; }
}

/* --- Notu olan metin ------------------------------------------------------
   Ekrandaki bazı alanların arkasında, tabloya sığmayan bir cümle durur:
   mevzuat parametresinin notu, yükümlülük kuralının açıklaması. Not sütun
   yapılırsa tablo iki katına çıkar; gizlenirse hiç okunmaz.

   Çözüm ipucudur, ama ipucunun **var olduğu görünmelidir**: üzerine gelmeyi
   deneyecek kişi, deneyecek bir şey olduğunu bilmelidir. Noktalı alt çizgi
   web'in bu iş için en eski işaretidir ve `cursor: help` onu doğrular.

   Sınıf tek yerde durur çünkü ikinci kullanımda inline stil kopyalanmaya
   başlamıştı; üçüncüsünde iki yer birbirinden ayrı düşerdi. */
.has-note {
    text-decoration: underline dotted;
    text-underline-offset: .2em;
    cursor: help;
}

/* Satırın kendi notu — kuralın açıklaması değil, kullanıcının yazdığı.
   Simge olmadan kimse notun varlığını bilemez: metnin altını çizmek burada
   işe yaramaz, çünkü not bir alana değil **kaydın tamamına** aittir. */
.note-marker {
    cursor: help;
    opacity: .55;
}

.note-marker:hover { opacity: 1; }

/* --- Giriş ekranları ------------------------------------------------------
   İki giriş ekranı da (uygulama ve portal) tek bir kutudan ibaretti: ortada
   bir form, etrafında boşluk. Çalışıyordu ama ürünün ilk gördüğü yüzü buydu
   ve hiçbir şey söylemiyordu.

   Düzen iki sütunlu: solda ürünün ne yaptığı, sağda form. Sol sütun dar
   ekranda **gizlenir** — telefonda giriş yapan biri tanıtım değil, iki alan
   ve bir düğme ister.

   Renk `--bs-primary` üzerinden kurulur; sabit bir renk yazmak, tema
   değiştiğinde uyumsuz kalan tek bir ekran bırakırdı. */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(940px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bs-body-bg);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .18);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 2.5rem;
    color: #fff;
    background: linear-gradient(150deg,
        var(--bs-primary) 0%,
        color-mix(in srgb, var(--bs-primary) 62%, #000) 100%);
}

.auth-brand h1 {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0;
}

.auth-brand .auth-tagline {
    opacity: .92;
    margin: 0;
}

/* Maddeler bir pazarlama listesi değil, ekranın ne yaptığının özeti: giriş
   yapan kişi doğru kapıda olduğunu görmelidir. */
.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .65rem;
}

.auth-points li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    opacity: .95;
}

.auth-points i {
    margin-top: .15rem;
    opacity: .85;
}

.auth-form {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form .form-floating > .form-control {
    border-right: 0;
}

/* Dar ekranda tanıtım gizlenir; kalan tek sütun tam genişliği alır. */
@media (max-width: 767.98px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form { padding: 2rem 1.5rem; }
}

/* --- Marka işareti --------------------------------------------------------
   Ölçü şablonda değil burada: `width` yazmak, her kullanım yerinde CSS ile
   ezilmesi gereken bir varsayılan bırakırdı. */
.auth-mark { width: 3rem; height: 3rem; }
.auth-mark-sm { width: 1.5rem; height: 1.5rem; }

/* Kenar çubuğundaki işaret, AdminLTE'nin `brand-image` ölçüsünü izler. */
.brand-image { width: 2rem; height: 2rem; }

/* İşaret markanın **yazısıyla aynı renkte** olmalı. Bağlantının kendi rengini
   miras alınca kenar çubuğunda mavi bir kalkan ile beyaz bir yazı yan yana
   duruyordu; ikisi aynı markayı söylemiyordu. Renk sabit yazılmaz, koyu
   temanın gövde renginden gelir. */
.app-sidebar .brand-image { color: var(--bs-body-color); }

/* --- Rapor başlığı (ekran) ------------------------------------------------
   Aynı parça hem baskıda hem önizlemede kullanılır; baskı ölçüleri
   milimetredir ve ekranda karşılığı yoktur. */
.report-view .letterhead { width: 100%; border: none; margin: 0 0 1rem; }
.report-view .letterhead td { border: none; padding: 0; vertical-align: middle; }
.report-view .letterhead .mark { width: 120px; }
.report-view .letterhead .mark img { max-height: 56px; max-width: 110px; }
.report-view .letterhead .subtitle { color: #6c757d; font-size: .85rem; margin: 0; }

/* --- Resmî rapor içerik çalışma alanı ----------------------------------- */
.report-editor-modal { max-width: min(1440px, 96vw); }
.report-editor-shell { border: 0; border-radius: 1rem; overflow: hidden; box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .2); }
.report-editor-header { padding: 1.1rem 1.4rem; background: var(--bs-body-bg); }
.report-editor-heading { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.report-editor-icon { display: grid; place-items: center; flex: 0 0 2.75rem; height: 2.75rem; border-radius: .75rem; color: var(--bs-primary); background: color-mix(in srgb, var(--bs-primary) 12%, transparent); font-size: 1.3rem; }
.report-editor-eyebrow { color: var(--bs-primary); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.report-editor-heading h5 { font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
.report-editor-meta { display: flex; flex-wrap: wrap; gap: .35rem; color: var(--bs-secondary-color); font-size: .8rem; font-variant-numeric: tabular-nums; }
.report-editor-progress { display: grid; grid-template-columns: auto minmax(8rem, 1fr) auto; align-items: center; gap: .8rem; padding: .65rem 1.4rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); font-size: .78rem; }
.report-editor-progress .progress { height: .42rem; background: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-body-bg)); }
.report-completion-count, .report-section-count { font-variant-numeric: tabular-nums; }
.report-editor-progress-note { color: var(--bs-secondary-color); }
.report-editor-body { display: grid; grid-template-columns: minmax(15rem, 22%) minmax(0, 1fr); padding: 0; overflow: hidden; }
.report-editor-sidebar { max-height: 68vh; padding: 1.1rem; overflow-y: auto; border-right: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.report-editor-search-label { font-size: .78rem; font-weight: 700; }
.report-editor-search .input-group-text, .report-editor-search .form-control { min-height: 2.75rem; background: var(--bs-body-bg); }
.report-section-nav { display: grid; gap: .4rem; margin-top: 1rem; }
.report-section-nav a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem .6rem; color: var(--bs-body-color); border: 1px solid transparent; border-radius: .65rem; text-decoration: none; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.report-section-nav a:hover { border-color: var(--bs-border-color); background: var(--bs-body-bg); }
.report-section-nav a.active { color: var(--bs-primary); border-color: color-mix(in srgb, var(--bs-primary) 35%, var(--bs-border-color)); background: var(--bs-body-bg); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.report-section-nav a:focus-visible { outline: 3px solid color-mix(in srgb, var(--bs-primary) 35%, transparent); outline-offset: 2px; }
.report-section-nav a:active { transform: scale(.985); }
.report-section-code, .report-question-code { color: var(--bs-primary); font-size: .72rem; font-weight: 750; letter-spacing: .035em; }
.report-section-name { overflow: hidden; font-size: .82rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.report-section-count { color: var(--bs-secondary-color); font-size: .72rem; }
.report-editor-content { max-height: 68vh; padding: 1.2rem 1.35rem 2rem; overflow-y: auto; scroll-behavior: smooth; }
.report-editor-guidance { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: 1rem; border: 0; font-size: .83rem; }
.report-section { margin-bottom: .75rem; border: 1px solid var(--bs-border-color) !important; border-radius: .8rem !important; overflow: hidden; }
.report-section .accordion-button { min-height: 3.5rem; gap: .7rem; font-weight: 650; text-wrap: balance; }
.report-section .accordion-button:not(.collapsed) { box-shadow: inset 0 -1px 0 var(--bs-border-color); }
.report-section .accordion-body { display: grid; gap: .85rem; padding: 1rem; background: var(--bs-tertiary-bg); }
.report-question { min-width: 0; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.report-question.has-error { border-color: var(--bs-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-danger) 12%, transparent); }
.report-question legend { display: flex; align-items: baseline; gap: .6rem; margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.35; text-wrap: pretty; }
.report-question-guidance { margin: .35rem 0 .85rem; color: var(--bs-secondary-color); font-size: .8rem; text-wrap: pretty; }
.report-field-label, .report-question label { display: block; margin-bottom: .35rem; font-size: .78rem; font-weight: 650; }
.report-question-status { margin-bottom: .85rem; }
.report-status-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.report-status-options > div { min-width: 0; }
.report-status-options label { display: flex; align-items: center; gap: .4rem; min-height: 2.5rem; margin: 0; padding: .45rem .7rem; border: 1px solid var(--bs-border-color); border-radius: .55rem; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.report-status-options label:has(input:checked) { color: var(--bs-primary); border-color: color-mix(in srgb, var(--bs-primary) 55%, var(--bs-border-color)); background: color-mix(in srgb, var(--bs-primary) 9%, transparent); }
.report-status-options label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--bs-primary) 30%, transparent); outline-offset: 2px; }
.report-status-options label:active { transform: scale(.985); }
.report-status-options input { margin: 0; }
.report-explanation, .report-evidence { min-height: 5.5rem; }
.inspection-value-row .form-control, .inspection-value-row .form-select { min-height: 2.75rem; }
.inspection-value-row .report-evidence { min-height: 5.5rem; }
.inspection-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1rem; }
.inspection-pagination .btn { min-width: 2.5rem; min-height: 2.5rem; font-variant-numeric: tabular-nums; }
.report-editor-footer { position: relative; gap: .55rem; padding: .8rem 1.4rem; box-shadow: 0 -.3rem 1rem rgba(15, 23, 42, .06); }
.report-editor-footer .btn { min-height: 2.75rem; padding-inline: 1rem; }
.report-editor-audit-note { margin-right: auto; color: var(--bs-secondary-color); font-size: .78rem; }
.report-search-empty { display: grid; place-items: center; gap: .5rem; min-height: 12rem; color: var(--bs-secondary-color); }
.report-search-empty i { font-size: 1.5rem; }

@media (max-width: 991.98px) {
    .report-editor-body { grid-template-columns: 1fr; overflow-y: auto; }
    .report-editor-sidebar { max-height: none; border-right: 0; border-bottom: 1px solid var(--bs-border-color); }
    .report-section-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-editor-content { max-height: none; overflow: visible; }
    .report-editor-progress-note { display: none; }
}
@media (max-width: 575.98px) {
    .report-editor-modal { max-width: 100%; margin: 0; min-height: 100%; }
    .report-editor-shell { min-height: 100vh; border-radius: 0; }
    .report-editor-progress { grid-template-columns: auto 1fr; }
    .report-section-nav { grid-template-columns: 1fr; }
    .report-status-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-editor-audit-note { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .report-editor-content { scroll-behavior: auto; }
    .report-section-nav a, .report-status-options label { transition: none; }
}

/* --- Eğitim kanıt çalışma alanı ----------------------------------------- */
.training-editor-modal { max-width: min(1280px, 96vw); }
.training-editor-shell { border: 0; border-radius: 1rem; overflow: hidden; box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .2); }
.training-editor-header { padding: 1.1rem 1.4rem; }
.training-editor-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(20rem, .65fr); gap: 0; padding: 0; overflow: hidden; }
.training-editor-records, .training-editor-actions { max-height: 68vh; overflow-y: auto; }
.training-editor-records { padding: 1.25rem; background: var(--bs-tertiary-bg); }
.training-editor-actions { padding: 1.25rem; border-left: 1px solid var(--bs-border-color); }
.training-editor-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.training-editor-section-heading h6 { margin: .1rem 0 0; font-weight: 750; text-wrap: balance; }
.training-editor-kicker { color: var(--bs-primary); font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.training-session-card { padding: 1rem; margin-bottom: .75rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; background: var(--bs-body-bg); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.training-session-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .6rem; }
.training-session-card > header div { display: flex; flex-direction: column; }
.training-session-card > header span, .training-session-trainer { color: var(--bs-secondary-color); font-size: .78rem; }
.training-session-card p { margin-bottom: .6rem; text-wrap: pretty; }
.training-session-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.training-attendee-list { display: grid; gap: .35rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--bs-border-color); }
.training-attendee-list > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2rem; font-size: .82rem; }
.training-empty-inline { color: var(--bs-secondary-color); font-style: italic; }
.training-empty-state { display: grid; place-items: center; gap: .4rem; min-height: 15rem; padding: 2rem; color: var(--bs-secondary-color); text-align: center; }
.training-empty-state i { color: var(--bs-primary); font-size: 2rem; }
.training-editor-actions .accordion-item { margin-bottom: .65rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; }
.training-editor-actions .accordion-button { min-height: 3.25rem; font-weight: 650; }
.training-editor-actions .form-control, .training-editor-actions .form-select { min-height: 2.75rem; }
.training-editor-actions .btn { min-height: 2.75rem; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.training-editor-actions .btn:active { transform: scale(.985); }
.training-editor-footer { padding: .8rem 1.4rem; box-shadow: 0 -.3rem 1rem rgba(15, 23, 42, .06); }
.training-editor-footer > span { margin-right: auto; color: var(--bs-secondary-color); font-size: .78rem; }
.training-editor-footer .btn { min-height: 2.75rem; }

@media (max-width: 991.98px) {
    .training-editor-body { grid-template-columns: 1fr; overflow-y: auto; }
    .training-editor-records, .training-editor-actions { max-height: none; overflow: visible; }
    .training-editor-actions { border-top: 1px solid var(--bs-border-color); border-left: 0; }
}
@media (max-width: 575.98px) {
    .training-editor-modal { max-width: 100%; min-height: 100%; margin: 0; }
    .training-editor-shell { min-height: 100vh; border-radius: 0; }
    .training-session-card > header { flex-direction: column; }
    .training-editor-footer > span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .training-editor-actions .btn { transition: none; }
}

/* CRM müşteri adayı: künye, faaliyet ve teklif alanları */
.crm-proposal-page { display: grid; gap: 1.2rem; padding-bottom: 2rem; }
.crm-proposal-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding: 1.5rem 1.65rem; border: 1px solid #d7e6df; border-left: 4px solid #16836b; border-radius: .9rem; background: linear-gradient(115deg, #f2faf6 0%, #fff 70%); box-shadow: 0 3px 16px rgba(18, 66, 52, .05); }
.crm-proposal-hero-main { min-width: 0; flex: 1; }
.crm-proposal-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; margin: -.55rem 0 .35rem -.55rem; padding: .45rem .55rem; color: #356c5c; font-size: .82rem; font-weight: 650; text-decoration: none; border-radius: .5rem; }
.crm-proposal-back:hover { color: #0d634f; background: #e5f2ec; }
.crm-proposal-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .45rem; color: #477768; font-size: .7rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.crm-proposal-status { padding: .2rem .55rem; border-radius: 99px; color: #0d634f; background: #ddefe7; letter-spacing: 0; }
.crm-proposal-hero h1 { margin: 0 0 1rem; color: #173d35; font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 760; line-height: 1.2; overflow-wrap: anywhere; }
.crm-proposal-facts { display: flex; flex-wrap: wrap; gap: .65rem 2rem; margin: 0; }
.crm-proposal-facts div { min-width: 8rem; }
.crm-proposal-facts dt { margin-bottom: .12rem; color: #64766f; font-size: .7rem; font-weight: 650; }
.crm-proposal-facts dd { margin: 0; color: #203d34; font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.crm-proposal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; max-width: 34rem; }
.crm-proposal-actions form { margin: 0; }
.crm-proposal-actions .btn { min-height: 2.5rem; white-space: nowrap; }
.crm-proposal-actions .btn:active { transform: scale(.97); }
.crm-proposal-decision-form { display: grid; grid-template-columns: minmax(10rem, 1fr) auto auto; gap: .5rem; width: 100%; }
.crm-proposal-grid { display: grid; grid-template-columns: minmax(18rem, .8fr) minmax(0, 1.2fr); gap: 1.2rem; align-items: start; }
.crm-proposal-panel { min-width: 0; overflow: hidden; border: 1px solid #e1e8e4; border-radius: .85rem; background: var(--bs-body-bg); box-shadow: 0 2px 12px rgba(20, 53, 42, .035); }
.crm-proposal-panel-header { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid #e8efea; background: color-mix(in srgb, var(--bs-tertiary-bg) 42%, var(--bs-body-bg)); }
.crm-proposal-panel-header > div > span { color: #58816f; font-size: .68rem; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; }
.crm-proposal-panel-header h2 { margin: .08rem 0 0; color: #203d34; font-size: 1rem; font-weight: 750; }
.crm-proposal-panel-icon { display: grid; place-items: center; flex: 0 0 2.35rem; height: 2.35rem; border-radius: .65rem; color: #14735d; background: #e5f2ec; }
.crm-proposal-data-list { display: grid; grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.2fr); margin: 0; padding: .45rem 1.2rem 1rem; }
.crm-proposal-data-list dt, .crm-proposal-data-list dd { margin: 0; padding: .72rem 0; border-bottom: 1px solid #edf1ee; }
.crm-proposal-data-list dt { padding-right: 1rem; color: #687970; font-size: .76rem; font-weight: 650; }
.crm-proposal-data-list dd { overflow-wrap: anywhere; color: #263f37; font-size: .87rem; }
.crm-proposal-data-list dt:nth-last-of-type(1), .crm-proposal-data-list dd:last-child { border-bottom: 0; }
.crm-proposal-data-list-wide { grid-template-columns: minmax(9rem, .25fr) minmax(0, .75fr); }
.crm-proposal-money { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-proposal-panel .table th { padding: .7rem 1rem; color: #64786c; background: #f7faf8; font-size: .71rem; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.crm-proposal-panel .table td { padding: .85rem 1rem; border-color: #edf1ee; font-size: .84rem; vertical-align: middle; }
.crm-tariff-panel.is-warning { border-color: #ead8a3; }
.crm-tariff-panel.is-danger { border-color: #e5b3b7; }
.crm-tariff-panel.is-success { border-color: #b9dacb; }
.crm-tariff-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; padding: 1rem 1.2rem; }
.crm-tariff-result > div { padding: .75rem .8rem; border: 1px solid #e5ece8; border-radius: .65rem; background: #fafcfb; }
.crm-tariff-result span { display: block; margin-bottom: .18rem; color: #6b7a72; font-size: .7rem; font-weight: 650; }
.crm-tariff-result strong { display: block; color: #203d34; font-size: .92rem; font-variant-numeric: tabular-nums; }
.crm-tariff-guidance { padding: 0 1.2rem 1.2rem; }
.crm-tariff-guidance-intro { display: flex; align-items: flex-start; gap: .65rem; margin: 0 1.2rem 1.1rem; padding: .8rem .9rem; border-radius: .65rem; color: #654f14; background: #fff8dc; }
.crm-tariff-guidance > .crm-tariff-guidance-intro { margin-inline: 0; }
.crm-tariff-guidance-intro > i { margin-top: .08rem; font-size: 1.05rem; }
.crm-tariff-guidance-intro p { margin: .2rem 0 0; font-size: .8rem; }
.crm-tariff-guidance ol { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; counter-reset: tariff-warning; }
.crm-tariff-guidance li { position: relative; padding: .85rem .9rem .85rem 3rem; border: 1px solid #eadfbd; border-radius: .65rem; background: #fffdf7; counter-increment: tariff-warning; }
.crm-tariff-guidance li::before { content: counter(tariff-warning); position: absolute; top: .82rem; left: .85rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; color: #6a5010; background: #f4e7b6; font-size: .72rem; font-weight: 750; }
.crm-tariff-guidance li > strong { color: #4b3b13; font-size: .86rem; }
.crm-tariff-guidance li > p { margin: .25rem 0 .55rem; color: #685d43; font-size: .78rem; }
.crm-tariff-guidance li > div { color: #3f493f; font-size: .8rem; }
.crm-tariff-guidance li > div > span { display: block; color: #6a5010; font-size: .67rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.crm-tariff-guidance details { margin-top: .45rem; font-size: .72rem; }

@media (max-width: 1050px) {
    .crm-proposal-hero { flex-direction: column; }
    .crm-proposal-actions { justify-content: flex-start; max-width: none; }
    .crm-proposal-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .crm-proposal-hero { padding: 1.15rem 1rem; }
    .crm-proposal-actions, .crm-proposal-actions .btn, .crm-proposal-actions form { width: 100%; }
    .crm-proposal-decision-form { grid-template-columns: 1fr 1fr; }
    .crm-proposal-decision-form .form-control { grid-column: 1 / -1; }
    .crm-proposal-data-list { grid-template-columns: 1fr; }
    .crm-proposal-data-list dt { padding-bottom: .1rem; border-bottom: 0; }
    .crm-proposal-data-list dd { padding-top: .1rem; }
    .crm-tariff-result { grid-template-columns: 1fr; }
}

.crm-prospect-page { display: grid; gap: 1.25rem; padding-bottom: 2rem; }
.crm-prospect-overview { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; padding: 1.5rem 1.75rem; border: 1px solid #d7e6df; border-left: 4px solid #16836b; border-radius: .85rem; background: linear-gradient(115deg, #f2faf6 0%, #fff 68%); box-shadow: 0 3px 16px rgba(18, 66, 52, .05); }
.crm-prospect-overview-main { min-width: 0; flex: 1; }
.crm-prospect-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: .55rem; color: #477768; font-size: .72rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.crm-prospect-stage { display: inline-flex; align-items: center; padding: .22rem .6rem; border-radius: 99px; color: #0d634f; background: #ddefe7; font-size: .7rem; letter-spacing: 0; }
.crm-prospect-overview h1 { margin: 0 0 1.15rem; color: #173d35; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 760; line-height: 1.2; overflow-wrap: anywhere; }
.crm-prospect-facts { display: flex; flex-wrap: wrap; gap: .65rem 2rem; margin: 0; }
.crm-prospect-facts div { min-width: 8rem; }
.crm-prospect-facts dt { margin-bottom: .15rem; color: #64766f; font-size: .72rem; font-weight: 650; }
.crm-prospect-facts dd { margin: 0; color: #203d34; font-size: .9rem; font-weight: 650; }
.crm-prospect-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; max-width: 28rem; }
.crm-prospect-actions .btn { white-space: nowrap; }
.crm-prospect-actions form { margin: 0; }
.crm-prospect-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(16rem, .85fr); gap: 1.25rem; align-items: start; }
.crm-prospect-panel { min-width: 0; overflow: hidden; border: 1px solid #e1e8e4; border-radius: .85rem; background: #fff; box-shadow: 0 2px 12px rgba(20, 53, 42, .035); }
.crm-prospect-panel-header { padding: 1.05rem 1.25rem; border-bottom: 1px solid #e8efea; }
.crm-prospect-panel-header > div { display: flex; align-items: center; gap: .7rem; }
.crm-prospect-panel-header h2 { margin: 0; color: #203d34; font-size: 1rem; font-weight: 750; }
.crm-prospect-section-number { color: #43836f; font-size: .75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.crm-prospect-panel-body { padding: .5rem 1.25rem 1rem; }
.crm-prospect-panel-body .list-group-item { border-color: #edf1ee; }
.crm-prospect-contacts { margin: 0; padding: 0; list-style: none; }
.crm-prospect-contacts li:not(.crm-prospect-empty) { display: flex; align-items: center; gap: .7rem; padding: .8rem 0; border-bottom: 1px solid #edf1ee; }
.crm-prospect-contacts li:last-child { border-bottom: 0; }
.crm-prospect-contacts strong, .crm-prospect-contacts small { display: block; }
.crm-prospect-contacts strong { color: #203d34; font-size: .85rem; }
.crm-prospect-contacts small { color: #6e7a74; font-size: .75rem; }
.crm-prospect-avatar { display: grid; place-items: center; flex: 0 0 2.2rem; width: 2.2rem; height: 2.2rem; border-radius: .6rem; color: #18735c; background: #e8f4ec; font-size: .85rem; font-weight: 750; }
.crm-prospect-empty { padding: 1.2rem 0; color: #6e7a74; font-size: .85rem; }
.crm-prospect-proposals { padding: .25rem 1.25rem .8rem; }
.crm-prospect-proposals .table-toolbar { padding: .9rem 0; border-bottom: 1px solid #e8efea; }
.crm-prospect-proposals .table-toolbar > div { width: 100%; gap: .75rem; }
.crm-prospect-proposals .table-toolbar h3 { color: #203d34; font-size: 1rem; font-weight: 750; }
.crm-prospect-proposals .table { margin: 0; }
.crm-prospect-proposals .table th { color: #5d7065; font-size: .72rem; font-weight: 750; letter-spacing: .03em; }
.crm-prospect-proposals .table td { padding-block: .85rem; }
@media (max-width: 1199.98px) { .crm-prospect-overview { flex-direction: column; } .crm-prospect-actions { justify-content: flex-start; max-width: none; } }
@media (max-width: 767.98px) { .crm-prospect-columns { grid-template-columns: 1fr; } .crm-prospect-overview { padding: 1.25rem; } .crm-prospect-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } .crm-prospect-actions .btn, .crm-prospect-actions form { width: 100%; } .crm-prospect-actions form .btn { white-space: normal; } }
@media (max-width: 420px) { .crm-prospect-actions { grid-template-columns: 1fr; } .crm-prospect-facts { display: grid; gap: .65rem; } }

/* İşletme kartı / Görüşmeler: günlük iletişim ve teklif çalışma alanı */
.crm-facility-workspace { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(20rem, .9fr); min-height: 17rem; }
.crm-facility-workspace-single { grid-template-columns: minmax(0, 1fr); }
.crm-facility-section { min-width: 0; padding: 1.45rem 1.6rem 1.6rem; }
.crm-facility-offers { border-left: 1px solid #e5ece8; background: #fafcfb; }
.crm-facility-section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid #e5ece8; }
.crm-facility-kicker { display: block; margin-bottom: .25rem; color: #58816f; font-size: .7rem; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; }
.crm-facility-section-header h2 { display: flex; align-items: center; gap: .5rem; margin: 0; color: #203d34; font-size: 1.05rem; font-weight: 750; }
.crm-facility-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.45rem; height: 1.45rem; padding-inline: .3rem; border-radius: 99px; color: #286e57; background: #e6f2eb; font-size: .72rem; font-variant-numeric: tabular-nums; }
.crm-facility-timeline .list-group-item { padding: 1.05rem 0 !important; border-color: #edf1ee; }
.crm-facility-timeline .list-group-item > .d-flex { align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem !important; }
.crm-facility-timeline .list-group-item strong { color: #233c34; font-size: .92rem; }
.crm-facility-timeline .list-group-item time { color: #6f7d75 !important; font-size: .77rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-facility-timeline .list-group-item .small { margin-top: .22rem; font-size: .77rem; }
.crm-facility-timeline .list-group-item .btn { margin-top: .8rem !important; }
.crm-facility-timeline .list-group > p { margin: 1.5rem 0 !important; color: #6f7d75; }
.crm-facility-offers .table-toolbar { padding: 0 0 1rem; border-color: #e5ece8; }
.crm-facility-offers .table-toolbar > div { width: 100%; flex-wrap: wrap; gap: .6rem; }
.crm-facility-offers .table-toolbar h3 { color: #203d34; font-size: 1.05rem; font-weight: 750; }
.crm-facility-offers .table { margin: 0; }
.crm-facility-offers .table th { color: #64786c; font-size: .72rem; font-weight: 750; }
.crm-facility-offers .table td { padding-block: .9rem; font-size: .85rem; overflow-wrap: anywhere; }
.crm-facility-offers .table td.text-muted { padding: 1.5rem .3rem; color: #6f7d75 !important; }
@media (max-width: 1050px) { .crm-facility-workspace { grid-template-columns: minmax(0, 1fr); } .crm-facility-offers { border-left: 0; border-top: 1px solid #e5ece8; } }
@media (max-width: 575.98px) { .crm-facility-section { padding: 1.15rem 1rem; } .crm-facility-section-header .btn { width: 100%; } }
