/**
 * dashboard-base.css — Shared foundation for admin & user dashboards
 *
 * Imported by both dashboard.html and admin/dashboard.html.
 * Keeps dashboards consistent and subdomain-ready.
 * Requires: variables.css loaded first.
 */

/* ═══ Status Badges ═══ */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-active  { background: var(--color-success-bg); color: var(--color-success); }
.badge-trial   { background: var(--color-info-bg);    color: var(--color-info); }
.badge-expired { background: var(--color-error-bg);   color: var(--color-error-light); }
.badge-failed  { background: var(--color-error-bg);   color: var(--color-error-light); }
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-pending { background: var(--color-warning-bg); color: var(--color-warning-light); }

/* ═══ Data Table ═══ */
.data-table-wrap {
    background: var(--bg-card, #181b23);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead {
    background: rgba(0, 0, 0, 0.2);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #5c6577);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #8b95a5);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr.clickable {
    cursor: pointer;
}

.data-table tbody tr.clickable:hover {
    background: rgba(37, 211, 102, 0.04);
}

/* ═══ Text Utilities ═══ */
.text-success { color: var(--color-success); }
.text-error   { color: var(--color-error-light); }
.text-warning { color: var(--color-warning); }
.text-info    { color: var(--color-info); }
.text-muted   { color: var(--text-muted); }

/* ═══ Grid Utilities ═══ */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .grid-2col,
    .grid-3col {
        grid-template-columns: 1fr;
    }
}
