/* ============================================================
   Dashboard Visão geral — page-header-meta, panel-head,
   service-row, quick-tiles, alert-row, per-page, empty-state.
   Extraído de app.css — carregado APÓS app.css.
   ============================================================ */
/* ============================================================
   Dashboard — padrão Visão geral (referência iGuardian)
   ============================================================ */

/* Header com data + refresh */
.page-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--app-text-muted, #6b7280);
    flex-shrink: 0;
}

.page-header-meta .fa-calendar {
    font-size: 14px;
}

.btn-refresh {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--app-border, #e5e7eb);
    background: #fff;
    color: var(--app-text-muted, #6b7280);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-refresh:hover {
    background: #f8fafc;
    color: var(--app-text, #111827);
}

/* Cabeçalho de painel com título + ações */
.app-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.app-panel-head .app-panel-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-panel-head .app-panel-title .fa-bolt {
    color: var(--app-primary, #2563eb);
}

.app-panel-head .app-panel-title .fa-bell {
    color: #f59e0b;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-panel-link {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--app-success, #16a34a);
    display: inline-block;
    flex-shrink: 0;
}

.status-dot-sm {
    width: 8px;
    height: 8px;
}

.panel-sub-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--app-success, #16a34a);
    margin: 0 0 16px;
}

/* Linhas de serviço tintadas */
.service-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.service-row:last-child {
    margin-bottom: 0;
}

.service-row:hover {
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
    color: inherit;
}

.service-row-success {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.service-row-info {
    background: #eff6ff;
    border-color: #dbeafe;
}

.service-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fff;
    flex-shrink: 0;
    box-shadow: var(--app-shadow-sm);
}

.service-row-success .service-row-icon {
    color: var(--app-success, #16a34a);
}

.service-row-info .service-row-icon {
    color: var(--app-primary, #2563eb);
}

.service-row-body {
    flex: 1 1 auto;
    min-width: 0;
}

.service-row-name {
    font-weight: 700;
    font-size: 14px;
    margin: 0;
    color: var(--app-text, #111827);
}

.service-row-desc {
    font-size: 13px;
    color: var(--app-text-muted, #6b7280);
    margin: 2px 0 0;
}

.service-row-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--app-success-soft, #dcfce7);
    color: var(--app-success, #16a34a);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.online-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.service-row-chevron {
    color: #94a3b8;
    font-size: 14px;
}

/* Tabela usuários por servidor */
#tabela-usuarios-servidor thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a94a6;
    font-weight: 600;
    border-bottom: 1px solid var(--app-border, #e5e7eb);
    white-space: nowrap;
}

.datatable-head-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a94a6;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
}

.empty-state-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--app-text, #111827);
    margin: 0 0 4px;
}

.empty-state-sub {
    font-size: 13px;
    color: var(--app-text-muted, #6b7280);
    margin: 0;
}

/* Ações rápidas — tiles coloridos */
.quick-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

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

@media (max-width: 575.98px) {
    .quick-tiles {
        grid-template-columns: 1fr;
    }
}

.quick-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.quick-tile:hover {
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
}

.quick-tile-blue {
    background: #eff6ff;
    border-color: #dbeafe;
}

.quick-tile-sky {
    background: #f0f9ff;
    border-color: #e0f2fe;
}

.quick-tile-purple {
    background: #faf5ff;
    border-color: #f3e8ff;
}

.quick-tile-green {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.quick-tile-icon {
    font-size: 22px;
    line-height: 1;
}

.quick-tile-blue .quick-tile-icon,
.quick-tile-blue .quick-tile-title {
    color: var(--app-primary, #2563eb);
}

.quick-tile-sky .quick-tile-icon,
.quick-tile-sky .quick-tile-title {
    color: #0284c7;
}

.quick-tile-purple .quick-tile-icon,
.quick-tile-purple .quick-tile-title {
    color: #7c3aed;
}

.quick-tile-green .quick-tile-icon,
.quick-tile-green .quick-tile-title {
    color: var(--app-success, #16a34a);
}

.quick-tile-title {
    font-weight: 700;
    font-size: 13px;
    margin: 0;
}

.quick-tile-sub {
    font-size: 12px;
    color: var(--app-text-muted, #6b7280);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.quick-tile-sub .fa-chevron-right {
    font-size: 12px;
    color: currentColor;
    opacity: 0.7;
}

/* Alertas — linhas clicáveis */
.alert-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--app-text, #111827);
    font-size: 13px;
    transition: background 0.15s ease;
}

.alert-row:last-child {
    margin-bottom: 0;
}

.alert-row:hover {
    background: #f1f5f9;
    color: var(--app-text, #111827);
}

.alert-row .alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alert-dot-yellow {
    background: #f59e0b;
}

.alert-dot-green {
    background: var(--app-success, #16a34a);
}

.alert-row .app-badge {
    flex-shrink: 0;
}

.alert-row-text {
    flex: 1 1 auto;
    min-width: 0;
}

.alert-row .fa-chevron-right {
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}
