/* Custom styles for Hayır Kumbara Takip Sistemi – Design System */

:root {
    /* Safe area */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    /* Font */
    --font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    /* Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    /* Text sizes */
    --text-xs: 14px;
    --text-sm: 15px;
    --text-md: 16px;
    --text-lg: 18px;
    --text-xl: 22px;
    /* Soft green palette (ana yeşil mat/yumuşak) */
    --green-600: #167A5D; /* primary */
    --green-500: #1B8F6A; /* accent / outline */
    --green-100: #DDF3EA;
    --green-050: #EAF7F0;
    --ink-900: #0f172a;
    --ink-600: #64748b;
    --white: #ffffff;
    --border: rgba(15, 23, 42, 0.1);
    /* Legacy aliases (normalize to soft palette) */
    --brand-green: var(--green-600);
    --brand-green-dark: #15803d;
    --soft-green-bg: var(--green-050);
    --btn-radius: var(--radius-lg);
    --btn-h: 56px;
}

/* Global base */
body {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}
input, button, textarea, select {
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-size: var(--text-md);
}
input:focus, button:focus, textarea:focus, select:focus {
    outline: none;
}

/* UI Kit – ortak bileşenler */
.ui-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    overflow: hidden;
}
.ui-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 800;
    background: var(--green-100);
    color: var(--green-600);
    border: 1px solid rgba(22, 163, 74, 0.2);
}
.ui-pill--success { background: var(--green-100); color: var(--green-600); border: 1px solid rgba(22, 163, 74, 0.2); }
.ui-pill--muted { background: #f1f5f9; color: #475569; border: 1px solid rgba(15, 23, 42, 0.1); }
.ui-btn {
    height: var(--btn-h);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--text-md);
    padding: 0 18px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    box-sizing: border-box;
    font-family: var(--font-family);
}
.ui-btn--primary {
    background: var(--green-600);
    color: #fff;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.22);
}
.ui-btn--primary:hover {
    background: var(--green-500);
    color: #fff;
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.26);
}
.ui-btn--soft {
    background: var(--green-050);
    color: var(--green-600);
    border: 1px solid rgba(22, 163, 74, 0.25);
}
.ui-btn--soft:hover {
    background: var(--green-100);
    border-color: rgba(22, 163, 74, 0.35);
    color: var(--green-600);
}
.ui-btn--outline {
    background: transparent;
    color: var(--green-600);
    border: 2px solid rgba(22, 163, 74, 0.5);
}
.ui-btn--outline.ui-btn--danger { color: #dc2626; border-color: rgba(220, 38, 38, 0.5); }
.ui-btn--outline.ui-btn--danger:hover { background: rgba(220, 38, 38, 0.08); border-color: #dc2626; }
.ui-btn--outline:hover {
    background: var(--green-050);
    border-color: var(--green-600);
}
.ui-input {
    height: 54px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0 14px;
    width: 100%;
    font-size: var(--text-md);
    font-family: var(--font-family);
    background: #fff;
}
.ui-input:focus {
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.ui-sheet {
    background: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.ui-sheet__header {
    padding: 14px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ui-sheet__body {
    padding: 12px 16px;
}
.ui-sheet__actions {
    display: flex;
    gap: 12px;
    padding: 12px 16px 16px;
}
.ui-sheet__actions .ui-btn { flex: 1; }

/* UI Modal (ortada modal) – smooth açılış/kapanış */
.ui-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.22s ease;
}
@media (max-width: 768px) {
    .ui-modal-overlay {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
        align-items: flex-end;
    }
    .ui-modal-overlay .ui-modal {
        max-height: calc(100dvh - 6rem - env(safe-area-inset-bottom, 0px));
        max-height: calc(100vh - 6rem - env(safe-area-inset-bottom, 0px));
    }
}
.ui-modal-overlay.hidden {
    display: none !important;
}
.ui-modal-overlay.is-open {
    opacity: 1;
}
.ui-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: min(720px, calc(100vw - 32px));
    max-height: calc(100dvh - 110px);
    max-height: calc(100vh - 110px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    will-change: opacity, transform;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.ui-modal.is-open {
    opacity: 1;
    transform: translateY(0);
}
.ui-modal__header { padding: 14px 16px 8px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.ui-modal__body {
    padding: 12px 16px 16px;
    padding-bottom: 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 220px);
    max-height: calc(100vh - 220px);
}
.ui-modal__actions {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: #fff;
    box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.06);
}
.ui-modal__actions .ui-btn { flex: 1; }

.ui-btn--danger {
    background: #dc2626;
    color: #fff;
    border: 1px solid #dc2626;
}
.ui-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.confirm-danger-overlay {
    z-index: 12000;
}
.confirm-danger-modal {
    max-width: min(420px, calc(100vw - 32px));
    text-align: center;
    padding: 28px 20px 18px;
}
.confirm-danger-modal__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    font-size: 34px;
}
.confirm-danger-modal__title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #0f172a;
}
.confirm-danger-modal__message {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.45;
}
.confirm-danger-modal__actions {
    box-shadow: none;
    position: static;
    padding: 0;
}

.box-collection-row__delete {
    margin: 0;
}
.box-collection-delete-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Select2 */
.select2-container {
    width: 100% !important;
}
.select2-container--bootstrap-5 .select2-selection {
    min-height: 3rem;
    border-color: var(--border, #dee2e6);
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--green-600, #16a34a);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.select2-container--bootstrap-5 .select2-dropdown {
    border-color: var(--border, #dee2e6);
    z-index: 20000;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--green-600, #16a34a);
}
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border-radius: 10px;
    border-color: var(--border, #dee2e6);
    padding: 8px 12px;
}
.select2-container--bootstrap-5 .form-select-sm ~ .select2-container .select2-selection,
.form-select-sm + .select2-container .select2-selection,
.select2-container--bootstrap-5.select2-sm .select2-selection {
    min-height: 2.25rem;
    font-size: 0.875rem;
}
.form-select-sm + .select2-container--bootstrap-5 .select2-selection {
    min-height: 2.25rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 0.875rem;
}
.ui-modal .select2-container,
.modal .select2-container {
    z-index: 1;
}

.file-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.file-btn {
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--green-050, #eefbf2);
    color: var(--green-600, #16a34a);
    border: 1px solid rgba(22, 163, 74, 0.25);
    font-size: var(--text-sm, 14px);
    font-weight: 700;
    cursor: pointer;
}
.file-name { font-size: 12px; color: var(--ink-600, #64748b); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fit-segment { display: flex; gap: 10px; margin-top: 8px; }
.fit-segment__btn {
    flex: 1;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(22, 163, 74, 0.25);
    background: #fff;
    color: var(--green-600);
    font-weight: 900;
    font-size: var(--text-sm, 14px);
    cursor: pointer;
}
.fit-segment__btn.is-active {
    background: var(--green-100);
    border-color: rgba(22, 163, 74, 0.35);
}

/* UI List (Hesabım linkleri) */
.ui-list { list-style: none; padding: 0; margin: 0; }
.ui-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    text-decoration: none;
    color: var(--ink-900);
    font-size: var(--text-md);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-family);
}
.ui-list-item:last-child { border-bottom: 0; }
.ui-list-item:hover { color: var(--green-600); }
.ui-list-item i:first-of-type { font-size: 1.2rem; color: var(--ink-600); }
.ui-list-item .bi-chevron-right { margin-left: auto; opacity: 0.5; }
.ui-list-item--button { background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }

/* Hesabım (profil) sayfası */
.account-page {
    padding-top: calc(8px + var(--safe-top));
    padding-bottom: 2rem;
    background: var(--green-050);
}

.account-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
}
.account-appbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-900);
}
.account-appbar-btn i { font-size: 1.35rem; }
.account-appbar-brand {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ink-900);
    letter-spacing: 0.2px;
}
.account-appbar-spacer {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.account-hero { position: relative; min-height: 200px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; margin-bottom: -2rem; }
.account-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    /* background-color: var(--green-050); */
}
.account-profile-wrap { position: relative; padding: 1.75rem 1rem 2.75rem; text-align: center; }
.account-avatar-wrap { margin: 0 auto 0.75rem; width: 88px; height: 88px; border-radius: 24px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 10px 26px rgba(16,24,40,0.12); position: relative; }
.account-avatar-wrap--large { width: 96px; height: 96px; border-radius: 26px; }
.account-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-default { width: 100%; height: 100%; background: var(--green-100); color: var(--green-600); display: flex; align-items: center; justify-content: center; font-size: 2.35rem; font-weight: 900; }
.account-avatar-edit {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #1B8F6A 0%, #167A5D 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(22, 122, 93, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.account-avatar-edit i { font-size: 1rem; }
.account-name { font-size: var(--text-xl); font-weight: 800; margin: 0 0 4px; color: var(--ink-900); }
.account-subrole { font-size: var(--text-sm); color: rgba(15, 23, 42, 0.6); margin: 0; }
.account-card { margin: 0 16px; padding: 1.25rem 1rem; }

.account-name-row--center { justify-content: center; }
.account-name-edit-indicator { color: rgba(15, 23, 42, 0.55); font-size: 1rem; }

.account-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.account-metric {
    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    padding: 14px 14px;
}
.account-metric-label {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.account-metric-value {
    margin-top: 6px;
    font-size: 26px;
    font-weight: 900;
    color: var(--green-600);
}

.account-info-cards { display: grid; gap: 12px; margin-bottom: 12px; }
.account-info-rowcard {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    align-items: center;
}
.account-info-rowcard-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
}
.account-info-rowcard-value {
    grid-column: 1 / 2;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink-900);
}
.account-rowcard-action {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    background: rgba(22, 122, 93, 0.12);
    color: var(--green-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.account-rowcard-action--icon { background: transparent; border: 0; width: 38px; height: 38px; display: inline-flex; }

.account-progress-pill {
    background: rgba(22, 122, 93, 0.14);
    border: 1px solid rgba(22, 122, 93, 0.18);
    color: #0F3D2E;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 14px;
}
.account-section-title { font-size: var(--text-lg); font-weight: 700; margin: 0 0 12px; color: var(--ink-900); }
.account-section-title--links { margin-top: 1.25rem; }
.account-info-grid { display: grid; gap: 12px; }
.account-info-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--green-050); border-radius: var(--radius-md); }
.account-info-icon { font-size: 1.25rem; color: var(--green-600); }
.account-info-label { display: block; font-size: var(--text-xs); color: var(--ink-600); }
.account-info-value { font-size: var(--text-md); font-weight: 700; color: var(--ink-900); }
.account-name-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.account-edit-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border); background: #fff; color: var(--ink-600); cursor: pointer; }
.account-edit-btn:hover { background: var(--green-050); color: var(--green-600); border-color: var(--green-500); }
.account-edit-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.ui-btn--sm { padding: 8px 14px; font-size: var(--text-sm); }
.account-info-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.account-info-header {
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0;
    padding: 12px 14px 8px;
    color: var(--ink-900);
}
.account-info-scroll {
    padding: 12px 14px 14px;
}
/* Mobil: tüm Hesabım sayfası tek scroll alanı */
@media (max-width: 991.98px) {
    .account-page {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: calc(72px + 12px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding-bottom: 1rem;
    }
}
@media (min-width: 992px) {
    .account-card { margin: 0 24px; padding: 1.5rem 1.25rem; }
}

/* Ayarlar sayfası: mobilde tüm sayfa scroll */
@media (max-width: 991.98px) {
    .settings-page {
        position: fixed;
        left: 0;
        right: 0;
        top: calc(10px + var(--safe-top));
        /* alttaki app-nav (alt bar) + dış boşluk + safe-area */
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 18px 16px 22px;
    }
}

/* Ayarlar sayfası: desktop'ta normal akış */
@media (min-width: 992px) {
    .settings-page {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        overflow: visible;
        padding: 1.25rem 0 2rem;
    }
}

/* Kumbara detay sayfası */
/* Kumbara detay: mobilde scroll alanı */
.box-show-page {
    position: fixed;
    inset: 0;
    overflow: hidden;
    padding-bottom: calc(90px + var(--safe-bottom));
}
.box-show-scroll {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 18px 16px;
}
.collection-create-page {
    position: fixed;
    inset: 0;
    overflow: hidden;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
.collection-create-scroll {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 18px 16px;
}
@media (min-width: 992px) {
    .box-show-page { position: static; padding-bottom: 0; overflow: visible; }
    .box-show-scroll { height: auto; overflow: visible; padding: 1rem 16px 2rem; }
    .collection-create-page { position: static; padding-bottom: 0; overflow: visible; }
    .collection-create-scroll { height: auto; overflow: visible; padding: 1.5rem 16px 2rem; }
}

.box-detail-page { padding: 0 0 1rem; }
.box-detail-card { padding: 1.25rem; }
.box-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 1rem; flex-wrap: wrap; }
.box-detail-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.box-detail-title { font-size: var(--text-xl); font-weight: 800; margin: 0; color: var(--ink-900); }
.box-detail-image-wrap { margin-bottom: 1rem; border-radius: var(--radius-md); overflow: hidden; background: var(--green-050); aspect-ratio: 16/10; }
.box-photo { width: 100%; height: 100%; object-position: center; }
.box-photo--cover { object-fit: cover; }
.box-photo--contain { object-fit: contain; background: #fff; }
.box-detail-image-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-600); font-size: var(--text-sm); gap: 8px; }
.box-detail-image-placeholder i { font-size: 2rem; opacity: 0.6; }
.box-detail-edit-form .form-label { margin-bottom: 4px; }
.box-detail-badge { background: var(--green-100); color: var(--green-600); font-size: var(--text-xs); font-weight: 700; }
.box-detail-badge--muted { background: var(--ink-200, #e2e8f0); color: var(--ink-600); }
.box-detail-info-block { margin-bottom: 1.25rem; }
.box-detail-info-list { margin: 0; padding: 0; list-style: none; }
.box-detail-info-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.box-detail-info-row:last-child { margin-bottom: 0; }
.box-detail-info-label { font-size: var(--text-xs); color: var(--ink-600); font-weight: 500; margin: 0; }
.box-detail-info-value { font-size: var(--text-sm); font-weight: 600; color: var(--ink-900); margin: 0; }
.box-detail-info-link { font-size: var(--text-sm); color: var(--green-600); text-decoration: underline; word-break: break-word; }
.box-detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.25rem; }
.box-detail-metric-card { background: var(--green-050); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.box-detail-metric-label { font-size: var(--text-xs); color: var(--ink-600); font-weight: 500; }
.box-detail-metric-value { font-size: var(--text-lg); font-weight: 800; color: var(--ink-900); }
.box-detail-last-bubble { display: inline-flex; margin-top: 2px; }
.box-detail-actions { margin-bottom: 1.25rem; }
.box-detail-actions .ui-btn { width: 100%; justify-content: center; }
.box-detail-section { margin-bottom: 1.25rem; }
.box-detail-section-title { font-size: var(--text-md); font-weight: 700; margin: 0 0 10px; color: var(--ink-900); }
.box-detail-collections { list-style: none; padding: 0; margin: 0; }
.box-detail-collection-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: var(--green-050); border-radius: var(--radius-md); margin-bottom: 8px; font-size: var(--text-sm); }
.box-detail-collection-date { color: var(--ink-600); }
.box-detail-collection-amount { font-weight: 700; color: var(--green-600); }
.box-detail-collection-collector { color: var(--ink-600); margin-left: auto; }
.box-detail-footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.box-detail-footer-actions .ui-btn { flex: 1; min-width: 140px; }

/* ========== Box Detail (V2) – referans görsele yakın ekran ========== */
.box-detail-v2 .box-show-scroll { padding-top: 10px; }
.box-detail-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 6px 14px;
}
.box-detail-appbar__back {
    width: auto;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-900);
    text-decoration: none;
    font-size: 15px;
    font-weight: 900;
    gap: 8px;
    padding: 0 12px;
}
.box-detail-appbar__back-arrow { font-size: 18px; line-height: 1; }
.box-detail-appbar__back-text { font-size: 14px; line-height: 1; }
.box-detail-appbar__brand {
    font-weight: 900;
    color: var(--ink-900);
    letter-spacing: 0.2px;
}
.box-detail-appbar__spacer {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.box-detail-card--v2 { border-radius: 26px; box-shadow: 0 16px 46px rgba(16,24,40,0.10); }
.box-hero {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: var(--green-050);
    margin-bottom: 14px;
    width: 100%;
    max-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.box-hero.js-lightbox-trigger {
    cursor: zoom-in;
}
.box-hero__img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #fff;
}
.box-hero__img.box-photo--cover { object-fit: contain; }
.box-hero__img.box-photo--contain { object-fit: contain; background: #fff; }
.box-hero__zoom {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 18px;
    cursor: zoom-in;
    z-index: 2;
}
.box-hero__zoom:hover { background: rgba(15, 23, 42, 0.88); }
.box-card__media {
    position: relative;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #e8eef5;
    width: 100%;
    max-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.box-card__media.js-lightbox-trigger { cursor: zoom-in; }
.box-card__media-img {
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #e8eef5;
}
.box-card__media--empty {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}
.box-card__media.is-broken .box-card__media-img { opacity: 0; }
.box-card__media.is-broken::after {
    content: 'Foto yok';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
}
.box-card__media-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}
.boxes-excel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
    justify-content: flex-end;
    max-width: 100%;
}
.boxes-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #fff;
    color: var(--ink-900);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}
