/* ============================================================
   OptiDesk 2.0 – Mobil nézet ("/m/...")
   Fázis 1: vendég/auth shell (MobileAuthLayout), landing, unsupported.
   A design-tokenek (--od-*) az app.css :root-jából öröklődnek.
   ============================================================ */

/* --- Vendég/auth mobil layout --- */
.od-m-auth {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* mobil böngésző URL-sáv kompenzáció */
    background: linear-gradient(160deg, var(--od-primary-xlt) 0%, var(--od-white) 60%);
}

.od-m-auth-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    background: var(--od-primary);
    box-shadow: var(--od-shadow-sm);
}

.od-m-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.od-m-auth-brand:hover { text-decoration: none; }

.od-m-auth-brand-text {
    color: var(--od-white);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

.od-m-auth-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1rem;
}

.od-m-auth-footer {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: 1rem;
    text-align: center;
}

.od-m-desktop-link {
    font-size: .9rem;
    color: var(--od-gray-600);
    font-weight: 500;
}
.od-m-desktop-link:hover { color: var(--od-primary-dark); }

.od-m-auth-copy {
    font-size: .72rem;
    color: var(--od-gray-400);
}

/* --- Mobil gombok világos háttéren ---
   Az app.css alap .od-btn-primary / .od-btn-outline-primary stílusa SÖTÉT háttérhez
   készült (fehér szöveg), és csak a .od-auth-page/.od-hero/.od-cta kontextusban vált
   kék szövegre. A mobil oldalak világos hátterűek, ezért itt is a világos-hátterű
   (kék) variánst kényszerítjük – különben a Belépés/outline gomb felirata fehér lenne. */
.od-m-auth .od-btn-primary,
.od-m-app .od-btn-primary,
.od-m-account .od-btn-primary {
    background: var(--od-primary);
    color: var(--od-white);
    border-color: var(--od-primary);
}
.od-m-auth .od-btn-primary:hover,
.od-m-app .od-btn-primary:hover,
.od-m-account .od-btn-primary:hover {
    background: var(--od-primary-dark);
    border-color: var(--od-primary-dark);
    color: var(--od-white);
}
.od-m-auth .od-btn-outline-primary,
.od-m-app .od-btn-outline-primary,
.od-m-account .od-btn-outline-primary {
    background: transparent;
    color: var(--od-primary);
    border: 2px solid var(--od-primary);
}
.od-m-auth .od-btn-outline-primary:hover,
.od-m-app .od-btn-outline-primary:hover,
.od-m-account .od-btn-outline-primary:hover {
    background: var(--od-primary-xlt);
    color: var(--od-primary-dark);
    border-color: var(--od-primary);
}

/* A megosztott auth-kártya mobil shellben: navbar-offset nélkül, kompaktabban. */
.od-m-auth-body .od-auth-page {
    min-height: auto;
    padding: 0;
    background: transparent;
    flex: 1 1 auto;
}
.od-m-auth-body .od-auth-page .container { padding-left: 0; padding-right: 0; }

/* --- Mobil landing (/m) --- */
.od-m-home {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.od-m-home-logo {
    margin-bottom: 1rem;
}

.od-m-home-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--od-primary-dark);
    line-height: 1.25;
    margin-bottom: .75rem;
}

.od-m-home-sub {
    color: var(--od-gray-600);
    font-size: .98rem;
    margin-bottom: 1.5rem;
}

.od-m-home-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 2rem;
}

.od-m-home-actions .btn { width: 100%; }

.od-m-home-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.od-m-home-features li {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: var(--od-white);
    border: 1px solid var(--od-gray-200);
    border-radius: var(--od-radius);
    padding: .7rem .85rem;
    font-size: .92rem;
    color: var(--od-gray-800);
    box-shadow: var(--od-shadow-sm);
}

.od-m-home-features li i {
    color: var(--od-primary);
    font-size: 1.15rem;
    flex: 0 0 auto;
}

