/* =============================================
   DASHBOARD — db-* namespace
   ============================================= */

/* --- Page header --- */
.db-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.db-header__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    font-family: 'Fraunces', serif;
}

.db-header__sub {
    font-size: .85rem;
    color: #9ca3af;
    margin-top: .2rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.db-header__stat {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-weight: 500;
    color: #6b7280;
}

.db-header__stat-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
    display: inline-block;
}

/* --- Onboarding --- */
.db-onboarding {
    background: linear-gradient(135deg, #fffbf2 0%, #fff8ec 100%);
    border: 1px solid rgba(255, 138, 0, .2);
    border-radius: 1.25rem;
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
}

.db-onboarding-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .35rem;
}

.db-onboarding-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 1.25rem 0;
}

.db-onboarding-step {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.db-onboarding-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 138, 0, .15);
    color: #c46a00;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-onboarding-step-text {
    font-size: .92rem;
    font-weight: 600;
    color: #374151;
}

.db-onboarding-arrow {
    color: rgba(255, 138, 0, .5);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1;
}

/* --- Section label --- */
.db-section-label {
    font-size: .7rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .75rem;
}

/* --- NFC Set cards --- */
.db-set-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 1.1rem;
    padding: 1.25rem 1.4rem;
    transition: box-shadow .18s, border-color .18s, transform .18s;
    position: relative;
    overflow: hidden;
}

.db-set-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ui-brand), #f59e0b);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity .18s;
}

.db-set-card:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, .09);
    border-color: rgba(255, 138, 0, .2);
    transform: translateY(-1px);
}

.db-set-card:hover::before {
    opacity: 1;
}

.db-set-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    background: linear-gradient(135deg, rgba(255, 138, 0, .12), rgba(245, 158, 11, .08));
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.db-set-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.db-set-card__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .3rem;
    flex-wrap: wrap;
}

.db-set-card__code {
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: .75rem;
    color: #9ca3af;
    background: #f3f4f6;
    border-radius: .4rem;
    padding: .1rem .45rem;
    display: inline-block;
}

.db-set-card__chips {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    color: #6b7280;
    font-weight: 500;
}

.db-set-card__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.db-set-card-empty {
    background: #fafafa;
    border: 2px dashed #e5e7eb;
    border-radius: 1.1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: border-color .15s, background .15s;
}

.db-set-card-empty:hover {
    border-color: rgba(255, 138, 0, .4);
    background: #fffbf5;
}

.db-set-card-empty__icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    opacity: .4;
}

.db-set-card-empty__title {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: .4rem;
}

.db-set-card-empty__sub {
    font-size: .85rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* --- Story cards (sidebar) --- */
.db-story-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: .9rem;
    padding: 1rem 1.1rem;
    transition: box-shadow .15s, border-color .15s;
}

.db-story-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
    border-color: #e5e7eb;
}

.db-story-card--ritual {
    border-color: rgba(13, 110, 253, .12);
    background: rgba(239, 246, 255, .5);
}

.db-story-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .65rem;
    font-weight: 700;
    padding: .18rem .55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .05em;
    flex-shrink: 0;
}

.db-story-pill--story {
    background: rgba(255, 138, 0, .1);
    color: #92400e;
}

.db-story-pill--ritual {
    background: rgba(13, 110, 253, .1);
    color: #1e3a8a;
}

.db-story-title {
    font-size: .92rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin-bottom: .15rem;
}

.db-story-meta {
    font-size: .78rem;
    color: #9ca3af;
    margin-bottom: .7rem;
}

/* --- News --- */
.db-news-item {
    padding: .65rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.db-news-item:last-child {
    border-bottom: none;
}

.db-news-title {
    font-size: .85rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.db-news-date {
    font-size: .72rem;
    color: #9ca3af;
    white-space: nowrap;
}

.db-news-excerpt {
    font-size: .8rem;
    color: #6b7280;
    margin-top: .2rem;
}

/* --- Activation section --- */
.db-activation-section {
    margin-bottom: 1.75rem;
}

.db-activation-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.db-activation-tile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.4rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: box-shadow .15s;
}

.db-activation-tile:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .07);
}

.db-activation-tile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.db-activation-tile--set::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.db-activation-tile--story::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.db-activation-tile__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.db-activation-tile__title {
    font-size: .95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .3rem;
}

.db-activation-tile__desc {
    font-size: .82rem;
    color: #9ca3af;
    margin-bottom: 1.1rem;
    flex: 1;
}

.db-activation-tile .form-control-sm {
    border-radius: .6rem;
    border-color: #e5e7eb;
    font-size: .85rem;
}

.db-activation-tile .form-control-sm:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.db-activation-tile--story .form-control-sm:focus {
    border-color: #86efac;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

/* --- Sidebar widget box --- */
.db-widget {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 1.1rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.db-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.db-widget__title {
    font-size: .82rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.db-widget__link {
    font-size: .78rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color .12s;
}

.db-widget__link:hover {
    color: var(--ui-accent);
}

/* --- Responsive --- */
@media (max-width: 575.98px) {
    .db-set-card__actions {
        flex-wrap: wrap;
    }

    .db-header__title {
        font-size: 1.25rem;
    }
}