.boxes-excel-btn i { font-size: 1.1rem; }
.boxes-excel-btn--muted { color: #334155; }
.boxes-excel-btn:hover { background: #f8fafc; color: var(--ink-900); }
@media (max-width: 575.98px) {
    .boxes-title-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .boxes-excel-actions {
        justify-content: stretch;
    }
    .boxes-excel-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        min-height: 48px;
        font-size: 14px;
        padding: 0 10px;
    }
    .box-card-actions-row { gap: 8px; }
    .box-action-btn { height: 44px; font-size: 13px; }
}
body.lightbox-open { overflow: hidden; }
.box-hero__placeholder {
    width: 100%;
    min-height: 220px;
    background: radial-gradient(1200px 300px at 50% -20%, rgba(22,122,93,0.18) 0%, rgba(22,122,93,0.06) 40%, rgba(255,255,255,0) 70%),
                linear-gradient(180deg, rgba(22,122,93,0.10) 0%, rgba(255,255,255,0) 55%),
                #ffffff;
}
.box-edit-map {
    width: 100%;
    height: 240px;
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #e8eef5;
}
.box-hero__status { position: absolute; right: 12px; top: 12px; }
.box-hero__status-chip {
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
}
.box-hero__status-chip--active { color: #167A5D; border-color: rgba(22,122,93,0.22); }
.box-hero__status-chip--passive { color: #ef4444; border-color: rgba(239,68,68,0.22); }

.box-head { margin-bottom: 12px; }
.box-head__title { margin: 0; font-size: 20px; font-weight: 900; color: var(--ink-900); }
.box-head__meta { margin-top: 8px; display: grid; gap: 6px; }
.box-head__meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.box-head__meta-label { font-size: 12.5px; color: rgba(15,23,42,0.55); font-weight: 700; }
.box-head__meta-value { font-size: 13.5px; color: var(--ink-900); font-weight: 700; }
.box-head__meta-link { font-size: 13.5px; color: var(--green-600); font-weight: 700; text-decoration: underline; text-align: right; }
.box-head__edit {
    margin-top: 10px;
    width: 100%;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(22,122,93,0.18);
    background: rgba(22,122,93,0.10);
    color: var(--green-600);
    font-weight: 800;
}

.box-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0 14px;
}
.box-metric {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 22px;
    padding: 14px 14px;
    box-shadow: 0 10px 30px rgba(16,24,40,0.08);
}
.box-metric__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.2px; color: rgba(15,23,42,0.55); }
.box-metric__value { margin-top: 6px; font-size: 20px; font-weight: 900; color: var(--green-600); }
.box-metric__sub { margin-top: 4px; font-size: 12px; color: rgba(15,23,42,0.55); font-weight: 600; }

.box-cta {
    display: inline-flex;
    width: 100%;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #1B8F6A 0%, #167A5D 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(22,122,93,0.20);
}
.box-detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.box-detail-section-link { font-size: 12px; color: rgba(15,23,42,0.55); font-weight: 800; text-transform: uppercase; letter-spacing: 0.2px; }

.box-collections-v2 { margin-top: 8px; }
.box-collection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 10px 26px rgba(16,24,40,0.06);
    margin-bottom: 10px;
}
.box-collection-row__amount { font-weight: 900; color: var(--ink-900); font-size: 14px; }
.box-collection-row__meta { font-size: 12px; color: rgba(15,23,42,0.55); font-weight: 600; margin-top: 2px; }
.box-collection-row__chev { color: rgba(15,23,42,0.35); font-size: 22px; font-weight: 900; }