/* ============================================================
   Belépett mobil app-shell (MobileLayout) – Fázis 2
   ============================================================ */
.od-m-app {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--od-gray-50);
}

/* --- Felső fejléc --- */
.od-m-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: .6rem;
    height: 56px;
    padding: 0 .85rem;
    background: var(--od-primary);
    box-shadow: var(--od-shadow-sm);
}

.od-m-header-brand { display: inline-flex; align-items: center; text-decoration: none; }
.od-m-header-brand:hover { text-decoration: none; }

.od-m-header-title { color: var(--od-white); font-weight: 700; font-size: 1.05rem; }

.od-m-company-btn {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.14);
    border: none;
    border-radius: var(--od-radius);
    color: var(--od-white);
    padding: .4rem .7rem;
    font-size: .92rem;
    font-weight: 500;
}
.od-m-company-btn > i:first-child { flex: 0 0 auto; }
.od-m-company-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.od-m-company-caret { flex: 0 0 auto; opacity: .8; font-size: .8rem; }

/* --- Tartalom --- */
.od-m-main {
    padding: 0 0 calc(64px + env(safe-area-inset-bottom, 0px));
}

/* --- Alsó tab-bar --- */
.od-m-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    background: var(--od-white);
    border-top: 1px solid var(--od-gray-200);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.od-m-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 60px;
    background: none;
    border: none;
    text-decoration: none;
    color: var(--od-gray-600);
    font-size: .7rem;
    font-weight: 500;
}
.od-m-tab:hover { text-decoration: none; color: var(--od-gray-600); }
.od-m-tab i { font-size: 1.3rem; }
.od-m-tab-active { color: var(--od-primary); }

/* --- Alulról felcsúszó lapok (sheet) --- */
.od-m-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0,0,0,.4);
}

.od-m-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: var(--od-white);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,.18);
    padding: .5rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: od-m-sheet-up .2s ease;
}
@keyframes od-m-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.od-m-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--od-gray-200);
    margin: .25rem auto .75rem;
}
.od-m-sheet-title { font-weight: 700; color: var(--od-gray-800); margin-bottom: .75rem; }

.od-m-company-search {
    position: relative;
    margin-bottom: .5rem;
}
.od-m-company-search i {
    position: absolute;
    left: .65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--od-gray-400);
}
.od-m-company-search input { padding-left: 2rem; }

.od-m-company-list { overflow-y: auto; }

.od-m-company-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .25rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--od-gray-100);
    padding: .7rem .25rem;
}
.od-m-company-item-active { background: var(--od-primary-xlt); border-radius: var(--od-radius); }

.od-m-more-list { display: flex; flex-direction: column; }
.od-m-more-logout { margin: 0; }
.od-m-more-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .85rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--od-gray-100);
    padding: .9rem .25rem;
    text-decoration: none;
    color: var(--od-gray-800);
    font-size: .98rem;
    font-weight: 500;
    text-align: left;
}
.od-m-more-item:hover { text-decoration: none; color: var(--od-gray-800); }
.od-m-more-item > i:first-child { font-size: 1.2rem; color: var(--od-primary); width: 1.4rem; text-align: center; }
.od-m-more-item span { flex: 1 1 auto; }
.od-m-more-caret { color: var(--od-gray-400); font-size: .8rem; }
.od-m-more-item-danger { color: var(--od-danger); }
.od-m-more-item-danger > i:first-child { color: var(--od-danger); }

/* --- Mobil oldal-konténer + fejléc (app-oldalak tartalma) --- */
.od-m-page { padding: 1rem .9rem; }
.od-m-page-head { margin-bottom: 1rem; }
.od-m-page-title { font-size: 1.25rem; font-weight: 700; color: var(--od-gray-800); margin: 0; }
.od-m-page-sub { font-size: .85rem; color: var(--od-gray-600); margin: .15rem 0 0; }

/* A mobil app-oldalakon a desktop .container fölös behúzását semlegesítjük */
.od-m-main .container { padding-left: .9rem; padding-right: .9rem; max-width: 100%; }

