/* ==== EFATURA FULLSCREEN MODE ==== */
body.fullscreen-efatura .nav-sticky {
    display: none !important;
}

/* Сброс и базовая сетка как в Jet Sürücü */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Контейнер приложения вместо огромной bootstrap-сетки */
.app-container {
    padding: 0;
    padding-top: 20px;
    margin: 0;
}

.app-main-card {
    /* можно добавить отступы при необходимости */
}

/* Алёрты в стиле Jet (немного дооформим Bootstrap) */
.app-main-card .alert {
    border-radius: 8px;
    border-width: 2px;
    font-size: 14px;
}

/* Кнопки в стиле Jet Sürücü */
.btn {
    border: 2px solid #000;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

/* Глобально на всю ширину — как в Jet */
.app-main-card .btn,
.app-main-card input[type="submit"] {
    width: 100%;
    padding: 12px 15px;
}

.btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: scale(0.98);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.btn-primary:hover {
    background: #222222;
}

.btn-light {
    background: #ffffff;
}

/* Заголовки и текст ближе к Jet */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    margin-bottom: 15px;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 20px;
}

p {
    margin-bottom: 10px;
    font-size: 14px;
}

/* Формы (input/select/textarea) в стиле Jet */
.app-main-card .form-control,
.app-main-card .form-select,
.select2-container--default .select2-selection--single {
    border: 2px solid #000;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
}

.app-main-card .form-control:focus,
.app-main-card .form-select:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* Select2 обводка в общем стиле */
.select2-container--default .select2-selection--single {
    height: 42px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

/* Класс .hidden может пригодиться дальше */
.hidden {
    display: none !important;
}

/* ===== Sticky navigation wrapper ===== */
.nav-sticky {
    position: sticky;
    top: -1px;
    z-index: 150;
    background: #f5f5f5;
    margin: 0 -20px;
    padding: 0 20px;
}

/* ===== Jet Sürücü header ===== */
.jet-header {
    margin-bottom: 0;
    background: #f5f5f5;
    padding-top: 10px;
}

.jet-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-number {
    font-size: 18px;
    margin-bottom: 5px;
}

/* ===== Только TABS внутри sticky-обёртки ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    padding: 10px 0 10px;
    overflow-x: auto;
    background: #f5f5f5;
}

.tab {
    flex: 0 0 auto;
    width: 84px;
    max-width: 84px;
    height: 84px;
    padding: 8px 6px;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: white;
    font-size: 12px;
    line-height: 1.15;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    color: #1a1a1a;
}

.tab > span:not(.tab-icon) {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 72px;
    line-height: 1.15;
}

.tab:hover {
    background: #fafafa;
    border-color: #d0d0d0;
}

.tab:active {
    transform: scale(0.97);
}

.tab.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Отключённые вкладки */
.tab.tab-disabled,
.tab[disabled] {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.tab-danger {
    border-color: #d32f2f;
    color: #d32f2f;
}

.tab-danger:hover {
    background: #ffebee;
    border-color: #d32f2f;
    color: #d32f2f;
}

.tab-danger.active {
    background: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

/* Карточка профиля / балансов */
.balance-card {
    background: white;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.profile-row:last-child {
    border-bottom: none;
}

.btn-edit {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    margin-top: 10px;
}

.logout-btn {
    margin-top: 20px;
    background: #f5f5f5;
}

.logout-btn:hover {
    background: #ffebee;
    border-color: #d32f2f;
    color: #d32f2f;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Очень маленькие экраны (телефоны до 480px) */
@media (max-width: 480px) {
    body {
        padding: 12px;
        max-width: 100%;
    }

    .nav-sticky {
        margin: 0 -12px;
        padding: 0 12px;
    }

    .jet-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .card-number {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .tabs {
        gap: 6px;
        margin-bottom: 16px;
    }

    .tab {
        width: 76px;
        max-width: 76px;
        height: 76px;
        padding: 6px 4px;
        font-size: 11px;
        gap: 4px;
    }

    .tab > span:not(.tab-icon) {
        max-width: 66px;
    }

    .tab-icon {
        font-size: 20px;
    }

    .balance-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 18px;
    }

    .app-main-card .btn,
    .app-main-card input[type="submit"] {
        padding: 10px 12px;
        font-size: 14px;
    }

    .app-main-card .form-control,
    .app-main-card .form-select,
    .select2-container--default .select2-selection--single {
        font-size: 13px;
        padding: 8px 10px;
    }

    .profile-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .app-main-card .alert {
        font-size: 13px;
    }
}

/* Планшеты и чуть более широкие экраны */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        max-width: 640px;
        padding: 16px;
    }

    .nav-sticky {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .jet-title {
        font-size: 30px;
    }

    .tabs {
        gap: 8px;
    }

    .tab {
        width: 84px;
        max-width: 84px;
        height: 84px;
    }
}

/* Крупные экраны — чутка расширим контейнер */
@media (min-width: 1024px) {
    body {
        max-width: 720px;
    }

    .balance-card {
        padding: 24px;
    }
}