.box-footer-btn {
    flex: 1;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid rgba(15,23,42,0.10);
    background: #fff;
    color: var(--ink-900);
}
.box-footer-btn--soft { background: rgba(22,122,93,0.10); border-color: rgba(22,122,93,0.18); color: var(--green-600); }
.box-footer-btn--danger { background: #fff; border-color: rgba(239,68,68,0.25); color: #ef4444; }

.boxes-controls-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.boxes-controls-row .boxes-search-form { flex: 1; min-width: 0; }

.btn-haritada,
.btn-map {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    line-height: 1;
    white-space: nowrap;
    font-size: 14px;
}
.btn-haritada i,
.btn-haritada svg,
.btn-map i,
.btn-map svg { flex: 0 0 auto; }
.btn-haritada span,
.btn-map span { flex: 0 0 auto; }
@media (min-width: 992px) {
    .btn-haritada,
    .btn-map {
        gap: 10px;
        padding: 0 18px;
        white-space: nowrap;
    }
}

/* Şifre değiştir sayfası */
.password-page { padding: 1rem 16px 2rem; }
.password-card { padding: 1.25rem; max-width: 400px; margin: 0 auto; }
.password-title { font-size: var(--text-xl); font-weight: 800; margin: 0 0 0.25rem; color: var(--ink-900); }
.password-sub { font-size: var(--text-sm); }
.no-location-modal { max-width: 340px; }

/* PC nav CTA pill */
/* App Navigation (sıfırdan) */
.app-nav { font-family: var(--font-family); }
.app-nav--desktop {
    display: none;
    position: sticky;
    top: 0;
    z-index: 8500;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.app-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.app-nav__brand {
    font-weight: 900;
    color: var(--ink-900);
    text-decoration: none;
    letter-spacing: 0.2px;
}
.app-nav__links { display: flex; align-items: center; gap: 10px; }
.app-nav__link {
    text-decoration: none;
    color: rgba(15, 23, 42, 0.72);
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 999px;
}
.app-nav__link:hover { background: rgba(22, 122, 93, 0.08); color: var(--ink-900); }
.app-nav__link.is-active { background: rgba(22, 122, 93, 0.12); color: var(--green-600); }
.app-nav__actions { display: flex; align-items: center; gap: 10px; }
.app-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--green-600);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(22, 122, 93, 0.20);
}
.app-nav__cta:hover { background: var(--green-500); color: #fff; }
.app-nav__menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-900);
}
.app-nav__menu-btn.dropdown-toggle::after { display: none; }
.app-nav__dropdown {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.14);
    padding: 6px;
    min-width: 220px;
    max-width: calc(100vw - 24px);
    z-index: 2147483000 !important;
}
.app-nav__dropdown.show { z-index: 2147483000 !important; }
.app-nav--mobile .app-nav__dropdown { margin-bottom: 10px; }
.app-nav__dropdown .dropdown-divider { margin: 6px 0; }
.app-nav__dropdown .dropdown-item { border-radius: 12px; font-weight: 800; padding: 10px 12px; line-height: 1.1; }
.app-nav__dropdown form { margin: 0; }
.app-nav__dropdown button.dropdown-item { width: 100%; text-align: left; }
.app-nav__dropdown .dropdown-item:active { background: rgba(22, 122, 93, 0.16); color: var(--ink-900); }
.app-nav--desktop,
.app-nav--mobile,
.app-nav__dropdown,
.app-nav__dropdown.show,
.app-nav__dropdown .dropdown-item,
.app-nav__dropdown button.dropdown-item,
.app-navm__item,
.app-navm__item--button {
    touch-action: manipulation;
    pointer-events: auto;
}

