.tab-item.admin-tab,
.tab-item.admin-tab i,
.tab-item.admin-tab.active,
.tab-item.admin-tab.active i {
    color: #ff8585;
}

.tab-item.admin-tab:hover,
.tab-item.admin-tab:hover i {
    color: #ffa5a5;
}

.tab-item.admin-tab:hover,
.tab-item.admin-tab.active {
    background: rgba(255, 133, 133, 0.09);
}

.tab-item.admin-tab.active::before {
    background: #ff8585;
}

.welcome-header {
    display: flex;
    align-items: flex-start;
    gap: var(--s-5);
    flex-wrap: wrap;
    margin-bottom: var(--s-6);
    padding-bottom: var(--s-5);
    border-bottom: 1px solid var(--line);
}

.welcome-left {
    min-width: 0;
}

.welcome-header h1 {
    font-size: var(--fs-22);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.welcome-header h1 .username {
    color: var(--accent);
}

.welcome-right {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-left: auto;
    flex-wrap: wrap;
}

.welcome-subtitle {
    margin-top: 4px;
    font-size: var(--fs-13);
    color: var(--text-muted);
}

.status-strip {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
    margin-top: var(--s-3);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface-raised);
    color: var(--text-secondary);
    font-size: var(--fs-11);
    font-weight: 500;
    line-height: 18px;
    white-space: nowrap;
}

.status-chip i {
    font-size: 10px;
    color: var(--text-muted);
}

.status-chip.linked,
.status-chip.ok {
    background: var(--accent-dim);
    border-color: var(--line-accent);
    color: var(--accent);
}

.status-chip.linked i,
.status-chip.ok i {
    color: var(--accent);
}

.status-chip-ghost {
    background: transparent;
    border-style: dashed;
    color: var(--text-muted);
}

.status-note,
.install-note {
    max-width: 560px;
    margin-top: var(--s-2);
    font-size: var(--fs-12);
    line-height: 1.5;
    color: var(--text-muted);
}

.install-note-dismiss {
    margin-left: var(--s-2);
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
}

.install-note-dismiss:hover {
    color: var(--text);
}

.dashboard-grid,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--s-4);
}

.dashboard-card,
.info-card,
.content-box {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.dashboard-card.full-width,
.full-width {
    grid-column: 1 / -1;
}

.dashboard-card > .card-header,
.info-card > .card-header {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--line);
}

.card-header h2,
.card-header h3 {
    font-size: var(--fs-14);
    font-weight: 600;
    color: var(--text);
}

.card-header > i:first-child {
    font-size: var(--fs-13);
    color: var(--text-muted);
}

.card-header .card-action,
.card-header > :last-child:not(h2):not(h3):not(i):not(p) {
    margin-left: auto;
}

.card-content,
.card-body {
    padding: var(--s-5);
    flex: 1;
}

.card-content > * + * {
    margin-top: var(--s-4);
}

.card-footer {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-5);
    border-top: 1px solid var(--line);
    background: var(--surface-sunk);
}

.card-desc,
.card-subtitle {
    font-size: var(--fs-12);
    color: var(--text-muted);
}

.info-list,
.detail-group {
    display: flex;
    flex-direction: column;
}

.info-item,
.detail-item,
.detail-row {
    display: flex;
    align-items: baseline;
    gap: var(--s-4);
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.info-item:last-child,
.detail-item:last-child,
.detail-row:last-child {
    border-bottom: 0;
}

.info-label,
.detail-label {
    flex: 0 0 auto;
    min-width: 150px;
    font-size: var(--fs-12);
    color: var(--text-muted);
}

.info-value,
.detail-value {
    flex: 1;
    min-width: 0;
    font-size: var(--fs-13);
    color: var(--text);
    word-break: break-word;
}

.info-value.mono,
.detail-value.mono {
    font-family: var(--font-mono);
    font-size: var(--fs-12);
}

.stats-row,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: var(--s-3);
}

.stat-item {
    padding: var(--s-4);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.stat-number,
.stat-value {
    display: block;
    font-size: var(--fs-22);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.stat-number.accent,
.stat-value.accent {
    color: var(--accent);
}

.stat-label {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-12);
    color: var(--text-muted);
}

.bar-track,
.meter {
    height: 5px;
    border-radius: var(--r-pill);
    background: var(--surface-raised);
    overflow: hidden;
}

.bar-fill,
.meter > span {
    display: block;
    height: 100%;
    border-radius: var(--r-pill);
    background: var(--accent);
    transition: width var(--t);
}

.bar-fill.warn,
.meter.warn > span {
    background: var(--warn);
}

.bar-fill.danger,
.meter.danger > span,
.at-max .bar-fill {
    background: var(--danger);
}

.token-container,
.api-token-display,
.download-url-container {
    display: flex;
    align-items: stretch;
    gap: var(--s-2);
}

.api-token-value,
.download-url-input,
.token-value {
    flex: 1;
    min-width: 0;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 var(--s-3);
    background: var(--surface-sunk);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: var(--fs-12);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn.copied,
.copy-btn.copied:hover {
    border-color: var(--line-accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: transparent;
    font-size: var(--fs-12);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast);
}

.page-btn:hover:not(:disabled) {
    color: var(--text);
    background: var(--surface-hover);
    border-color: var(--line-strong);
}

.page-btn.active {
    background: var(--accent-dim);
    border-color: var(--line-accent);
    color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.danger-zone {
    border-color: rgba(244, 82, 92, 0.3);
}

.danger-zone > .card-header {
    border-bottom-color: rgba(244, 82, 92, 0.3);
}

.danger-zone > .card-header h2,
.danger-zone > .card-header h3,
.danger-zone > .card-header i {
    color: var(--danger);
}

.danger-zone-desc {
    font-size: var(--fs-13);
    color: var(--text-secondary);
}

.danger-zone-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: var(--fs-13);
    color: var(--text-muted);
}

.danger-zone-list li {
    position: relative;
    padding-left: var(--s-4);
}

.danger-zone-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--line-strong);
}

.loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity var(--t), visibility var(--t);
}

.loader-wrapper.hidden,
.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#content {
    min-height: 100vh;
}

.item-row {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    transition: border-color var(--t-fast), background-color var(--t-fast);
}

.item-row + .item-row {
    margin-top: var(--s-2);
}

.item-row:hover {
    border-color: var(--line-strong);
    background: var(--surface-raised);
}

.item-title {
    font-size: var(--fs-13);
    font-weight: 500;
    color: var(--text);
}

.item-meta {
    font-size: var(--fs-12);
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .dashboard-grid,
    .cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .welcome-header {
        flex-direction: column;
        gap: var(--s-3);
    }

    .welcome-right {
        margin-left: 0;
    }

    .info-item,
    .detail-item,
    .detail-row {
        flex-direction: column;
        gap: 2px;
    }

    .info-label,
    .detail-label {
        min-width: 0;
    }

    .item-row {
        flex-wrap: wrap;
    }
}
