:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    height: 100vh;
    background-color: #f4f6f9;
    color: var(--dark);
}

/* Sidebar */
sidebar {
    width: 260px;
    background-color: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #1a252f;
    text-align: center;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.sidebar-menu li:hover, .sidebar-menu li.active {
    background-color: var(--secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background-color: white;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border);
    font-size: 1.25rem;
    font-weight: 600;
}

.content-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards & Forms */
.card {
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--primary);
    border-bottom: 2px solid var(--light);
    padding-bottom: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

input, select {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
}

button {
    padding: 9px 18px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-end;
}

button:hover {
    background-color: #2980b9;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    font-size: 0.9rem;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--light);
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-house { background-color: #e8f8f5; color: #16a085; }
.badge-building { background-color: #fef9e7; color: #f1c40f; }
.badge-block { background-color: #f4ecf7; color: #8e44ad; }

.status-pending { color: var(--warning); font-weight: bold; }
.status-progress { color: var(--secondary); font-weight: bold; }
.status-completed { color: var(--success); font-weight: bold; }