.app-nav--mobile {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(10px + var(--safe-bottom));
    width: min(560px, calc(100vw - 16px));
    margin-left: auto;
    margin-right: auto;
    height: 64px;
    padding: 0 clamp(8px, 2vw, 10px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-radius: clamp(18px, 3vw, 22px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    z-index: 2147482000;
}
.app-navm__item {
    text-decoration: none;
    color: rgba(15, 23, 42, 0.70);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.app-navm__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.app-navm__item.is-active { color: var(--green-600); }
.app-navm__item--button { width: 100%; height: 100%; border: 0; background: transparent; }
.app-navm__item--button.dropdown-toggle::after { display: none; }
.app-navm__icon { font-size: 19px; line-height: 1; }
.app-navm__item.is-active .app-navm__icon i { font-weight: 700; }
.app-navm__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    text-decoration: none;
    color: rgba(15, 23, 42, 0.70);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.01em;
    align-self: stretch;
    padding-bottom: 6px;
}
.app-navm__cta-btn {
    width: 52px;
    height: 52px;
    margin-top: -22px;
    border-radius: 999px;
    background: var(--green-600);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(22, 122, 93, 0.30);
    transition: transform .15s ease, background .15s ease;
}
.app-navm__cta:hover,
.app-navm__cta:focus-visible { color: rgba(15, 23, 42, 0.85); }
.app-navm__cta:active .app-navm__cta-btn { transform: scale(0.94); background: var(--green-500); }

@media (max-width: 991.98px) {
    body { padding-bottom: calc(clamp(76px, 11.5vh, 86px) + var(--safe-bottom)); }
}
@media (min-width: 992px) {
    .app-nav--desktop { display: block; }
    .app-nav--mobile { display: none; }
    body { padding-bottom: 0; }
}

/* Harita ekranında alt nav daha kompakt */
.page-map .app-nav--mobile { height: 60px; }

.stats-total-value { color: var(--green-600); }
.stats-month-bars { display: flex; flex-direction: column; gap: 10px; }
.stats-month-bar-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--green-050); border-radius: var(--radius-md); font-size: var(--text-sm); }
.stats-month-bar-label { color: var(--ink-600); font-weight: 600; }
.stats-month-bar-value { color: var(--green-600); font-weight: 700; }

html.dark .ui-card { background: #0f172a; border-color: rgba(255,255,255,0.08); }
html.dark .ui-btn--soft { background: rgba(22,163,74,0.15); color: #86efac; border-color: rgba(134,239,172,0.25); }
html.dark .ui-btn--soft:hover { background: rgba(22,163,74,0.22); color: #86efac; }
html.dark .ui-input { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
.btn-pill {
    height: var(--btn-h);
    border-radius: var(--btn-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    text-decoration: none;
    padding: 0 18px;
    box-sizing: border-box;
    cursor: pointer;
    border: 0;
}
a.btn-pill {
    flex: 1;
}
.btn-pill--primary {
    background: var(--green-600);
    color: #fff;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.22);
}
.btn-pill--primary:hover {
    background: var(--green-500);
    color: #fff;
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.26);
}
.btn-pill--soft {
    background: var(--green-050);
    color: var(--green-600);
    border: 1px solid rgba(22, 163, 74, 0.25);
}
.btn-pill--soft:hover {
    background: var(--green-100);
    border-color: rgba(22, 163, 74, 0.35);
    color: var(--green-600);
}
html.dark .btn-pill--soft {
    background: rgba(22, 163, 74, 0.12);
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.22);
}
html.dark .btn-pill--soft:hover {
    background: rgba(22, 163, 74, 0.2);
    border-color: rgba(134, 239, 172, 0.35);
    color: #86efac;
}
.promo-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.promo-actions a.btn-pill {
    flex: 1;
}
.box-sheet__actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding: 0 16px 14px;
}
.box-sheet__actions .btn-pill {
    flex: 1;
}
.btn-pill .btn-subtitle {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-pill .btn-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
}
.btn-pill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Katmanlama – z-index skalası (yüksekten düşüğe) */
.z-global-modal { z-index: 9999; }
.z-search-results-popup { z-index: 9998; }
.z-popup-overlay { z-index: 9997; }
.z-map-topbar { z-index: 9000; }
.z-mobile-bottom-nav { z-index: 8000; }
.z-map-controls { z-index: 7000; }
.z-map { z-index: 1; }

/* Harita sayfası: sayfa / overscroll kilidi (mobil + masaüstü) */
html:has(body.page-map) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}
body.page-map {
    height: 100%;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    touch-action: manipulation;
}
body.page-map #app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden !important;
    max-width: 100vw;
}
body.page-map footer {
    display: none !important;
}
body.page-map .hk-main-map {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0;
    max-width: 100vw;
}
body.page-map .hk-map-container,
body.page-map .hk-map-page {
    height: 100%;
    max-height: 100%;
    overflow: hidden !important;
    max-width: 100vw;
}
body.page-map #map {
    touch-action: none;
    -ms-touch-action: none;
}
body.page-map #searchResultsScroll,
body.page-map #searchResultsList,
body.page-map #boxSearchResultsScroll,
body.page-map .box-search-results-scroll {
    touch-action: pan-y !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
body.page-map #searchResultsCard.search-results-card--open {
    touch-action: pan-y;
    overscroll-behavior: contain;
}
body.page-map .map-search-wrap,
body.page-map .map-fab-stack,
body.page-map .map-topbar,
body.page-map .hk-map-top {
    touch-action: manipulation;
}
body.page-map input,
body.page-map textarea,
body.page-map select {
    touch-action: manipulation;
}
@media (max-width: 768px) {
    body.page-map {
        position: fixed;
        inset: 0;
    }
    body.page-map .map-bottom-sheet:not(#searchResultsCard),
    body.page-map .map-info-card.map-bottom-sheet:not(#searchResultsCard) {
        overflow: hidden !important;
        touch-action: manipulation;
    }
    body.page-map .map-bottom-sheet:not(#searchResultsCard) .card-body {
        overflow: hidden !important;
    }
}
@media (min-width: 769px) {
    body.page-map {
        position: fixed;
        inset: 0;
    }
}

/* Kumbaralarım (/boxes): mobilde sadece liste alanı scroll */
@media (max-width: 768px) {
    .boxes-page,
    .boxes-shell {
        position: fixed;
        inset: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
    .boxes-header,
    .boxes-top {
        flex: 0 0 auto;
        padding: 12px;
        background: #fff;
        z-index: 10;
    }
    .boxes-list,
    .boxes-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 12px 12px 16px;
    }
}
html.dark .boxes-header { background: #0f172a; }
@media (min-width: 769px) {
    .boxes-page {
        position: static;
        inset: auto;
        padding-bottom: 0;
        background: #EAF7F0;
        min-height: calc(100vh - 64px);
    }
    .boxes-header,
    .boxes-top {
        background: transparent;
        padding: 1.25rem 1.25rem 0.5rem;
    }
    .boxes-appbar {
        display: none !important;
    }
    .boxes-header-inner {
        gap: 1rem;
    }
    .boxes-controls {
        gap: 0.75rem;
    }
    .boxes-search-input-wrap {
        max-width: 100%;
    }
    .boxes-list {
        overflow: visible;
        padding: 0.75rem 1.25rem 2rem;
    }
}

/* Kumbaralarım: modern kart ve filtre başlık */
.boxes-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.boxes-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
}
.boxes-appbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-900);
}
.boxes-appbar-btn i { font-size: 1.35rem; }
.boxes-appbar-brand {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ink-900);
    letter-spacing: 0.2px;
}
.boxes-appbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-900);
    text-decoration: none;
}
.boxes-appbar-avatar i { font-size: 1.15rem; }

