﻿:root {
    --brand-primary: #0f4c81;
    --brand-secondary: #1669c9;
    --brand-accent: #18b6a0;
    --brand-muted: #6b7a99;
    --bg-page: #eef2f9;
    --bg-card: #ffffff;
    --border-soft: rgba(15, 76, 129, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-soft: 0 18px 45px -25px rgba(15, 76, 129, 0.45);
    --shadow-card: 0 24px 48px -28px rgba(15, 76, 129, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Scrollbar styling (Webkit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 76, 129, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 76, 129, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 76, 129, 0.5);
}

/* Focus visible improvements */
*:focus-visible {
    outline: 2px solid var(--brand-secondary);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: rgba(22, 105, 201, 0.2);
    color: inherit;
}

body.app-body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, rgba(22, 105, 201, 0.12), transparent 45%),
        radial-gradient(circle at bottom right, rgba(24, 182, 160, 0.14), transparent 40%),
        var(--bg-page);
    color: #1e2a3b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.container,
.container-xl {
    max-width: 1320px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1400px) {
    .container,
    .container-xl {
        max-width: 1400px;
    }
}

.navbar {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.95), rgba(22, 105, 201, 0.95));
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px -20px rgba(15, 76, 129, 0.7);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.navbar-brand-logo {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.navbar-brand-text {
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding-inline: 1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    opacity: 1;
    transform: translateY(-1px);
}

.navbar .dropdown-menu {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 76, 129, 0.12);
    box-shadow: 0 18px 35px -25px rgba(15, 76, 129, 0.5);
    min-width: 14rem;
}

.navbar .dropdown-item {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.navbar .badge.bg-light {
    color: var(--brand-primary) !important;
    font-size: 0.7rem;
    padding: 0.4rem 0.55rem;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.navbar-text {
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline-light {
    border-radius: 30px;
    padding-inline: 1.2rem;
}

.page-header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 2.75rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, rgba(15, 76, 129, 0.08), rgba(24, 182, 160, 0.08)) var(--bg-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(22, 105, 201, 0.12), transparent 55%),
        radial-gradient(circle at bottom left, rgba(24, 182, 160, 0.16), transparent 50%);
    pointer-events: none;
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header .page-intro {
    flex: 1 1 420px;
    max-width: 680px;
}

.page-eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.24em;
    color: var(--brand-secondary);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.page-title {
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 700;
    color: rgb(20, 45, 82);
    margin-bottom: 0.4rem;
}

.page-subtitle {
    color: rgba(30, 42, 59, 0.75);
    max-width: 540px;
}

.page-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.page-actions .btn {
    padding-inline: 1.25rem;
    border-radius: 999px;
    font-weight: 600;
}

.page-actions .btn-outline-secondary {
    border-color: rgba(15, 76, 129, 0.22);
    color: #1e2a3b;
    background-color: rgba(255, 255, 255, 0.65);
}

.page-actions .btn-outline-secondary:hover,
.page-actions .btn-outline-secondary:focus {
    border-color: rgba(15, 76, 129, 0.4);
    background-color: #ffffff;
}

.page-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(15, 76, 129, 0.12), transparent 55%);
    pointer-events: none;
}

.metric-card-title {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-muted);
    margin-bottom: 0.6rem;
}

.metric-card-value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: rgb(20, 45, 82);
}

.metric-card-footnote {
    margin-top: 0.75rem;
    color: rgba(30, 42, 59, 0.7);
    font-size: 0.85rem;
}

.app-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(15, 76, 129, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.app-card:hover,
.app-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 28px 55px -30px rgba(15, 76, 129, 0.55);
}

.app-card:hover::after,
.app-card:focus-within::after {
    opacity: 1;
}

