/* =========================================================
   MOB365 CONTROL CENTER — PROFESSIONAL LAYOUT
   ========================================================= */

.login-layout {
    min-height: 100vh;
}

:root {
    --sidebar-width: 252px;
    --sidebar-collapsed-width: 78px;
    --sidebar-bg: #0b1220;
    --sidebar-bg-soft: #111a2d;
    --sidebar-border: rgba(255, 255, 255, .07);
    --layout-bg: #f4f7fb;
    --layout-text: #0f172a;
    --layout-muted: #64748b;
    --brand-blue: #2563eb;
    --brand-indigo: #4f46e5;
    --layout-border: #e2e8f0;
}

/* =========================
   SHELL
   ========================= */

.mob-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--layout-bg);
    transition: grid-template-columns .24s ease;
}

    .mob-layout.sidebar-collapsed {
        grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
    }

/* =========================
   SIDEBAR
   ========================= */

.mob-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    width: 100%;
    height: 100vh;
    min-width: 0;
    flex-direction: column;
    padding: 20px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    color: #fff;
    background: radial-gradient( circle at 20% 0%, rgba(37, 99, 235, .20), transparent 30% ), linear-gradient( 180deg, #0d1729 0%, #0b1220 100% );
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 12px 0 35px rgba(15, 23, 42, .10);
    z-index: 50;
}

/* =========================
   BRAND
   ========================= */

