:root {
    --dc-nav-blue: #50c5ff;
    --dc-nav-blue-dark: #16a6e6;
    --dc-nav-dark: #0c1630;
    --dc-nav-dark-2: #111827;
    --dc-nav-text: rgba(255, 255, 255, 0.86);
    --dc-nav-muted: rgba(255, 255, 255, 0.56);
    --dc-nav-card: rgba(255, 255, 255, 0.06);
    --dc-nav-danger: #ef4444;
}

.dc-command-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background:
        radial-gradient(circle at top left, rgba(80, 197, 255, 0.16), transparent 28%),
        linear-gradient(135deg, var(--dc-nav-dark), var(--dc-nav-dark-2));
    border-bottom: 1px solid rgba(80, 197, 255, 0.16);
    box-shadow: 0 12px 35px rgba(2, 8, 23, 0.22);
}

.dc-command-nav,
.dc-command-nav .container {
    min-height: 82px;
}

.dc-command-nav .container {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1800px;
    width: 100%;
    padding-left: 28px;
    padding-right: 28px;
}

.dc-command-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    min-width: 0;
    flex: 0 0 auto;
}

.dc-command-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(80, 197, 255, 0.10);
    border: 1px solid rgba(80, 197, 255, 0.22);
    box-shadow: 0 8px 22px rgba(80, 197, 255, 0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dc-command-logo img {
    width: 42px;
    height: 42px;
    max-width: 42px;
    max-height: 42px;
    display: block;
    object-fit: contain;
}

/* Match footer logo hover */
.dc-command-brand:hover .dc-command-logo {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(80, 197, 255, 0.26);
}

.dc-command-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.dc-command-brand-title {
    display: block;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.dc-command-brand-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--dc-nav-muted);
    font-size: .58rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dc-command-desktop {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dc-command-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    min-width: 0;
    list-style: none;
}

/* TEXT-ONLY navigation options (no icon fonts anywhere) */
.dc-command-link {
    min-height: 38px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--dc-nav-text);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: 0.22s ease;
}

.dc-command-link:hover,
.dc-command-link:focus {
    color: #ffffff;
    background: var(--dc-nav-card);
    border-color: rgba(80, 197, 255, 0.18);
}

.dc-command-link.active {
    color: #111827;
    background: var(--dc-nav-blue);
    border-color: var(--dc-nav-blue);
    box-shadow: 0 10px 25px rgba(80, 197, 255, 0.25);
}

.dc-command-dropdown .dropdown-menu {
    margin-top: 12px;
    padding: 10px;
    min-width: 250px;
    border: 1px solid rgba(80, 197, 255, 0.18);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(2, 8, 23, 0.22);
}

.dc-command-dropdown .dropdown-header {
    color: #6f7177;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    padding: 8px 12px 10px;
}

.dc-command-dropdown .dropdown-item {
    min-height: 40px;
    border-radius: 12px;
    color: #414042;
    font-size: 0.84rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    transition: 0.18s ease;
}

.dc-command-dropdown .dropdown-item:hover {
    background: #eaf8ff;
    color: #414042;
}

.dc-command-dropdown .dropdown-item.active {
    background: #e0f4ff;
    color: #0b4a63;
    font-weight: 800;
}

.dc-command-user {
    margin-left: 6px;
}

.dc-command-user-btn {
    min-height: 42px;
    max-width: 245px;
    padding: 5px 10px 5px 6px;
    border-radius: 999px;
    color: var(--dc-nav-text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: 0.22s ease;
}

.dc-command-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dc-nav-blue), var(--dc-nav-blue-dark));
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
    flex-shrink: 0;
}

.dc-command-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    min-width: 0;
}

.dc-command-user-name {
    max-width: 120px;
    color: #ffffff;
    font-size: .74rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc-command-user-role {
    margin-top: 3px;
    color: var(--dc-nav-muted);
    font-size: .6rem;
    font-weight: 650;
}

.dc-command-divider {
    height: 1px;
    background: rgba(65, 64, 66, 0.12);
    margin: 8px 4px;
}

.dc-command-logout {
    color: var(--dc-nav-danger) !important;
    font-weight: 800 !important;
}

.dc-command-logout:hover {
    background: #fff1f1 !important;
    color: var(--dc-nav-danger) !important;
}

/* ==========================================================
   LOGOUT CONFIRMATION MODAL
========================================================== */

.portal-logout-modal {
    z-index: 20050;
}

.portal-logout-modal .modal-dialog {
    width: min(92vw, 480px);
    max-width: 480px;
    margin: 1rem auto;
}

.portal-logout-modal .modal-content {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--r-2xl);

    background: var(--surface);
    color: var(--text);

    box-shadow: var(--shadow-xl);
}

