.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Gaya baru untuk pesan sukses di halaman login */
.login-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
    text-align: center;
}
/* General Body and Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
}

/* ================== LOGIN PAGE STYLES ================== */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f4f7f6;
}

.login-container {
    display: flex;
    width: 900px;
    max-width: 90%;
    min-height: 550px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.login-branding {
    width: 50%;
    padding: 50px;
    background: linear-gradient(135deg, #4a90e2, #50e3c2);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.login-branding h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.login-branding p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.login-form-container {
    width: 50%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

.login-form-container .subtitle {
    margin-bottom: 30px;
    color: #777;
}

.login-form .input-group {
    position: relative;
    margin-bottom: 25px;
}

.login-form .input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.login-form .input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #4a90e2;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #357abd;
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    text-align: center;
}


/* ================== MAIN APP LAYOUT STYLES ================== */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: #2c3e50;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
}

.content-inner {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo {
    padding: 20px;
    text-align: center;
    font-size: 1.8rem;
    background-color: #34495e;
}

.nav-menu {
    list-style: none;
    padding: 0;
    flex-grow: 1; /* Makes the menu fill available space */
    overflow-y: auto; /* PERBAIKAN: Menambahkan scroll vertikal jika menu terlalu panjang */
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s, padding-left 0.3s;
    border-left: 3px solid transparent;
}

.nav-menu li.active > a,
.nav-menu li a:hover {
    background-color: #34495e;
    border-left: 3px solid #50e3c2;
    padding-left: 25px;
}

.has-submenu > a .arrow {
    float: right;
    transition: transform 0.3s;
}

.nav-menu li.active > a .arrow {
    transform: rotate(-90deg);
}

.submenu {
    list-style: none;
    padding-left: 0;
    background-color: #1c2833;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.nav-menu li.active > .submenu {
    max-height: 500px; /* Adjust as needed */
}

.submenu li a {
    padding-left: 40px;
}

.submenu li.active a,
.submenu li a:hover {
    background-color: #2c3e50;
    padding-left: 45px;
}

.user-info {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #34495e;
}

.user-info span {
    display: block;
    margin-bottom: 10px;
}

.logout-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #e74c3c;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c0392b;
}


/* ================== GENERAL CONTENT STYLES ================== */

/* Header for content blocks */
.header-wrapper {
    padding-bottom: 15px; /* Jarak antara teks dan garis */
    margin-bottom: 20px; /* Jarak antara garis dan tabel */
    border-bottom: 1px solid #ddd; /* Warna garis */
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h2 {
    margin: 0; /* Hapus margin default dari h2 */
}

/* Action Bar for buttons above table */
.action-bar {
    display: flex;
    justify-content: flex-end; /* Posisikan tombol ke kanan */
    align-items: center;
    margin-bottom: 20px;
    gap: 10px; /* Jarak antar tombol */
}


/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: #4a90e2;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card .number {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Styled Tables */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.styled-table thead tr {
    background-color: #4a90e2;
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #4a90e2;
}

.styled-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Styling for action icons in tables */
.action-icons {
    text-align: center;
}

.action-icons a {
    text-decoration: none;
    margin: 0 8px; /* Spacing between icons */
    font-size: 1.1em; /* Slightly larger icons */
}

.action-icons i {
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.action-icons a:hover i {
    transform: scale(1.2);
    opacity: 0.7;
}

.action-icons .fa-edit {
    color: #007bff; /* Biru untuk edit */
}

.action-icons .fa-trash-alt {
    color: #dc3545; /* Merah untuk hapus */
}

.action-icons .fa-sitemap {
    color: #28a745; /* Hijau untuk sub-cabang */
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    color: white;
}
.status-aktif {
    background-color: #28a745; /* Hijau */
}
.status-resign {
    background-color: #dc3545; /* Merah */
}


/* Forms */
.form-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

/* Table Filters */
.table-filters .filter-input {
    width: 100%;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9em;
}


/* Buttons */
.btn {
    display: inline-flex; /* Menggunakan flexbox untuk alignment */
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    font-weight: 500;
}
.btn i {
    margin-right: 8px;
}

.btn:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* Export Dropdown */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.btn-export {
    background-color: #28a745; /* Warna hijau */
}
.btn-export:hover {
    background-color: #218838;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
}

.dropdown-content a i {
    margin-right: 10px;
}

.dropdown-content a:hover {
    background-color: #ddd;
}


/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.pagination a {
    color: #4a90e2;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #4a90e2;
    color: white;
    border: 1px solid #4a90e2;
}

.pagination a:hover:not(.active) {
    background-color: #f4f4f4;
}

/* Form 3 Kolom */
.form-grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
}