.boxes-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.boxes-title {
    font-size: clamp(1.05rem, 1.2vw, 1.25rem);
    font-weight: 600;
}

.boxes-subtitle {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: #6b7280;
}

.boxes-new-btn {
    border-radius: 999px;
    padding-inline: 1.1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.boxes-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.boxes-search-form {
    width: 100%;
}

.boxes-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 48px;
    height: 48px;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
    overflow: visible;
}

.boxes-search-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    color: #9ca3af;
    margin: 0;
}

.boxes-search-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0 !important;
    height: auto !important;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0 !important;
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    align-self: center;
}

.boxes-search-input:focus {
    box-shadow: none;
    outline: none;
}

.boxes-search-clear {
    flex: 0 0 auto;
    align-self: center;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    text-decoration: underline;
    white-space: nowrap;
}

.boxes-filters {
    display: flex;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.pill {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    color: #4b5563;
    white-space: nowrap;
    display: inline-block;
    text-decoration: none;
}
.boxes-filters .pill:hover { opacity: 0.9; }

.pill-active,
.pill.pill-active {
    background: #111827;
    color: #f9fafb;
    border-color: #111827;
}

.boxes-bulk-form {
    margin-top: 0.15rem;
}

.boxes-select-all {
    max-width: 960px;
    margin: 0 auto 0.5rem;
}

.boxes-container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 769px) {
    .boxes-container {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    .boxes-list .row.boxes-grid {
        max-width: none;
    }
}

.boxes-list .row {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid: cihaz/zoom'a göre otomatik kolon (ekranı doldursun) */
.boxes-list .row.boxes-grid {
    max-width: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 46vw, 320px), 1fr));
    gap: clamp(12px, 2.2vw, 18px);
}
.boxes-list .row.boxes-grid > .col { width: auto; }

.box-card {
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
}

.box-card-header {
    padding: clamp(0.75rem, 1.4vw, 1rem) clamp(0.9rem, 2vw, 1.15rem) clamp(0.35rem, 1vw, 0.55rem);
    background: #fff;
    color: var(--ink-900);
}
.box-card-header .box-card-title,
.box-card-header .box-card-barcode {
    color: inherit;
}

.box-card-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}
.box-card-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.box-card-status--active {
    background: rgba(22, 163, 74, 0.18);
    color: var(--green-600);
    border-color: rgba(22, 163, 74, 0.22);
}
.box-card-status--passive {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.22);
}

.box-owner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.box-owner-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.18);
    color: var(--green-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    flex: 0 0 auto;
}
.box-owner-text {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1.15;
}
.box-owner-label {
    color: #6B7280;
    font-weight: 500;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
}
.box-owner-name {
    font-weight: 600;
    color: #0F172A;
    font-size: clamp(0.9rem, 1vw, 1rem);
}

