/* =========================================================
   ELTEKSMAK KOKPİT - KURUMSAL RENKLER
   ========================================================= */

:root {
    --elteksmak-red: #ec1d23;
    --elteksmak-red-dark: #b9151a;
    --elteksmak-red-light: #fff1f2;
    --elteksmak-black: #111111;
    --elteksmak-dark-gray: #343434;
    --elteksmak-medium-gray: #777777;
    --elteksmak-light-gray: #f5f5f5;
    --elteksmak-border: #dddddd;
    --elteksmak-white: #ffffff;
}

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--elteksmak-light-gray);
    color: var(--elteksmak-black);
}

/* =========================================================
   GİRİŞ SAYFASI
   ========================================================= */

.kokpit-login-wrapper {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.kokpit-login-card {
    width: 100%;
    max-width: 470px;
    padding: 38px 42px 30px;
    background-color: var(--elteksmak-white);
    border-top: 6px solid var(--elteksmak-red);
    border-radius: 12px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.13);
}

.kokpit-login-logo-wrapper {
    text-align: center;
    margin-bottom: 22px;
}

.kokpit-login-logo {
    width: 100%;
    max-width: 380px;
    height: auto;
    object-fit: contain;
}

.kokpit-login-heading {
    text-align: center;
    margin-bottom: 28px;
}

    .kokpit-login-heading h1 {
        margin-bottom: 7px;
        color: var(--elteksmak-black);
        font-size: 1.75rem;
        font-weight: 800;
        letter-spacing: 0.02em;
    }

    .kokpit-login-heading p {
        margin: 0;
        color: var(--elteksmak-medium-gray);
        font-size: 0.98rem;
    }

.kokpit-login-footer {
    margin-top: 25px;
    padding-top: 17px;
    border-top: 1px solid var(--elteksmak-border);
    color: var(--elteksmak-medium-gray);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

/* =========================================================
   FORM ALANLARI
   ========================================================= */

.form-label {
    color: var(--elteksmak-dark-gray);
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 44px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background-color: var(--elteksmak-white);
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--elteksmak-red);
        box-shadow: 0 0 0 0.2rem rgba(236, 29, 35, 0.16);
    }

.kokpit-form-control {
    padding-left: 13px;
    padding-right: 13px;
}

/* =========================================================
   BUTONLAR
   ========================================================= */

