/* Copyright (c) 2025-2026 William Chesher | MIT License */
/* dashboard.css - Dashboard/overview page styles (index.html) */

/* ============================================
   Dashboard Grid Layout
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-grid .span-2 {
        grid-column: auto;
    }
}

.span-2 {
    grid-column: span 2;
}

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

/* ============================================
   Dashboard Sections
   ============================================ */

.dashboard-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 1.25rem;
}

.dashboard-section h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-section h2 svg {
    width: 1.2em;
    height: 1.2em;
    color: var(--accent);
}

.dashboard-section h2 .circle-btn {
    margin-left: auto;
}

html.dark-theme .dashboard-section {
    background: rgba(15, 15, 35, 0.85);
    border: 1px solid rgba(124, 255, 220, 0.15);
}

html.dark-theme .dashboard-section h2 {
    border-color: rgba(124, 255, 220, 0.1);
    color: #eee;
}

/* ============================================
   Status Cards (Service Health)
   ============================================ */

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 400px) {
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.status-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.status-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-card svg {
    width: 40px;
    height: 40px;
    color: var(--accent, #7c6fae);
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.status-card .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-card .indicator.healthy { background: #4caf50; }
.status-card .indicator.degraded { background: #ff9800; }
.status-card .indicator.down { background: #f44336; }
.status-card .indicator.unknown { background: #9e9e9e; }

.status-card .name {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    text-transform: lowercase;
}

.status-card .state {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    margin-top: 0.25rem;
    text-transform: lowercase;
}

html.dark-theme .status-card {
    background: #1e1e2e;
    border-color: #3a3a4a;
}

html.dark-theme .status-card .name {
    color: #e0e0e0;
}

html.dark-theme .status-card .state {
    color: #888;
}

html.dark-theme .status-card svg {
    color: var(--accent, #9d8fce);
}

/* ============================================
   Stat Cards (Large Display)
   ============================================ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card-lg {
    background: var(--accent, #00d4ff);
    border: 1px solid var(--accent-light, #a0a1d0);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.stat-card-lg:hover {
}

.stat-card-lg svg {
    width: 40px;
    height: 40px;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-card-lg .value {
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.stat-card-lg .label {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

.stat-card-lg.online .value { color: #fff; }
.stat-card-lg.warning .value { color: #fff; }
.stat-card-lg.error .value { color: #fff; }

html.dark-theme .stat-card-lg {
    background: var(--accent, #00d4ff);
    border-color: var(--accent-hover, #726fae);
}

html.dark-theme .stat-card-lg svg {
    color: #fff;
}

html.dark-theme .stat-card-lg .value {
    color: #fff;
}

html.dark-theme .stat-card-lg .label {
    color: rgba(255, 255, 255, 0.8);
}

html.dark-theme .stat-card-lg.online .value { color: #fff; }
html.dark-theme .stat-card-lg.warning .value { color: #fff; }
html.dark-theme .stat-card-lg.error .value { color: #fff; }

/* ============================================
   Activity List
   ============================================ */

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list .activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-list .activity-item:last-child {
    border-bottom: none;
}

.activity-list .activity-item svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.activity-list .activity-item .info {
    flex: 1;
    min-width: 0;
}

.activity-list .activity-item .title {
    font-size: 0.85rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-list .activity-item .meta {
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
}

.activity-list .activity-item .status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    background: #e8f5e9;
    color: #2e7d32;
}

.activity-list .activity-item .status.offline {
    background: #f5f5f5;
    color: #666;
}

html.dark-theme .activity-list .activity-item {
    border-color: #3a3a4a;
}

html.dark-theme .activity-list .activity-item .title {
    color: #e0e0e0;
}

html.dark-theme .activity-list .activity-item .status {
    background: rgba(124, 255, 220, 0.15);
    color: #7cffdc;
}

html.dark-theme .activity-list .activity-item .status.offline {
    background: #2a2a3a;
    color: #888;
}

/* ============================================
   Quick Actions
   ============================================ */

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-actions-primary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-action-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-action-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 111, 174, 0.3);
}

.quick-action-primary svg {
    width: 1em;
    height: 1em;
}

.quick-actions-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #555;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.quick-action:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

.quick-action svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

html.dark-theme .quick-action {
    background: #1e1e2e;
    border-color: #3a3a4a;
    color: #e0e0e0;
}

html.dark-theme .quick-action:hover {
    background: rgba(124, 255, 220, 0.1);
    border-color: var(--accent);
}

/* ============================================
   Version Info
   ============================================ */

.version-info {
    display: flex;
    gap: 2rem;
    font-size: 0.8rem;
    color: #666;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.version-info .item {
    display: flex;
    gap: 0.5rem;
}

.version-info .label {
    color: #888;
}

.version-info .value {
    font-family: 'Roboto Mono', monospace;
}

html.dark-theme .version-info {
    border-color: #3a3a4a;
    color: #888;
}

/* ============================================
   Environment Badge
   ============================================ */

.env-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #9e9e9e;
    color: #fff;
}

.env-badge.env-development {
    background: #4caf50;
    color: #fff;
}

.env-badge.env-staging {
    background: #ff9800;
    color: #fff;
}

.env-badge.env-production {
    background: #f44336;
    color: #fff;
}
