/* Layout adjustments live separately from the visual theme and vendor CSS. */
.tmt-mobile-navigation { display: none; }
.tmt-desktop-navigation, .tmt-account-navigation { min-width: 0; }
.tmt-account-navigation { margin-left: auto; }
.tmt-account-navigation > .navbar-nav { align-items: center; }
.tmt-auth-card { width: 100%; max-width: 420px; }
.tmt-auth-card-wide { max-width: 560px; }
.tmt-auth-page { min-height: 75vh; padding: 24px 0; }

@media screen and (max-width: 1199.98px) {
    .tmt-navigation { flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
    .tmt-navigation .tmt-desktop-navigation { display: none; }
    .tmt-mobile-navigation { display: block; min-width: 0; }
    .tmt-mobile-navigation summary { cursor: pointer; }
    .tmt-mobile-navigation > summary {
        padding: 10px 16px;
        min-height: 44px;
        font-size: 16px;
        border: 1px solid var(--tmt-border);
        border-radius: 8px;
    }
    .tmt-mobile-panel {
        position: absolute;
        z-index: 1030;
        top: 100%;
        left: 8px;
        right: 8px;
        max-height: 75vh;
        max-height: 75dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--tmt-surface);
        border: 1px solid var(--tmt-border);
        border-radius: 12px;
        padding: 8px;
        box-shadow: 0 12px 28px rgba(25, 38, 60, .15);
        font-size: 16px;
        overflow-wrap: anywhere;
    }
    .tmt-mobile-panel ul { margin: 0; padding: 0; list-style: none; }
    .tmt-mobile-panel ul ul { padding-left: 16px; border-left: 2px solid var(--tmt-border); }
    .tmt-mobile-panel a, .tmt-mobile-panel summary {
        display: block;
        padding: 12px;
        min-height: 44px;
        color: var(--tmt-text);
        line-height: 1.4;
        text-decoration: none;
        border-radius: 6px;
    }
    .tmt-mobile-panel summary { display: list-item; list-style-position: inside; }
    .tmt-mobile-panel a:hover, .tmt-mobile-panel a[aria-current="page"] { background: var(--tmt-accent-soft); }
    .tmt-mobile-navigation :focus-visible { outline: 2px solid var(--tmt-accent); outline-offset: -2px; }
    .tmt-mobile-account { border-top: 1px solid var(--tmt-border); margin-top: 8px; padding-top: 8px; }
    .tmt-mobile-account strong { display: block; padding: 12px; }
    .tmt-account-navigation #selectLanguage { width: 130px; margin: 0 !important; }
}

@media screen and (max-width: 767.98px) {
    body.tmt-theme { font-size: 14px; margin-bottom: 0; }
    .tmt-theme .wrapper, .tmt-theme .main { width: 100%; min-width: 0; }
    .tmt-theme .content { padding: 16px 12px 80px; min-width: 0; }
    .tmt-theme .card { min-width: 0; max-width: 100%; }
    .tmt-theme .card-body, .tmt-theme .card-header, .tmt-theme .card-footer { padding: 16px; }
    .tmt-theme .breadcrumb-tmt { padding: 8px 12px; overflow-wrap: anywhere; }

    /* Legacy forms use col-N even on phones. Stack these application columns;
       do not alter widget rows, table cells or virtualized grid measurements. */
    .tmt-theme :is(.content, .e-dlg-content, .modal-body, .tmt-auth-page) .row > :is(
        .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
        .col-7, .col-8, .col-9, .col-10, .col-11
    ) { flex: 0 0 100%; width: 100%; max-width: 100%; margin-bottom: 12px; }
    .tmt-theme .row > * { min-width: 0; }
    .tmt-theme .row-sm { margin-top: 0 !important; }
    .tmt-theme .p-0 { width: 100% !important; margin-left: 0 !important; margin-top: 0 !important; }
    .tmt-theme .form-control, .tmt-theme .form-select,
    .tmt-theme input.e-input, .tmt-theme textarea.e-input { font-size: 16px !important; }
    .tmt-theme .form-control:not(textarea), .tmt-theme .form-select,
    .tmt-theme .e-input-group:not(.e-checkbox-wrapper):not(.e-radio-wrapper) { min-height: 44px; }
    .tmt-theme .btn:not(.btn-image) { min-height: 44px; font-size: 14px !important; white-space: normal; }
    .tmt-theme .form-actions { margin-top: 12px; }
    .tmt-theme .control-label, .tmt-theme .form-label { font-size: 14px; }
    .tmt-theme .e-grid, .tmt-theme .e-treegrid, .tmt-theme .e-schedule,
    .tmt-theme .e-tab, .tmt-theme .e-kanban { max-width: 100%; min-width: 0; }
    .tmt-theme .e-dialog { max-width: calc(100vw - 24px) !important; }
    .tmt-theme .e-dialog .e-dlg-content { overflow: auto; }
    .tmt-theme .e-dialog .e-footer-content, .tmt-theme .modal-footer { white-space: normal; }
    .tmt-theme .e-dialog .e-footer-content .e-btn { margin-top: 8px; }
    .tmt-theme .table-responsive, .tmt-theme .tmt-table-scroll { max-width: 100%; overflow-x: auto; }
    .tmt-theme .nav-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .tmt-theme .nav-tabs .nav-link { white-space: nowrap; min-height: 44px; }
    .tmt-theme.tmt-public > .container { padding: 0 16px; }
    .tmt-theme.tmt-public .navbar > .container { flex-wrap: nowrap; }
    .tmt-theme.tmt-public .navbar-nav { max-width: 150px; }
}

.tmt-week-picker { display: flex; align-items: end; gap: 8px; }
.tmt-week-input { flex: 1; min-width: 0; }
.tmt-week-picker .btn { min-width: 44px; min-height: 44px; }

@media print { .tmt-mobile-navigation { display: none; } }