.portal-logout-top {
    display: flex;
    justify-content: center;

    padding: 30px 24px 0;
}

.portal-logout-icon {
    width: 92px;
    height: 92px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(80, 197, 255, 0.25);
    border-radius: 50%;

    background: var(--brand-50);
    color: var(--brand-deeper);

    font-size: 2.2rem;

    box-shadow:
        0 12px 30px rgba(80, 197, 255, 0.18);
}

.portal-logout-body {
    padding: 22px 30px 26px;
    text-align: center;
}

.portal-logout-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 14px;
    padding: 6px 13px;

    border: 1px solid var(--brand-200);
    border-radius: var(--r-pill);

    background: var(--brand-50);
    color: var(--brand-deeper);

    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-logout-body h5 {
    margin: 0 0 10px;

    color: var(--text-head);

    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.3;
}

.portal-logout-body>p {
    max-width: 390px;
    margin: 0 auto 22px;

    color: var(--text-muted);

    font-size: 0.92rem;
    line-height: 1.65;
}

.portal-logout-user {
    display: flex;
    align-items: center;
    gap: 12px;

    max-width: 340px;
    margin: 0 auto;
    padding: 13px 15px;

    border: 1px solid var(--border);
    border-radius: var(--r-lg);

    background: var(--surface-1);

    text-align: left;
}

.portal-logout-user .dc-command-avatar {
    flex: 0 0 auto;
}

.portal-logout-user div {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.portal-logout-user strong {
    overflow: hidden;

    color: var(--text-head);

    font-size: 0.9rem;
    font-weight: 750;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-logout-user span:last-child {
    color: var(--text-muted);

    font-size: 0.78rem;
    font-weight: 600;
}

.portal-logout-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;

    padding: 18px 24px 24px;

    border-top: 1px solid var(--border);

    background: var(--surface-1);
}

.portal-logout-confirm {
    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 0 20px;

    border: 1px solid var(--brand);
    border-radius: var(--r-lg);

    background: var(--brand);
    color: var(--text-inv);

    font-size: 0.88rem;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(80, 197, 255, 0.22);

    transition:
        background var(--t-base),
        border-color var(--t-base),
        transform var(--t-base),
        box-shadow var(--t-base);
}

.portal-logout-confirm:hover {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
    color: var(--text-inv);

    transform: translateY(-1px);

    box-shadow:
        0 12px 26px rgba(80, 197, 255, 0.28);
}

.portal-logout-confirm:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.portal-logout-confirm .spinner-border {
    width: 1rem;
    height: 1rem;
}

.dc-command-logout.js-open-logout-modal {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 10px;

    border: 0;

    background: transparent;

    text-align: left;
}

@media (max-width: 575.98px) {
    .portal-logout-modal .modal-dialog {
        width: calc(100vw - 24px);
        margin: 12px auto;
    }

    .portal-logout-top {
        padding-top: 24px;
    }

    .portal-logout-icon {
        width: 78px;
        height: 78px;

        font-size: 1.9rem;
    }

    .portal-logout-body {
        padding: 18px 20px 22px;
    }

    .portal-logout-body h5 {
        font-size: 1.25rem;
    }

    .portal-logout-footer {
        flex-direction: column-reverse;

        padding: 16px 18px 20px;
    }

    .portal-logout-footer .btn-secondary,
    .portal-logout-confirm {
        width: 100%;
    }
}



/* Hamburger: drawn in CSS, so no icon font is needed */
.dc-command-mobile-btn {
    min-width: 84px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(80, 197, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: auto;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: 0.22s ease;
}

.dc-command-mobile-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(80, 197, 255, 0.45);
    color: #ffffff;
}

.dc-command-burger {
    position: relative;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--dc-nav-blue);
    display: inline-block;
    flex-shrink: 0;
}

.dc-command-burger::before,
.dc-command-burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--dc-nav-blue);
}

.dc-command-burger::before {
    top: -5px;
}

.dc-command-burger::after {
    top: 5px;
}