.btn-primary,
.kokpit-login-button {
    background-color: var(--elteksmak-red);
    border-color: var(--elteksmak-red);
    color: var(--elteksmak-white);
    font-weight: 700;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .kokpit-login-button:hover,
    .kokpit-login-button:focus {
        background-color: var(--elteksmak-red-dark);
        border-color: var(--elteksmak-red-dark);
        color: var(--elteksmak-white);
    }

.kokpit-login-button {
    width: 100%;
    min-height: 47px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.btn-outline-primary {
    color: var(--elteksmak-red);
    border-color: var(--elteksmak-red);
}

    .btn-outline-primary:hover {
        color: var(--elteksmak-white);
        background-color: var(--elteksmak-red);
        border-color: var(--elteksmak-red);
    }

/* =========================================================
   KARTLAR VE TABLOLAR
   ========================================================= */

.card {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.table thead th {
    color: var(--elteksmak-white);
    background-color: var(--elteksmak-black);
    border-color: var(--elteksmak-black);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: var(--elteksmak-red-light);
}

/* =========================================================
   DOĞRULAMA MESAJLARI
   ========================================================= */

.text-danger {
    color: var(--elteksmak-red) !important;
}

.kokpit-validation-summary:empty {
    display: none;
}

.kokpit-validation-summary ul {
    margin-bottom: 0;
    padding-left: 18px;
}

/* =========================================================
   MOBİL GÖRÜNÜM
   ========================================================= */

@media (max-width: 767.98px) {
    .kokpit-login-wrapper {
        align-items: flex-start;
        padding-top: 20px;
    }

    .kokpit-login-card {
        padding: 28px 22px 24px;
    }

    .kokpit-login-logo {
        max-width: 320px;
    }
}

/* =========================================================
   ANA KOKPİT SAYFASI
   ========================================================= */

.kokpit-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.kokpit-top-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 18px 22px;
    background-color: var(--elteksmak-white);
    border-left: 5px solid var(--elteksmak-red);
    border-radius: 10px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.07);
}

.kokpit-brand-area {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.kokpit-page-logo {
    display: block;
    width: 185px;
    max-width: 28vw;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.kokpit-page-heading {
    padding-left: 22px;
    border-left: 1px solid #dddddd;
}

    .kokpit-page-heading h1 {
        margin: 0 0 4px;
        color: var(--elteksmak-black);
        font-size: 1.55rem;
        font-weight: 800;
    }

    .kokpit-page-heading p {
        margin: 0;
        color: var(--elteksmak-medium-gray);
        font-size: 0.9rem;
    }

.kokpit-user-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.kokpit-user-information {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.kokpit-user-label {
    margin-bottom: 2px;
    color: var(--elteksmak-medium-gray);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kokpit-user-information strong {
    color: var(--elteksmak-black);
    font-size: 0.92rem;
}

.kokpit-logout-button {
    white-space: nowrap;
}

/* =========================================================
   ANA İŞLEM ALANI
   ========================================================= */

.kokpit-action-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 22px 25px;
    color: var(--elteksmak-white);
    background-color: var(--elteksmak-black);
    border-radius: 10px;
}

    .kokpit-action-panel h2 {
        margin: 0 0 5px;
        font-size: 1.45rem;
        font-weight: 700;
    }

    .kokpit-action-panel p {
        margin: 0;
        color: #cfcfcf;
        font-size: 0.9rem;
    }

.kokpit-create-button {
    min-width: 190px;
    min-height: 44px;
    white-space: nowrap;
}

/* =========================================================
   FİLTRELER
   ========================================================= */

.kokpit-filter-card,
.kokpit-list-card {
    margin-bottom: 18px;
    padding: 22px;
    background-color: var(--elteksmak-white);
    border-radius: 10px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.07);
}

.kokpit-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--elteksmak-border);
}

    .kokpit-section-heading h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
    }

    .kokpit-section-heading span {
        color: var(--elteksmak-medium-gray);
        font-size: 0.82rem;
    }

.kokpit-clear-filters {
    color: var(--elteksmak-red);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

    .kokpit-clear-filters:hover {
        color: var(--elteksmak-red-dark);
        text-decoration: underline;
    }

/* =========================================================
   MÜŞTERİ TABLOSU
   ========================================================= */

.kokpit-list-card {
    padding: 0;
    overflow: hidden;
}

.kokpit-record-table {
    margin-bottom: 0;
}

    .kokpit-record-table thead th {
        padding: 15px 18px;
        border: 0;
        color: var(--elteksmak-white);
        background-color: var(--elteksmak-black);
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .kokpit-record-table tbody td {
        padding: 15px 18px;
        border-color: #eeeeee;
        color: var(--elteksmak-dark-gray);
        font-size: 0.88rem;
        vertical-align: middle;
    }

    .kokpit-record-table tbody tr:hover {
        background-color: var(--elteksmak-red-light);
    }

.kokpit-customer-name {
    color: var(--elteksmak-black);
}

.kokpit-machine-list {
    min-width: 230px;
    max-width: 390px;
}

.kokpit-stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    color: #333333;
    background-color: #eeeeee;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.kokpit-probability-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.probability-very-low {
    color: #ffffff;
    background-color: #bd1e27;
}

.probability-low {
    color: #ffffff;
    background-color: #e46b22;
}

.probability-medium {
    color: #4c3b00;
    background-color: #f4d35e;
}

.probability-high {
    color: #174b25;
    background-color: #9bd5a8;
}

.probability-very-high {
    color: #ffffff;
    background-color: #218838;
}

.probability-default {
    color: #333333;
    background-color: #dddddd;
}

.kokpit-record-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
}

/* =========================================================
   BOŞ LİSTE
   ========================================================= */

.kokpit-empty-state {
    padding: 65px 25px;
    text-align: center;
}

.kokpit-empty-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    color: var(--elteksmak-white);
    background-color: var(--elteksmak-red);
    border-radius: 14px;
    font-size: 1.8rem;
    font-weight: 900;
}

.kokpit-empty-state h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

.kokpit-empty-state p {
    max-width: 500px;
    margin: 0 auto 22px;
    color: var(--elteksmak-medium-gray);
}

/* =========================================================
   RAPORLAMA
   ========================================================= */

