/* app/static/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Palet Warna Pastel Baru yang Lebih Soft */
    --pastel-primary: #a7c957; /* Hijau alpukat lembut */
    --pastel-secondary: #f2e9e4; /* Krem hangat */
    --pastel-background: #fdfaf6; /* Latar belakang putih gading */
    --pastel-sidebar-bg: #e0eec6; /* Hijau zaitun sangat muda */
    --pastel-sidebar-text: #5c6e3b; /* Teks hijau tua */
    --pastel-sidebar-hover-bg: #d4e2b7; /* Hover hijau sedikit lebih tua */
    --pastel-sidebar-active-bg: var(--pastel-primary);
    --pastel-card-bg: #ffffff;
    --pastel-text: #4a4a4a; /* Teks abu-abu tua lembut */
    --pastel-shadow: rgba(0, 0, 0, 0.05);
    --pastel-info: #79a7d3; /* Biru langit lembut */
    --pastel-warning: #f8c971; /* Kuning mustard lembut */
    --pastel-danger: #e57373; /* Merah jambu lembut */
    --pastel-link: #64b5f6; /* Biru pastel untuk link */
}

body {
    background-color: var(--pastel-background);
    font-family: 'Inter', sans-serif;
    color: var(--pastel-text);
    display: flex;
}

.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--pastel-sidebar-bg);
    padding-top: 1.5rem;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar .sidebar-header {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar .sidebar-header h3 {
    color: var(--pastel-sidebar-text);
    font-weight: 700;
}

.sidebar ul.components {
    padding: 0;
    list-style: none;
}

.sidebar ul li a {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    display: block;
    color: var(--pastel-sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.sidebar ul li a:hover {
    background-color: var(--pastel-sidebar-hover-bg);
    border-left: 4px solid var(--pastel-primary);
    color: var(--pastel-text);
}

.sidebar ul li.active > a {
    background-color: var(--pastel-primary);
    font-weight: 600;
    color: #ffffff;
}

.sidebar ul li a i {
    margin-right: 10px;
}

.sidebar .sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.content {
    margin-left: 250px;
    padding: 2rem;
    width: calc(100% - 250px);
    min-height: 100vh;
    transition: all 0.3s;
}

.card {
    background-color: var(--pastel-card-bg);
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px var(--pastel-shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 6px var(--pastel-shadow);
}

.btn-primary {
    background-color: var(--pastel-primary);
    color: #ffffff;
}

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

.btn-secondary {
    background-color: var(--pastel-secondary);
    color: var(--pastel-text);
}

.btn-secondary:hover {
    background-color: #e4d1c9;
}

.btn-info {
    background-color: var(--pastel-info);
    color: #ffffff;
}

.btn-info:hover {
    background-color: #649ad0;
}

.btn-warning {
    background-color: var(--pastel-warning);
    color: #ffffff;
}

.btn-warning:hover {
    background-color: #f7b74e;
}

.btn-danger {
    background-color: var(--pastel-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #e06060;
}

/* =============== Gaya Halaman Login =============== */
.login-page-container {
    min-height: 100vh;
    background-color: var(--pastel-background);
}

.login-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--pastel-shadow);
}

.login-image-side {
    /* background: url('../img/img01.png') no-repeat center center; */
    background: url('../img/img01.png') no-repeat center center;
    background-size: cover;
}

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--pastel-card-bg);
}

.form-control {
    border-radius: 0.5rem;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: var(--pastel-primary);
    box-shadow: 0 0 0 0.2rem rgba(167, 201, 87, 0.25);
}

.alert {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #eaf6e0;
    border-color: #d4e2b7;
    color: #5c6e3b;
}

.alert-danger {
    background-color: #fce4e4;
    border-color: #e57373;
    color: #a43a3a;
}

.alert-warning {
    background-color: #fff8e8;
    border-color: #f8c971;
    color: #8c6d33;
}
.alert-info {
   background-color: #e1f5fe;
   border-color: #b3e5fc;
   color: #01579b;
}

/* =============== Gaya Tabel =============== */
.table {
    background-color: var(--pastel-card-bg);
    box-shadow: 0 4px 12px var(--pastel-shadow);
    border-radius: 0.75rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f9fafb;
    border-bottom: 2px solid #f2f2f2;
    color: var(--pastel-text);
}

.table tbody tr:nth-of-type(odd) {
    background-color: #fdfdfd;
}

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

.table td, .table th {
   border-top: 1px solid #f2f2f2;
}

.badge-info, .badge-warning, .badge-danger, .badge-secondary {
    color: #ffffff; /* Pastikan teks badge kontras */
}
.badge-info { background-color: var(--pastel-info); }
.badge-warning { background-color: var(--pastel-warning); }
.badge-danger { background-color: var(--pastel-danger); }
.badge-secondary { background-color: var(--pastel-secondary); color: var(--pastel-text); }

/* Penyesuaian Warna Bootstrap */
.text-danger {
    color: var(--pastel-danger) !important; 
}

/* =============== Aturan Responsif =============== */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px; 
    }
    .sidebar.active {
        margin-left: 0;
    }
    .content {
        width: 100%;
        margin-left: 0;
    }
}