/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --info-color: #3498db;
    --success-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-radius: 0;
    --box-shadow: none;
}

body {
    background-color: #f5f6fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Navbar */
.navbar {
    background-color: var(--dark-color) !important;
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    background: #fff;
    margin-bottom: 1rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--dark-color);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 1rem;
}

.table thead th a {
    color: white !important;
}

.table thead th a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.table td {
    border-bottom: 1px solid #eee;
    padding: 1rem;
    vertical-align: middle;
}

/* Progress Bars */
.progress {
    background-color: #eee;
    border-radius: var(--border-radius);
    height: 6px;
    margin: 0.5rem 0;
}

.progress-bar {
    border-radius: var(--border-radius);
}

/* Badges */
.badge {
    border-radius: var(--border-radius);
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #eee;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Info Boxes */
.info-box {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translateY(-3px);
}

.info-box .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.info-box .title {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.info-box .number {
    font-size: 2rem !important;
    line-height: 1;
    font-weight: 800;
}

/* Filters Section */
.filters {
    background: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
}

/* Loading Overlay */
.loading-overlay {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
}

.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    margin-bottom: 1rem;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.info-box {
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.info-box-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.info-box-content {
    padding: 5px 10px;
}

.info-box-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 5px 0;
    color: #fff;
}

.info-box-text {
    color: #fff;
    font-weight: 500;
}

.bg-info-flat {
    background-color: var(--flat-blue);
    color: white;
}

.bg-success-flat {
    background-color: var(--flat-green);
    color: white;
}

.bg-danger-flat {
    background-color: var(--flat-red);
    color: white;
}

.bg-warning-flat {
    background-color: var(--flat-yellow);
    color: white;
}

.bg-secondary-flat {
    background-color: #6c757d;
    color: white;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #343a40;
    color: white;
    border-bottom: none;
}

.table td {
    vertical-align: middle;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.progress {
    height: 1.5rem;
    margin-bottom: 0;
}

.progress-bar {
    line-height: 1.5rem;
}

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
}

.badge {
    padding: 0.4em 0.8em;
}

.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #007bff;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

#loadingOverlay {
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.vm-name {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

.sort-icon:hover {
    color: #fff;
    cursor: pointer;
}

.column-header {
    cursor: pointer;
}

.column-header:hover {
    background-color: #1a2733;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
}

.nav-pills .nav-link {
    color: var(--primary-color);
}

.storage-list {
    margin-top: 10px;
    font-size: 0.9rem;
}

.storage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.active-tab-indicator {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--secondary-color);
}

.mesin-card {
    height: 100%;
    position: relative;
}

.mesin-card .progress {
    height: 10px;
    margin-bottom: 12px;
}

.vm-count {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.vm-count-item {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.05);
    font-size: 0.9rem;
}

/* Medium Desktop Responsive */
@media (min-width: 1201px) and (max-width: 1400px) {
    .table {
        font-size: 0.9rem;
    }
    
    .table thead th {
        padding: 0.85rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .table tbody td {
        padding: 0.85rem 0.75rem;
    }
    
    .table tbody td .progress {
        width: 90px;
        height: 5px;
    }
    
    .vm-name {
        max-width: 180px;
    }
}

/* Tablet and Small Desktop Responsive */
@media (min-width: 769px) and (max-width: 1200px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 1000px;
        font-size: 0.85rem;
    }
    
    .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .table tbody td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    .table tbody td .progress {
        width: 80px;
        height: 4px;
    }
    
    .vm-name {
        max-width: 150px;
    }
    
    .filters .row {
        justify-content: center;
    }
    
    .filters .col-md-4 {
        flex: 0 0 35%;
        max-width: 35%;
    }
    
    .filters .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .filters .col-md-2 {
        flex: 0 0 15%;
        max-width: 15%;
    }
    
    .card-header .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .card-header select {
        width: 100px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .info-box {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
    }
    
    .info-box .icon {
        font-size: 2.5rem;
        margin-bottom: 0;
        margin-right: 1rem;
        width: 60px;
        text-align: center;
    }
    
    .info-box .content {
        flex: 1;
    }
    
    .info-box .title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .info-box .number {
        font-size: 1.8rem;
        font-weight: 800;
    }
    
    .row > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
    
    /* Card style for table on mobile */
    .table-responsive {
        margin: 0;
        border: none;
    }
    
    .table-responsive table {
        border: none;
    }
    
    .table-responsive table thead {
        display: none;
    }
    
    .table-responsive table tbody tr {
        display: block;
        background: #fff;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    }
    
    .table-responsive table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .table-responsive table tbody td:last-child {
        border-bottom: none;
    }
    
    .table-responsive table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
    }
    
    .table-responsive table tbody td .progress {
        width: 150px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .filters form {
        flex-direction: column;
    }
    
    .filters .col-md-2,
    .filters .col-md-3 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-header .d-flex {
        width: 100%;
        justify-content: space-between;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Progress Bar Colors */
.progress {
    background-color: rgba(0,0,0,0.1);
}

.progress-bar.bg-success {
    background-color: #28a745 !important;
}

.progress-bar.bg-warning {
    background-color: #ffc107 !important;
}

.progress-bar.bg-danger {
    background-color: #dc3545 !important;
}

/* Table Styles */
.table thead th {
    background-color: #343a40;
    color: #fff;
    font-weight: 500;
    border-bottom: none;
}

.table thead th a {
    color: #fff !important;
}

.table tbody td {
    vertical-align: middle;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Progress Text */
.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
}

/* Custom Background Colors */
.bg-purple {
    background-color: #8e44ad !important;
}

.bg-teal {
    background-color: #16a085 !important;
}

/* Info Box Styles */