.box-card-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.box-action-btn {
    flex: 1 1 0;
    height: clamp(48px, 6.2vh, 56px);
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.9rem, 1vw, 1rem);
    letter-spacing: 0;
    padding: 0 clamp(14px, 2vw, 22px);
    white-space: nowrap;
    text-align: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.box-action-btn--outline {
    background: #ffffff;
    color: #1B8F6A;
    border: 1.5px solid rgba(27, 143, 106, 0.45);
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06);
}
.box-action-btn--outline:hover {
    background: rgba(27, 143, 106, 0.06);
    color: #1B8F6A;
}
.box-action-btn--outline:active {
    background: rgba(27, 143, 106, 0.1);
}
.box-action-btn--filled {
    background: linear-gradient(135deg, #1B8F6A 0%, #167A5D 100%);
    color: #ffffff;
    border: 1px solid rgba(22, 122, 93, 0.35);
    box-shadow: 0 8px 18px rgba(22, 122, 93, 0.18);
}
.box-action-btn--filled:hover {
    background: linear-gradient(135deg, #1B8F6A 0%, #146D53 100%);
    color: #ffffff;
}
.box-action-btn--filled:active {
    background: linear-gradient(135deg, #177E5F 0%, #115B45 100%);
}

.box-card-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
}

.box-card-title {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    font-weight: 600;
}

.box-card-barcode {
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.box-meta-address {
    align-items: flex-start;
}

.box-meta-address dd {
    font-weight: 400;
}

.box-address-link {
    color: #0d6efd;
    text-decoration: none;
}

.box-address-link:hover {
    text-decoration: underline;
}

html.dark .box-address-link {
    color: #60a5fa;
}

.box-card-body {
    padding: clamp(0.8rem, 1.6vw, 1.05rem) clamp(0.9rem, 2vw, 1.15rem) clamp(0.9rem, 2vw, 1.1rem);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* Appbar dropdown (Hesabım / Kumbaralarım) */
.appbar-dropdown { border-radius: 16px; border: 1px solid rgba(15, 23, 42, 0.10); box-shadow: 0 16px 44px rgba(16, 24, 40, 0.12); }
.appbar-dropdown .dropdown-item { font-weight: 700; }
.appbar-dropdown,
.appbar-dropdown .dropdown-item,
.appbar-dropdown button.dropdown-item {
    touch-action: manipulation;
    pointer-events: auto;
}
.account-appbar-btn.dropdown-toggle::after,
.boxes-appbar-btn.dropdown-toggle::after { display: none; }

.box-meta {
    margin: 0;
}

.box-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #4b5563;
}

.box-meta-row + .box-meta-row {
    margin-top: 0.2rem;
}

.box-meta-row dt {
    font-weight: 500;
}

.box-meta-row dd {
    margin: 0;
    font-weight: 600;
    color: #111827;
}

/* Son tahsilat badge – renk JS ile data-days'a göre set edilir */
.box-meta-row.box-meta-badge-row {
    margin-bottom: 12px;
}
.promo-card-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}
.promo-card-badge--empty {
    background: rgba(22, 163, 74, 0.1);
    color: var(--ink-600);
    border-color: rgba(22, 163, 74, 0.18);
}
html.dark .promo-card-badge--empty {
    background: rgba(22, 163, 74, 0.12);
    color: #94a3b8;
    border-color: rgba(22, 163, 74, 0.2);
}
.box-meta-badge-row dd {
    display: flex;
    align-items: center;
}

.box-card-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.box-card-actions .btn-sm {
    font-size: 0.75rem;
    padding-inline: 0.6rem;
}

@media (min-width: 769px) {
    .box-card {
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    }
}

@media (max-width: 768px) {
    .box-card-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .box-card-actions .btn,
    .box-card-actions .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

html.dark .boxes-subtitle {
    color: #9ca3af;
}

html.dark .boxes-search-input-wrap {
    background: #020617;
}

html.dark .pill {
    background: #020617;
    border-color: #1f2937;
    color: #e5e7eb;
}

html.dark .pill-active,
html.dark .pill.pill-active {
    background: #f9fafb;
    color: #020617;
    border-color: #f9fafb;
}

html.dark .box-card {
    background: #020617;
    border-color: #1f2937;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}

html.dark .box-card-header {
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.18), rgba(22, 163, 74, 0.1));
    color: #e5e7eb;
}
html.dark .box-card-header .box-card-title,
html.dark .box-card-header .box-card-barcode {
    color: #f9fafb;
}

html.dark .box-meta-row {
    color: #9ca3af;
}

html.dark .box-meta-row dd {
    color: #f9fafb;
}

/* Pagination – /boxes sayfası (tek blok, Bootstrap 5) */
.promo-pagination {
    display: flex;
    justify-content: center;
    padding: 18px 0 6px;
    margin-top: 8px;
}
.promo-pagination nav {
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.promo-pagination nav .d-flex,
.promo-pagination nav .d-sm-flex {
    justify-content: center;
    width: 100%;
}
.promo-pagination nav .d-none.d-sm-flex > div:first-child {
    display: none !important;
}
.promo-pagination nav .d-none.d-sm-flex {
    display: flex !important;
    justify-content: center;
}
.promo-pagination .pagination {
    margin: 0;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.promo-pagination .page-item .page-link {
    border-radius: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    color: #111827;
    min-width: auto;
    font-size: 0.9375rem;
}
.promo-pagination .page-item .page-link svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}
.promo-pagination .page-item.active .page-link {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}
.promo-pagination .page-item.disabled .page-link {
    opacity: 0.45;
}
html.dark .promo-pagination .page-item .page-link {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}
html.dark .promo-pagination .page-item.active .page-link {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}

/* Kumbara detayı (/boxes/{id}): mobilde sayfa içi scroll alanı */
@media (max-width: 768px) {
    .show-page {
        position: fixed;
        inset: 0;
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        overflow: hidden;
        display: flex;
        flex-direction: column;
        background: #fff;
        height: 100vh;
        height: 100dvh;
    }
    .show-header {
        flex: 0 0 auto;
    }
    .show-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
        touch-action: pan-y;
    }
}
html.dark .show-page { background: #0b1220; }
@media (min-width: 769px) {
    .show-page {
        position: static;
        inset: auto;
        padding-bottom: 0;
    }
    .show-content {
        overflow: visible;
        padding: 0;
    }
}

/* Status Bar */
.status-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.875rem;
}

.status-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.status-item i {
    font-size: 1rem;
}

/* Mobile-first: büyük butonlar (Bootstrap değişkenleri ile – btn-sm/btn-lg bozulmasın) */
.btn {
    --bs-btn-font-size: 1.05rem;
    --bs-btn-padding-y: 0.7rem;
    --bs-btn-padding-x: 1.25rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-sm {
    --bs-btn-font-size: 0.875rem;
    --bs-btn-padding-y: 0.45rem;
    --bs-btn-padding-x: 0.8rem;
    --bs-btn-border-radius: 10px;
    gap: 0.3rem;
}

.btn-lg {
    --bs-btn-font-size: 1.15rem;
    --bs-btn-padding-y: 0.9rem;
    --bs-btn-padding-x: 1.75rem;
    --bs-btn-border-radius: 16px;
}


/* Form inputs - larger for mobile */
.form-control,
.form-select {
    font-size: 1rem;
    padding: 0.7rem 1rem;
    min-height: 3rem;
    border-radius: 14px;
    border-color: rgba(15, 23, 42, 0.14);
}
/* Ok ikonu ile metin çakışmasın */
.form-select { padding-right: 2.5rem; background-position: right 1rem center; }
.form-control-sm,
.form-select-sm {
    font-size: 0.9rem;
    min-height: 2.5rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    border-radius: 10px;
}
.form-control-sm { padding-left: 0.75rem; padding-right: 0.75rem; }
.form-select-sm { padding-left: 0.75rem; padding-right: 2.25rem; background-position: right 0.75rem center; }
.form-control:focus,
.form-select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(22, 122, 93, 0.15);
}
.form-control[type="file"] { padding: 0.55rem 0.75rem; line-height: 1.8; }

.form-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Card improvements for mobile */
.card {
    --bs-card-border-radius: 20px;
    --bs-card-inner-border-radius: 19px;
    --bs-card-border-color: rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.card-header {
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1rem;
}

.card-body {
    padding: 1.25rem;
}

/* Alert improvements */
.alert {
    font-size: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
}

.alert i {
    margin-right: 0.5rem;
}

/* Success screen - large confirmation */
.success-screen {
    text-align: center;
    padding: 3rem 1rem;
}

.success-screen i {
    font-size: 4rem;
    color: #198754;
    margin-bottom: 1rem;
}

.success-screen h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.success-screen p {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.mobile-nav, .mobile-bottom-nav, .hk-bottom-nav {
    display: none !important;
}

/* Koyu mod (global tema) */
html.dark,
html.dark body {
    background: #0b1220;
    color: #e5e7eb;
}

html.dark .card,
html.dark .navbar,
html.dark .container,
html.dark .card-header,
html.dark .bg-white {
    background: #0f172a !important;
    border-color: #1f2937;
}

html.dark .navbar-light .navbar-brand,
html.dark .nav-link {
    color: #e5e7eb !important;
}

html.dark a:not(.btn-primary):not(.hk-bottom-nav__item):not(.mobile-nav__item):not(.mobile-nav__fab):not(.mobile-nav3__item):not(.app-navm__item) {
    color: #93c5fd;
}

html.dark .text-muted {
    color: #9ca3af !important;
}

html.dark input,
html.dark select,
html.dark textarea,
html.dark .form-control {
    background: #0b1220 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html.dark .bg-light {
    background: #0b1220 !important;
}

html.dark .border-top,
html.dark .border-bottom,
html.dark .border {
    border-color: #1f2937 !important;
}

html.dark footer {
    background: #0f172a !important;
    border-color: #1f2937;
}

/* ========== Auth / Login sayfası (referans: hero + card) ========== */
body.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    position: static;
    touch-action: manipulation;
    background: var(--green-050);
}
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 100vw;
    background: var(--green-050);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
.auth-hero {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px 0;
    overflow: hidden;
}
.auth-hero img,
.auth-hero .auth-hero-img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
}
.auth-hero-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #94a3b8;
}
.auth-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin-top: auto;
}
.auth-title {
    font-size: var(--text-xl);
    font-weight: 900;
    margin: 0 0 6px;
    text-align: center;
}
.auth-sub {
    margin: 0 0 16px;
    color: var(--ink-600);
    text-align: center;
    font-size: var(--text-sm);
}
.auth-form {
    margin-top: 4px;
}
.auth-field {
    margin-bottom: 12px;
}
.auth-field--check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.auth-input {
    height: 54px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0 14px;
    width: 100%;
    font-size: var(--text-md);
    box-sizing: border-box;
    font-family: var(--font-family);
}
.auth-input.is-invalid {
    border-color: #dc3545;
}
.auth-error {
    font-size: 0.8125rem;
    color: #dc3545;
    margin-top: 4px;
}
.auth-btn {
    height: 56px;
    border-radius: var(--radius-lg);
    border: 0;
    width: 100%;
    background: var(--green-600);
    color: #fff;
    font-weight: 900;
    font-size: var(--text-md);
    margin-top: 14px;
    cursor: pointer;
    font-family: var(--font-family);
}
.auth-btn:hover {
    background: var(--green-500);
    color: #fff;
}
.auth-footer-text {
    text-align: center;
    color: var(--ink-600);
    font-size: var(--text-sm);
}

/* Mobil giriş: büyük görsel üstte, form en altta */
@media (max-width: 991.98px) {
    body.auth-body {
        overflow: hidden;
        height: 100dvh;
        height: 100vh;
    }
    .auth-page {
        height: 100dvh;
        height: 100vh;
        min-height: 100dvh;
        justify-content: flex-end;
    }
    .auth-hero {
        flex: 1 1 0;
        min-height: 52%;
        padding: calc(8px + env(safe-area-inset-top, 0px)) 4px 0;
        align-items: flex-end;
    }
    .auth-hero img,
    .auth-hero .auth-hero-img {
        width: 108%;
        max-width: 108%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
        object-position: center bottom;
        transform: translateY(4px);
    }
    .auth-card {
        flex: 0 0 auto;
        margin-top: 0;
        border-radius: 22px 22px 0 0;
        padding-top: 18px;
        box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.12);
    }
    .auth-title {
        font-size: 1.35rem;
    }
    .auth-sub {
        margin-bottom: 14px;
        font-size: 0.875rem;
    }
    .auth-field {
        margin-bottom: 10px;
    }
    .auth-input {
        height: 50px;
        font-size: 16px;
    }
    .auth-btn {
        height: 52px;
        margin-top: 10px;
    }
    .auth-footer-text {
        margin-top: 0.75rem !important;
        font-size: 0.8rem;
    }
}