.app-card .card-header {
    background-color: transparent;
    border-color: rgba(15, 76, 129, 0.08);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.app-card .card-body {
    padding: 1.5rem;
}

.app-card .card-footer {
    background-color: rgba(15, 76, 129, 0.03);
    border-top: 1px solid rgba(15, 76, 129, 0.06);
    padding: 1.25rem 1.5rem;
}

.section-divider {
    margin: 2.5rem 0;
    border-top: 1px solid rgba(15, 76, 129, 0.08);
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 76, 129, 0.25);
    min-height: 46px;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(22, 105, 201, 0.7);
    box-shadow: 0 0 0 0.15rem rgba(22, 105, 201, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

.table-offer {
    margin-bottom: 0;
}

.table-offer thead th {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--brand-muted);
    border-bottom: 1px solid rgba(15, 76, 129, 0.12);
    padding-block: 0.75rem;
}

.table-offer tbody td {
    vertical-align: middle;
    border-color: rgba(15, 76, 129, 0.08);
    padding-block: 0.65rem;
}

.table-offer tbody tr:hover {
    background: rgba(15, 76, 129, 0.03);
}

.table-offer input,
.table-offer textarea {
    min-width: 120px;
}

/* Teklif Kalemleri Tablosu - Kompakt Tasarım */
#items-table {
    font-size: 0.875rem;
    table-layout: auto;
}

#items-table thead th {
    font-size: 0.7rem;
    padding: 0.6rem 0.4rem;
    font-weight: 600;
    white-space: nowrap;
    background-color: rgba(15, 76, 129, 0.06);
    text-align: center;
    border-bottom: 2px solid rgba(15, 76, 129, 0.15);
}

#items-table thead th:first-child,
#items-table thead th:nth-child(2) {
    text-align: left;
}

#items-table tbody td {
    padding: 0.5rem 0.4rem;
    vertical-align: middle;
}

#items-table .form-control,
#items-table textarea {
    min-height: 36px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

#items-table textarea.form-control {
    min-height: 60px;
    resize: vertical;
    overflow-y: hidden !important;
    transition: height 0.1s ease;
}

#items-table textarea[name*="[title]"] {
    min-height: 36px !important;
    max-height: 120px !important;
    resize: vertical !important;
    overflow-y: hidden !important;
}

#items-table textarea[name*="[description]"] {
    min-height: 60px !important;
    max-height: 150px !important;
    resize: vertical !important;
    overflow-y: hidden !important;
}

/* Sütun genişlikleri - Kar sütunu kaldırıldı */
#items-table th:nth-child(1),
#items-table td:nth-child(1) {
    width: 16%;
    min-width: 120px;
}

#items-table th:nth-child(2),
#items-table td:nth-child(2) {
    width: 20%;
    min-width: 140px;
}

#items-table th:nth-child(3),
#items-table td:nth-child(3) {
    width: 8%;
    min-width: 70px;
}

#items-table th:nth-child(4),
#items-table td:nth-child(4) {
    width: 8%;
    min-width: 70px;
}

#items-table th:nth-child(5),
#items-table td:nth-child(5) {
    width: 10%;
    min-width: 85px;
}

#items-table th:nth-child(6),
#items-table td:nth-child(6) {
    width: 11%;
    min-width: 90px;
}

#items-table th:nth-child(7),
#items-table td:nth-child(7) {
    width: 8%;
    min-width: 70px;
}

#items-table th:nth-child(8),
#items-table td:nth-child(8) {
    width: 8%;
    min-width: 65px;
}

#items-table th:nth-child(9),
#items-table td:nth-child(9) {
    width: 10%;
    min-width: 85px;
}

#items-table th:nth-child(10),
#items-table td:nth-child(10) {
    width: 3%;
    min-width: 40px;
}

/* Miktar, İndirim, KDV inputlarını daha dar yap */
#items-table input[name*="[quantity]"],
#items-table input[name*="[discount_rate]"],
#items-table input[name*="[tax_rate]"] {
    max-width: 70px;
    text-align: center;
}

/* Maliyet ve Birim Fiyat */
#items-table input[name*="[cost_price]"],
#items-table input[name*="[unit_price]"] {
    max-width: 95px;
    text-align: right;
}

/* Birim */
#items-table input[name*="[unit]"] {
    max-width: 70px;
    text-align: center;
}

/* Tutar görünümü */
#items-table .line-total {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.5rem 0.6rem;
}

/* Silme butonu */
#items-table .remove-item {
    font-size: 1.4rem;
    padding: 0.2rem 0.5rem;
    line-height: 1;
}

/* Maliyet alanı vurgusu */
#items-table .bg-warning {
    background-color: rgba(255, 193, 7, 0.08) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
}


/* Totaller Bölümü */
.offer-totals {
    margin-top: 1rem;
}

.offer-totals .form-control {
    font-size: 0.9rem;
    min-height: 42px;
}

.offer-totals .alert {
    margin-top: 1rem;
    padding: 1rem;
}

