/* ==========================================
   SIMANLAB - Main Stylesheet
   ========================================== */

:root {
    --primary-dark: #072e25;      /* Warna Hijau Gelap Khas Sidebar */
    --primary-green: #0d3b2e;     
    --accent-green: #10b981;      /* Hijau Terang untuk Status Aktif */
    --accent-blue: #3b82f6;       /* Biru untuk Statistik Utama */
    --accent-yellow: #f59e0b;     /* Kuning untuk Perawatan */
    --accent-red: #ef4444;        /* Merah untuk Bermasalah */
    
    --bg-body: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-dark);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
}

.sidebar-menu li.active a,
.sidebar-menu li a:hover {
    background-color: var(--accent-green);
    color: #ffffff;
    font-weight: 500;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.content-body {
    padding: 30px;
}

/* --- CARDS / METRICS (Dashboard) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- BADGES STATUS --- */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-aktif {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-bermasalah {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-perawatan {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-dijadwalkan {
    background-color: #dbeafe;
    color: #1e40af;
}

/* --- TABLES --- */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 30px;
}

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

table th, table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
}

table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: #fcfcfc;
}

/* --- BUTTONS --- */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary {
    background-color: var(--accent-green);
    color: white;
}

.btn-primary:hover {
    background-color: #059669;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
}

.btn-icon:hover {
    background: #f1f5f9;
    color: var(--text-main);
}