.kokpit-report-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 22px 25px;
    background-color: var(--elteksmak-white);
    border: 1px solid var(--elteksmak-border);
    border-radius: 10px;
}

    .kokpit-report-panel h3 {
        margin: 0 0 5px;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .kokpit-report-panel p {
        margin: 0;
        color: var(--elteksmak-medium-gray);
        font-size: 0.86rem;
    }

.kokpit-report-buttons {
    display: flex;
    gap: 10px;
}

/* =========================================================
   MODAL
   ========================================================= */

.kokpit-modal-content {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
}

.kokpit-modal-header {
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 4px solid var(--elteksmak-red);
}

    .kokpit-modal-header h2 {
        margin: 0 0 4px;
        font-size: 1.3rem;
        font-weight: 800;
    }

    .kokpit-modal-header p {
        margin: 0;
        color: var(--elteksmak-medium-gray);
        font-size: 0.86rem;
    }

.kokpit-modal-placeholder {
    padding: 60px 25px;
    text-align: center;
}

    .kokpit-modal-placeholder h3 {
        font-size: 1.15rem;
        font-weight: 700;
    }

    .kokpit-modal-placeholder p {
        margin-bottom: 0;
        color: var(--elteksmak-medium-gray);
    }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {
    .kokpit-top-panel,
    .kokpit-action-panel,
    .kokpit-report-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .kokpit-user-area {
        width: 100%;
        justify-content: space-between;
    }

    .kokpit-user-information {
        align-items: flex-start;
    }

    .kokpit-create-button,
    .kokpit-report-buttons {
        width: 100%;
    }

        .kokpit-report-buttons .btn {
            flex: 1;
        }
}

@media (max-width: 575.98px) {
    .kokpit-page {
        padding: 12px;
    }

    .kokpit-top-panel {
        padding: 15px;
    }

    .kokpit-brand-area {
        width: 100%;
        gap: 14px;
    }

    .kokpit-page-logo {
        width: 145px;
        max-width: 48vw;
    }

    .kokpit-page-heading {
        padding-left: 14px;
    }

        .kokpit-page-heading h1 {
            font-size: 1.18rem;
        }

        .kokpit-page-heading p {
            display: none;
        }

    .kokpit-action-panel,
    .kokpit-filter-card,
    .kokpit-report-panel {
        padding: 18px;
    }

    .kokpit-report-buttons {
        flex-direction: column;
    }

    .kokpit-record-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   BAŞARI MESAJI
   ========================================================= */

.kokpit-success-alert {
    margin-bottom: 18px;
    border: 0;
    border-left: 5px solid #218838;
    border-radius: 8px;
}

/* =========================================================
   KAYIT FORMU
   ========================================================= */

.kokpit-record-form {
    padding: 24px;
    background-color: #f6f6f6;
}

.kokpit-form-section {
    margin-bottom: 22px;
    padding: 22px;
    background-color: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
}

    .kokpit-form-section:last-child {
        margin-bottom: 0;
    }

.kokpit-form-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6e6e6;
}

    .kokpit-form-section-heading h3 {
        margin: 0 0 3px;
        font-size: 1rem;
        font-weight: 800;
    }

    .kokpit-form-section-heading p {
        margin: 0;
        color: var(--elteksmak-medium-gray);
        font-size: 0.82rem;
    }

.kokpit-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: #ffffff;
    background-color: var(--elteksmak-red);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
}

.kokpit-field-description {
    margin: -4px 0 14px;
    color: var(--elteksmak-medium-gray);
    font-size: 0.82rem;
}

/* =========================================================
   YURT İÇİ / YURT DIŞI
   ========================================================= */

.kokpit-market-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.kokpit-choice-card {
    position: relative;
    cursor: pointer;
}

    .kokpit-choice-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .kokpit-choice-card span {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 9px 14px;
        color: #333333;
        background-color: #f3f3f3;
        border: 2px solid transparent;
        border-radius: 7px;
        font-weight: 700;
        transition: 0.15s ease-in-out;
    }

    .kokpit-choice-card input:checked + span {
        color: var(--elteksmak-red);
        background-color: var(--elteksmak-red-light);
        border-color: var(--elteksmak-red);
    }

/* =========================================================
   MAKİNE SEÇİMLERİ
   ========================================================= */