.mob-sidebar-brand {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.mob-brand-link {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
}

.mob-brand-logo {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 13px;
    color: #fff;
    background: linear-gradient( 135deg, #2563eb, #6d5dfc );
    box-shadow: 0 12px 24px rgba(37, 99, 235, .25);
    font-size: 19px;
    font-weight: 950;
}

.mob-brand-copy {
    min-width: 0;
}

    .mob-brand-copy strong,
    .mob-brand-copy span {
        display: block;
    }

    .mob-brand-copy strong {
        color: #fff;
        font-size: 15px;
        font-weight: 950;
        letter-spacing: .025em;
    }

    .mob-brand-copy span {
        margin-top: 3px;
        color: #7f91ad;
        font-size: 9px;
        font-weight: 750;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

.mob-sidebar-toggle {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 10px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, .055);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

    .mob-sidebar-toggle:hover {
        border-color: rgba(255, 255, 255, .20);
        background: rgba(255, 255, 255, .10);
    }

.toggle-lines {
    display: grid;
    gap: 3px;
}

    .toggle-lines span {
        display: block;
        width: 15px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

/* =========================
   SECTION LABEL
   ========================= */

.mob-sidebar-section-label {
    margin: 0 11px 10px;
    color: #5f718d;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

/* =========================
   NAVIGATION
   ========================= */

.mob-nav {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}

    .mob-nav a {
        position: relative;
        display: flex;
        min-height: 46px;
        align-items: center;
        gap: 12px;
        padding: 0 12px;
        overflow: hidden;
        border: 1px solid transparent;
        border-radius: 12px;
        color: #aebbd0;
        text-decoration: none;
        font-size: 12px;
        font-weight: 800;
        transition: color .18s ease, background .18s ease, border-color .18s ease;
    }

        .mob-nav a:hover {
            color: #fff;
            border-color: rgba(255, 255, 255, .06);
            background: rgba(255, 255, 255, .055);
        }

        .mob-nav a.active {
            color: #fff;
            border-color: rgba(96, 165, 250, .17);
            background: linear-gradient( 90deg, rgba(37, 99, 235, .25), rgba(37, 99, 235, .08) );
        }

.mob-nav-indicator {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: transparent;
}

.mob-nav a.active .mob-nav-indicator {
    background: #60a5fa;
    box-shadow: 0 0 16px rgba(96, 165, 250, .55);
}

.mob-nav-icon {
    display: grid;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    place-items: center;
    color: #7f91ad;
}

.mob-nav a:hover .mob-nav-icon,
.mob-nav a.active .mob-nav-icon {
    color: #7db4ff;
}

.mob-nav-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mob-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================
   SIDEBAR FOOTER
   ========================= */

.mob-sidebar-footer {
    margin-top: 22px;
}

.mob-environment-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
}

.mob-environment-icon {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 8px;
    background: rgba(34, 197, 94, .12);
}

    .mob-environment-icon span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #22c55e;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
    }

.mob-environment-copy {
    min-width: 0;
    flex: 1;
}

    .mob-environment-copy strong,
    .mob-environment-copy span {
        display: block;
    }

    .mob-environment-copy strong {
        color: #d9fbe4;
        font-size: 10px;
        font-weight: 900;
    }

    .mob-environment-copy span {
        margin-top: 2px;
        color: #62728a;
        font-size: 8px;
        font-weight: 650;
    }

.mob-version {
    color: #62728a;
    font-size: 9px;
    font-weight: 750;
}

/* =========================
   COLLAPSED SIDEBAR
   ========================= */

.sidebar-collapsed .mob-sidebar {
    padding-right: 10px;
    padding-left: 10px;
}

.sidebar-collapsed .mob-sidebar-brand {
    flex-direction: column;
    justify-content: center;
    gap: 9px;
}

.sidebar-collapsed .mob-brand-link {
    justify-content: center;
}

.sidebar-collapsed .mob-brand-copy,
.sidebar-collapsed .mob-sidebar-section-label,
.sidebar-collapsed .mob-nav-text,
.sidebar-collapsed .mob-environment-copy,
.sidebar-collapsed .mob-version {
    display: none;
}

.sidebar-collapsed .mob-nav a {
    justify-content: center;
    padding: 0;
}

.sidebar-collapsed .mob-nav-indicator {
    top: 9px;
    bottom: 9px;
}

.sidebar-collapsed .mob-environment-card {
    justify-content: center;
    padding: 10px;
}

/* =========================
   MAIN CONTENT
   ========================= */

.mob-content {
    min-width: 0;
}

.mob-topbar {
    position: sticky;
    top: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 26px;
    border-bottom: 1px solid var(--layout-border);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 18px rgba(15, 23, 42, .03);
    backdrop-filter: blur(18px);
    z-index: 30;
}

.mob-topbar-left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.mob-topbar-title {
    min-width: 0;
}

    .mob-topbar-title strong,
    .mob-topbar-title span {
        display: block;
    }

    .mob-topbar-title strong {
        color: var(--layout-text);
        font-size: 14px;
        font-weight: 900;
    }

    .mob-topbar-title span {
        margin-top: 3px;
        overflow: hidden;
        color: var(--layout-muted);
        font-size: 10px;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.mob-mobile-menu-button {
    display: none;
    width: 39px;
    height: 39px;
    place-items: center;
    border: 1px solid #dbe4ef;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
}

    .mob-mobile-menu-button span {
        display: block;
        width: 16px;
        height: 2px;
        margin: 2px 0;
        border-radius: 999px;
        background: #334155;
    }

/* =========================
   USER
   ========================= */

.mob-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mob-user-avatar {
    display: grid;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient( 135deg, #2563eb, #5b4ff1 );
    font-size: 13px;
    font-weight: 950;
}

.mob-user-copy {
    min-width: 0;
}

    .mob-user-copy strong,
    .mob-user-copy span {
        display: block;
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mob-user-copy strong {
        color: #0f172a;
        font-size: 11px;
        font-weight: 900;
    }

    .mob-user-copy span {
        margin-top: 2px;
        color: #94a3b8;
        font-size: 9px;
        font-weight: 650;
    }

.mob-logout-form {
    margin: 0;
}

.mob-logout-button {
    display: inline-flex;
    min-height: 37px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 850;
}

    .mob-logout-button:hover {
        border-color: #fca5a5;
        background: #fff1f2;
    }

    .mob-logout-button svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* =========================
   PAGE CONTAINER
   ========================= */

.mob-page-container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 28px;
}

/* =========================
   MOBILE OVERLAY
   ========================= */

.mob-sidebar-overlay {
    display: none;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {

    .mob-layout,
    .mob-layout.sidebar-collapsed {
        display: block;
    }

    .mob-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(280px, 86vw);
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 18px 0 50px rgba(15, 23, 42, .24);
    }

    .mobile-menu-open .mob-sidebar {
        transform: translateX(0);
    }

    .sidebar-collapsed .mob-sidebar {
        padding: 20px 14px;
    }

    .sidebar-collapsed .mob-sidebar-brand {
        flex-direction: row;
        justify-content: flex-start;
    }

    .sidebar-collapsed .mob-brand-copy,
    .sidebar-collapsed .mob-sidebar-section-label,
    .sidebar-collapsed .mob-nav-text,
    .sidebar-collapsed .mob-environment-copy,
    .sidebar-collapsed .mob-version {
        display: block;
    }

    .sidebar-collapsed .mob-nav a {
        justify-content: flex-start;
        padding: 0 12px;
    }

    .sidebar-collapsed .mob-environment-card {
        justify-content: flex-start;
        padding: 11px;
    }

    .mob-sidebar-toggle {
        display: none;
    }

    .mob-sidebar-overlay {
        position: fixed;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(2, 6, 23, .52);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
        z-index: 40;
    }

    .mobile-menu-open .mob-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .mob-mobile-menu-button {
        display: grid;
    }

    .mob-topbar {
        padding: 0 17px;
    }

    .mob-page-container {
        padding: 20px 16px;
    }
}

@media (max-width: 620px) {

    .mob-topbar-title span {
        max-width: 200px;
    }

    .mob-user-copy {
        display: none;
    }

    .mob-logout-button span {
        display: none;
    }

    .mob-logout-button {
        width: 37px;
        padding: 0;
        justify-content: center;
    }
}
