/* ==========================================================
   GLOBAL STYLES (Dipakai oleh semua halaman, termasuk Login)
   ========================================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9; /* Latar belakang abu-abu muda */
    margin: 0;
    color: #333;
}

.login-container {
            background: #ffffff;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px; /* Batasi lebar maksimum */
            text-align: center;
        }

        .login-container h2 {
            color: #38761d; /* Hijau Tua/Florist */
            margin-bottom: 25px;
            font-size: 1.8em;
            letter-spacing: 0.5px;
        }

/* Input dan Label */
        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #555;
        }

        .form-group input[type="text"],
        .form-group input[type="password"] {
            width: 100%;
            padding: 12px;
            border: 1px solid #ccc;
            border-radius: 6px;
            box-sizing: border-box; /* Penting untuk padding agar tidak melebihi lebar */
            font-size: 1em;
            transition: border-color 0.3s;
        }
        
        .form-group input[type="text"]:focus,
        .form-group input[type="password"]:focus {
            border-color: #70ad47; /* Hijau cerah saat fokus */
            outline: none;
            box-shadow: 0 0 5px rgba(112, 173, 71, 0.5);
        }

        /* Tombol Login */
        .login-container button {
            width: 100%;
            padding: 12px;
            background-color: #70ad47; /* Warna Hijau Utama */
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1.1em;
            font-weight: bold;
            transition: background-color 0.3s, transform 0.1s;
        }

        .login-container button:hover {
            background-color: #5b8e3a; /* Hijau sedikit lebih gelap saat hover */
        }
        
        .login-container button:active {
            transform: scale(0.99);
        }

        /* Pesan Error */
        .error-message {
            background-color: #fdd8d8;
            color: #d32f2f;
            padding: 10px;
            border-radius: 6px;
            margin-bottom: 15px;
            border: 1px solid #f9bdbd;
            font-size: 0.9em;
        }

        /* Responsiveness (Mobile) */
        @media (max-width: 600px) {
            .login-container {
                margin: 0 10px;
                padding: 20px;
                border-radius: 8px;
            }
            .login-container h2 {
                font-size: 1.5em;
            }
        }

/* CONTAINER untuk layout utama (tidak dipakai di login) */
.container {
    display: flex;
    min-height: calc(100vh - 70px); /* Kurangi tinggi header */
    padding-top: 70px; /* Jaga agar konten tidak tertutup header */
}

/* Form Input Style (Konsisten dengan Login) */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #70ad47; /* Hijau cerah saat fokus */
    outline: none;
    box-shadow: 0 0 5px rgba(112, 173, 71, 0.5);
}

/* Tombol Utama */
button[type="submit"], .btn-primary {
    padding: 10px 15px;
    background-color: #70ad47;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

button[type="submit"]:hover, .btn-primary:hover {
    background-color: #5b8e3a;
}

/* Tombol Sekunder */
.btn-secondary {
    padding: 10px 15px;
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none; /* Jika digunakan pada <a> */
    display: inline-block;
}

/* Pesan Error dan Success */
.error-message, .success-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
}
.error-message {
    background-color: #fdd8d8;
    color: #d32f2f;
    border: 1px solid #f9bdbd;
}
.success-message {
    background-color: #c8e6c9;
    color: #38761d;
    border: 1px solid #a5d6a7;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-info {
    display: inline-block;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none; /* Penting untuk tag <a> */
    font-weight: bold;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 1em;
}

/* ========================================================== */
/* 1. Tombol Merah (btn-danger) - Untuk Aksi Hapus/Batal */
/* ========================================================== */
.btn-danger {
    /* Merah Solid */
    background-color: #dc3545; /* Merah Standar Bootstrap */
    color: white; 
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
}

.btn-danger:hover {
    background-color: #c82333; /* Merah Lebih Gelap saat di-hover */
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.6);
}

/* ========================================================== */
/* 2. Tombol Kuning (btn-info) - Untuk Aksi Informasi/Cetak/Netral */
/* ========================================================== */
.btn-info {
    /* Kuning Muda/Cyan (Info Standar) */
    background-color: #ffc107; /* Kuning (Amber/Yellow) */
    color: #343a40; /* Warna teks gelap agar terbaca di background terang */
    border: 1px solid #ffc107;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.4);
}

.btn-info:hover {
    background-color: #e0a800; /* Kuning Lebih Gelap saat di-hover */
    border-color: #e0a800;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.6);
}

/* ==========================================================
   HEADER & NAVBAR DASHBOARD
   ========================================================== */
.main-header {
    background-color: #38761d; /* Hijau Tua */
    color: white;
    padding: 15px 30px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info span {
    margin-right: 20px;
    font-size: 0.9em;
}

.logout-btn {
    color: #ffccbc; /* Merah muda lembut */
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ffccbc;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.logout-btn:hover {
    background-color: #ffccbc;
    color: #38761d;
}


/* SIDEBAR (NAV) */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar h3 {
    color: #70ad47;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.menu-list {
    list-style: none;
    padding: 0;
}

.menu-item a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.menu-item a:hover {
    background-color: #f0f0f0;
    color: #70ad47;
    padding-left: 5px;
}

.menu-separator {
    border: 0;
    height: 1px;
    background: #f0f0f0;
    margin: 15px 0;
}

/* ==========================================================
   MAIN CONTENT & CARD DASHBOARD
   ========================================================== */
.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #f9f9f9;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

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

.card h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #38761d;
}

.card-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 5px 0 10px;
}

.card small {
    color: #777;
    font-style: italic;
}