.dc-command-offcanvas {
    background:
        radial-gradient(circle at top left, rgba(80, 197, 255, 0.16), transparent 30%),
        linear-gradient(160deg, #0c1630, #111827);
    color: #ffffff;
    border-left: 1px solid rgba(80, 197, 255, 0.18);
}

.dc-command-offcanvas .offcanvas-header {
    padding: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.dc-command-offcanvas .offcanvas-title {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.dc-command-offcanvas .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.dc-command-mobile-list {
    display: grid;
    gap: 8px;
    padding: 18px 0;
}

.dc-command-mobile-link,
.dc-command-mobile-dropdown-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    padding: 0 16px;
    color: var(--dc-nav-text);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    transition: 0.22s ease;
}

.dc-command-mobile-link:hover,
.dc-command-mobile-dropdown-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
}

.dc-command-mobile-dropdown-btn {
    justify-content: space-between;
}

/* CSS chevron instead of an icon font; it flips when the section opens */
.dc-command-mobile-dropdown-btn::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 10px;
    border-right: 2px solid var(--dc-nav-blue);
    border-bottom: 2px solid var(--dc-nav-blue);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.dc-command-mobile-dropdown-btn[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(-2px);
}

.dc-command-mobile-submenu {
    display: grid;
    gap: 6px;
    margin: 7px 0 4px;
    padding-left: 12px;
}

.dc-command-mobile-submenu a {
    min-height: 42px;
    border-radius: 13px;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.035);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 650;
}

.dc-command-mobile-submenu a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.dc-command-mobile-user {
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dc-command-mobile-user-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dc-command-mobile-actions {
    display: grid;
    gap: 7px;
}

.dc-command-mobile-actions a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    min-height: 38px;
}

.dc-command-mobile-actions a:hover {
    color: #ffffff;
}

#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background:
        radial-gradient(circle at top, rgba(80, 197, 255, 0.18), transparent 35%),
        linear-gradient(135deg, #0c1630, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
}

#preloader::before {
    content: "";
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.16);
    border-top-color: #50c5ff;
    animation: dcPreloaderSpin 0.85s linear infinite;
}

#preloader::after {
    content: "Digital Cards Portal";
    position: absolute;
    margin-top: 105px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

@keyframes dcPreloaderSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
       RESPONSIVE NAV  (text options only - no icon fonts)

       >= 1200px ......... full text menu in the bar
       <  1200px ......... "Menu" button + offcanvas (text options)

       NOTE: the old 768-1199px tier was an ICON-ONLY rail (links had
       font-size: 0 and showed just the icon). With icons removed those
       buttons would be blank, and 8-10 text labels will not fit at that
       width - so tablets now use the offcanvas, where every option has
       room for its full word.
    ========================================================== */

/* ---- DESKTOP: text menu in the bar ---- */
@media (min-width: 1200px) {
    .dc-command-desktop {
        display: flex;
    }

    .dc-command-mobile-btn {
        display: none;
    }

    .dc-command-menu {
        gap: 2px;
    }

    .dc-command-link {
        padding: 0 11px;
        font-size: .8rem;
    }

    .dc-command-brand-subtitle,
    .dc-command-user-role {
        display: none;
    }
}

/* Wide screens: a little more breathing room */
@media (min-width: 1500px) {
    .dc-command-menu {
        gap: 4px;
    }

    .dc-command-link {
        padding: 0 14px;
        font-size: .83rem;
    }

    .dc-command-brand-subtitle,
    .dc-command-user-role {
        display: block;
    }
}

/* ---- TABLET + PHONE: offcanvas with full text options ---- */
@media (max-width: 1199.98px) {
    .dc-command-desktop {
        display: none;
    }

    .dc-command-mobile-btn {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {

    .dc-command-nav,
    .dc-command-nav .container {
        min-height: 74px;
    }
}

@media (max-width: 991.98px) {

    .dc-command-logo {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
        border-radius: 14px;
    }

    .dc-command-logo img {
        width: 38px;
        height: 38px;
        max-width: 38px;
        max-height: 38px;
    }
}

@media (max-width: 575.98px) {

    .dc-command-logo {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        border-radius: 13px;
    }

    .dc-command-logo img {
        width: 34px;
        height: 34px;
        max-width: 34px;
        max-height: 34px;
    }
}

@media (max-width: 360px) {

    .dc-command-logo {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .dc-command-logo img {
        width: 30px;
        height: 30px;
        max-width: 30px;
        max-height: 30px;
    }
}

.dc-command-brand-title {
    font-size: .88rem;
}

.dc-command-brand-subtitle {
    display: none;
}

.dc-command-mobile-btn {
    min-width: auto;
    padding: 0 12px;
}

.dc-command-offcanvas {
    width: 86% !important;
}