:root {
    --dashboard-surface: rgba(8, 20, 38, 0.82);
    --dashboard-surface-strong: rgba(10, 25, 46, 0.92);
    --dashboard-border: rgba(123, 255, 236, 0.18);
    --dashboard-border-strong: rgba(123, 255, 236, 0.46);
    --dashboard-text-soft: rgba(222, 245, 249, 0.72);
    --dashboard-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
    --dashboard-shadow-glow: 0 0 30px rgba(0, 240, 255, 0.18);
    --dashboard-orange: #ffb248;
    --dashboard-green: #7cff9f;
    --dashboard-muted: #97a8b8;
}

body.dashboard-page {
    min-height: 100vh;
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
}

.dashboard-nav {
    margin-inline: 0;
}

.dashboard-nav__link {
    position: relative;
}

.dashboard-nav__link--active::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--landing-accent-soft), var(--landing-accent));
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
}

.dashboard-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px 0 8px;
}

.dashboard-hero h1 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(2.2rem, 8vw, 4.3rem);
    line-height: 1.04;
    text-shadow: 0 0 22px rgba(0, 240, 255, 0.14);
}

.dashboard-hero__description,
.dashboard-section-heading p,
.dashboard-cta-card p,
.dashboard-modal__header p,
.dashboard-empty-state p,
.dashboard-code-card__message p,
.dashboard-code-card__status-note,
.dashboard-admin-link p {
    color: var(--dashboard-text-soft);
    line-height: 1.7;
}

.dashboard-create-trigger {
    width: 100%;
}

.dashboard-top-grid {
    display: grid;
    gap: 20px;
}

.dashboard-profile-card,
.dashboard-cta-card,
.dashboard-empty-state,
.dashboard-code-card,
.dashboard-modal__dialog {
    border: 1px solid var(--dashboard-border);
    background: linear-gradient(180deg, rgba(10, 24, 43, 0.84), rgba(4, 12, 24, 0.82));
    backdrop-filter: blur(22px);
    box-shadow: var(--dashboard-shadow);
}

.dashboard-profile-card,
.dashboard-cta-card {
    padding: 24px;
    border-radius: 30px;
}

.dashboard-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-card-heading h2,
.dashboard-section-heading h2,
.dashboard-cta-card h2,
.dashboard-modal__header h3 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    line-height: 1.1;
}

/* Collapsible profile */
.dashboard-profile-details {
    border: none;
}
.dashboard-profile-details summary {
    list-style: none;
    cursor: pointer;
}
.dashboard-profile-details summary::-webkit-details-marker { display: none; }
.dashboard-profile-details summary::marker { display: none; content: ''; }

.dashboard-card-heading--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dashboard-toggle-chevron {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
    transition: transform 0.3s;
}
.dashboard-profile-details[open] .dashboard-toggle-chevron {
    transform: rotate(180deg);
}

.dashboard-profile-grid {
    display: grid;
    gap: 14px;
}

.dashboard-profile-item {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-profile-item__label,
.dashboard-code-card__label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--landing-accent-soft);
}

.dashboard-profile-item__value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 1.05rem;
    font-weight: 600;
}

.dashboard-profile-item__value > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dashboard-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.18);
    background: rgba(0, 240, 255, 0.06);
    color: var(--landing-accent);
}

.dashboard-editable {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-editable__text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.dashboard-editable__input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}
.dashboard-editable__input:focus {
    border-color: var(--landing-accent);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.15);
}
.dashboard-editable__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.18);
    background: rgba(0, 240, 255, 0.06);
    color: var(--landing-accent);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    font-size: 0.8rem;
}
.dashboard-editable__btn:hover {
    background: rgba(0, 240, 255, 0.12);
}

.dashboard-notification-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.dashboard-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-toggle-row.is-disabled {
    opacity: 0.68;
}

.dashboard-toggle-row__label {
    font-weight: 700;
}

.dashboard-toggle-row__hint {
    margin-top: 6px;
    color: var(--dashboard-text-soft);
    font-size: 0.95rem;
}

.dashboard-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dashboard-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dashboard-switch__track {
    position: relative;
    display: inline-flex;
    width: 58px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.dashboard-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5feff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
    transition: transform 300ms ease;
}

.dashboard-switch input:checked + .dashboard-switch__track {
    background: linear-gradient(135deg, #4ecca3 0%, #00f0ff 100%);
    border-color: transparent;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.28);
}