/* Warna Card Spesifik */
.card-order-baru { border-left: 5px solid #ff9800; /* Orange */ }
.card-produksi { border-left: 5px solid #2196f3; /* Biru */ }
.card-pengiriman { border-left: 5px solid #ffeb3b; /* Kuning */ }
.card-revenue { border-left: 5px solid #4caf50; /* Hijau */ }

.quick-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

/* ==========================================================
   FORM & TABLE STYLES (Untuk Konsistensi CRUD)
   ========================================================== */

/* Kontainer Full Width (untuk halaman tanpa sidebar) */
.container-full {
    padding-top: 70px; /* Jaga agar konten tidak tertutup header */
    padding-left: 30px;
    padding-right: 30px;
}

/* Card untuk Form */
.form-card {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.button-group button {
    margin-right: 10px;
}

/* Tabel Data Standar */
.table-responsive {
    overflow-x: auto; /* Untuk memastikan tabel bisa di-scroll horizontal di mobile */
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #e0f2f1; /* Warna header tabel */
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

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

/* Tombol Aksi dalam Tabel */
.btn-action {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 2px 0;
}
.edit-btn { background-color: #ffc107; color: #333; }
.delete-btn { background-color: #f44336; color: white; }

/* ==========================================================
   RESPONSIVE TABLE (MOBILE OPTIMIZATION)
   ========================================================== */
@media screen and (max-width: 600px) {
    .container-full {
        padding: 70px 10px 10px 10px;
    }
    
    .data-table {
        border: 0;
    }

    .data-table thead {
        display: none; /* Sembunyikan header tabel */
    }

    .data-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        padding: 10px;
    }

    .data-table td {
        display: block;
        text-align: right !important;
        border-bottom: 1px dotted #ccc;
        font-size: 0.9em;
        padding-left: 50%;
        position: relative;
    }

    .data-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #555;
    }

    .data-table td:last-child {
        border-bottom: 0;
    }
    
    .button-group button, .button-group .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ==========================================================
   MANAJEMEN KARYAWAN & USER SPESIFIC STYLES
   ========================================================== */

/* Layout 2 kolom untuk Form (Desktop) */
.card-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Info Box */
.info-box {
    background-color: #e3f2fd; /* Biru muda */
    border-left: 5px solid #2196f3;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

/* Role Badge */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    color: white;
    display: inline-block;
}

.role-admin { background-color: #e53935; } /* Merah */
.role-keuangan { background-color: #ff9800; } /* Oranye */
.role-produksi { background-color: #4caf50; } /* Hijau */
.role-driver { background-color: #1e88e5; } /* Biru */
.role-karyawan { background-color: #6d4c41; } /* Coklat */
.role-none { background-color: #ccc; color: #555; } /* Abu-abu */

/* Tombol Khusus Buat Akun */
.btn-action.add-user-btn {
    background-color: #00bcd4; /* Cyan */
    color: white;
}
.btn-action.add-user-btn:hover {
    background-color: #0097a7;
}

/* Responsiveness untuk 2 Kolom */
@media (max-width: 900px) {
    /* Di layar kecil, ubah grid menjadi satu kolom */
    .card-grid-2 {
        grid-template-columns: 1fr;
    }
}
/* Pastikan responsive table styling dari jawaban sebelumnya sudah ada di style.css */

/* ==========================================================
   MANAJEMEN CABANG SPESIFIC STYLES
   ========================================================== */

/* Grup Form Inline (untuk Kode Pos dan Status) */
.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    display: inline-block;
    text-transform: uppercase;
}

.status-active { 
    background-color: #4caf50; /* Hijau */
}
.status-inactive { 
    background-color: #f44336; /* Merah */
}

/* Responsiveness untuk Grup Inline */
@media (max-width: 600px) {
    /* Di layar kecil, ubah grid inline menjadi satu kolom */
    .form-group-inline {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Pastikan style untuk .container-full, .form-card, .data-table, .table-responsive, dan media query untuk tabel sudah ada (dari jawaban sebelumnya). */

/* Status Badge untuk Tabel Laporan */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    display: inline-block;
    text-transform: uppercase;
}
.status-lunas { background-color: #4caf50; } /* Hijau */
.status-belum-lunas { background-color: #f44336; } /* Merah */
.status-sebagian { background-color: #ff9800; } /* Oranye */
.status-invoice-dibuat { background-color: #2196f3; } /* Biru */

/* Pastikan class dasar seperti .container-full, .main-content, .card, .form-group, .btn-primary, .info-text, dll. sudah ada */

/* Gaya Khusus untuk Input Order */
.order-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dua kolom di desktop */
    gap: 20px;
}

.order-form-grid .card {
    margin: 0;
}

.single-column-card {
    grid-column: 1 / -1; /* Mengambil seluruh lebar di grid */
}

.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.input-readonly {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.btn-large {
    padding: 12px 25px;
    font-size: 1.1em;
}

/* Responsiveness: Ubah menjadi satu kolom di layar kecil */
@media (max-width: 768px) {
    .order-form-grid {
        grid-template-columns: 1fr;
    }
    .form-group-inline {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   RESPONSIVENESS
   ========================================================== */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 10px 20px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    .menu-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .menu-item {
        /* Tambahkan style untuk menu horizontal */
        border: 1px solid #eee;
        border-radius: 4px;
    }
    .menu-item a {
        padding: 8px 12px;
    }
    .menu-separator {
        display: none; /* Sembunyikan garis pemisah di mobile */
    }
    
    .main-header .user-info {
        display: none; /* Sembunyikan di mobile agar header tidak terlalu penuh */
    }
    .main-header h1 {
        font-size: 1.4em;
    }
    .main-content {
        padding: 20px;
    }
}