.offer-totals .alert .form-control {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 76, 129, 0.15);
    font-size: 0.95rem;
}

.table-stack {
    width: 100%;
}

.table-stack thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Tablo Mobil Responsive */
@media (max-width: 768px) {
    .table-stack thead {
        display: none;
    }

    .table-stack thead th {
        min-width: auto !important;
        white-space: normal;
    }

    .table-stack tbody {
        display: grid;
        gap: 1.25rem;
    }

    .table-stack tbody tr {
        display: grid;
        gap: 0.75rem;
        padding: 1.25rem 1.5rem;
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-soft);
        background: var(--bg-card);
    }

    .table-stack tbody td {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        border: 0;
        padding: 0;
        text-align: left !important;
        min-width: 0;
        overflow: visible;
    }

    .table-stack tbody td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: var(--brand-muted);
        flex: 0 0 auto;
        margin-bottom: 0.35rem;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        line-height: 1.3;
    }

    .table-stack tbody .line-total {
        display: inline-flex;
        justify-content: flex-end;
        font-weight: 600;
        margin-left: auto;
    }

    .table-stack tbody td[data-label='Islem'] {
        align-items: flex-start;
        flex-shrink: 0;
        min-width: auto;
    }

    .table-stack tbody td[data-label='Islem'] .btn {
        align-self: flex-start;
        white-space: nowrap;
    }

    .table-stack tbody td .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        justify-content: flex-start;
    }

    .table-stack tbody td .btn-group .btn {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .table-stack tbody td[data-label='Islemler'] {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .table-stack tbody td[data-label='Islemler'] form {
        width: 100%;
    }

    .table-stack tbody td[data-label='Islemler'] .btn {
        width: 100%;
    }

    .table-stack tbody td[colspan] {
        display: block;
        text-align: center !important;
        padding: 1.5rem !important;
    }

    .table-stack tbody td[colspan]::before {
        display: none;
    }

    /* Items table için özel mobil düzenlemeler */
    #items-table tbody tr {
        padding: 0.75rem;
    }

    #items-table tbody td {
        padding: 0.5rem 0 !important;
        min-width: 0;
    }

    #items-table .form-control,
    #items-table textarea {
        font-size: 0.9rem !important;
        min-height: 38px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        padding: 0.4rem 0.6rem !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    #items-table tbody td {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        min-width: 0;
        flex-shrink: 1;
    }

    #items-table tbody td input[type="text"],
    #items-table tbody td input[type="number"],
    #items-table tbody td textarea {
        width: 100% !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    #items-table .product-select,
    #items-table .image-select {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.5rem !important;
        min-height: auto !important;
        margin-bottom: 0.25rem !important;
    }

    #items-table textarea.form-control {
        min-height: 70px !important;
        resize: vertical !important;
        overflow-y: hidden !important;
    }

    /* Title textarea - sarılabilir, genişleyebilir */
    #items-table textarea[name*="[title]"] {
        min-height: 36px !important;
        max-height: 120px !important;
        resize: vertical !important;
        overflow: hidden !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }

    /* Description textarea - sarılabilir, genişleyebilir */
    #items-table textarea[name*="[description]"] {
        min-height: 60px !important;
        max-height: 150px !important;
        resize: vertical !important;
        overflow: hidden !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }

    #items-table input[name*="[quantity]"],
    #items-table input[name*="[discount_rate]"],
    #items-table input[name*="[tax_rate]"],
    #items-table input[name*="[unit]"] {
        max-width: 100%;
        text-align: left;
    }

    #items-table input[name*="[cost_price]"],
    #items-table input[name*="[unit_price]"] {
        max-width: 100%;
        text-align: left;
    }

    #items-table .remove-item {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .table-stack tbody td .btn-group .btn {
        flex-basis: 100%;
    }

    #items-table tbody tr {
        padding: 0.85rem;
    }
}

.offer-totals .form-control {
    background: rgba(15, 76, 129, 0.04);
    border: none;
    font-weight: 600;
}

.offer-totals .form-control.fw-bold {
    color: var(--brand-primary);
}

.badge {
    border-radius: 999px;
    letter-spacing: 0.04em;
    padding-inline: 0.8rem;
    font-weight: 600;
}

.alert-info {
    background: rgba(24, 182, 160, 0.12);
    border: 1px solid rgba(24, 182, 160, 0.32);
    color: #10665c;
}