.dashboard-switch input:checked + .dashboard-switch__track::after {
    transform: translateX(26px);
}

.dashboard-switch input:disabled + .dashboard-switch__track {
    opacity: 0.55;
}

.dashboard-frequency-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 32px 8px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' fill-opacity='0.5' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    flex-shrink: 0;
}
.dashboard-frequency-select:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.4);
}
.dashboard-frequency-select option {
    background: #1a1a3e;
    color: #fff;
}

.dashboard-usage {
    margin-top: 22px;
    padding: 18px 20px 20px;
    border-radius: 24px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    background: rgba(0, 240, 255, 0.05);
}

.dashboard-usage__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.dashboard-progress {
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4ecca3 0%, #00f0ff 100%);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.4);
}

.dashboard-cta-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.dashboard-cta-card__actions {
    display: grid;
    gap: 12px;
}

.dashboard-codes-section {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dashboard-section-heading {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-codes-response {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-loading {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--dashboard-text-soft);
}

.dashboard-loading__pulse {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.34) 0%, rgba(0, 240, 255, 0.04) 68%, transparent 72%);
    animation: dashboard-pulse 1.8s ease-in-out infinite;
}

@keyframes dashboard-pulse {
    0%, 100% {
        transform: scale(0.92);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

.dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--landing-text);
    cursor: pointer;
    transition: transform 300ms ease, border-color 300ms ease, background 300ms ease, box-shadow 300ms ease;
}

.dashboard-filter:hover,
.dashboard-filter.is-active {
    transform: translateY(-1px);
    border-color: var(--dashboard-border-strong);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: var(--dashboard-shadow-glow);
}

.dashboard-filter__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.dashboard-codes-grid {
    display: grid;
    gap: 18px;
}

.dashboard-code-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: 28px;
    cursor: pointer;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
    animation: dashboard-fade-up 500ms ease both;
}

.dashboard-code-card:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--dashboard-border-strong);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.18), 0 18px 46px rgba(0, 0, 0, 0.34);
}

@keyframes dashboard-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-code-card__header,
.dashboard-code-card__link-row,
.dashboard-code-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-code-card__header {
    padding-inline-end: 44px;
}

.dashboard-code-card__titles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    flex: 1;
    padding-inline-end: 10px;
}

.dashboard-code-card__titles h3 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    word-break: break-word;
}

.dashboard-code-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-status-badge,
.dashboard-type-badge,
.dashboard-tag,
.dashboard-message-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-status-badge--active {
    color: #062312;
    background: rgba(124, 255, 159, 0.92);
}

.dashboard-status-badge--paused {
    color: #eff5fb;
    background: rgba(130, 145, 160, 0.24);
    border: 1px solid rgba(130, 145, 160, 0.36);
}

.dashboard-status-badge--unactivated {
    color: #271100;
    background: rgba(255, 178, 72, 0.92);
}

.dashboard-type-badge {
    color: var(--landing-text);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.16);
}

.dashboard-message-count {
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    color: #04111f;
    background: linear-gradient(135deg, #79ffe1 0%, #00f0ff 100%);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
}

/* ── Card state accents ── */
.dashboard-code-card {
    border-left: 3px solid transparent;
}
.dashboard-code-card.is-unread {
    border-left-color: var(--landing-accent, #00f0ff);
    box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.12), 0 0 20px -8px rgba(0, 240, 255, 0.3);
}
.dashboard-code-card.is-scans-new {
    border-left-color: #7da7d9;
}
.dashboard-code-card.is-stale {
    opacity: 0.72;
}
[dir="rtl"] .dashboard-code-card {
    border-left: none;
    border-right: 3px solid transparent;
}
[dir="rtl"] .dashboard-code-card.is-unread {
    border-right-color: var(--landing-accent, #00f0ff);
}
[dir="rtl"] .dashboard-code-card.is-scans-new {
    border-right-color: #7da7d9;
}

/* ── Card badge ── */
.card-badge {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 13px;
    font-weight: 700;
    font-size: 13px;
    line-height: 26px;
    text-align: center;
    flex-shrink: 0;
}
a.card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
a.card-badge:hover {
    transform: translateY(-1px);
}
.card-badge--unread {
    color: #04111f;
    background: linear-gradient(135deg, #79ffe1, #00f0ff);
    box-shadow: 0 0 12px -2px rgba(0, 240, 255, 0.5);
}
.card-badge--scans {
    color: #0a1624;
    background: #7da7d9;
}
.card-badge.is-clearing {
    animation: badge-clear 300ms ease-out forwards;
}
@keyframes badge-clear {
    to { opacity: 0; transform: scale(0.7); }
}
[dir="rtl"] .card-badge {
    order: -1;
}

/* ── Card metrics ── */
.card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}
.metric {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}
a.metric {
    color: inherit;
    text-decoration: none;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
a.metric:hover {
    border-color: rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.05);
    transform: translateY(-1px);
}
.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #8ea0ae;
    font-size: 16px;
}
.metric-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.metric-total-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.metric-total {
    font-size: 1.45rem;
    font-weight: 700;
    color: rgba(232, 244, 236, 0.78);
    line-height: 1;
}
.metric-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.55);
    flex-shrink: 0;
}
.metric--active .metric-icon {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.24);
    background: rgba(74, 222, 128, 0.08);
}
.metric--active .metric-total {
    color: #4ade80;
}
.metric-label {
    font-size: 0.83rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--dashboard-text-soft);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 480px) {
    .card-metrics { grid-template-columns: 1fr; }
    .metric-total { font-size: 1.25rem; }
}