.kokpit-machine-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.kokpit-machine-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 45px;
    padding: 10px 12px;
    cursor: pointer;
    background-color: #f7f7f7;
    border: 1px solid #dddddd;
    border-radius: 7px;
}

    .kokpit-machine-option:hover {
        background-color: var(--elteksmak-red-light);
        border-color: #efaaaa;
    }

    .kokpit-machine-option span {
        font-size: 0.84rem;
        font-weight: 600;
    }

    .kokpit-machine-option .form-check-input {
        margin: 0;
        flex-shrink: 0;
    }

        .kokpit-machine-option .form-check-input:checked {
            background-color: var(--elteksmak-red);
            border-color: var(--elteksmak-red);
        }

/* =========================================================
   TEKLİF ALANI
   ========================================================= */

.kokpit-offer-heading {
    justify-content: space-between;
}

.kokpit-offer-empty {
    padding: 20px;
    color: #777777;
    text-align: center;
    background-color: #f8f8f8;
    border: 1px dashed #c9c9c9;
    border-radius: 8px;
    font-size: 0.88rem;
}

.kokpit-offer-item {
    margin-bottom: 16px;
    padding: 18px;
    background-color: #fafafa;
    border: 1px solid #dddddd;
    border-left: 4px solid var(--elteksmak-red);
    border-radius: 8px;
}

    .kokpit-offer-item:last-child {
        margin-bottom: 0;
    }

.kokpit-offer-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid #e3e3e3;
}

    .kokpit-offer-item-header strong {
        font-size: 0.95rem;
    }

.kokpit-revision-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
    padding: 14px 16px;
    background-color: #f6f6f6;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.kokpit-revision-editor-heading h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 750;
}

.kokpit-revision-editor-heading p {
    margin: 0;
    color: #666666;
    font-size: 0.82rem;
}

.kokpit-revision-offer-changed {
    background-color: #fff9e8;
    border-color: #e0bd51;
    border-left-color: #d39d00;
}

/* =========================================================
   SATIŞ OLASILIĞI
   ========================================================= */

.kokpit-probability-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.kokpit-probability-option {
    position: relative;
    cursor: pointer;
}

    .kokpit-probability-option input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .kokpit-probability-option span {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 9px 10px;
        border: 3px solid transparent;
        border-radius: 8px;
        font-size: 0.82rem;
        font-weight: 800;
        text-align: center;
        transition: 0.15s ease-in-out;
    }

.probability-choice-very-low span {
    color: #8b171d;
    background-color: #fde3e5;
}

.probability-choice-low span {
    color: #9a4612;
    background-color: #ffeadb;
}

.probability-choice-medium span {
    color: #725d00;
    background-color: #fff4ba;
}

.probability-choice-high span {
    color: #246135;
    background-color: #dcf2e2;
}

.probability-choice-very-high span {
    color: #155326;
    background-color: #bfe7c9;
}

.kokpit-probability-option input:checked + span {
    border-color: currentColor;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* =========================================================
   PASİF ALANLAR
   ========================================================= */

.kokpit-disabled-section {
    opacity: 0.58;
    background-color: #f1f1f1;
}

.kokpit-inline-radio-group,
.kokpit-result-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

    .kokpit-inline-radio-group label,
    .kokpit-result-options label {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 0.86rem;
        font-weight: 600;
    }

/* =========================================================
   NOTLAR VE MODAL ALT BÖLÜMÜ
   ========================================================= */

.kokpit-character-hint {
    margin-top: 5px;
    color: var(--elteksmak-medium-gray);
    font-size: 0.75rem;
    text-align: right;
}

.kokpit-modal-footer {
    padding: 16px 24px;
    background-color: #ffffff;
    border-top: 1px solid #dddddd;
}

.kokpit-save-record-button {
    min-width: 170px;
}

/* =========================================================
   RESPONSIVE FORM
   ========================================================= */

@media (max-width: 991.98px) {
    .kokpit-machine-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kokpit-probability-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .kokpit-record-form {
        padding: 12px;
    }

    .kokpit-form-section {
        padding: 16px;
    }

    .kokpit-form-section-heading,
    .kokpit-offer-heading {
        align-items: flex-start;
        flex-direction: column;
    }

        .kokpit-offer-heading .d-flex {
            align-items: flex-start !important;
        }

        .kokpit-offer-heading .btn {
            width: 100%;
        }

    .kokpit-market-options,
    .kokpit-machine-options,
    .kokpit-probability-options {
        grid-template-columns: 1fr;
    }

    .kokpit-offer-item-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .kokpit-modal-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .kokpit-modal-footer .btn {
            width: 100%;
            min-width: 0;
        }
}

/* =========================================================
   MODAL KAYDIRMA DÜZELTMESİ
   ========================================================= */

#newRecordModal .modal-dialog {
    height: calc(100vh - 2rem);
    height: calc(100dvh - 2rem);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#newRecordModal .kokpit-modal-content {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.kokpit-modal-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.kokpit-modal-header,
.kokpit-modal-footer {
    flex: 0 0 auto;
}

.kokpit-record-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 575.98px) {
    #newRecordModal .modal-dialog {
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        margin: 0;
    }

    #newRecordModal .kokpit-modal-content {
        border-radius: 0;
    }
}

