/* ============================================================
   PesaPoll — Shared top navigation (.dtop)
   Used by BOTH the public frontend layout and the dashboard layout,
   so it is fully self-contained (only depends on --base, which both
   layouts define via color.php). Neutrals are local (--t-*).
   ============================================================ */
.dtop {
    --t-line: 220 16% 91%;
    --t-bg: 210 20% 98%;
    --t-ink: 222 22% 12%;
    --t-muted: 220 10% 40%;
    --t-faint: 220 12% 60%;
    position: sticky; top: 0; z-index: 40;
    background: #fff; border-bottom: 1px solid hsl(var(--t-line));
    font-family: var(--heading-font, "Plus Jakarta Sans", "Maven Pro", sans-serif);
}
.dtop__inner { display: flex; align-items: center; gap: 14px; max-width: 1340px; margin: 0 auto; padding: 11px 22px; }
.dtop__logo { flex: 0 0 auto; display: inline-flex; }
.dtop__logo img { max-height: 30px; width: auto; display: block; }
.dtop__burger { background: transparent; border: none; color: hsl(var(--base)); font-size: 20px; padding: 2px 4px; line-height: 1; cursor: pointer; }

.dtop__nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dtop__nav::-webkit-scrollbar { display: none; }
.dtop__link {
    font-size: 14px; font-weight: 600; color: hsl(var(--t-muted));
    padding: 8px 13px; border-radius: 9px; text-decoration: none; white-space: nowrap; transition: .15s ease;
}
.dtop__link:hover { color: hsl(var(--base)); background: hsl(var(--base) / 0.07); }
.dtop__link.active { color: hsl(var(--base)); background: hsl(var(--base) / 0.10); }

.dtop__right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }

.dtop__balance {
    display: flex; flex-direction: column; line-height: 1.15; text-decoration: none;
    padding: 6px 14px; border: 1px solid hsl(var(--t-line)); border-radius: 10px; background: hsl(var(--t-bg));
}
.dtop__balance .k { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--t-faint)); }
.dtop__balance .v { font-size: 15px; font-weight: 800; color: hsl(var(--t-ink)); }
.dtop__balance:hover { border-color: hsl(var(--base) / 0.4); }

.dtop__deposit, .dtop__btn {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px;
    padding: 9px 16px; border-radius: 10px; text-decoration: none; transition: .15s ease; white-space: nowrap;
}
.dtop__deposit { background: hsl(var(--base)); color: #fff !important; }
.dtop__deposit:hover { filter: brightness(1.06); }
.dtop__btn--ghost { color: hsl(var(--t-ink)); border: 1px solid hsl(var(--t-line)); background: #fff; }
.dtop__btn--ghost:hover { color: hsl(var(--base)); border-color: hsl(var(--base) / 0.5); }
.dtop__btn--solid { background: hsl(var(--base)); color: #fff !important; }
.dtop__btn--solid:hover { filter: brightness(1.06); }

/* avatar + account dropdown (self-contained, hover/focus based) */
.dtop__user { position: relative; list-style: none; margin: 0; padding: 0; }
.dtop__user > li { position: relative; }
.dtop__avatar {
    width: 40px; height: 40px; border-radius: 50%; background: hsl(var(--base)); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 13.5px; text-decoration: none; cursor: pointer;
}
.dtop__menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 232px;
    background: #fff; border: 1px solid hsl(var(--t-line)); border-radius: 14px; padding: 8px;
    box-shadow: 0 18px 40px -16px hsl(222 40% 20% / 0.28);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s ease; z-index: 50;
}
.dtop__user:hover .dtop__menu,
.dtop__user:focus-within .dtop__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dtop__menu-head { padding: 8px 10px 10px; border-bottom: 1px solid hsl(var(--t-line)); margin-bottom: 6px; }
.dtop__menu-head .name { font-size: 14px; font-weight: 700; color: hsl(var(--base)); margin: 0; }
.dtop__menu-head .handle { font-size: 12.5px; color: hsl(var(--t-faint)); margin: 2px 0 0; }
.dtop__menu a {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
    font-size: 13.5px; font-weight: 600; color: hsl(var(--t-muted)); text-decoration: none; transition: .12s ease;
}
.dtop__menu a i { font-size: 16px; width: 18px; text-align: center; }
.dtop__menu a:hover { background: hsl(var(--base) / 0.08); color: hsl(var(--base)); }
.dtop__menu a.is-danger:hover { background: hsl(3 84% 60% / 0.08); color: hsl(3 84% 55%); }

/* responsive */
@media (min-width: 1200px) { .dtop__burger { display: none; } }
@media (max-width: 1199px) {
    .dtop__nav { display: none; }
    .dtop__logo { margin-right: auto; }
}
@media (max-width: 575px) {
    .dtop__inner { padding: 10px 14px; gap: 10px; }
    .dtop__balance { padding: 5px 10px; }
    .dtop__balance .v { font-size: 13.5px; }
    .dtop__logo img { max-height: 27px; }
    .dtop__deposit span.txt { display: none; }
}

/* mobile drawer buttons (frontend .mobile-menu) */
.dtop__btn { justify-content: center; }
.mobile-menu .dmob__actions { display: flex; flex-direction: column; gap: 10px; padding: 18px 24px 8px; }
.mobile-menu .menu-outer .navigation li a { display: block; }