.dashboard-code-card__link-row {
    flex-wrap: wrap;
}

.dashboard-code-card__link {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--dashboard-text-soft);
    overflow: hidden;
}

.dashboard-code-card__link span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.28);
    background: rgba(0, 240, 255, 0.06);
    color: var(--landing-text);
    cursor: pointer;
    transition: transform 300ms ease, background 300ms ease, box-shadow 300ms ease;
}

.dashboard-copy-button:hover {
    transform: translateY(-1px);
    background: rgba(0, 240, 255, 0.14);
    box-shadow: var(--dashboard-shadow-glow);
}

.dashboard-code-card__message {
    display: block;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: border-color 200ms ease, background 200ms ease;
    cursor: pointer;
}

a.dashboard-code-card__message:hover {
    border-color: rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.04);
}

.dashboard-code-card__message p {
    margin: 0;
    color: var(--landing-text);
    word-break: break-word;
}

.dashboard-code-card__message time {
    display: inline-block;
    margin-top: 10px;
    color: var(--dashboard-text-soft);
    font-size: 0.88rem;
}

.dashboard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-tag {
    color: var(--landing-text);
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-tag--0 {
    background: rgba(0, 240, 255, 0.12);
}

.dashboard-tag--1 {
    background: rgba(78, 204, 163, 0.16);
}

.dashboard-tag--2 {
    background: rgba(121, 255, 225, 0.14);
}

.dashboard-tag--3 {
    background: rgba(0, 173, 239, 0.14);
}

.dashboard-tag--4 {
    background: rgba(111, 239, 255, 0.16);
}

.dashboard-tag--muted {
    color: var(--dashboard-muted);
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-code-card__status-note {
    margin: 0;
    font-size: 0.95rem;
}

.dashboard-code-card__footer {
    margin-top: auto;
    color: var(--landing-accent-soft);
    font-weight: 700;
}

.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 44px 28px;
    border-radius: 32px;
    text-align: center;
}

.dashboard-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 28px;
    background: rgba(0, 240, 255, 0.08);
    color: var(--landing-accent);
    font-size: 2rem;
    box-shadow: var(--dashboard-shadow-glow);
}

.dashboard-empty-state h3 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 1.55rem;
}

.dashboard-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 120;
}

.dashboard-modal.is-open {
    display: flex;
}

.dashboard-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 4, 10, 0.76);
    backdrop-filter: blur(8px);
}

.dashboard-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(92vh, 920px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 32px;
}

.dashboard-modal__body {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(88vh, 860px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid var(--dashboard-border);
    background: linear-gradient(180deg, rgba(10, 24, 43, 0.88), rgba(4, 12, 24, 0.92));
    backdrop-filter: blur(22px);
    box-shadow: var(--dashboard-shadow);
}

.dashboard-modal__close {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--landing-text);
    cursor: pointer;
    font-size: 18px;
    transition: background 180ms ease, transform 180ms ease;
}

.dashboard-modal__close:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.dashboard-modal__close i {
    pointer-events: none;
}

.dashboard-modal__panel-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.dashboard-create-panel {
    display: none;
}

.dashboard-create-panel.is-active {
    display: block;
}

