/* ========================================
   E-PASIEN KHANZA - MAIN STYLESHEET
   ======================================== */

   /* GLOBAL STYLES */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* NAVBAR STYLES */
.navbar {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

/* BREADCRUMB */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #fff;
    font-weight: 600;
}

/* USER INFO BADGE */
.user-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    color: white;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

/* BUTTONS */
.btn-logout {
    background: #e74c3c !important;
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.btn-logout:hover {
    background: #c0392b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.btn-riwayat {
    background-color: #3498db;
    color: white;
    border: none;
    transition: all 0.3s;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-riwayat:hover {
    background-color: #2980b9;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* CARDS */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.stats-card {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-card h6 {
    opacity: 0.9;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-card h2 {
    font-weight: 700;
    margin-bottom: 0;
}

.card-pasien {
    border-left: 5px solid #0d6efd;
    border-radius: 10px;
    transition: all 0.3s;
}

.card-pasien:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* FORM SECTIONS */
.form-section {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border-top: 4px solid #27ae60;
}

.form-section h6 {
    color: #27ae60;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.label-custom {
    font-weight: 600;
    font-size: 0.8rem;
    color: #555;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    display: block;
}

.required-label::after {
    content: " *";
    color: #e74c3c;
}

.header-card {
    background: #fff;
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 5px solid #27ae60;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FORM CONTROLS */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.6rem 0.9rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.15);
    border-color: #27ae60;
}

.form-control-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.875rem;
}

/* TABLE STYLES */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #555;
    border: none;
    padding: 1rem;
}

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

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* BADGES */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 6px;
}

/* ALERTS */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.alert-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

/* LOGIN PAGE SPECIFIC */
.login-body {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.welcome-text {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-text h2 {
    font-weight: 700;
    letter-spacing: -1px;
}

.welcome-text p {
    opacity: 0.9;
    font-weight: 300;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.btn-success {
    background: linear-gradient(to right, #27ae60, #11998e);
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* FOOTER */
footer {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

footer.login-footer {
    background: rgba(0, 0, 0, 0.05);
    color: white;
}

/* UTILITIES */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.rounded-pill {
    border-radius: 50px !important;
}

.text-success {
    color: #27ae60 !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .user-info {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .table {
        font-size: 0.85rem;
    }
}

/* ANIMATION */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* LOADING SPINNER */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.header-bg { background: linear-gradient(45deg, #27ae60, #11998e); color: white; padding: 25px 0; border-radius: 0 0 20px 20px; margin-bottom: 25px; }
.card-custom { border: none; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 15px; }
.label-soap { font-weight: bold; color: #2c3e50; font-size: 0.75rem; text-transform: uppercase; display: block; margin-top: 10px; border-bottom: 1px solid #f0f0f0; padding-bottom: 2px; }
.evaluasi-box { background-color: #fff9e6; padding: 10px; border-radius: 8px; border: 1px dashed #ffd966; margin-top: 10px; }
.accordion-item { border: none; margin-bottom: 10px; border-radius: 12px !important; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.accordion-button { background-color: #fff; font-weight: 600; color: #27ae60; }
.accordion-button:not(.collapsed) { background-color: #e8f5e9; color: #1b5e20; box-shadow: none; }
.scroll-obat { max-height: 200px; overflow-y: auto; }
/* Style Tambahan Lab */
.btn-lab { color: #0d6efd !important; background-color: #f0f7ff !important; }

/* Merapatkan Tabel & Fix Layout */
.navbar {
    position: sticky !important;
    top: 0;
    z-index: 1060;
}

.breadcrumb-section {
    position: sticky !important;
    top: 56px; /* Sesuai tinggi navbar */
    z-index: 1050;
    background: #ffffff !important;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px !important;
}

/* Kerapatan baris tabel */
#tabel-monitoring td {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Memperbaiki jarak container agar tidak tertutup sticky header */
body {
    scroll-padding-top: 130px;
}
/* Perbaikan Tampilan Breadcrumb Navigasi */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E");
    vertical-align: middle;
}

.breadcrumb-item a {
    color: #27ae60 !important; /* Warna hijau khas Khanza */
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #1e8449 !important;
    text-decoration: underline !important;
}

.breadcrumb-item.active {
    color: #6c757d !important; /* Warna abu-abu untuk halaman yang sedang dibuka */
}