/* Flexben a text-truncate-hez kell a min-width:0 (Bootstrap nem tartalmazza) */
.min-w-0 { min-width: 0; }

/* Kártyaként megjelenő gomb (számla-lista elem) */
.od-m-invoice-card {
    width: 100%;
    background: var(--od-white);
    border: none;
    padding: 0;
}

/* Számla részletek lap */
.od-m-invoice-sheet { max-height: 88vh; }
.od-m-invoice-body { overflow-y: auto; }

/* ============================================================
   Mobil fiók-shell (MobileAccountLayout) – Fázis 2
   ============================================================ */
.od-m-account {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--od-gray-50);
}

.od-m-account-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: .5rem;
    height: 56px;
    padding: 0 .5rem;
    background: var(--od-primary);
    color: var(--od-white);
}
.od-m-account-back,
.od-m-account-desktop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--od-white);
    font-size: 1.2rem;
    border-radius: var(--od-radius);
}
.od-m-account-back:hover,
.od-m-account-desktop:hover { color: var(--od-white); background: rgba(255,255,255,.14); }
.od-m-account-title { flex: 1 1 auto; font-weight: 700; font-size: 1.05rem; }

.od-m-account-nav {
    position: sticky;
    top: 56px;
    z-index: 1029;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    background: var(--od-white);
    border-bottom: 1px solid var(--od-gray-200);
    padding: .4rem .5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.od-m-account-nav::-webkit-scrollbar { display: none; }

.od-m-account-navlink {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 64px;
    padding: .4rem .6rem;
    border-radius: var(--od-radius);
    color: var(--od-gray-600);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 500;
}
.od-m-account-navlink i { font-size: 1.1rem; }
.od-m-account-navlink:hover { color: var(--od-gray-800); text-decoration: none; }
.od-m-account-navlink.active { background: var(--od-primary-xlt); color: var(--od-primary); }

.od-m-account-body { padding: 1rem .9rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
/* A Manage oldalak saját .container behúzását mobilon semlegesítjük */
.od-m-account-body .container { padding-left: 0; padding-right: 0; max-width: 100%; }
.od-m-account-body .od-manage-page { display: block; }

/* ============================================================
   Cég-modul mobil oldalak (Dokumentumok, Bér, Törzsadat) – Fázis 3
   ============================================================ */

/* Dokumentum kategória-szűrő lap */
.od-m-cat-list { overflow-y: auto; max-height: 50vh; }
.od-m-cat-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .25rem;
    border-bottom: 1px solid var(--od-gray-100);
    font-size: .95rem;
}

/* Törzsadat read-only kártyák */
.od-m-md-card {
    background: var(--od-white);
    border-radius: var(--od-radius-lg);
    box-shadow: var(--od-shadow-sm);
    padding: 1rem;
    margin-bottom: .75rem;
}
.od-m-md-title { font-weight: 700; color: var(--od-gray-800); margin-bottom: .75rem; }

.od-m-md-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--od-gray-100);
}
.od-m-md-row:last-child { border-bottom: none; }
.od-m-md-label { color: var(--od-gray-600); font-size: .82rem; flex: 0 0 auto; }
.od-m-md-value { font-weight: 500; text-align: right; word-break: break-word; }

.od-m-md-item {
    border: 1px solid var(--od-gray-200);
    border-radius: var(--od-radius);
    padding: .65rem .8rem;
    margin-bottom: .5rem;
}
.od-m-md-item:last-child { margin-bottom: 0; }

/* --- "Csak asztali nézet" (/m/unsupported) --- */
.od-m-unsupported {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.od-m-unsupported-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--od-primary-xlt);
    color: var(--od-primary);
    font-size: 2rem;
}

.od-m-unsupported-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--od-gray-800);
    margin-bottom: .5rem;
}

.od-m-unsupported-text {
    color: var(--od-gray-600);
    font-size: .95rem;
    margin-bottom: 1.5rem;
}