[data-copy-target] {
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #1669c9, #0f4c81);
    border: none;
    box-shadow: 0 12px 30px -18px rgba(15, 76, 129, 0.8);
    font-weight: 600;
    padding-inline: 1.5rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0f4c81, #0d3f6b);
}

.btn-outline-secondary {
    border-radius: 30px;
    padding-inline: 1rem;
}

.status-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--brand-muted);
}

.app-footer {
    background: rgba(15, 76, 129, 0.08);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(15, 76, 129, 0.12);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-brand {
    font-weight: 600;
    color: var(--brand-primary);
}

.brand-logo-preview {
    min-width: 180px;
    min-height: 110px;
    display: grid;
    place-items: center;
    background: rgba(15, 76, 129, 0.04);
    border-radius: var(--radius-sm);
}

.brand-logo-preview img {
    max-width: 220px;
    max-height: 90px;
    object-fit: contain;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: linear-gradient(125deg, rgba(15, 76, 129, 0.1), rgba(24, 182, 160, 0.08)) var(--bg-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(22, 105, 201, 0.14), transparent 55%);
    pointer-events: none;
}

.auth-wrapper > * {
    position: relative;
    z-index: 1;
}

.auth-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-visual-inner {
    max-width: 420px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: rgba(15, 76, 129, 0.1);
    color: var(--brand-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: rgb(20, 45, 82);
}

.auth-description {
    color: rgba(30, 42, 59, 0.75);
    margin-bottom: 1.5rem;
}

.auth-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: rgba(30, 42, 59, 0.85);
}

.auth-list li::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    flex: 0 0 auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 76, 129, 0.12);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    backdrop-filter: blur(12px);
}

.auth-card-heading {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: rgb(20, 45, 82);
}