@media (min-width: 992px) {
    body.auth-body {
        overflow: auto;
        height: auto;
    }
    .auth-page {
        flex-direction: row;
        height: auto;
        min-height: 100vh;
        justify-content: stretch;
    }
    .auth-hero {
        flex: 1;
        min-height: 100vh;
        max-height: none;
        padding: 24px;
        align-items: center;
    }
    .auth-hero img,
    .auth-hero .auth-hero-img {
        width: auto;
        max-width: 92%;
        height: auto;
        max-height: 90vh;
        transform: none;
    }
    .auth-card {
        flex: 0 0 420px;
        margin: 40px;
        margin-top: 40px;
        border-radius: 24px;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}

/* =====================================================================
   Tasarım tutarlılığı (2026-10): Bootstrap mavisini marka yeşiline eşle,
   tablo → mobil kart, sayfa bazlı mobil düzeltmeler.
   ===================================================================== */

/* ---- Bootstrap tema değişkenleri → marka yeşili ---- */
:root {
    --bs-primary: #167A5D;
    --bs-primary-rgb: 22, 122, 93;
    --bs-link-color: #167A5D;
    --bs-link-color-rgb: 22, 122, 93;
    --bs-link-hover-color: #0F5C46;
    --bs-link-hover-color-rgb: 15, 92, 70;
    --bs-focus-ring-color: rgba(22, 122, 93, 0.2);
    --bs-body-color: #0f172a;
    --bs-body-font-family: var(--font-family);
    --bs-secondary-color: #64748b;
    --bs-tertiary-bg: #f8fafc;
}
body { background-color: #f6f8f7; }
body.bg-light { background-color: #f6f8f7 !important; }

.btn-primary {
    --bs-btn-bg: #167A5D;
    --bs-btn-border-color: #167A5D;
    --bs-btn-hover-bg: #13684F;
    --bs-btn-hover-border-color: #13684F;
    --bs-btn-active-bg: #0F5C46;
    --bs-btn-active-border-color: #0F5C46;
    --bs-btn-disabled-bg: #167A5D;
    --bs-btn-disabled-border-color: #167A5D;
    --bs-btn-focus-shadow-rgb: 22, 122, 93;
}
.btn-outline-primary {
    --bs-btn-color: #167A5D;
    --bs-btn-border-color: rgba(22, 122, 93, 0.5);
    --bs-btn-hover-bg: #167A5D;
    --bs-btn-hover-border-color: #167A5D;
    --bs-btn-active-bg: #13684F;
    --bs-btn-active-border-color: #13684F;
    --bs-btn-disabled-color: #167A5D;
    --bs-btn-disabled-border-color: rgba(22, 122, 93, 0.5);
    --bs-btn-focus-shadow-rgb: 22, 122, 93;
}
.btn-success {
    --bs-btn-bg: #1B8F6A;
    --bs-btn-border-color: #1B8F6A;
    --bs-btn-hover-bg: #167A5D;
    --bs-btn-hover-border-color: #167A5D;
    --bs-btn-active-bg: #13684F;
    --bs-btn-active-border-color: #13684F;
}
.btn-outline-secondary {
    --bs-btn-color: #334155;
    --bs-btn-border-color: rgba(15, 23, 42, 0.18);
    --bs-btn-hover-bg: #f1f5f9;
    --bs-btn-hover-color: #0f172a;
    --bs-btn-hover-border-color: rgba(15, 23, 42, 0.24);
    --bs-btn-active-bg: #e2e8f0;
    --bs-btn-active-color: #0f172a;
    --bs-btn-active-border-color: rgba(15, 23, 42, 0.24);
}
.form-check-input:checked {
    background-color: #167A5D;
    border-color: #167A5D;
}
.form-check-input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(22, 122, 93, 0.15);
}
.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2394a3b8'/%3e%3c/svg%3e");
}
.pagination {
    --bs-pagination-color: #167A5D;
    --bs-pagination-hover-color: #0F5C46;
    --bs-pagination-focus-color: #0F5C46;
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(22, 122, 93, 0.15);
    --bs-pagination-active-bg: #167A5D;
    --bs-pagination-active-border-color: #167A5D;
    --bs-pagination-border-radius: 12px;
    flex-wrap: wrap;
    gap: 6px;
}
.page-link { border-radius: 12px !important; min-width: 40px; text-align: center; }
.dropdown-menu {
    --bs-dropdown-link-active-bg: #167A5D;
    --bs-dropdown-border-radius: 16px;
}
.nav-pills { --bs-nav-pills-link-active-bg: #167A5D; }
.badge.bg-success { background-color: #1B8F6A !important; }
.kpi-amber { color: #b45309; }

/* ---- Kart başlıkları (admin, QR vb.) ---- */
.card > .card-header {
    padding: 0.9rem 1.1rem;
    border-bottom: 0;
}
.card > .card-header.bg-primary {
    background: linear-gradient(135deg, #1B8F6A 0%, #167A5D 100%) !important;
}
.card-header h4,
.card-header h5 { font-size: 1.1rem; font-weight: 800; margin: 0; }
.card-header .btn {
    --bs-btn-font-size: 0.875rem;
    --bs-btn-padding-y: 0.45rem;
    --bs-btn-padding-x: 0.8rem;
    --bs-btn-border-radius: 999px;
    flex-direction: row;
    white-space: nowrap;
}
.card-header .btn br { display: none; }
.card-header .btn-light { --bs-btn-color: #167A5D; --bs-btn-bg: #fff; --bs-btn-border-color: #fff; }
.card-header .btn-outline-light { --bs-btn-border-color: rgba(255, 255, 255, 0.6); }

.breadcrumb { font-size: 0.9rem; margin-bottom: 0.75rem; }
.breadcrumb a { text-decoration: none; font-weight: 600; }

/* ---- UI buton/ikon boşluğu (ör. "⊗İptal") ---- */
.ui-btn,
.btn-pill { gap: 8px; }

/* ---- Select2: diğer form alanlarıyla aynı yükseklik / köşe ---- */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 14px;
    border-color: rgba(15, 23, 42, 0.14);
    font-size: 1rem;
}
.select2-container--bootstrap-5 .select2-selection--single {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background-position: right 1rem center;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 1.4;
    color: #0f172a;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { color: #64748b; }
.select2-container--bootstrap-5 .select2-selection.select2-sm,
.form-select-sm + .select2-container--bootstrap-5 .select2-selection {
    min-height: 2.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    padding: 0.35rem 2.25rem 0.35rem 0.75rem;
    background-position: right 0.75rem center;
}
.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
}
.select2-container--bootstrap-5 .select2-results__option { padding: 0.6rem 1rem; }
.select2-container--bootstrap-5 .select2-results__option--selected { background-color: var(--green-050); color: var(--green-600); }
/* Harita: kullanıcı filtresi arama barı ile aynı dilde (pill) */
.hk-map-user-filter .select2-container { width: auto !important; min-width: 180px; max-width: calc(100vw - 24px); }
.hk-map-user-filter .select2-container--bootstrap-5 .select2-selection {
    border-radius: 999px;
    min-height: 44px;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ---- Tablolar ---- */
.table { --bs-table-hover-bg: rgba(22, 122, 93, 0.04); }
.table > thead th {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
    white-space: nowrap;
}
.table a { text-decoration: none; font-weight: 600; }

/* Tablo → mobil kart (app.js tabloları .table-stack ile işaretler, td'lere data-label ekler) */
@media (max-width: 767.98px) {
    .table-responsive:has(> .table-stack) { overflow: visible; }
    .ui-card:has(.table-stack),
    .card:has(> .card-body > .table-responsive > .table-stack) {
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .card:has(> .card-body > .table-responsive > .table-stack) > .card-body { padding-left: 0; padding-right: 0; }
    .table-stack,
    .table-stack > tbody,
    .table-stack > tbody > tr,
    .table-stack > tbody > tr > td {
        display: block;
        width: 100%;
    }
    .table-stack { margin-bottom: 0; }
    .table-stack > thead { display: none; }
    .table-stack > :not(caption) > * > * {
        background-color: transparent;
        box-shadow: none;
    }
    .table-stack > tbody > tr {
        background: #fff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 18px;
        box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
        padding: 4px 14px;
        margin-bottom: 12px;
    }
    .table-stack > tbody > tr > td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        text-align: right;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .table-stack > tbody > tr > td:last-child { border-bottom: 0; }
    .table-stack > tbody > tr > td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 42%;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
    .table-stack > tbody > tr > td:not([data-label]) { justify-content: flex-end; flex-wrap: wrap; }
    .table-stack > tbody > tr > td:not([data-label]):empty { display: none; }
    .table-stack > tbody > tr > td.td-full { justify-content: center; text-align: center; }
    .table-stack > tbody > tr > td > form,
    .table-stack > tbody > tr > td > .form-select,
    .table-stack > tbody > tr > td > select,
    .table-stack > tbody > tr > td > .select2-container,
    .table-stack > tbody > tr > td > .d-flex { max-width: 58%; min-width: 0 !important; }
    .table-stack > tbody > tr > td > .d-flex.flex-column { flex: 1 1 auto; }
    .table-stack > tbody > tr > td .form-select-min-w-120,
    .table-stack > tbody > tr > td .form-select-min-w-110 { min-width: 0; }
    .table-stack > tbody > tr > td:last-child:not([data-label]) form { max-width: none; }
}

/* ---- İstatistik KPI kartları: mobilde 2 sütun ---- */
.stats-kpis .ui-card h4,
.stats-kpis .card h2 {
    font-size: clamp(1.05rem, 4.6vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.stats-kpis .ui-card,
.stats-kpis .card { height: 100%; }
.stats-kpis .ui-card p,
.stats-kpis .card p { font-size: 0.8rem; }
.stats-kpis > .col:first-child .ui-card h4 { color: var(--green-600); }
.kpi-card { border-width: 1px; border-top-width: 4px !important; }

/* ---- Kumbaralar: Excel aksiyonları mobilde 2x2 ızgara (gizli kaydırma yerine hepsi görünür) ---- */
@media (max-width: 575.98px) {
    .boxes-excel-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .boxes-excel-btn {
        justify-content: center;
        white-space: nowrap;
        min-height: 44px;
        padding: 0 12px;
        border-radius: 999px;
        font-size: 13px;
        gap: 6px;
    }
    .boxes-excel-btn i { font-size: 1rem; }
    .boxes-title-row { gap: 8px; }
    .boxes-title { margin-bottom: 0 !important; }
}
.boxes-filters .pill { padding: 0.4rem 0.95rem; font-size: 0.85rem; font-weight: 600; }
.pill-active,
.pill.pill-active {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}
/* Kırık/eksik foto: şerit gibi kalmasın */
.box-card__media.is-broken { min-height: 120px; }
.box-card__media.is-broken .box-card__media-zoom { display: none; }

/* ---- Kumbara detay: bilgi satırları başlıktaki meta satırlarıyla aynı düzende ---- */
.box-detail-v2 .box-detail-info-block { margin: 4px 0 12px; }
.box-detail-v2 .box-detail-info-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.box-detail-v2 .box-detail-info-label { font-size: 12.5px; color: rgba(15, 23, 42, 0.55); font-weight: 700; }
.box-detail-v2 .box-detail-info-value { font-size: 13.5px; font-weight: 700; text-align: right; }
.box-detail-v2 .box-detail-info-value a { color: var(--green-600); }
.box-detail-v2 .box-head { margin-bottom: 6px; }
.box-head__meta-row { align-items: flex-start; }
.box-head__meta-label { flex: 0 0 auto; padding-top: 1px; }
.box-head__meta-link { min-width: 0; overflow-wrap: anywhere; }
.box-hero__placeholder { min-height: 160px; }

/* ---- Giriş: görsel mobilde ortada, üstte boş alan kalmasın ---- */
@media (max-width: 991.98px) {
    .auth-hero { align-items: center; }
    .auth-hero img,
    .auth-hero .auth-hero-img {
        width: 100%;
        max-width: 520px;
        object-position: center center;
        transform: none;
    }
}

/* ---- Sayfa başlıkları (Tahsilatlar vb.) ---- */
.collections-page h4 { font-weight: 800; }

/* Grafikler: mobilde ekranı kaplamasın */
.chart-box { position: relative; height: 240px; }
.chart-box--pie { height: 260px; }
@media (min-width: 992px) { .chart-box { height: 280px; } .chart-box--pie { height: 300px; } }

/* Select2 temizle (×) butonu metnin üstüne binmesin */
.select2-container--bootstrap-5 .select2-selection--single:has(.select2-selection__clear) { padding-right: 3.75rem; }
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear { right: 2.4rem; }
.select2-container--bootstrap-5 .select2-selection.select2-sm:has(.select2-selection__clear),
.form-select-sm + .select2-container--bootstrap-5 .select2-selection:has(.select2-selection__clear) { padding-right: 3.4rem; }
.select2-container--bootstrap-5 .select2-selection.select2-sm .select2-selection__clear { right: 2rem; }

/* Giriş görselinin açık zemini sayfa zeminiyle kaynaşsın (kutu kenarı görünmesin) */
.auth-hero img,
.auth-hero .auth-hero-img { mix-blend-mode: multiply; }

/* Kumbara detay: foto yüklenemezse hero şerit gibi kalmasın */
.box-hero { min-height: 160px; }

/* Kart başlığı (admin): mobilde başlık tam satır, butonlar altta */
@media (max-width: 575.98px) {
    .card > .card-header.d-flex { flex-wrap: wrap; gap: 10px; }
    .card > .card-header.d-flex > :first-child { flex: 1 1 100%; }
    .card > .card-header.d-flex > :not(:first-child) { flex-wrap: wrap; }
}
.auth-hero img,
.auth-hero .auth-hero-img {
    -webkit-mask-image: radial-gradient(ellipse 72% 66% at 50% 50%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 66% at 50% 50%, #000 62%, transparent 100%);
}

/* ---- Boş durum (empty state) ---- */
.empty-state {
    text-align: center;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.empty-state--inline { padding: 24px 12px; height: 100%; justify-content: center; }
.empty-state__icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--green-050, #EAF7F0);
    color: var(--green-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 6px;
}
.empty-state__title { font-weight: 800; color: var(--ink-900); margin: 0; font-size: 1.05rem; }
.empty-state__text { color: #475569; font-size: 0.95rem; max-width: 30ch; margin: 0 auto 6px; line-height: 1.45; }
.empty-state__btn { gap: 8px; min-width: 200px; }

/* ---- Giriş: şifre göster/gizle ---- */
.auth-password-wrap { position: relative; }
.auth-password-wrap .auth-input { padding-right: 52px; }
.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 12px;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.auth-password-toggle:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }

/* ---- Hata sayfaları ---- */
.error-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px calc(24px + var(--safe-bottom));
    background: #F4F8F6;
}
.error-page__card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
    padding: 32px 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.error-page__code { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; color: var(--green-600); margin-bottom: 6px; }
.error-page__title { font-size: 1.35rem; font-weight: 800; color: var(--ink-900); margin-bottom: 8px; }
.error-page__text { color: #475569; margin-bottom: 20px; line-height: 1.5; }
.error-page__actions { display: grid; gap: 10px; }
.error-page__actions .ui-btn { width: 100%; }
