/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-input {
    min-width: 150px;
    max-width: 200px;
}

.filter-select {
    min-width: 140px;
}

/* ==================== GRIDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

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

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

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

/* ==================== CHART ==================== */
.chart-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    width: 100%;
}

/* ==================== SETTINGS ==================== */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
}

.settings-option:hover {
    background: var(--bg-tertiary);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

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

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

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.form-divider {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ==================== PAGINATION ==================== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination-btn:hover {
    background: var(--bg-tertiary);
}

.pagination-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ==================== TOGGLE ==================== */
.toggle {
    width: 44px;
    height: 24px;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle:checked {
    background: var(--accent);
}

.toggle:checked::before {
    transform: translateX(20px);
}

/* ==================== STAT CARDS ==================== */
.stat-card {
    padding: 1.5rem;
}

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.emerald { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-card-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-card-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-card-icon.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }

.stat-card-value {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== STATUS ITEMS ==================== */
.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.status-item-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-dot.emerald { background: #10b981; }
.status-dot.yellow { background: #eab308; }
.status-dot.red { background: #ef4444; }

.status-item-value {
    font-weight: 700;
}

/* ==================== TABLE STYLES ==================== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.table-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ==================== FORM STYLES ==================== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }

.form-divider {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-input {
    min-width: 200px;
}

.filter-select {
    min-width: 150px;
}

/* ==================== CHART CONTAINER ==================== */
.chart-container {
    position: relative;
    width: 100%;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ==================== SETTINGS ==================== */
.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ==================== LINK STYLES ==================== */
.link {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ==================== SECTION HEADER ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-weight: 600;
}

.section-subtitle {
    color: var(--text-muted);
}

/* ==================== SPACING UTILITIES ==================== */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ==================== FLEX UTILITIES ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* ==================== TEXT UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ==================== WIDTH UTILITIES ==================== */
.w-full { width: 100%; }

/* ==================== GRID UTILITIES ==================== */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ==================== SIZING UTILITIES ==================== */
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 50%; }

/* ==================== COLOR UTILITIES ==================== */
.text-emerald-400 { color: #34d399; }
.text-blue-400 { color: #60a5fa; }
.text-purple-400 { color: #a78bfa; }
.text-orange-400 { color: #fb923c; }
.text-red-400 { color: #f87171; }
.text-white { color: #ffffff; }

.bg-emerald-500\/10 { background: rgba(16, 185, 129, 0.1); }
.bg-gray-700 { background: #374151; }
.bg-red-500\/20 { background: rgba(239, 68, 68, 0.2); }

/* ==================== BORDER UTILITIES ==================== */
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.pt-4 { padding-top: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }

/* ==================== TOAST CONTAINER ==================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ==================== HIDDEN UTILITIES ==================== */
.hidden { display: none !important; }
.hidden-desktop { display: none; }

/* ==================== TENANT CELL ==================== */
.tenant-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tenant-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    font-weight: 500;
}

/* Show only on mobile */
.show-mobile {
    display: none;
}
