/* ===== Reset & Global ===== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f9f9f9;
  color: #1a1a1a;
}

/* ===== Layout ===== */
.main-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.content {
  padding: 30px 40px;
  background-color: #ffffff;
  overflow-y: auto;
}

/* ===== Header & Footer ===== */
.app-header, .app-footer {
  background-color: #0b2a4a; /* biru tua elegan */
  color: #fff;
  padding: 15px 20px;
}

.app-header .center {
  font-size: 14px;
}

.app-footer {
  text-align: center;
  font-size: 13px;
  background-color: #0e355c; /* sedikit lebih terang */
}

/* ===== Sidebar ===== */
.sidebar {
  background-color: #0b2a4a;
  color: #fff;
  padding: 20px;
}

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

.sidebar .menu-item a {
  display: block;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.sidebar .menu-item a.active {
  background-color: #003f88;
  font-weight: bold;
}

.sidebar .menu-item a:hover {
  background-color: #003f88;
}

.submenu {
  display: none;
  padding-left: 15px;
}

.submenu.show {
  display: block;
}

/* ===== Bahasa Link / Dropdown ===== */
.lang-switcher select,
.lang-switcher a {
  color: #0c0c0c !important;
  background-color: transparent;
  border: 1px solid #fff;
  border-radius: 4px;
  padding: 4px 8px;
  text-decoration: none;
  cursor: pointer;
}

.lang-switcher select option {
  color: #000;
}

.lang-switcher a:hover {
  text-decoration: underline;
  color: #ddd;
}

/* ===== Table ===== */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.styled-table th {
  background-color: #0b2a4a;
  color: #fff;
  padding: 8px;
  text-align: left;
}

.styled-table td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.styled-table tr:nth-child(even) {
  background-color: #eef3f8;
}

.no-data {
  text-align: center;
  color: #666;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95em;
  border: none;
  transition: background-color 0.2s ease;
}

.btn-primary {
  background-color: #0056b3;
  color: #fff;
}

.btn-primary:hover {
  background-color: #003f88;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

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

/* Tombol sejajar */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* ===== Form ===== */
.form-control {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-box {
  max-width: 80%;
  margin: 20px auto;
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
   padding: 25px 40px;      /* beri ruang horizontal lebih besar */
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.two-columns .column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Responsif: otomatis jadi 1 kolom di layar kecil */
@media (max-width: 768px) {
  .two-columns {
    grid-template-columns: 1fr;
  }
}



/* ===== Notifications ===== */
.notif-box {
  margin-top: 15px;
}

.alert {
  padding: 10px;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* ===== Login Page ===== */
.login-container {
  max-width: 400px;
  margin: 60px auto;
  background: #fff;
  padding: 25px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.login-container h1 {
  margin-bottom: 10px;
  color: #0b2a4a;
}

.subtitle {
  color: #555;
  margin-bottom: 20px;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #999;
}

.login-container form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.login-container label {
  font-weight: bold;
  margin-bottom: 4px;
}

.login-container input.form-control {
  width: 100%;
  padding: 8px;
}

.login-container button.btn {
  margin-top: 10px;
  align-self: flex-start;
}
#menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

#menu-list li.sortable-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin-bottom: 5px;
    cursor: move;
    transition: background 0.2s ease;
}

#menu-list li.sortable-item:hover {
    background: #eef;
}

#menu-list li.sortable-item.ui-sortable-helper {
    background: #cce5ff;
    border-color: #66b0ff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#menu-list li.sortable-item.ui-sortable-placeholder {
    background: #e0e0e0;
    border: 2px dashed #aaa;
    visibility: visible !important;
    height: 40px;
}
/* Lebarkan area tab */
.nav-tabs {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  border-bottom: 2px solid #dee2e6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* bayangan lembut di bawah tab */
  background-color: #f8f9fa; /* warna latar tab */
  border-radius: 6px 6px 0 0;
  padding: 6px 10px;
}

/* Setiap tab melebar rata */
.nav-tabs .nav-item {
  flex: 1;
  text-align: center;
}

/* Gaya link tab */
.nav-tabs .nav-link {
  width: 100%;
  font-weight: 500;
  color: #0b2a4a;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  transition: all 0.2s ease-in-out;
}

/* Tab aktif */
.nav-tabs .nav-link.active {
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.08);
}

.two-columns {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr; /* kolom lebih lebar */
  gap: 30px; /* jarak antar kolom */
  align-items: start;
}

.two-columns .column {
  display: flex;
  flex-direction: column;
  gap: 18px; /* jarak antar field */
}

/* Lebarkan input dan textarea agar proporsional */
.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
}

/* Tambahkan bayangan lembut di area tab */
.tab-pane {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  background-color: #fff;
  padding: 20px;
}

/* Responsif: otomatis jadi 1 kolom di layar kecil */
@media (max-width: 768px) {
  .two-columns {
    grid-template-columns: 1fr;
  }
}
/* Area preview cropper */
#previewImage {
  max-width: 100%;
  border: 2px solid #007bff;
  border-radius: 6px;
  margin-top: 10px;
  background-color: #f8f9fa;
}

/* Tombol crop */
#cropButton {
  background-color: #198754;
  border: none;
  font-weight: 600;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#cropButton:hover {
  background-color: #157347;
}

/* Footer agar lebih kontras */
.app-footer {
  background-color: #f1f3f5;
  border-top: 1px solid #dee2e6;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: #495057;
}
