/* File: assets/css/style.css */
/* Custom styles for Sistem Monitoring Bantex */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Custom card styling */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.dashboard-card {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.dashboard-card .card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.dashboard-card .card-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    width: 250px; /* Lebar tetap */
    overflow-y: auto; /* Scroll jika konten terlalu panjang */
}

/* Tambahkan sedikit jarak untuk konten sidebar */
.sidebar .nav-link {
    padding: 0.5rem 1rem;
    margin: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
    font-weight: 600;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

/* Login page styles */
.login-container {
    max-width: 450px;
    margin: 2rem auto;
}

.login-card {
    border-radius: 15px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-body {
    padding: 2rem;
}

/* Search form styles */
.search-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.search-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.search-header h2 {
    font-weight: 700;
    color: var(--primary-color);
}

.search-header p {
    color: var(--secondary-color);
}

/* Table styles */
.table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.status-badge {
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
}

.status-tersedia {
    background-color: var(--success-color);
    color: white;
}

.status-tidak-tersedia {
    background-color: var(--danger-color);
    color: white;
}

/* Button styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* Form styles */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Pastikan konten utama tidak tertutup sidebar */
main.col-md-9.ms-sm-auto.col-lg-10.px-md-4 {
    margin-left: 250px !important; /* Sesuaikan dengan lebar sidebar */
    width: calc(100% - 250px) !important;
}

/* Tambahkan CSS ini ke file style.css Anda atau dalam tag <style> */

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

/* Jika diperlukan, atur ukuran canvas */
#availabilityChart {
    max-height: 300px;
}

/* Style untuk legend manual */
.chart-legend {
    margin-top: 10px;
    text-align: center;
}

.legend-item {
    display: inline-block;
    margin: 0 10px;
}

/* Menghilangkan chart container dan elemen lain saat printing */
@media print {
    .no-print {
        display: none !important;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
}

/* Perbaikan responsif untuk layar kecil */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding-top: 0;
    }
    
    main.col-md-9.ms-sm-auto.col-lg-10.px-md-4 {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Hero section for homepage */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/bg-login.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-radius: 0 0 50% 50% / 20%;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* DataTables custom styling */
div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
    margin-bottom: 1rem;
}

div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border: 1px solid #ced4da;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    justify-content: center;
    margin-top: 1rem;
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 1rem;
    font-style: italic;
    color: var(--secondary-color);
}

/* Action buttons in tables */
.action-btn {
    margin: 0 0.2rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Home page features */
.feature-card {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    background-color: white;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Import/Export form styling */
.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
}

.file-upload .file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload .file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload:hover .file-label {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.file-upload .file-label i {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

/* Report section styling */
.report-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.report-card:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.report-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.report-card h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        background-color: white;
    }
    
    .container, .container-fluid {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .table {
        width: 100% !important;
    }
}