/* Navigation and page layout live here; component styles live in style.css. */
:root {
    --brand-bg-color: #0f172a;
    /* Single flat brand colour for the mobile app chrome: it fills the notch /
       status-bar strip, the header and the bottom tab-bar strip so they merge. */
    --app-chrome: #013C84;
    --shell-canvas: #f4f7fb;
    --shell-border: #dde5ef;
    --shell-ink: #172033;
    --shell-brand: #0f766e;
    --motion-duration: 220ms;
    --motion-ease: cubic-bezier(.2, .7, .2, 1);
}

.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom));
    background: var(--app-chrome);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    align-items: stretch;
    justify-content: space-around;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: rgba(255, 255, 255, 0.58);
    gap: 4px;
    transition: color 0.2s, transform 0.2s var(--motion-ease);
}

.tab-item i {
    font-size: 24px;
}

.tab-item span {
    font-size: 10px;
    font-weight: 500;
}

.tab-item.active {
    color: #ffffff;
}

html, body { min-width: 0; height: 100%; overflow: hidden; background: var(--shell-canvas); }
button, a, input, select { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--shell-brand); outline-offset: 3px; }
.app-sidebar :focus-visible { outline-color: #a5baff; }
[hidden] { display: none !important; }

.app-container {
    --panel-width: 256px;
    display: none;
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: var(--shell-canvas);
    color: var(--shell-ink);
}
.app-container.show { display: flex; }
.app-sidebar {
    --nav-active: #405de6;
    --nav-hover: #1c3459;
    --nav-text: #c5d3ed;
    z-index: 60;
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--panel-width);
    width: var(--panel-width);
    min-height: 0;
    padding: 28px 16px 18px;
    background: var(--brand-bg-color);
    color: var(--nav-text);
    overflow-y: auto;
    transition: flex-basis var(--motion-duration) var(--motion-ease), width var(--motion-duration) var(--motion-ease), padding var(--motion-duration) var(--motion-ease);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 0 8px;
    margin-bottom: 40px;
    color: #edf2ff;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}
.sidebar-brand img { flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; background: transparent; border: 0; border-radius: 0; padding: 0; }
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar-nav .menu-item, .sidebar-logout {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 0;
    border-radius: 6px;
    color: var(--nav-text);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease;
}
.sidebar-nav svg, .sidebar-logout svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-nav svg, .sidebar-logout svg { stroke-width: 1.5; }
.sidebar-nav .menu-item:hover { background: var(--nav-hover); color: #edf2ff; }
.sidebar-nav .menu-item.active { color: #fff; background: var(--nav-active); }
.sidebar-nav .menu-item svg { transition: transform 180ms var(--motion-ease); }
.sidebar-nav .menu-item:hover svg { transform: translateX(2px); }
.sidebar-footer { margin-top: auto; padding-top: 20px; }
.sidebar-logout { color: var(--nav-text); }
.sidebar-logout:hover { background: var(--nav-hover); color: #edf2ff; }
.drawer-close, .sidebar-overlay { display: none; }

.main-content-wrapper { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.header-left-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-search-container {
    flex: 1;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.header-search-wrapper {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 2px 12px;
    height: 44px;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.header-search-wrapper:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.header-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    padding-right: 12px;
}
.header-filter-group i {
    font-size: 16px;
    color: #64748b;
}
.header-select {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    width: 100%;
    outline: none;
}
.header-search-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
    margin: 0 12px;
}
.header-search-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-search-group i {
    font-size: 16px;
    color: #64748b;
}
.header-search-group input {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 14px;
    color: #0f172a;
    outline: none;
}
.header-search-group input::placeholder {
    color: #94a3b8;
}

.fixed-header {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 72px;
    padding: 12px 28px;
    gap: 24px;
    background: white;
    border-bottom: 1px solid var(--shell-border);
}
.mobile-menu-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 6px; color: #294575; background: transparent; font: inherit; font-weight: 400; transition: background-color 160ms ease, transform 160ms ease; }
.mobile-menu-button:hover { background: #edf2ff; }
.mobile-menu-button:active { transform: scale(.97); }
.mobile-menu-button svg { transition: transform var(--motion-duration) var(--motion-ease); }
.sidebar-collapsed .mobile-menu-button svg { transform: rotate(90deg); }
.header-title { font-size: 14px; font-weight: 600; color: #667085; }
.global-breadcrumb { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; min-height: 48px; min-width: 0; padding: 10px 28px; gap: 12px; background: white; border-bottom: 1px solid var(--shell-border); }
.breadcrumb-navigation { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; font-size: 13px; color: #667085; }
.breadcrumb-link { flex-shrink: 0; cursor: pointer; color: #0f766e; }
.breadcrumb-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-separator { flex: 0 0 auto; }
.main-content { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.content-section { display: none; width: 100%; min-width: 0; padding: 36px 32px; }
.content-section.active { display: block; animation: section-enter 700ms var(--motion-ease) backwards; }
.screen-container { width: 100%; max-width: 1440px; min-width: 0; margin: 0 auto; animation: content-enter 560ms var(--motion-ease) backwards; }
.screen-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.screen-header-left { flex: 1 1 240px; min-width: 0; }
.screen-header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.screen-title { margin: 0; color: var(--shell-ink); font-size: clamp(22px, 2.1vw, 30px); line-height: 1.3; font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.screen-header-content { width: 100%; min-width: 0; }
.screen-header .inline-breadcrumb { margin-top: 10px; color: #667085; }
.screen-header .filters-row { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); width: 100%; gap: 16px; margin-top: 8px; align-items: end; }
.screen-header .filter-group { min-width: 0; width: 100%; }
.screen-header .filter-label { font-size: 11px; font-weight: 650; letter-spacing: .055em; margin-bottom: 2px; }
.screen-header .filter-select, .screen-header .search-input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #cfd8e3; border-radius: 7px; font-size: 14px; }
.screen-header .filter-select:focus, .screen-header .search-input:focus { border-color: var(--shell-brand); outline: 2px solid var(--shell-brand); outline-offset: 2px; }
.category-cards-grid-large { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.category-card-large { min-width: 0; min-height: 128px; padding: 24px; gap: 18px; border: 1px solid #d5dee9; border-radius: 10px; background: white; transition: border-color 180ms ease, transform 180ms var(--motion-ease), background-color 180ms ease; }
.category-card-large .category-card-title { font-size: 16px; font-weight: 600; line-height: 1.45; color: #27364b; }
.category-card-large .category-card-subtitle { margin-top: 8px; font-size: 13px; font-weight: 400; color: #667085; }
.category-card-arrow { transition: transform 180ms var(--motion-ease); }
.category-card-large:hover .category-card-arrow { transform: translateX(3px); }
.category-card-content { min-width: 0; }
.category-card-title, .tender-title-text, .tender-list-title, .document-name, .info-value { overflow-wrap: anywhere; }
.tenders-grid, .dependencias-grid, .documents-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.screen-container .tender-detail-layout { min-width: 0; }
.global-search-results-dropdown { max-width: calc(100vw - 28px); max-height: min(65dvh, 600px); overflow-y: auto; }
.toast-container { max-width: calc(100vw - 28px); pointer-events: none; }
.login-screen { padding: 20px; overflow-y: auto; }
.login-card { margin: auto; }

/* Contact uses the same white surfaces, blue actions, and responsive spacing. */
.contact-intro { margin-top: 10px; color: #667085; font-size: 15px; line-height: 1.6; }
.contact-form { width: 100%; max-width: 800px; padding: 28px; background: white; border: 1px solid var(--shell-border); border-radius: 10px; }
.contact-form-heading { margin-bottom: 26px; }
.contact-form-heading h2 { margin: 0 0 6px; font-size: 17px; font-weight: 500; color: var(--shell-ink); }
.contact-form-heading p, .contact-help { color: #667085; font-size: 13px; line-height: 1.6; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.contact-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.contact-field-full { grid-column: 1 / -1; }
.contact-field label { font-size: 14px; font-weight: 500; color: #294575; }
.contact-field input, .contact-field textarea { width: 100%; min-width: 0; padding: 12px 14px; background: white; color: var(--shell-ink); border: 1px solid #cfd8e3; border-radius: 7px; font: inherit; font-size: 16px; line-height: 1.5; transition: border-color 160ms ease; }
.contact-field textarea { resize: vertical; min-height: 132px; max-height: 360px; }
.contact-field input:focus, .contact-field textarea:focus { border-color: #405de6; outline: 2px solid #405de6; outline-offset: 2px; }
.contact-field input::placeholder, .contact-field textarea::placeholder { color: #8996aa; opacity: 1; }
.contact-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 28px 0 14px; }
.contact-submit { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 20px; border: 0; border-radius: 7px; background: #405de6; color: white; font: inherit; font-size: 14px; font-weight: 500; transition: background-color 160ms ease, transform 160ms ease; }
.contact-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.contact-submit:hover { background: #334cc7; }
.contact-submit:active { transform: translateY(1px); }
.contact-destination { color: #667085; font-size: 14px; }
.contact-handoff { margin-top: 16px; color: #294575; font-size: 14px; }
.contact-handoff a { color: #334cc7; text-decoration: underline; text-underline-offset: 3px; }

/* Small movements only: one entrance per screen, no idle effects. */
@keyframes content-enter {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes section-enter {
    from { opacity: 0; transform: translateY(46px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes card-enter {
    from { opacity: 0; transform: translateY(52px) scale(.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes panel-backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Entrance motion is always on (owner request), independent of OS motion settings. */
.category-cards-grid-large > .category-card-large:nth-child(-n+6) { animation: content-enter 240ms var(--motion-ease) backwards; }
.category-cards-grid-large > .category-card-large:nth-child(2) { animation-delay: 25ms; }
.category-cards-grid-large > .category-card-large:nth-child(3) { animation-delay: 50ms; }
.category-cards-grid-large > .category-card-large:nth-child(4) { animation-delay: 75ms; }
.category-cards-grid-large > .category-card-large:nth-child(5) { animation-delay: 100ms; }
.category-cards-grid-large > .category-card-large:nth-child(6) { animation-delay: 125ms; }

/* Every licitación (grid + list) enters with a staggered lift. */
.tenders-grid > *,
.tenders-list > *,
.documents-grid > *,
.info-card { animation: card-enter 620ms var(--motion-ease) backwards; }
.tenders-grid > *:nth-child(2), .tenders-list > *:nth-child(2), .documents-grid > *:nth-child(2) { animation-delay: 70ms; }
.tenders-grid > *:nth-child(3), .tenders-list > *:nth-child(3), .documents-grid > *:nth-child(3) { animation-delay: 140ms; }
.tenders-grid > *:nth-child(4), .tenders-list > *:nth-child(4), .documents-grid > *:nth-child(4) { animation-delay: 210ms; }
.tenders-grid > *:nth-child(5), .tenders-list > *:nth-child(5), .documents-grid > *:nth-child(5) { animation-delay: 280ms; }
.tenders-grid > *:nth-child(6), .tenders-list > *:nth-child(6), .documents-grid > *:nth-child(6) { animation-delay: 350ms; }
.tenders-grid > *:nth-child(7), .tenders-list > *:nth-child(7), .documents-grid > *:nth-child(7) { animation-delay: 420ms; }
.tenders-grid > *:nth-child(8), .tenders-list > *:nth-child(8), .documents-grid > *:nth-child(8) { animation-delay: 490ms; }
.tenders-grid > *:nth-child(9), .tenders-list > *:nth-child(9), .documents-grid > *:nth-child(9) { animation-delay: 560ms; }
.tenders-grid > *:nth-child(10), .tenders-list > *:nth-child(10), .documents-grid > *:nth-child(10) { animation-delay: 630ms; }
.tenders-grid > *:nth-child(11), .tenders-list > *:nth-child(11), .documents-grid > *:nth-child(11) { animation-delay: 700ms; }
.tenders-grid > *:nth-child(12), .tenders-list > *:nth-child(12), .documents-grid > *:nth-child(12) { animation-delay: 770ms; }

/* Licitación detail reveals as one block. */
.basic-info-section { animation: content-enter 560ms var(--motion-ease) backwards; }

/* Live filtering/search must not replay the entrance on every keystroke. */
.tenders-grid.no-enter > *,
.tenders-list.no-enter > * { animation: none; }
@media (hover: hover) and (pointer: fine) {
    .category-card-large:hover { border-color: #7d928d; background: #fff; transform: translateY(-2px); }
    .folder-card:hover, .tender-list-item:hover { border-color: #8b9cab; }
}
.primary-btn, .secondary-btn, .folder-card, .tender-list-item, .document-card { transition: background-color 160ms ease, border-color 160ms ease, transform 180ms var(--motion-ease); }
.primary-btn:active, .secondary-btn:active { transform: translateY(1px); }

@media (min-width: 901px) {
    .app-container.sidebar-collapsed { --panel-width: 80px; }
    .sidebar-collapsed .app-sidebar { padding-inline: 10px; }
    .sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
    .sidebar-collapsed .sidebar-brand span,
    .sidebar-collapsed .menu-item span,
    .sidebar-collapsed .sidebar-logout span { display: none; }
    .sidebar-collapsed .menu-item,
    .sidebar-collapsed .sidebar-logout { justify-content: center; padding-inline: 8px; }
}
@media (max-width: 1100px) {
    .header-title { display: none; }
    .content-section { padding: 24px; }
}
@media (max-width: 900px) {
    .app-sidebar { position: absolute; inset: 0 auto 0 0; width: min(300px, calc(100vw - 48px)); padding-top: 64px; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
    .app-sidebar.is-open { transform: translateX(0); visibility: visible; }
    .drawer-close { display: grid; place-items: center; position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; font-size: 28px; font-weight: 300; color: var(--nav-text); border: 0; border-radius: 6px; transition: background-color 160ms ease; }
    .drawer-close:hover { background: var(--nav-hover); }
    .sidebar-overlay { display: block; position: absolute; inset: 0; z-index: 50; background: #0f172a80; animation: panel-backdrop-enter 180ms ease; }
    .fixed-header { min-height: 68px; padding: 12px 20px; }
    .global-breadcrumb { padding-inline: 20px; }
    .category-cards-grid-large { gap: 16px; }
}
@media (max-width: 600px) {
    .contact-form { padding: 22px 18px; }
    .contact-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .contact-submit { width: 100%; }
    .fixed-header { gap: 10px; padding: 10px 14px; }
    .mobile-menu-button { padding-inline: 10px; }
    .mobile-menu-button span { font-size: 13px; }
    .global-breadcrumb { padding: 10px 14px; }
    .content-section { padding: 22px 14px; }
    .screen-header { margin-bottom: 22px; }
    .screen-header .filters-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .screen-header .filter-select, .screen-header .search-input { font-size: 16px; }
    .category-cards-grid-large, .tenders-grid, .dependencias-grid, .documents-grid, .deploy-stats { grid-template-columns: minmax(0, 1fr); }
    .category-card-large { flex-direction: row; text-align: left; min-height: 118px; padding: 20px; gap: 16px; }
    .category-card-large .category-card-content { flex: 1; }
    .category-card-large .category-card-title { font-size: 16px; }
    .screen-header-right, .deploy-actions, .tender-list-item { flex-wrap: wrap; }
    .tender-list-right { flex-wrap: wrap; }
    .info-grid { grid-template-columns: minmax(0, 1fr); }
    .login-card { padding: 28px 22px; }
}
/* Motion is intentionally always on (owner request); OS motion settings are not honoured. */

/* ===========================================
   iOS-style mobile app shell
   =========================================== */
html { -webkit-text-size-adjust: 100%; }
body {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}
.main-content, .app-sidebar, .global-search-results-dropdown, .login-screen { -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
    /* Paint the strips behind the status bar and the home indicator */
    html, body { height: 100%; background: var(--app-chrome); }
    .app-container { 
        padding: 0 0 calc(60px + env(safe-area-inset-bottom)) 0; 
        background: var(--app-chrome);
    }

    .mobile-tab-bar {
        display: flex;
    }

    .main-content-wrapper {
        background: var(--shell-canvas);
        border-radius: 20px 20px 0 0;
        overflow: hidden;
    }

    /* Hide menu button on mobile since we have tab bar */
    .mobile-menu-button {
        display: none;
    }

    .header-left-actions::after {
        margin-left: 0;
    }

    /* Sidebar: keep it for logout or other secondary actions if needed, or hide completely */
    .app-sidebar {
        display: none;
    }
    .sidebar-overlay {
        display: none;
    }

    /* Header: brand app bar that also fills the notch / status bar area */
    .fixed-header {
        min-height: 56px;
        padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 10px calc(12px + env(safe-area-inset-left));
        gap: 12px;
        background: var(--app-chrome);
        border-bottom: 0;
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }
    .header-left-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 4px;
    }
    .header-left-actions::after {
        content: 'Licitaciones';
        color: white;
        font-weight: 600;
        font-size: 17px;
    }
    .header-search-container {
        max-width: none;
        width: 100%;
    }
    .header-search-wrapper {
        background: rgba(255, 255, 255, 0.12);
        height: 38px;
        border-radius: 10px;
        padding: 0 10px;
    }
    .header-filter-group {
        min-width: 110px;
        padding-right: 8px;
    }
    .header-filter-group i { color: rgba(255, 255, 255, 0.6); font-size: 14px; }
    /* 16px keeps iOS from zooming the page when a field is focused */
    .header-select { color: white; font-size: 16px; }
    .header-select option { color: #0f172a; }
    .header-search-divider { background: rgba(255, 255, 255, 0.2); margin: 0 8px; }
    .header-search-group i { color: rgba(255, 255, 255, 0.6); font-size: 14px; }
    .header-search-group input { color: white; font-size: 16px; }
    .header-search-group input::placeholder { color: rgba(255, 255, 255, 0.4); }

    .mobile-menu-button {
        width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
        border-radius: 50%;
        color: #fff;
    }
    .mobile-menu-button span { display: none; }
    .mobile-menu-button:hover { background: rgba(255, 255, 255, .14); }
    .mobile-menu-button svg { width: 20px; height: 20px; }

    .global-search-results-dropdown {
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        border-radius: 14px;
        box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    }

    /* Breadcrumb: slim translucent sub-header */
    .global-breadcrumb {
        min-height: 42px;
        padding: 8px calc(14px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left));
        background: rgba(255, 255, 255, .9);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        font-size: 13px;
    }

    /* Content: the container already reserves the home indicator strip */
    .content-section { padding: 18px calc(14px + env(safe-area-inset-right)) 24px calc(14px + env(safe-area-inset-left)); }
    .screen-header { margin-bottom: 18px; }
    .screen-title { font-size: 24px; }

    /* Cards: grouped-list surfaces */
    .tender-card, .tender-list-item, .document-card, .folder-card,
    .category-card-large, .contact-form, .info-card {
        border: 1px solid rgba(15, 23, 42, .07);
        border-radius: 16px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .tender-list-item { padding: 16px; gap: 14px; }
    .category-card-large { min-height: 108px; padding: 18px; }

    /* Toasts: bottom banner above the home indicator */
    .toast-container {
        top: auto;
        bottom: calc(16px + env(safe-area-inset-bottom));
        left: 14px;
        right: 14px;
    }
    .toast {
        width: 100%;
        min-width: 0;
        max-width: none;
        border-radius: 14px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
        transform: translateY(24px);
    }
    .toast.show { transform: translateY(0); }

    /* Login: full-bleed launch screen */
    .login-screen { padding: calc(24px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left)); }
    .login-card {
        max-width: 100%;
        padding: 32px 22px;
        border: 0;
        border-radius: 22px;
        box-shadow: 0 20px 60px rgba(8, 15, 35, .28);
    }
    .login-logo { margin-bottom: 28px; }
    .login-logo img { width: 84px; height: 84px; }
    .login-form { gap: 18px; }
    .form-group label { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
    .login-input { padding: 15px 16px; border-width: 1px; border-radius: 12px; font-size: 17px; }
    .login-form button[type="submit"] { min-height: 52px; border-radius: 14px; font-size: 17px; }
}

/* Touch devices get press feedback instead of hover */
@media (hover: none) {
    .tender-card:active, .tender-list-item:active, .document-card:active,
    .folder-card:active, .category-card-large:active, .menu-item:active { transform: scale(.985); }
    .tab-item:active { transform: scale(.9); }
    .mobile-menu-button:active, .primary-btn:active, .secondary-btn:active,
    .contact-submit:active, .login-btn:active { transform: scale(.96); }
}

/* ===========================================
   iOS app feel
   =========================================== */
/* Chrome is structural: never let it be selected or rubber-band */
.fixed-header, .mobile-tab-bar, .app-sidebar, .global-breadcrumb, .sidebar-brand {
    -webkit-user-select: none;
    user-select: none;
}
/* Content scrolls like a native list: no visible scrollbars on touch */
@media (max-width: 900px) {
    .main-content, .app-sidebar, .global-search-results-dropdown {
        scrollbar-width: none;
    }
    .main-content::-webkit-scrollbar,
    .app-sidebar::-webkit-scrollbar,
    .global-search-results-dropdown::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }
}
/* Icon "pop" when a tab becomes active, like a native tab bar */
.tab-item i { transition: transform 220ms var(--motion-ease); }
.tab-item.active i { transform: scale(1.06); }
