/* SocialPoints Media portal.
   Layout only. Everything Bootstrap already does - buttons, forms, cards,
   tables, alerts, dropdowns, grid, spacing - is left to Bootstrap.
   Colours are derived from Bootstrap's own CSS variables so the theme
   toggle works without a second palette. */

:root {
    --spm-sidebar-w: 264px;
    /* Sampled from the SocialPoints Media logo. */
    --spm-brand: #0C3C78;        /* navy  */
    --spm-brand-2: #E47818;      /* orange */
    --spm-sidebar-bg: #0B1F3A;   /* deep navy, same family as the mark */
    --spm-sidebar-fg: #9fb0c7;
    --spm-sidebar-fg-active: #ffffff;
    --spm-sidebar-hover: rgba(255, 255, 255, .07);
}

body {
    background: var(--bs-secondary-bg);
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ shell */

.portal { min-height: 100vh; }

.portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--spm-sidebar-w);
    background: var(--spm-sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1045;
    overflow-y: auto;
}

.portal-main {
    margin-left: var(--spm-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.98px) {
    .portal-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .portal-sidebar.is-open { transform: none; }
    .portal-main { margin-left: 0; }
}

.portal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1040;
}

/* ------------------------------------------------------------------ brand */

.portal-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.15rem 1.25rem;
}

.portal-brand-mark {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--spm-brand), var(--spm-brand-2));
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    display: grid;
    place-items: center;
}

/* Full logo on a light chip, so the navy wordmark stays legible on dark. */
.portal-brand-logo {
    display: block;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    padding: .6rem .7rem;
}
.portal-brand-logo img { width: 100%; height: auto; display: block; }

.portal-brand-block { padding: 1rem 1.25rem .25rem; }

.portal-admin-tag {
    display: inline-flex; align-items: center; gap: .35rem;
    margin: .55rem 1.25rem 0;
    padding: .18rem .5rem;
    border-radius: 5px;
    background: #B42318;
    color: #fff;
    font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

.portal-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.portal-brand-text strong { color: #fff; font-size: .98rem; }
.portal-brand-text small  { color: var(--spm-sidebar-fg); font-size: .74rem; }

/* The client's own site, so they always know which one they are editing. */
.portal-site {
    margin: 0 1.25rem 1rem;
    padding: .7rem .8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
}
.portal-site-name { color: #fff; font-size: .84rem; font-weight: 600; }
.portal-site-url  { color: var(--spm-sidebar-fg); font-size: .76rem; text-decoration: none; display: block; }
.portal-site-url:hover { color: #fff; }

/* -------------------------------------------------------------------- nav */

.portal-nav { padding: 0 .75rem; flex: 1; }

.portal-nav-heading {
    color: #5c6a80;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 1.25rem .75rem .4rem;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .58rem .75rem;
    margin-bottom: .12rem;
    border-radius: 8px;
    color: var(--spm-sidebar-fg);
    text-decoration: none;
    font-size: .89rem;
    font-weight: 500;
}
.portal-nav-link:hover { background: var(--spm-sidebar-hover); color: #fff; }
.portal-nav-link.active { background: var(--spm-brand-2); color: #fff; }
.portal-nav-link i { font-size: 1.05rem; opacity: .9; }

.portal-sidebar-foot { padding: .75rem 1.25rem 1.1rem; }
.portal-theme-toggle {
    width: 100%;
    display: flex; align-items: center; gap: .6rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: var(--spm-sidebar-fg);
    padding: .45rem .7rem;
    font-size: .82rem;
}
.portal-theme-toggle:hover { background: var(--spm-sidebar-hover); color: #fff; }

/* ----------------------------------------------------------------- topbar */

.portal-topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.5rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.portal-heading h1 { font-size: 1.24rem; font-weight: 650; margin: 0; }
.portal-heading p  { margin: .12rem 0 0; font-size: .84rem; color: var(--bs-secondary-color); }

.portal-burger { font-size: 1.4rem; padding: 0 .25rem; color: var(--bs-body-color); text-decoration: none; }

.portal-user {
    display: flex; align-items: center; gap: .6rem;
    background: transparent; border: 0; padding: .25rem .35rem; border-radius: 8px;
    color: var(--bs-body-color);
}
.portal-user:hover { background: var(--bs-secondary-bg); }
.portal-user-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.portal-user-text strong { font-size: .85rem; font-weight: 600; }
.portal-user-text small  { font-size: .72rem; color: var(--bs-secondary-color); }

.portal-avatar {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--spm-brand), var(--spm-brand-2));
    color: #fff; font-size: .8rem; font-weight: 600;
    display: grid; place-items: center;
}

.portal-content { padding: 1.5rem; flex: 1; }

/* ------------------------------------------------------------------ stats */

.stat-tile { display: flex; align-items: flex-start; gap: .9rem; }
.stat-icon {
    width: 42px; height: 42px; flex: 0 0 42px;
    border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem;
}
.stat-value { font-size: 1.6rem; font-weight: 650; line-height: 1.1; }
.stat-label { font-size: .8rem; color: var(--bs-secondary-color); }

/* ------------------------------------------------------------------ login */

.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 991.98px) { .login-wrap { grid-template-columns: 1fr; } }

.login-form-side {
    display: grid; place-items: center; padding: 2rem;
    background: var(--bs-body-bg);
}
.login-form-inner { width: 100%; max-width: 400px; }

.login-art {
    background: linear-gradient(145deg, #071627, var(--spm-brand) 55%, var(--spm-brand-2));
    color: #fff;
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 991.98px) { .login-art { display: none; } }
.login-art h2 { font-weight: 650; line-height: 1.25; }
.login-art ul { list-style: none; padding: 0; margin: 1.75rem 0 0; }
.login-art li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .9rem; opacity: .92; }
.login-art li i { margin-top: .15rem; }