.dashboard-create-panel--loading {
    min-height: 320px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.dashboard-create-panel--loading.is-active {
    display: flex;
}

.dashboard-create-panel--loading img {
    width: 120px;
    height: auto;
}

.dashboard-modal__header {
    margin-bottom: 22px;
}

.dashboard-modal__heading {
    margin: 0 0 10px;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.45rem, 3.5vw, 2rem);
    line-height: 1.08;
}

.dashboard-modal__subtext {
    margin: 0 0 18px;
    color: var(--dashboard-text-soft);
    line-height: 1.65;
}

.dashboard-create-form {
    display: grid;
    gap: 18px;
}

.dashboard-form-field {
    display: grid;
    gap: 10px;
}

.dashboard-form-field label {
    color: var(--landing-text);
    font-weight: 700;
}

.dashboard-form-input {
    width: 100%;
    min-height: 56px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(78, 204, 163, 0.26);
    background: rgba(9, 20, 42, 0.82);
    color: var(--landing-text);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.dashboard-form-input:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.56);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.14);
}

.dashboard-form-actions {
    display: grid;
    gap: 12px;
}

.dashboard-range-card {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-range-card__meta {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-range-card__meta strong {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.35rem, 4vw, 1.9rem);
    line-height: 1;
}

.dashboard-range-card__meta span {
    color: var(--dashboard-text-soft);
    font-size: 0.92rem;
    text-align: end;
}

.dashboard-range-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #79ffe1 0%, #00f0ff var(--range-progress, 45%), rgba(255, 255, 255, 0.08) var(--range-progress, 45%), rgba(255, 255, 255, 0.08) 100%);
    outline: none;
}

.dashboard-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #dffcff;
    background: radial-gradient(circle, #f4ffff 0%, #79ffe1 45%, #00f0ff 100%);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
    cursor: pointer;
}

.dashboard-range-input::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-range-input::-moz-range-progress {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #79ffe1 0%, #00f0ff 100%);
}

.dashboard-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid #dffcff;
    border-radius: 50%;
    background: radial-gradient(circle, #f4ffff 0%, #79ffe1 45%, #00f0ff 100%);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
    cursor: pointer;
}

.dashboard-range-card__scale {
    display: flex;
    justify-content: space-between;
    color: var(--dashboard-text-soft);
    font-size: 0.82rem;
}

.dashboard-form-error {
    display: none;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 98, 98, 0.35);
    background: rgba(91, 14, 14, 0.42);
    color: #ff9d9d;
}

.dashboard-field {
    display: grid;
    gap: 10px;
}

.dashboard-field label,
.dashboard-admin-link label {
    color: var(--landing-text);
    font-weight: 700;
}

.dashboard-field input[type="text"],
.dashboard-admin-link input {
    width: 100%;
    min-height: 56px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(78, 204, 163, 0.26);
    background: rgba(9, 20, 42, 0.82);
    color: var(--landing-text);
    font-size: 1rem;
}

.dashboard-field input[type="text"]:focus,
.dashboard-admin-link input:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.56);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.14);
}

.dashboard-tag-input-wrap {
    position: relative;
}

.dashboard-tag-input {
    width: 100%;
}

.dashboard-tag-autocomplete {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline: 0;
    display: none;
    z-index: 20;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 15, 28, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.dashboard-tag-autocomplete.is-open {
    display: block;
}

.dashboard-tag-autocomplete__item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    color: var(--landing-text-soft);
    text-align: start;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.dashboard-tag-autocomplete__item:hover {
    background: rgba(0, 240, 255, 0.08);
    color: var(--landing-text);
}

.dashboard-tag-autocomplete__item:last-child {
    border-bottom: 0;
}

.dashboard-tag-autocomplete__item--create {
    color: var(--landing-accent);
    font-weight: 700;
}

.dashboard-choice-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-choice-cards {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-choice-card {
    position: relative;
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 6px;
    min-height: 88px;
    padding: 14px 14px 12px;
    border-radius: 18px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: rgba(7, 18, 37, 0.78);
    cursor: pointer;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease, background 300ms ease;
    overflow: hidden;
}

.dashboard-choice-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 240, 255, 0.42);
    box-shadow: var(--dashboard-shadow-glow);
}

.dashboard-choice-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.dashboard-choice-card > span:not(.dashboard-choice-card__icon) {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--landing-text);
    overflow-wrap: anywhere;
}

