* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #111827;
    color: white;
    padding: 24px 18px;
}

.brand {
    margin-bottom: 32px;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #9ca3af;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .nav-menu a {
        color: #e5e7eb;
        text-decoration: none;
        padding: 12px 14px;
        border-radius: 8px;
        display: block;
    }

        .nav-menu a:hover {
            background: #1f2937;
        }

.disabled-link {
    color: #6b7280 !important;
    cursor: not-allowed;
}

.main-content {
    flex: 1;
    padding: 32px;
}

.page-header {
    margin-bottom: 24px;
}

    .page-header h1 {
        margin: 0;
        font-size: 32px;
    }

.text-muted {
    color: #6b7280;
    margin-top: 6px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    min-height: 160px;
}

.card-label {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.status {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 16px;
}

.status-online {
    color: #047857;
}

.status-offline {
    color: #b91c1c;
}

.card-detail {
    font-size: 14px;
    color: #374151;
    margin-top: 8px;
}

.placeholder-text {
    color: #9ca3af;
    font-size: 16px;
}

.filter-bar {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

    .filter-bar div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .filter-bar input {
        padding: 8px;
        min-width: 160px;
    }

    .filter-bar button {
        padding: 9px 16px;
        cursor: pointer;
    }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.summary-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
}

.summary-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

    .page-actions a {
        display: inline-block;
        padding: 10px 14px;
        border: 1px solid #ccc;
        border-radius: 6px;
        text-decoration: none;
        background: #f8f8f8;
    }

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}

    .data-table th,
    .data-table td {
        border: 1px solid #ddd;
        padding: 10px;
    }

    .data-table th {
        background: #f5f5f5;
        text-align: left;
    }

.text-right {
    text-align: right;
}

.tree {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.tree-node {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid #d6dbe1;
}

details {
    margin: 0.4rem 0;
}

summary {
    cursor: pointer;
    padding: 0.35rem 0;
    list-style-position: outside;
}

    summary strong {
        color: #0f172a;
    }

.tree-actions {
    margin: 0.5rem 0 0.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .tree-actions a {
        text-decoration: none;
    }

.muted {
    color: #777;
    font-size: 0.85rem;
}

ul {
    margin-top: 0.25rem;
    margin-left: 1.5rem;
}

.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    max-width: 720px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    gap: 6px;
}

    .form-group label {
        font-weight: 700;
        color: #374151;
    }

    .form-group input,
    .form-group select {
        padding: 10px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 15px;
    }

.form-check-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
}

button {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #111827;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #1f2937;
}