/* style.css */
body {
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    min-height: 100vh;
    background-color: #f4f6f8;
    margin: 0;
    padding: 0;
}


h2, h3 {
    text-align: center;
    color: #a7a3a3;

}

a {
    text-decoration: none;
    color: #4CAF50;
}

a:hover {
    text-decoration: underline;
}

button, .btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    margin: 10px auto;
    font-size: 16px;
}

button:hover, .btn:hover {
    background-color: #45a049;
}

form {
    max-width: 500px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"], .submit-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #45a049;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

th {
    background-color: #4CAF50;
    color: white;
}

td a {
    color: #4CAF50;
    margin: 0 5px;
}

.logout-link {
    display: block;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    table, form {
        width: 100%;
        font-size: 14px;
    }

    button, .btn {
        width: 100%;
        font-size: 16px;
    }

    h2, h3 {
        font-size: 20px;
    }
}
/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout */
body {
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    min-height: 100vh;
    background-color: #f4f6f8;
}

/* Sidebar */



.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    background-color: #34495e;
    border-radius: 4px;
}

.sidebar ul li a:hover {
    background-color: #1abc9c;
}

/* Konten Utama */
.main-content {
    flex: 1;
    padding: 30px;
    background: #fff;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

th, td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #2c3e50;
    color: white;
}

/* Tombol */
button, .btn {
    padding: 8px 14px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    display: inline-block;
}

.btn:hover {
    background-color: #219150;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .main-content {
        padding: 15px;
    }
}
.notif {
    padding: 12px;
    background-color: #dff0d8;
    color: #3c763d;
    border-left: 6px solid #4CAF50;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    border-radius: 5px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0.95;
    animation: fadeout 2s ease-in-out forwards;
}

@keyframes fadeout {
    0% { opacity: 0.95; }
    70% { opacity: 0.95; }
    100% { opacity: 0; display: none; }
}
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2ecc71;
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0.95;
    animation: fadeout 2.5s ease-in-out forwards;
}

@keyframes fadeout {
    0% { opacity: 0.95; }
    70% { opacity: 0.95; }
    100% { opacity: 0; display: none; }
}
.btn.red {
    background-color: #c0392b;
}

.btn.red:hover {
    background-color: #a93226;
}
.full-width {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.btn.red {
    background-color: #c0392b;
}

.btn.red:hover {
    background-color: #a93226;
}
.popup-confirm {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-box {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.popup-buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  overflow-x: auto;
}

/* Sidebar default tersembunyi */
.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 220px;
  height: 100%;
  background-color: #2c3e50;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar.active {
  left: 0;
}




.sidebar h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #e74c3c;
}

.sidebar a {
  display: block;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.sidebar a:hover {
  background-color: #34495e;
}
.main-content {
  margin-left: 0;
  transition: margin-left 0.3s;
}

/* Jika sidebar aktif, beri ruang 220px */
.sidebar.active ~ .main-content {
  margin-left: 220px;
}



h1 {
  margin-bottom: 20px;
  color: #333;
text-align: center; /* ✅ Ini yang menengahkan */
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
}

th, td {
  padding: 12px;
  border: 1px solid #ccc;
  text-align: left;
}

th {
  background-color: #2c3e50;
  color: white;
}

.btn {
  padding: 10px 20px;
  background-color: #27ae60;
  color: white;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
}

.btn.red {
  background-color: #e74c3c;
}

.btn:hover {
  opacity: 0.9;
}

input[type="text"], input[type="password"], input[type="number"] {
  padding: 10px;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.popup {
  background-color: #2ecc71;
  color: white;
  padding: 10px;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
 /* Sidebar default tersembunyi */
.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 220px;
  height: 100%;
  background-color: #2c3e50;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar.active {
  left: 0;
}



.main-content {
  margin-left: 0;
  transition: margin-left 0.3s;
}

/* Jika sidebar aktif, beri ruang 220px */
.sidebar.active ~ .main-content {
  margin-left: 220px;
}



  table {
    font-size: 13px;
    width: 100%;
    overflow-x: auto;
    display: block;
  }

  .btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  h1 {
    font-size: 20px;
  }
}
.menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 26px;
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 5px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 220px;
        height: 100%;
        background-color: #2c3e50;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
  margin-left: 0;
  transition: margin-left 0.3s;
}

/* Jika sidebar aktif, beri ruang 220px */
.sidebar.active ~ .main-content {
  margin-left: 220px;
}


    .menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 26px;
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 5px;
    z-index: 1001;
    display: block; /* <-- ini kuncinya */
}

.sidebar ul ul {
    margin-top: 5px;
}

.sidebar ul ul li a {
    background-color: #3b4a5a;
    padding-left: 25px;
    font-size: 14px;
}