.dashboard-choice-card small {
    display: block;
    margin: 0;
    color: var(--dashboard-text-soft);
    font-size: 0.8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dashboard-choice-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.08);
    color: var(--landing-accent);
    font-size: 0.92rem;
}

.dashboard-choice-card.is-selected,
.dashboard-choice-card:has(input:checked) {
    background: linear-gradient(135deg, #79ffe1 0%, #00f0ff 100%);
    border-color: transparent;
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.18);
}

.dashboard-choice-card.is-selected > span:not(.dashboard-choice-card__icon),
.dashboard-choice-card:has(input:checked) > span:not(.dashboard-choice-card__icon),
.dashboard-choice-card.is-selected small,
.dashboard-choice-card:has(input:checked) small {
    color: #04111f;
}

.dashboard-choice-card.is-selected .dashboard-choice-card__icon,
.dashboard-choice-card:has(input:checked) .dashboard-choice-card__icon {
    border-color: rgba(4, 17, 31, 0.12);
    background: rgba(4, 17, 31, 0.12);
    color: #04111f;
}

.dashboard-toggle-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-toggle-panel strong {
    display: block;
    margin-bottom: 6px;
}

.dashboard-toggle-panel__copy {
    min-width: 0;
}

.dashboard-toggle-panel p {
    margin: 0;
    color: var(--dashboard-text-soft);
    overflow-wrap: anywhere;
}

.dashboard-create-form__actions,
.dashboard-create-result__actions,
.dashboard-admin-link__row {
    display: grid;
    gap: 12px;
}

.dashboard-create-result__image {
    width: min(280px, 100%);
    margin: 0 auto;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.16);
}

.dashboard-create-result__image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 18px;
}

.dashboard-create-result__status {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 18px 0 22px;
    text-align: center;
}

.dashboard-create-result__status p {
    margin: 0;
    color: var(--dashboard-text-soft);
}

/* Restricted card (creator but not owner) */
.dashboard-code-card--restricted {
    opacity: 0.7;
    cursor: default;
}

.dashboard-code-card--restricted .dashboard-code-card__header {
    pointer-events: none;
}

.dashboard-code-card__message--restricted {
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.4);
    font-style: italic;
    font-size: 0.88rem;
}

.dashboard-code-card__footer--restricted {
    color: rgba(255,255,255,0.35);
    font-size: 0.82rem;
}

.dashboard-admin-link {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-admin-link p {
    margin: 0;
    color: var(--dashboard-orange);
}

.dashboard-create-result__close {
    width: 100%;
    margin-top: 18px;
}

@media (min-width: 760px) {
    .dashboard-hero {
        flex-direction: row;
        align-items: end;
        justify-content: space-between;
    }

    .dashboard-create-trigger {
        width: auto;
        min-width: 280px;
    }

    .dashboard-top-grid {
        grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
        align-items: start;
    }

    .dashboard-cta-card__actions {
        grid-template-columns: 1fr;
    }

    .dashboard-profile-grid,
    .dashboard-notification-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-section-heading {
        flex-direction: row;
        align-items: end;
        justify-content: space-between;
    }

    .dashboard-codes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-create-form__actions,
    .dashboard-create-result__actions,
    .dashboard-admin-link__row,
    .dashboard-form-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1120px) {
    .dashboard-codes-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 759px) {
    .dashboard-modal {
        padding: 12px;
    }

    .dashboard-modal__body,
    .dashboard-modal__dialog,
    .dashboard-profile-card,
    .dashboard-cta-card,
    .dashboard-code-card,
    .dashboard-empty-state {
        border-radius: 24px;
    }

    .dashboard-code-card__header,
    .dashboard-code-card__link-row,
    .dashboard-code-card__footer,
    .dashboard-toggle-panel,
    .dashboard-toggle-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-message-count {
        align-self: flex-start;
    }

    .dashboard-choice-grid,
    .dashboard-choice-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-range-card__meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-range-card__meta span {
        text-align: start;
    }
}

@media (max-width: 520px) {
    .dashboard-filter {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-modal__body,
    .dashboard-profile-card,
    .dashboard-cta-card,
    .dashboard-code-card,
    .dashboard-empty-state,
    .dashboard-modal__dialog {
        padding-inline: 16px;
    }

    .dashboard-choice-card {
        min-height: 0;
        padding: 13px;
    }

    .dashboard-choice-card__icon {
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-code-card,
    .dashboard-copy-button,
    .dashboard-filter,
    .dashboard-choice-card,
    .dashboard-switch__track,
    .dashboard-switch__track::after,
    .dashboard-loading__pulse {
        animation: none;
        transition: none;
    }
}

/* ── Dashboard toast ── */
.dash-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 2000;
    padding: 12px 28px;
    border-radius: 12px;
    background: rgba(6, 15, 28, 0.95);
    border: 1px solid rgba(78, 204, 163, 0.35);
    color: #4ecca3;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 300ms ease, transform 300ms ease;
    pointer-events: none;
    text-align: center;
    max-width: 90vw;
}
.dash-toast--error {
    border-color: rgba(255, 60, 60, 0.35);
    color: #ff6b6b;
}
.dash-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Batch modal extras ── */
.batch-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.batch-progress-bar__fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--landing-accent), var(--landing-accent-soft));
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    transition: width 300ms ease;
    width: 0%;
}

