/* assets/css/style.css */
:root {
    --primary-color: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --sidebar-bg: #0d2a54;
    --sidebar-color: #e2e8f0;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --body-bg: #f4f7f6;
    --card-bg: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
}

/* Wrapper and Layout */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar.toggled {
    margin-left: -250px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-text {
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.sidebar-menu {
    padding-top: 10px;
    flex-grow: 1;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-radius: 0;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    color: #fff;
    background: var(--sidebar-hover);
    border-left-color: var(--info-color);
    font-weight: 500;
}

.menu-icon {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 10px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: all 0.3s;
}

.top-header {
    background: #fff;
    padding: 15px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    z-index: 1050;
    /* Ensure dropdowns fly over everything */
    position: relative;
}

.page-title {
    font-weight: 600;
    color: var(--dark-color);
}

.btn-menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--dark-color);
    cursor: pointer;
}

#live-clock {
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

#live-clock i {
    color: var(--primary-color);
}

.page-container {
    padding: 30px;
    flex-grow: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 25px;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    font-weight: 600;
}

/* Statistic Cards */
.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
}

.stat-content h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.stat-content p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom-width: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 15px 10px;
}

.table td {
    padding: 12px 10px;
}

/* Custom Badges */
.badge {
    padding: 6px 10px;
    font-weight: 500;
    border-radius: 6px;
}

.badge-aktif {
    background-color: rgba(25, 135, 84, 0.15);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.badge-pasif {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.badge-askida {
    background-color: rgba(255, 193, 7, 0.2);
    color: #d39e00;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 16px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        left: -250px;
    }

    .sidebar.toggled {
        left: 0;
        margin-left: 0;
    }

    .page-container {
        padding: 15px;
    }
}