/* =========================================================
   KAYIT DETAY MODALI
   ========================================================= */

.kokpit-details-body {
    padding: 24px;
    background-color: #f5f5f5;
}

.kokpit-details-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 260px;
    color: #666666;
}

.kokpit-details-section {
    margin-bottom: 18px;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 9px;
}

    .kokpit-details-section:last-child {
        margin-bottom: 0;
    }

    .kokpit-details-section h3 {
        margin: 0 0 16px;
        padding-bottom: 11px;
        color: #111111;
        border-bottom: 2px solid var(--elteksmak-red);
        font-size: 1rem;
        font-weight: 800;
    }

.kokpit-details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.kokpit-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 13px;
    background-color: #f7f7f7;
    border-radius: 7px;
}

    .kokpit-detail-item > span:first-child {
        color: #777777;
        font-size: 0.74rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .kokpit-detail-item strong {
        color: #222222;
        font-size: 0.9rem;
        overflow-wrap: anywhere;
    }

.kokpit-detail-text,
.kokpit-detail-description {
    color: #333333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.kokpit-detail-description {
    margin-top: 14px;
    padding: 14px;
    background-color: #f7f7f7;
    border-radius: 7px;
}

    .kokpit-detail-description span {
        display: block;
        margin-bottom: 6px;
        color: #777777;
        font-size: 0.74rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .kokpit-detail-description p {
        margin: 0;
    }

.kokpit-details-empty {
    padding: 20px;
    color: #777777;
    text-align: center;
    background-color: #f8f8f8;
    border: 1px dashed #cccccc;
    border-radius: 7px;
}

.kokpit-details-offer-version {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #dddddd;
    border-radius: 8px;
}

    .kokpit-details-offer-version:last-child {
        margin-bottom: 0;
    }

.kokpit-details-offer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 15px;
    color: #ffffff;
    background-color: #222222;
}

    .kokpit-details-offer-header span {
        color: #cccccc;
        font-size: 0.76rem;
    }

.kokpit-details-offer-items {
    padding: 14px;
    background-color: #fafafa;
}

.kokpit-details-offer-item {
    margin-bottom: 10px;
    padding: 13px;
    background-color: #ffffff;
    border-left: 4px solid var(--elteksmak-red);
    border-radius: 6px;
}

    .kokpit-details-offer-item:last-child {
        margin-bottom: 0;
    }

.kokpit-details-offer-description {
    margin-bottom: 10px;
    color: #222222;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.kokpit-details-offer-metadata {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: #777777;
    font-size: 0.82rem;
}

    .kokpit-details-offer-metadata strong {
        color: var(--elteksmak-red);
        font-size: 1rem;
    }

@media (max-width: 991.98px) {
    .kokpit-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .kokpit-details-body {
        padding: 12px;
    }

    .kokpit-details-section {
        padding: 15px;
    }

    .kokpit-details-grid {
        grid-template-columns: 1fr;
    }

    .kokpit-details-offer-header,
    .kokpit-details-offer-metadata {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* =========================================================
   KAYIT İŞLEMLERİ - DÜZENLEME / SİLME
   ========================================================= */

.kokpit-details-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.kokpit-details-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kokpit-details-action-buttons .btn {
    min-width: 105px;
}

.kokpit-offer-mode-hint {
    margin-bottom: 15px;
    padding: 11px 13px;
    color: #555555;
    background-color: #f4f4f4;
    border-left: 4px solid var(--elteksmak-red);
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.kokpit-offer-readonly {
    opacity: 0.72;
}

.kokpit-offer-readonly .kokpit-offer-mode-hint {
    opacity: 1;
}

.kokpit-validation-summary:empty,
.kokpit-validation-summary.validation-summary-valid {
    display: none;
}

#deleteRecordModal .modal-body {
    padding: 24px;
}

@media (max-width: 575.98px) {
    .kokpit-details-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .kokpit-details-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .kokpit-details-footer > .btn,
    .kokpit-details-action-buttons .btn {
        width: 100%;
        min-width: 0;
    }
}

.kokpit-error-alert {
    margin-bottom: 18px;
    border: 0;
    border-left: 5px solid var(--elteksmak-red);
    border-radius: 8px;
}

/* =========================================================
   SÖZLEŞME VE SATIŞ KALemLERİ
   ========================================================= */

.kokpit-sale-section-heading,
.kokpit-contract-header,
.kokpit-contract-machines-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kokpit-sale-section-heading {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e3e3e3;
}

.kokpit-sale-section-heading h4,
.kokpit-contract-machines-heading strong {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
}

.kokpit-sale-section-heading p,
.kokpit-contract-machines-heading span {
    display: block;
    margin: 3px 0 0;
    color: #777;
    font-size: .78rem;
}

.kokpit-tracking-check {
    margin-bottom: 18px;
    padding: 14px 14px 14px 38px;
    background: #fff8e7;
    border: 1px solid #efdba3;
    border-radius: 8px;
}

.kokpit-contract-card {
    margin: 0 0 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-left: 5px solid var(--elteksmak-red);
    border-radius: 9px;
}

.kokpit-contract-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.kokpit-contract-machines-heading {
    margin: 18px 0 12px;
}

.kokpit-contract-machine-row {
    margin-bottom: 10px;
    padding: 13px;
    background: #f7f7f7;
    border: 1px solid #e4e4e4;
    border-radius: 7px;
}

.kokpit-contract-machine-row:last-child {
    margin-bottom: 0;
}

.kokpit-details-contract {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.kokpit-details-contract:last-child {
    margin-bottom: 0;
}

.kokpit-details-contract-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 15px;
    color: #fff;
    background: #222;
}

.kokpit-details-contract-header span {
    color: #ccc;
    font-size: .78rem;
}

.kokpit-details-contract-items {
    padding: 12px 14px;
    background: #fafafa;
}

.kokpit-details-contract-item {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 90px 150px;
    gap: 14px;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.kokpit-details-contract-item:last-child {
    border-bottom: 0;
}

.kokpit-details-contract-item strong {
    color: var(--elteksmak-red);
    text-align: right;
}

/* =========================================================
   RAPOR SEÇİM MODALI
   ========================================================= */

.kokpit-report-form {
    padding: 24px;
    background: #f6f6f6;
}

.kokpit-report-market-section {
    margin-top: 24px;
    padding: 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 9px;
}

.kokpit-report-market-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.kokpit-report-market-header h3 {
    margin: 0 0 3px;
    font-size: 1rem;
    font-weight: 800;
}

.kokpit-report-market-header p {
    margin: 0;
    color: #777;
    font-size: .8rem;
}

.kokpit-report-market-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.kokpit-report-market-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-height: 290px;
    margin-top: 12px;
    overflow-y: auto;
}

.kokpit-report-market-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    cursor: pointer;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: .84rem;
}

.kokpit-report-market-option:hover {
    background: var(--elteksmak-red-light);
    border-color: #e9a3a5;
}

.kokpit-report-market-option input:checked + span {
    color: var(--elteksmak-red);
    font-weight: 700;
}

/* =========================================================
   RAPOR SAYFALARI
   ========================================================= */

.report-page {
    width: min(1800px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 50px;
    color: #1d1d1d;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding: 18px 22px;
    background: #fff;
    border-left: 5px solid var(--elteksmak-red);
    border-radius: 9px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, .07);
}

.report-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.report-logo {
    width: 160px;
    height: auto;
}

.report-kicker,
.report-section-kicker {
    color: var(--elteksmak-red);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.report-header h1 {
    margin: 3px 0 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.report-actions {
    display: flex;
    gap: 9px;
}

.report-metadata {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.report-metadata > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
}

.report-metadata span {
    color: #777;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.report-metadata strong {
    font-size: .88rem;
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.report-kpi-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-kpi-card {
    min-height: 104px;
    padding: 17px 19px;
    background: #fff;
    border-top: 4px solid #222;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .06);
}

.report-kpi-card span {
    display: block;
    color: #6a6a6a;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.report-kpi-card strong {
    display: block;
    margin-top: 9px;
    font-size: 1.7rem;
    line-height: 1.1;
}

.report-kpi-card small {
    display: block;
    margin-top: 7px;
    color: #777;
}

.report-kpi-card-emphasis,
.report-kpi-card-opportunity {
    border-top-color: #218838;
}

.report-kpi-card-danger {
    border-top-color: var(--elteksmak-red);
}

.report-rate-card {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px 22px;
    margin-bottom: 18px;
    padding: 15px 18px;
    background: #edf8f0;
    border: 1px solid #b9dfc1;
    border-left: 5px solid #218838;
    border-radius: 8px;
}

.report-rate-card > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.report-rate-card span {
    color: #555;
    font-size: .78rem;
}

.report-rate-values {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
}

.report-rate-card p {
    grid-column: 1 / -1;
    margin: 0;
    color: #555;
    font-size: .78rem;
}

.report-rate-warning {
    background: #fff8e7;
    border-color: #efdba3;
    border-left-color: #d79713;
}

.report-section {
    margin-bottom: 18px;
    padding: 19px;
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .06);
}

.report-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--elteksmak-red);
}

.report-section-title h2 {
    margin: 3px 0 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.report-count-badge,
.report-status-pill,
.report-opportunity-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    background: #efefef;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.report-opportunity-pill {
    color: #174b25;
    background: #d9f0df;
}

.kokpit-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.result-sale-completed {
    color: #145c2b;
    background: #d9f2df;
    border-color: #a8d9b5;
}

.result-project-lost {
    color: #8a1c24;
    background: #f8dadd;
    border-color: #e9afb5;
}

.result-project-postponed {
    color: #174f82;
    background: #dcecff;
    border-color: #abccef;
}

.result-project-cancelled {
    color: #812755;
    background: #f8ddec;
    border-color: #e7b0cf;
}

.result-in-progress {
    color: #725600;
    background: #fff1b8;
    border-color: #e8cf67;
}

.report-result-cell {
    font-weight: 800;
}

.report-result-success {
    color: #145c2b !important;
    background: #d9f2df !important;
}

.report-result-danger {
    color: #8a1c24 !important;
    background: #f8dadd !important;
}

.report-result-pending {
    color: #725600 !important;
    background: #fff1b8 !important;
}

.report-empty {
    padding: 32px 20px;
    color: #777;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #bbb;
    border-radius: 7px;
}

.report-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.report-table,
.report-mini-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table {
    min-width: 1150px;
    font-size: .75rem;
}

.report-table th {
    padding: 10px 9px;
    color: #fff;
    background: #1d1d1d;
    border: 1px solid #3f3f3f;
    font-weight: 700;
    vertical-align: middle;
}

.report-table td {
    padding: 9px;
    border: 1px solid #e1e1e1;
    vertical-align: top;
    line-height: 1.45;
}

.report-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.report-table tfoot th {
    background: var(--elteksmak-red);
}

.report-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-breakdown-card {
    padding: 15px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.report-breakdown-card h3,
.report-chart-card h3 {
    margin: 0 0 12px;
    font-size: .9rem;
    font-weight: 800;
}

.report-mini-table {
    font-size: .78rem;
}

.report-mini-table th,
.report-mini-table td {
    padding: 8px 9px;
    border-bottom: 1px solid #ddd;
}

.report-mini-table th {
    color: #555;
    font-size: .7rem;
    text-transform: uppercase;
}

.report-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-chart-card {
    min-width: 0;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.report-chart-card-wide {
    grid-column: 1 / -1;
}

.report-chart-card canvas {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

.report-chart-total {
    margin: 8px 0 2px;
    color: #222;
    font-size: .88rem;
    font-weight: 800;
    text-align: center;
}

.report-print-new-page {
    display: block;
}

.report-chart-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin-top: 10px;
    font-size: .72rem;
}

.report-chart-legend > div {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}

.report-chart-legend-marker {
    width: 10px;
    height: 10px;
    margin-top: 3px;
    flex: 0 0 auto;
    border-radius: 2px;
}

.report-avoid-break,
.report-chart-card,
.report-breakdown-card,
.report-rate-card,
.report-kpi-card {
    break-inside: avoid;
    page-break-inside: avoid;
}

@media (max-width: 991.98px) {
    .kokpit-report-market-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-kpi-grid,
    .report-kpi-grid-four,
    .report-chart-grid,
    .report-breakdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-chart-card-wide {
        grid-column: auto;
    }
}

@media (max-width: 575.98px) {
    .kokpit-sale-section-heading,
    .kokpit-contract-header,
    .kokpit-contract-machines-heading,
    .kokpit-report-market-header,
    .report-header,
    .report-section-title,
    .report-rate-card {
        align-items: stretch;
        flex-direction: column;
        display: flex;
    }

    .kokpit-report-market-list,
    .report-metadata,
    .report-kpi-grid,
    .report-kpi-grid-four,
    .report-chart-grid,
    .report-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .kokpit-details-contract-item {
        grid-template-columns: 1fr;
    }

    .kokpit-details-contract-item strong {
        text-align: left;
    }

    .report-page {
        width: calc(100% - 20px);
        padding-top: 10px;
    }

    .report-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-logo {
        width: 135px;
    }

    .report-actions .btn {
        flex: 1;
    }

    .report-chart-legend {
        grid-template-columns: 1fr;
    }
}

@page {
    size: A4 landscape;
    margin: 10mm;
}

@media print {
    html,
    body {
        width: 100%;
        min-width: 0;
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .report-page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .report-header,
    .report-section,
    .report-kpi-card {
        box-shadow: none;
    }

    .report-header {
        margin-bottom: 6mm;
        padding: 4mm;
    }

    .report-logo {
        width: 38mm;
    }

    .report-metadata,
    .report-kpi-grid,
    .report-section,
    .report-rate-card {
        margin-bottom: 5mm;
    }

    .report-section {
        padding: 4mm;
    }

    .report-table-wrapper {
        overflow: visible;
    }

    .report-table {
        min-width: 0;
        table-layout: auto;
        font-size: 7.2pt;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table tfoot {
        display: table-footer-group;
    }

    .report-table tr,
    .report-table td,
    .report-table th {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .report-table th,
    .report-table td {
        padding: 2mm;
    }

    .report-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4mm;
    }

    .report-chart-card {
        min-height: 95mm;
        padding: 3mm;
    }

    .report-chart-card-wide {
        grid-column: 1 / -1;
    }

    .report-chart-card canvas {
        max-height: 70mm !important;
    }

    .report-chart-legend {
        font-size: 6.8pt;
    }
}

.kokpit-contract-total {
    margin-top: 12px;
    padding: 10px 12px;
    color: #555;
    text-align: right;
    background: #f1f1f1;
    border-radius: 6px;
    font-size: .84rem;
}

.kokpit-contract-total strong {
    color: var(--elteksmak-red);
    font-size: .95rem;
}

/* =========================================================
   RAPOR YAZDIRMA - BÖLÜM VE BAŞLIK SAYFA KONTROLÜ
   ========================================================= */

@media print {
    .report-analyses-section,
    .report-charts-section {
        display: block !important;
        width: 100% !important;
        break-before: page !important;
        page-break-before: always !important;
    }

    /*
     * Uzun tabloların ardından analiz bölümünü taşıyan dolu wrapper,
     * Chrome/Edge yazdırma motorunda section kuralından daha kararlı çalışır.
     */
    .report-print-new-page {
        display: block !important;
        width: 100% !important;
        break-before: page !important;
        page-break-before: always !important;
    }

    .report-print-new-page > .report-analyses-section {
        break-before: auto !important;
        page-break-before: auto !important;
    }

    .report-section-title {
        break-after: avoid-page !important;
        page-break-after: avoid !important;
    }

    .report-section-title + * {
        break-before: avoid-page !important;
        page-break-before: avoid !important;
    }

    .report-analysis-card,
    .report-breakdown-card,
    .report-chart-card,
    .report-chart-container,
    .report-chart-total {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}

@media (max-width: 575.98px) {
    .kokpit-revision-editor-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .kokpit-revision-editor-heading .badge {
        align-self: flex-start;
    }
}