.batch-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(78, 204, 163, 0.15);
    border: 2px solid rgba(78, 204, 163, 0.4);
    color: #4ecca3;
    font-size: 28px;
    font-weight: 700;
}

.batch-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.batch-result-actions .landing-button {
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

.batch-csv-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.25);
    color: #ffbe55;
    font-size: 0.85rem;
    line-height: 1.5;
}

.batch-csv-warning i {
    flex-shrink: 0;
    margin-top: 2px;
}

.dashboard-form-error {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 60, 60, 0.12);
    border: 1px solid rgba(255, 60, 60, 0.3);
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 12px;
}

.dashboard-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--landing-text-soft, rgba(223, 252, 255, 0.55));
}

@media (max-width: 520px) {
    .batch-result-actions {
        flex-direction: column;
    }
    .batch-result-actions .landing-button {
        min-width: 0;
    }
}

/* ── Batch grid download ── */
.batch-grid-section {
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.batch-grid-section__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--landing-text-soft, rgba(223,252,255,0.7));
    margin-bottom: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.batch-grid-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.batch-grid-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.batch-grid-option--check {
    justify-content: space-between;
}

.batch-grid-option__label {
    font-size: 0.82rem;
    color: var(--landing-text, #dffcff);
    flex: 0 0 130px;
    white-space: nowrap;
}

.batch-grid-option__control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.batch-grid-option__control .dashboard-range {
    flex: 1;
}

.batch-grid-option__value {
    font-size: 0.8rem;
    color: var(--landing-accent, #00e5ff);
    font-weight: 600;
    min-width: 42px;
    text-align: right;
}

.batch-grid-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    align-items: flex-start;
    min-height: 40px;
    padding: 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 4px;
}

.batch-grid-preview__cell {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .batch-grid-option__label {
        flex: 0 0 100px;
    }
}

/* ── Inbox summary bar ── */
.inbox-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 16px 0 24px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), rgba(125, 167, 217, 0.03));
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 14px;
    flex-wrap: wrap;
}
.inbox-summary.is-empty {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}
.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: #e8f4ec;
    cursor: pointer;
    font: inherit;
    border-radius: 10px;
    transition: background 150ms;
}
.summary-item:hover { background: rgba(255, 255, 255, 0.04); }
.summary-item strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--landing-accent, #00f0ff);
}
.summary-item--scans strong { color: #7da7d9; }
.summary-icon { font-size: 20px; }
.summary-action {
    font-size: 12px;
    color: #7a8a82;
    margin-inline-start: 6px;
}
[dir="rtl"] .summary-action { direction: ltr; }
.summary-empty { color: #7a8a82; font-size: 14px; }
.summary-mark-all {
    margin-inline-start: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #b8c7bf;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 150ms, color 150ms;
}
.summary-mark-all:hover {
    border-color: var(--landing-accent, #00f0ff);
    color: var(--landing-accent, #00f0ff);
}

/* ── Attention tab ── */
.dashboard-filter--attention {
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.06);
}
.dashboard-filter--attention .dashboard-filter__count {
    background: var(--landing-accent, #00f0ff);
    color: #04111f;
}

@media (max-width: 640px) {
    .inbox-summary { flex-direction: column; align-items: stretch; }
    .summary-item { justify-content: space-between; }
    .summary-mark-all { margin-inline-start: 0; text-align: center; }
}

/* ============================================================
   Redesigned dashboard — compact top bar
   ============================================================ */
.db-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.db-top-bar__left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.db-greeting {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.db-greeting span { color: #00f0ff; }

.db-mini-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.db-mini-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.8rem;
    color: #8899aa;
    white-space: nowrap;
}
.db-mini-stat strong {
    color: #00f0ff;
    font-weight: 600;
}
.db-mini-stat--warning {
    border-color: rgba(255,180,0,0.3);
}
.db-mini-stat--warning strong {
    color: #ffb400;
}

.db-top-bar__actions {
    display: flex;
    gap: 10px;
}
.db-btn-primary {
    background: linear-gradient(135deg, #00f0ff, #4ecca3);
    color: #0a0e1a;
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.db-btn-primary:hover {
    box-shadow: 0 0 20px rgba(0,240,255,0.3);
}
.db-btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #e0e0e0;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.db-btn-secondary:hover {
    border-color: rgba(0,240,255,0.4);
    color: #00f0ff;
}

/* Avatar */
.db-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f0ff, #4ecca3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #0a0e1a;
    text-decoration: none;
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}
.db-avatar:hover, .db-avatar--active {
    box-shadow: 0 0 12px rgba(0,240,255,0.4);
}

/* Profile page */
.profile-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
}
.profile-section {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.profile-section:last-of-type { border-bottom: none; }
.profile-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.profile-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.profile-actions .dashboard-buy-btn,
.profile-actions .dashboard-history-link {
    font-size: 0.85rem;
    padding: 10px 18px;
}

/* Search input for dashboard */
.db-search-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 7px 14px 7px 34px;
    color: #e0e0e0;
    font-size: 0.82rem;
    width: 200px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23667' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}
.db-search-input:focus { border-color: rgba(0,240,255,0.4); }
.db-search-input::placeholder { color: rgba(255,255,255,0.25); }

@media (max-width: 768px) {
    .db-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .db-top-bar__actions {
        width: 100%;
    }
    .db-top-bar__actions .db-btn-primary,
    .db-top-bar__actions .db-btn-secondary {
        flex: 1;
    }
    .db-search-input { width: 100%; }
}

/* ===================== Search (Step 52) ===================== */
.dashboard-search {
    margin-bottom: 14px;
}

.dashboard-search__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.dashboard-search__icon {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    pointer-events: none;
}

.dashboard-search__input {
    width: 100%;
    padding: 11px 40px 11px 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e8edf2;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.dashboard-search__input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.dashboard-search__input:focus {
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.08);
}

.dashboard-search__clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 6px;
    font-size: 13px;
}

.dashboard-search__clear:hover {
    color: #fff;
}

/* ===================== Selection bar (Step 52) ===================== */
.dashboard-selection-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 14px;
    margin-bottom: 10px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.dashboard-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.dashboard-select-all input[type="checkbox"] {
    accent-color: #00f0ff;
    width: 16px;
    height: 16px;
}

.dashboard-selection-count {
    color: #00f0ff;
    font-weight: 600;
}

.dashboard-selection-deselect {
    margin-left: auto;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    padding: 5px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background .2s, color .2s;
}

.dashboard-selection-deselect:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* ===================== Card checkbox (Step 52) ===================== */
.dashboard-code-card {
    position: relative;
}

.dashboard-select-checkbox {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    opacity: 0;
    transition: opacity .2s;
}

[dir="rtl"] .dashboard-select-checkbox {
    right: auto;
    left: 16px;
}

.dashboard-select-checkbox__mark {
    display: none;
}

.dashboard-code-card:hover .dashboard-select-checkbox,
.dashboard-code-card.is-selected .dashboard-select-checkbox,
.dashboard-selection-bar:not([style*="display: none"]) ~ * .dashboard-select-checkbox,
.dashboard-selection-bar:not([style*="display:none"]) ~ * .dashboard-select-checkbox {
    opacity: 1;
}

.dashboard-select-cb {
    accent-color: #00f0ff;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===================== Selected card highlight (Step 52) ===================== */
.dashboard-code-card.is-selected {
    border-color: rgba(0, 240, 255, 0.3) !important;
    background: rgba(0, 240, 255, 0.04);
    box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.15), 0 4px 20px rgba(0, 240, 255, 0.06);
}

/* ===================== Bulk toolbar stub (Step 52) ===================== */
.dashboard-bulk-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(18, 22, 30, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 240, 255, 0.15);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    padding: 14px 20px;
    animation: bulkToolbarSlideUp .25s ease-out;
}

@keyframes bulkToolbarSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.dashboard-bulk-toolbar__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-bulk-toolbar__count {
    color: #00f0ff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* ===================== Mobile: selection mode (Step 52) ===================== */
@media (max-width: 600px) {
    .dashboard-code-card__header {
        padding-inline-end: 48px;
    }

    .dashboard-code-card__titles {
        padding-inline-end: 8px;
    }

    .dashboard-select-checkbox {
        opacity: 1;
        width: 32px;
        height: 32px;
        top: 14px;
        right: 14px;
    }

    [dir="rtl"] .dashboard-select-checkbox {
        right: auto;
        left: 14px;
    }

    .dashboard-select-cb {
        width: 20px;
        height: 20px;
    }

    .dashboard-selection-bar {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }

    .dashboard-bulk-toolbar {
        padding: 12px 14px;
    }
}

/* ===================== Bulk toolbar buttons (Step 53) ===================== */
.dashboard-bulk-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .1s;
    white-space: nowrap;
}

.bulk-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.bulk-btn:active {
    transform: translateY(0);
}

.bulk-btn i {
    font-size: 13px;
}

.bulk-btn--tag {
    border-color: rgba(0, 240, 255, 0.2);
}

.bulk-btn--tag:hover {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
}

.bulk-btn--csv {
    border-color: rgba(78, 204, 163, 0.2);
}

.bulk-btn--csv:hover {
    background: rgba(78, 204, 163, 0.1);
    color: #4ecca3;
}

.bulk-btn--zip {
    border-color: rgba(78, 204, 163, 0.2);
}

.bulk-btn--zip:hover {
    background: rgba(78, 204, 163, 0.1);
    color: #4ecca3;
}

.bulk-btn--settings {
    border-color: rgba(0, 173, 239, 0.2);
}

.bulk-btn--settings:hover {
    background: rgba(0, 173, 239, 0.1);
    color: #00adef;
}

.bulk-btn--delete {
    border-color: rgba(255, 80, 80, 0.2);
}

.bulk-btn--delete:hover {
    background: rgba(255, 80, 80, 0.12);
    color: #ff5050;
}

.bulk-btn--close {
    margin-inline-start: auto;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    padding: 8px;
}

.bulk-btn--close:hover {
    color: #fff;
    background: none;
}

.bulk-btn--cancel {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.bulk-btn--danger {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff5050;
}

.bulk-btn--danger:hover {
    background: rgba(255, 80, 80, 0.25);
}

/* ===================== Delete confirmation modal (Step 53) ===================== */
.bulk-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-modal {
    background: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.bulk-modal h3 {
    margin: 0 0 12px;
    font-size: 17px;
    color: #e8edf2;
}

.bulk-modal p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.5;
}

.bulk-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===================== Tag popup (Step 53) ===================== */
.bulk-tag-popup {
    position: fixed;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background: #1a1f2e;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    width: 300px;
    max-height: 320px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.bulk-tag-popup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.bulk-tag-popup__header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
}

.bulk-tag-popup__header button:hover {
    color: #fff;
}

@media (min-width: 768px) {
    .dashboard-modal__close {
        top: 22px;
        inset-inline-end: 22px;
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 24px;
    }

    .bulk-btn--close,
    .bulk-tag-popup__header button {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 22px;
        padding: 0;
    }
}

.bulk-tag-popup__input {
    width: 100%;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e8edf2;
    font-size: 13px;
    outline: none;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.bulk-tag-popup__input:focus {
    border-color: rgba(0, 240, 255, 0.3);
}

.bulk-tag-popup__list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bulk-tag-popup__item {
    display: block;
    width: 100%;
    text-align: start;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}

.bulk-tag-popup__item:hover {
    background: rgba(0, 240, 255, 0.08);
    color: #fff;
}

/* ===================== Mobile bulk toolbar (Step 53) ===================== */
@media (max-width: 600px) {
    .dashboard-bulk-toolbar__inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .dashboard-bulk-toolbar__actions {
        width: 100%;
        justify-content: space-between;
    }

    .bulk-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .bulk-btn span {
        display: none;
    }

    .bulk-tag-popup {
        width: calc(100% - 28px);
        left: 14px;
        transform: none;
    }
}