.auth-card-description {
    color: rgba(30, 42, 59, 0.72);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth-card .form-label {
    font-weight: 600;
    color: rgba(30, 42, 59, 0.85);
}

.auth-card .form-control {
    padding: 0.75rem 1rem;
}

.auth-card .btn-primary {
    width: 100%;
    padding-block: 0.85rem;
}

/* Tablet Responsive */
@media (max-width: 991.98px) {
    .navbar .nav-link {
        padding-inline: 0.75rem;
        font-size: 0.95rem;
    }

    .navbar-brand-logo {
        height: 40px;
    }

    .app-card .card-body {
        padding: 1.25rem;
    }

    .page-header {
        padding: 1.75rem;
        gap: 1.25rem;
    }

    .page-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .page-metrics {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .metric-card {
        padding: 1.25rem;
    }
}

/* Mobil Responsive */
@media (max-width: 767.98px) {
    body.app-body {
        font-size: 15px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand-text {
        font-size: 0.9rem;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: var(--radius-md);
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 12px 32px -20px rgba(15, 76, 129, 0.5);
    }

    .navbar-collapse .nav-link {
        color: var(--brand-primary) !important;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        margin-bottom: 0.25rem;
    }

    .navbar-collapse .nav-link:hover {
        background: rgba(15, 76, 129, 0.08);
    }

    .navbar-collapse .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        background: rgba(15, 76, 129, 0.04);
    }

    .navbar-collapse .navbar-text {
        color: var(--brand-muted) !important;
        padding: 0.75rem 1rem;
    }

    .navbar-collapse .btn-outline-light {
        border-color: var(--brand-primary);
        color: var(--brand-primary);
        width: 100%;
        margin-top: 0.5rem;
    }

    .page-header {
        margin-bottom: 2rem;
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .page-header .page-intro {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .page-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .page-eyebrow {
        font-size: 0.7rem;
    }

    .page-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.65rem;
    }

    .page-actions .btn {
        width: 100%;
        padding-block: 0.7rem;
        font-size: 0.95rem;
    }

    .app-card {
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .app-card .card-header {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .app-card .card-body {
        padding: 1.25rem;
    }

    .app-card .card-footer {
        padding: 1rem 1.25rem;
    }

    .page-metrics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-card {
        padding: 1.25rem 1.5rem;
    }

    .metric-card-value {
        font-size: 1.75rem;
    }

    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px;
        padding: 0.7rem 1rem;
    }

    textarea.form-control {
        min-height: 120px;
    }

    .btn {
        min-height: 48px;
        padding: 0.7rem 1.25rem;
        font-size: 0.95rem;
    }

    .btn-primary {
        padding-inline: 1.75rem;
    }

    .section-divider {
        margin: 1.75rem 0;
    }

    .offer-totals {
        margin-top: 1.25rem;
    }

    .offer-totals > div {
        font-size: 0.95rem;
    }

    /* Tablo için özel mobil düzenlemeler */
    .card-body .table-responsive {
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    #items-table {
        width: auto !important;
        min-width: 100% !important;
        overflow: visible !important;
    }

    /* Mobil buton grupları */
    .btn-group-sm .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .table-stack tbody td[data-label='Islemler'] .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .table-stack tbody td[data-label='Islemler'] .btn-group .btn {
        width: 100%;
        border-radius: var(--radius-sm) !important;
    }

    /* Yan panel düzenlemeleri */
    .row .col-lg-8,
    .row .col-lg-4 {
        margin-bottom: 1.5rem;
    }

    .row .col-lg-4 .app-card {
        margin-bottom: 1rem;
    }

    /* Alert kutularını düzenle */
    .alert {
        font-size: 0.9rem;
        padding: 0.9rem 1rem;
    }

    /* Form-check elemanları */
    .form-check {
        padding-left: 1.75rem;
    }

    .form-check-input {
        width: 1.2rem;
        height: 1.2rem;
        margin-top: 0.2rem;
    }

    .form-check-label {
        font-size: 0.95rem;
    }

    /* Dropdowns */
    .dropdown-menu {
        font-size: 0.95rem;
    }

    .dropdown-item {
        padding: 0.65rem 1rem;
    }

    /* Badge elemanları */
    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* Card başlıkları */
    .card-header .h5,
    .card-header .h6 {
        font-size: 1.05rem;
    }

    .card-header small,
    .card-header .text-muted {
        font-size: 0.85rem;
        display: block;
        margin-top: 0.35rem;
    }

    /* Sticky submit button (mobilde yukarı kaydırmayı önle) */
    .col-lg-4 .app-card:has(.d-grid) {
        position: sticky;
        bottom: 1rem;
        z-index: 10;
    }
}

/* Küçük Mobil Cihazlar */
@media (max-width: 575.98px) {
    body.app-body {
        font-size: 14px;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .navbar-brand-logo {
        height: 36px;
    }

    .navbar-brand-text {
        font-size: 0.85rem;
    }

    .page-header {
        padding: 1.25rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: var(--radius-md);
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }

    .app-card {
        border-radius: 14px;
    }

    .app-card .card-header {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .app-card .card-body {
        padding: 1rem;
    }

    .app-card .card-footer {
        padding: 0.9rem 1rem;
    }

    .metric-card {
        padding: 1rem 1.25rem;
    }

    .metric-card-title {
        font-size: 0.7rem;
    }

    .metric-card-value {
        font-size: 1.5rem;
    }

    .auth-wrapper {
        padding: 1.25rem;
        gap: 1.5rem;
        border-radius: var(--radius-md);
    }

    .auth-visual {
        order: 2;
        text-align: center;
        padding: 0.5rem;
    }

    .auth-card {
        order: 1;
        padding: 1.5rem;
    }

    .auth-visual-inner {
        max-width: 100%;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .auth-card-heading {
        font-size: 1.4rem;
    }

    /* Form elementi büyütmeleri (mobilde daha kolay dokunma) */
    .form-control,
    .form-select {
        min-height: 50px;
        font-size: 16px;
    }

    .btn {
        min-height: 50px;
        font-size: 0.95rem;
    }

    /* Tablo responsive düzenlemeleri */
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    /* Ödeme yöntemleri checkbox grid */
    .form-check {
        padding-left: 1.5rem;
    }

    .form-check-input {
        width: 1.15rem;
        height: 1.15rem;
    }

    /* Submit button küçük ekranlarda sticky */
    .col-lg-4 .app-card:has(.d-grid) {
        position: sticky;
        bottom: 0.75rem;
    }

    /* Overflow-scroll düzeltmeleri */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Row gutters */
    .row.g-4 {
        --bs-gutter-y: 1.25rem;
    }
}

/* Ekstra Küçük Cihazlar */
@media (max-width: 375px) {
    .page-title {
        font-size: 1.35rem;
    }

    .page-eyebrow {
        font-size: 0.65rem;
    }

    .metric-card-value {
        font-size: 1.35rem;
    }

    .app-card .card-header {
        font-size: 0.9rem;
    }

    /* Touch cihazlarda hover animasyonlarını devre dışı bırak */
    .app-card:hover,
    .app-card:focus-within {
        transform: none;
    }
}

/* Touch cihazlar için hover desteğini kaldır */
@media (hover: none) and (pointer: coarse) {
    .app-card:hover,
    .app-card:focus-within {
        transform: none;
        box-shadow: var(--shadow-card);
    }

    .app-card:hover::after,
    .app-card:focus-within::after {
        opacity: 0;
    }

    .navbar .nav-link:hover,
    .navbar .nav-link:focus {
        transform: none;
    }
}

/* Offer Accordion Styles */
.offers-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.offer-accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.offer-accordion-item:hover {
    box-shadow: 0 4px 12px -4px rgba(15, 76, 129, 0.15);
    border-color: rgba(15, 76, 129, 0.15);
}

.offer-accordion-header {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.offer-accordion-header:hover {
    background: rgba(15, 76, 129, 0.03);
}

.offer-accordion-header[aria-expanded="true"] {
    background: rgba(15, 76, 129, 0.05);
    border-bottom: 1px solid var(--border-soft);
}

.offer-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.offer-summary-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.offer-number {
    font-weight: 700;
    color: var(--brand-primary);
    font-size: 0.95rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.offer-customer {
    font-weight: 600;
    color: rgb(20, 45, 82);
}

.offer-company {
    font-size: 0.9rem;
}

.offer-summary-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.offer-amount {
    font-weight: 700;
    color: var(--brand-accent);
    font-size: 1.05rem;
}

.offer-date {
    color: var(--brand-muted);
    font-size: 0.85rem;
}

.offer-toggle-icon {
    display: flex;
    align-items: center;
    color: var(--brand-muted);
    transition: transform 0.2s ease;
}

.offer-accordion-header[aria-expanded="true"] .offer-toggle-icon {
    transform: rotate(180deg);
}

.offer-accordion-body {
    border-top: 1px solid var(--border-soft);
}

.offer-details {
    padding: 1.25rem 1.5rem;
    background: rgba(15, 76, 129, 0.02);
}

.offer-detail-item {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
}

.offer-detail-item label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.offer-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
}

.offer-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.offer-actions .btn svg {
    flex-shrink: 0;
}

.offer-filters {
    background: rgba(15, 76, 129, 0.04);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
}

.empty-state {
    padding: 2rem;
}

.empty-state svg {
    opacity: 0.4;
}

/* Responsive accordion */
@media (max-width: 767.98px) {
    .offer-accordion-header {
        padding: 0.9rem 1rem;
    }

    .offer-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .offer-summary-main {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .offer-summary-meta {
        width: 100%;
        justify-content: space-between;
    }

    .offer-toggle-icon {
        margin-left: auto;
    }

    .offer-details {
        padding: 1rem;
    }

    .offer-actions {
        flex-direction: column;
    }

    .offer-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .offer-filters {
        padding: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .offer-accordion-header {
        padding: 0.75rem 0.85rem;
    }

    .offer-number {
        font-size: 0.9rem;
    }

    .offer-customer {
        font-size: 0.95rem;
    }

    .offer-amount {
        font-size: 1rem;
    }

    .offer-detail-item {
        padding: 0.85rem;
    }
}

/* Product Image Upload Styles */
.product-image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.product-image-container {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-image-container:hover {
    border-color: rgba(22, 105, 201, 0.4) !important;
    box-shadow: 0 0 0 2px rgba(22, 105, 201, 0.1);
}

.product-image-upload {
    display: none;
}

.spinner-border-sm {
    width: 1.2rem;
    height: 1.2rem;
    border-width: 0.15em;
}

/* Mobil cihazlarda ürün görseli düzenlemeleri */
@media (max-width: 767.98px) {
    .product-image-container {
        min-width: 50px !important;
        min-height: 50px !important;
    }

    #items-table td[data-label="Urun / Hizmet"] .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }

    #items-table td[data-label="Urun / Hizmet"] .product-image-container {
        align-self: center;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .page-actions,
    .btn,
    .app-footer,
    [data-label='Islemler'],
    .card-header small {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .app-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }

    .page-header {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
    }

    .product-image-upload,
    .remove-image {
        display: none !important;
    }
}
