/* ========= VARIABEL DASAR ========= */
:root {
  --as-bg: #160a22;
  --as-card: #2b153b;
  --as-card-soft: #3a234b;
  --as-primary: #9f5dff;
  --as-primary-soft: #5f5dff;
  --as-accent: #4caf50;
  --as-danger: #e74c3c;
  --as-text-main: #ffffff;
  --as-text-muted: #c9bde4;
  --as-radius-lg: 20px;
  --as-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

/* ========= GLOBAL BACKGROUND ========= */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--as-bg);
  color: var(--as-text-main);
}

/* ========= BUTTON ========= */
.as-btn {
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.as-btn-primary {
  background: linear-gradient(135deg, #5f5dff, #9f5dff);
  color: #fff;
}
.as-btn-outline {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
}

/* ========= MAIN LAYOUT ADMIN ========= */
.admin-main {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.admin-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ========= CARD ========= */
.admin-card {
  background: var(--as-card);
  border-radius: var(--as-radius-lg);
  box-shadow: var(--as-shadow-lg);
  padding: 18px 22px 20px;
  margin-bottom: 16px;
}

/* ========= FORM TAMBAH TUGAS ========= */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 16px 20px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--as-text-muted);
}

.admin-input,
.admin-textarea,
.admin-select {
  border-radius: 12px;
  border: 1px solid #5c466f;
  background: #1f122d;
  color: #fff;
  padding: 8px 10px;
  font-size: 14px;
}

.admin-textarea {
  min-height: 72px;
  resize: vertical;
}

.admin-input[type="file"] {
  padding: 6px 10px;
  font-size: 13px;
}

/* Baris tombol */
.admin-form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* ========= TABEL TUGAS ========= */
.admin-table-wrapper {
  margin-top: 6px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table thead {
  background: var(--as-card-soft);
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-table th {
  font-weight: 600;
  color: var(--as-text-muted);
  text-align: left;
}

.admin-table tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.08);
}

/* Status pill di tabel */
.admin-status-pill {
  display: inline-block;
  min-width: 80px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.admin-status-menunggu {
  background: #5c6bc0;
}
.admin-status-diproses {
  background: #ffa000;
  color: #222;
}
.admin-status-selesai {
  background: #43a047;
}
.admin-status-tertutup {
  background: #c62828;
}

/* Link Edit */
.admin-table a.admin-link {
  color: #80d8ff;
  text-decoration: none;
}
.admin-table a.admin-link:hover {
  text-decoration: underline;
}

/* ========= ERROR / SUCCESS MESSAGE ========= */
.admin-alert {
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}
.admin-alert-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--as-danger);
  color: #ffb3b3;
}
.admin-alert-success {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid #2ecc71;
  color: #b9f6ca;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
  .as-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .as-tagline {
    display: none;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-table thead th {
    text-align: left;
    font-weight: 600;
    color: #f5f5f5;
}

.admin-table-compact td,
.admin-table-compact th {
    padding-top: 4px;
    padding-bottom: 4px;
}

.row-muted {
    opacity: 0.55;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.badge-success {
    background: #2ecc71;
    color: #111;
}

.badge-muted {
    background: #555;
    color: #eee;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Paksa pakai style global seperti index.php */
.as-topbar {
    padding: 8px 24px;
    height: auto;
}

.as-sidebar{
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  transform: translateX(-260px);
  transition: transform .25s ease;
  z-index: 6000;
}

.as-sidebar.is-open{
  transform: translateX(0);
}

/* overlay */
.as-sidebar-overlay{
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 5500;
}

body.sidebar-open .as-sidebar-overlay{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.as-sidebar{ transform: translateX(-260px); }
.as-sidebar.is-open{ transform: translateX(0); }

