:root {
    --bg: #0b1220;
    --panel: rgba(17, 25, 40, .82);
    --panel-solid: #111928;
    --card: #1e293b;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #f59e0b;
    --border: rgba(255,255,255,.12);
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .25), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, .16), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 280px;
    min-height: 100vh;
    padding: 24px;
    background: rgba(7, 13, 25, .86);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(16px);
    flex-direction: column;
    position: sticky;
    top: 0;
}

.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 15px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff; font-weight: 800;
}
.brand-title { font-weight: 800; letter-spacing: .2px; }
.brand-subtitle { color: var(--muted); font-size: .84rem; }

.sidebar-nav { display: grid; gap: 8px; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #cbd5e1;
    text-decoration: none;
    transition: .18s ease;
}
.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(37, 99, 235, .22);
}

.app-main { flex: 1; min-width: 0; }

.topbar {
    min-height: 82px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 18, 32, .70);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title { font-size: 1.32rem; font-weight: 800; }
.topbar-subtitle { color: var(--muted); font-size: .9rem; }

.content-wrap { padding: 28px; }
.app-footer { padding: 20px 28px 30px; color: var(--muted); font-size: .9rem; }

.glass-card {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(0,0,0,.25);
    backdrop-filter: blur(18px);
}

.stat-card { padding: 22px; height: 100%; }
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-value { font-size: 2rem; font-weight: 850; line-height: 1.1; margin-top: 8px; }
.stat-meta { color: #cbd5e1; font-size: .9rem; margin-top: 10px; }

.progress { height: 9px; background: rgba(255,255,255,.11); }
.progress-bar { background: linear-gradient(90deg, var(--blue), var(--cyan)); }

.table-card {
    padding: 0;
    overflow: hidden;
    background: rgba(17, 25, 40, .72);
}

.table-dark-custom {
    margin: 0;
    color: #e5e7eb !important;
    background: transparent !important;
}

.table-dark-custom thead th {
    background: rgba(255,255,255,.055) !important;
    color: #94a3b8 !important;
    font-weight: 800;
    border-bottom: 1px solid var(--border) !important;
    padding: 15px 18px;
    white-space: nowrap;
}

.table-dark-custom tbody td {
    background: rgba(15, 23, 42, .42) !important;
    color: #e5e7eb !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    vertical-align: middle;
    padding: 15px 18px;
}

.table-dark-custom tbody tr:hover td {
    background: rgba(37, 99, 235, .12) !important;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(15, 23, 42, .34);
    flex-wrap: wrap;
}

.form-control,
.form-select {
    background: rgba(15,23,42,.95) !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
}

.form-control:focus,
.form-select:focus {
    background: rgba(15,23,42,.98) !important;
    border-color: var(--cyan) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 .2rem rgba(6, 182, 212, .15) !important;
}

.form-control::placeholder { color: #94a3b8 !important; }
.form-select option { background: #0f172a; color: #fff; }
.form-label { color: #e5e7eb; font-weight: 700; }
.form-text { color: #94a3b8 !important; }

.subdomain-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(220px, 320px) auto;
    gap: 10px;
    align-items: center;
}

.domain-switcher {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(15, 23, 42, .72);
    transition: .18s ease;
}

.domain-pill span {
    color: #93c5fd;
    font-weight: 800;
}

.domain-pill:hover,
.domain-pill.active {
    color: #fff;
    border-color: rgba(59, 130, 246, .55);
    background: rgba(37, 99, 235, .24);
}

.btn-delete {
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.38);
    background: rgba(239,68,68,.12);
    font-weight: 700;
}

.btn-delete:hover {
    color: #fff;
    border-color: rgba(239,68,68,.75);
    background: rgba(239,68,68,.24);
}

.pagination-dark .page-link {
    color: #cbd5e1;
    background: rgba(15,23,42,.78);
    border-color: rgba(255,255,255,.12);
}

.pagination-dark .page-link:hover {
    color: #fff;
    background: rgba(37,99,235,.24);
    border-color: rgba(59,130,246,.55);
}

.pagination-dark .page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-color: transparent;
}

.pagination-dark .page-item.disabled .page-link {
    color: #64748b;
    background: rgba(15,23,42,.42);
    border-color: rgba(255,255,255,.08);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border: 0;
    font-weight: 700;
}

.mobile-offcanvas { background: #07101f; color: #fff; }

.badge-soft-success { background: rgba(34,197,94,.16); color: #86efac; }
.badge-soft-danger { background: rgba(239,68,68,.16); color: #fca5a5; }
.badge-soft-warning { background: rgba(245,158,11,.16); color: #fcd34d; }
.badge-soft-info { background: rgba(6,182,212,.16); color: #67e8f9; }

@media (max-width: 991.98px) {
    .subdomain-filter-form { grid-template-columns: 1fr; width: 100%; }
    .content-wrap { padding: 18px; }
    .topbar { padding: 14px 18px; min-height: 72px; }
    .stat-value { font-size: 1.65rem; }
}

/* MariaDB pagina */
.metric-box {
    padding: 18px;
    min-height: 120px;
    border-radius: 18px;
    background: rgba(15, 23, 42, .58);
    border: 1px solid rgba(255,255,255,.10);
}

.metric-box strong {
    display: block;
    margin-top: 8px;
    font-size: 1.35rem;
    color: #fff;
}

.mariadb-wide-progress {
    height: 14px;
    border-radius: 999px;
}

.diagnose-list {
    display: grid;
    gap: 10px;
}

.diagnose-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, .58);
    border: 1px solid rgba(255,255,255,.10);
}

.diagnose-item span {
    color: #94a3b8;
}

.diagnose-item strong {
    color: #fff;
    white-space: nowrap;
}

.table-header-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(15, 23, 42, .34);
}

.process-info-cell {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Apache pagina */
.apache-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.module-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 13px;
    border-radius: 16px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(15, 23, 42, .58);
}

.module-pill span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: .8rem;
}

.module-pill.loaded {
    color: #bbf7d0;
    border-color: rgba(34,197,94,.20);
}

.module-pill.loaded span {
    background: rgba(34,197,94,.18);
    color: #86efac;
}

.module-pill.missing {
    color: #fcd34d;
    border-color: rgba(245,158,11,.28);
}

.module-pill.missing span {
    background: rgba(245,158,11,.18);
    color: #fcd34d;
}

.apache-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 170px;
    overflow: auto;
    padding-right: 4px;
}

.apache-chip-list span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(255,255,255,.09);
    font-size: .82rem;
}

.log-view {
    max-height: 360px;
    overflow: auto;
    padding: 16px;
    border-radius: 18px;
    color: #dbeafe;
    background: rgba(2, 6, 23, .72);
    border: 1px solid rgba(255,255,255,.10);
    font-size: .86rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 767.98px) {
    .apache-metric-grid,
    .module-grid {
        grid-template-columns: 1fr;
    }
}
