/* ==========================================================
   ACE SHOP – CSS FINAL CLEAN VERSION
   Dibersihkan, dirapikan, duplikasi dihapus, flex layout stabil
   ========================================================== */

/* ===== ROOT ===== */
:root {
    --primary: #1976d2;
    --primary-dark: #115293;
    --bg-dark: #160a22;
    --card-bg: #ffffff;
    --radius: 14px;
    --shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ===== GENERAL ===== */
body {
    margin: 0;
    font-family: system-ui, sans-serif;
}

/* THEME DARK */
body.theme-aceshop {
    background: var(--bg-dark);
    color: #fff;
}

/* ==========================================================
   TOPBAR
   ========================================================== */
.as-topbar {
    background: #2b193d;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.as-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.as-burger span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 4px 0;
    background: #fff;
    border-radius: 3px;
}

.as-logo-text {
    font-weight: 700;
}

.as-topbar-right a {
    text-decoration: none;
}

/* Buttons – versi rapi */
.as-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

/* Primary = ungu utama (misal tombol Masuk, dll) */
.as-btn-primary {
    background: #7B61FF;
    color: #fff;
}

.as-btn-primary:hover {
    background: #9276ff;
}

/* Secondary = tombol "Kerjakan" (glass soft, tidak terlalu putih) */
.as-btn-secondary {
    background: #5e3ba5;
    color: #fff;
}

.as-btn-secondary:hover {
    background: #7b52cc;
}

/* Outline jika masih dipakai di tempat lain */
.as-btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

/* ==========================================================
   MAIN LAYOUT
   ========================================================== */
.as-main {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ==========================================================
   BANNER SLIDER
   ========================================================== */
.as-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.as-slider-wrapper {
    display: flex;
    transition: 0.4s ease;
}

.as-slide {
    flex: 0 0 100%;
    height: 360px;
}

.as-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nav buttons */
.as-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #fff;
    background: rgba(0,0,0,0.4);
    padding: 8px 12px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    user-select: none;
}

.as-prev { left: 12px; }
.as-next { right: 12px; }

/* Pagination dots */
.as-dots {
    position: absolute;
    width: 100%;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.as-dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.as-dot.active {
    background: #fff;
}

/* ==========================================================
   TASK LIST
   ========================================================== */
.as-task-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.as-task-card {
    background: #2b153b;
    border-radius: 24px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Bar icon marketplace di dalam kartu tugas */
.as-task-marketplaces {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* Bungkus icon bulat */
.as-mp-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gambar icon */
.as-mp-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Marketplace aktif = terang */
.as-mp-icon.is-active {
    opacity: 1;
}

/* Marketplace tidak dipilih admin = redup */
.as-mp-icon.is-inactive {
    opacity: 0.25;
    filter: grayscale(0.5);
}

.as-mp-icon.is-active {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.16);
}


/* Thumbnail */
.as-task-thumb {
    width: 110px;
    height: 110px;
    background: #ffffff12;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-task-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.as-task-body {
    flex: 1;
    min-width: 0;
}

/* Title */
.as-task-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.as-task-subtitle {
    font-size: 14px;
    color: #cfc1ea;
}

/* Status & buttons */
.as-task-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 110px;
    gap: 10px;
}

.as-status-pill {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.as-status-open { background: #27ae60; }
.as-status-closed { background: #d93025; }

/* CLOSED EFFECT */
.as-task-card--closed {
    opacity: 0.45;
    filter: grayscale(.4);
}

.as-task-card--closed .as-task-btn {
    pointer-events: none;
    cursor: not-allowed;
    background: #666 !important;
    color: #ddd !important;
}

/* Badges */
.as-badge-new {
    background: #ff4757;
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 6px;
    font-weight: 700;
}

.as-badge-new {
    background: #ff4757;
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 6px;
    font-weight: 700;
    animation: badgePulse 1.2s ease-in-out infinite;
}

/* Efek glow halus untuk kartu tugas baru (24 jam terakhir) */
.as-task-card--new {
    animation: newTaskGlow 1.6s ease-in-out infinite alternate;
}

@keyframes newTaskGlow {
    from {
        box-shadow: 0 0 0 rgba(124, 92, 255, 0.0);
    }
    to {
        box-shadow: 0 0 20px rgba(124, 92, 255, 0.55);
    }
}

/* Pulse kecil di badge NEW */
@keyframes badgePulse {
    0%   { transform: scale(1);   opacity: 1;   }
    50%  { transform: scale(1.08); opacity: 0.85; }
    100% { transform: scale(1);   opacity: 1;   }
}


/* link brand di topbar (logo + teks) */
.as-brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

/* kalau belum ada di main.css, boleh tambahkan juga: */
.as-brand-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.as-brand-text {
    display: flex;
    flex-direction: column;
}

.as-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #2a143d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    z-index: 999;
}

.as-topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.as-burger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 4px 0;
    background: white;
    border-radius: 3px;
}

.as-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.as-logo {
    width: 35px;
    height: 35px;
}

.as-title {
    font-size: 18px;
    color: white;
    font-weight: bold;
}

.as-subtitle {
    font-size: 12px;
    color: #dcdcdc;
}

.as-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.as-user {
    color: white;
    font-size: 14px;
}

/* ========== SIDEBAR ========== */
.as-sidebar {
    position: fixed;
    top: 70px; /* di bawah topbar */
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    background: #201033;
    box-shadow: 4px 0 18px rgba(0,0,0,0.4);
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    z-index: 900;
    display: flex;
    flex-direction: column;
}

body.as-sidebar-open .as-sidebar {
    transform: translateX(0);
}

.as-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.as-sidebar-title {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.as-sidebar-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #aaa;
    cursor: pointer;
}

.as-sidebar-user {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.as-sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.as-sidebar-user-role {
    color: #b5a7ff;
    font-size: 12px;
}

.as-sidebar-nav {
    padding: 10px 8px 16px;
    overflow-y: auto;
    flex: 1;
}

.as-nav-section-title {
    color: #8f8f8f;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 12px 10px 4px;
}

.as-nav-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    margin: 2px 4px;
    color: #d6d6d6;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}

.as-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.as-nav-item.active {
    background: linear-gradient(90deg, #7B61FF, #a37bff);
    color: #fff;
}

.as-nav-icon {
    width: 24px;
    text-align: center;
    margin-right: 8px;
}

.as-sidebar-overlay {
    position: fixed;
    inset: 70px 0 0 0; /* di bawah topbar */
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 850;
}

body.as-sidebar-open .as-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Di layar lebar, konten bisa digeser sedikit kalau mau */
@media (min-width: 1024px) {
    body.as-sidebar-open .page-content {
        margin-left: 260px;
        transition: margin-left .25s ease-out;
    }
}

/* ====== IMAGE SLIDER BANNER ====== */
.as-section--slider {
    margin-bottom: 10px;
}

.as-slider {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 0 25px rgba(0,0,0,0.4);
}

.as-slide-track {
    display: flex;
    transition: transform 0.6s ease;
}

.as-slide img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.as-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    font-size: 32px;
    padding: 6px 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(4px);
    line-height: 1;
}

.as-slider-btn:hover {
    background: rgba(0,0,0,0.75);
}

.as-slider-btn.prev { left: 15px; }
.as-slider-btn.next { right: 15px; }


/* ========== POPUP KONFIRMASI TUGAS ========== */
.tc-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.tc-modal.is-visible {
    display: flex;
}

.tc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.tc-modal-box {
    position: relative;
    max-width: 900px;
    width: 90%;
    padding: 40px 60px 32px;
    border-radius: 24px;
    background: #1c1327;     /* solid gelap — tidak transparan */
    color: #fff;
    box-shadow: 0 0 50px rgba(0,0,0,0.6);
}

.tc-modal-title {
    text-align: center;
    font-size: 26px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}

.tc-modal-text {
    text-align: center;
    margin-bottom: 24px;
    font-size: 15px;
}

.tc-checkbox-group {
    margin-bottom: 12px;
}

.tc-checkbox-group-bottom {
    margin-top: 26px;
    margin-bottom: 30px;
}

.tc-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    font-size: 15px;
}

.tc-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.tc-modal-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 10px;
}

.tc-modal-actions .as-btn {
    min-width: 180px;
}

/* Tombol OK = hijau */
.tc-btn-ok {
    background: #28a745 !important; /* hijau */
    color: #fff !important;
}

.tc-btn-ok:hover {
    background: #32c35c !important; /* hijau lebih terang */
}

/* Saat modal terbuka, jangan scroll body */
body.tc-modal-open {
    overflow: hidden;
}

.tc-btn-back {
    background: #6c52d9 !important;
    color: #fff !important;
}

.tc-btn-back:hover {
    background: #7b63f0 !important;
}

/* Normalisasi tampilan checkbox di pop-up */
.tc-checklist label {
    font-size: 14px;        /* samakan ukuran */
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    white-space: normal;     /* pastikan teks wrap normal */
}

.tc-checklist label span {
    font-size: 14px;
    line-height: 1.4;
}

/* ==== GLOBAL TOPBAR FIX (SAMA SEPERTI INDEX) ==== */

/* tinggi & padding topbar */
header.as-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 24px !important;   /* lebih tipis dari sebelumnya */
    background: #2b193d;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* susunan logo + teks */
header.as-topbar .as-brand-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ukuran logo */
header.as-topbar .as-logo-img {
    width: 36px !important;
    height: 36px !important;
    object-fit: cover;
    border-radius: 6px;
}

/* teks ACE SHOP */
header.as-topbar .as-logo-text {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.1;
}

/* tagline kecil di bawah logo */
header.as-topbar .as-tagline {
    font-size: 11px;
    line-height: 1.2;
    margin-top: 2px;
}

/* ===========================
   TOPBAR ACE SHOP – FINAL
   =========================== */

header.as-topbar {
    position: fixed;          /* kalau mau seperti index, bar nempel di atas */
    top: 0;
    left: 0;
    right: 0;
    height: 64px;             /* tinggi bar */
    padding: 0 24px;          /* tanpa padding vertikal, biar benar2 center */
    background: #2b193d;
    color: #fff;
    display: flex;
    align-items: center;      /* center vertikal logo + teks */
    justify-content: space-between;
    z-index: 999;
}

/* kiri topbar: burger + brand */
.as-topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ==== BURGER MENU – versi rapat (seperti sebelumnya) ==== */
.as-burger {
    display: flex;
    flex-direction: column;
    gap: 1px;
    cursor: pointer;
}

/* link brand (logo + teks) */
.as-brand-link {
    text-decoration: none;
    color: inherit;
}
.as-brand-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* LOGO – diperbesar */
.as-logo-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* wadah teks ACE SHOP + tagline */
.as-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;  /* tepinya lurus */
    line-height: 1.2;
}

/* ACE SHOP */
.as-logo-text {
    font-size: 18px;
    font-weight: 700;
    margin: 0 !important;     /* buang margin lama kalau ada */
    line-height: 1.1;
}

/* tagline di bawah ACE SHOP */
.as-tagline {
    font-size: 12px;
    opacity: 0.9;
    margin: 2px 0 0 0 !important;  /* tepat di bawah, tanpa miring/mundur */
    line-height: 1.2;
}

/* kanan topbar */
.as-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

header.as-topbar .as-logo-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 6px;
}

.as-nav-heading {
    font-weight: 600;
    cursor: default;
}

.as-nav-sub {
    padding-left: 40px; /* geser ke dalam */
    font-size: 13px;
    opacity: 0.9;
}

/* blok user di kanan topbar */
.as-user-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* avatar foto profil kecil */
.as-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.45);
    background: #4b2b7f;
}

/* placeholder kalau belum ada foto */
.as-user-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* teks "akun : karyawan1" */
.as-user-name {
    font-size: 14px;
}

.as-sidebar-user-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.as-sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

.as-sidebar-avatar--placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #6b4bb1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #fff;
}

.panduan-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-family: inherit;
}

.panduan-modal.is-open {
    display: flex;
}

.panduan-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.panduan-dialog {
    position: relative;
    background: #1d1230;
    color: #fff;
    border-radius: 20px;
    padding: 24px 28px 28px;

    /* ⬇️ INI YANG MEMBESARKAN */
    max-width: 900px;        /* desktop besar */
    width: 95vw;             /* hampir full layar */
    max-height: 90vh;        /* tidak keluar layar */
    overflow: hidden;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
    z-index: 1;
}


.panduan-title {
    font-size: 22px;
    font-weight: 700;
}


.panduan-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: #ffffffaa;
    font-size: 26px;
    cursor: pointer;
}

.panduan-slider-wrapper {
    position: relative;
    overflow: hidden;
}

.panduan-slider {
    display: flex;
    transition: transform 0.35s ease;
}

.panduan-slide {
    min-width: 100%;
    opacity: 0.1;
    transform: scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
    text-align: center;
}

.panduan-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.panduan-image {
    width: 100%;
    max-height: 420px;     /* ⬅️ gambar jauh lebih besar */
    object-fit: contain;  /* tidak terpotong */
    border-radius: 16px;
    margin-bottom: 14px;
}

.panduan-caption h3 {
    font-size: 18px;
}

.panduan-caption p {
    font-size: 15px;
    line-height: 1.6;
}

.panduan-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #5b3be6;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.panduan-nav.prev { left: 8px; }
.panduan-nav.next { right: 8px; }

.panduan-nav:hover {
    opacity: 1;
}

.panduan-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.panduan-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: #4c3c99;
    cursor: pointer;
}

.panduan-dots .dot.is-active {
    width: 26px;
    background: #bb86ff;
}

@media (max-width: 480px) {
    .panduan-dialog {
        margin: 0 10px;
        padding: 16px;
    }
}

/* ===== Modal Syarat & Ketentuan ===== */
.sk-modal { display:none; position:fixed; inset:0; z-index:9999; }
.sk-modal.is-open { display:block; }

.sk-backdrop{
  position:absolute; inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}

.sk-dialog{
  position:relative;
  max-width: 880px;
  width: calc(100% - 28px);
  margin: 52px auto;
  border-radius: 18px;
  background: rgba(20, 10, 35, .92);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  padding: 18px 18px 14px;
  color: #eae7ff;
}

.sk-close{
  position:absolute; top:10px; right:12px;
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 22px;
  cursor:pointer;
}

.sk-title{ margin: 8px 44px 4px 0; font-size: 20px; }
.sk-subtitle{ margin:0 44px 12px 0; opacity:.8; font-size: 13px; }

.sk-content{
  max-height: 55vh;
  overflow:auto;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}

.sk-content h3{ margin: 12px 0 6px; font-size: 14px; }
.sk-content ul{ margin: 0 0 8px 18px; }
.sk-content li{ margin: 6px 0; opacity:.95; }

.sk-footer{
  margin-top: 12px;
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.sk-check{
  display:flex; gap: 10px; align-items:center;
  font-size: 13px;
  opacity:.95;
}

.sk-actions{ display:flex; gap: 10px; }

.sk-btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor:pointer;
}

.sk-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.sk-btn-primary{
  background: linear-gradient(135deg, rgba(120,80,255,.95), rgba(60,210,255,.75));
  border-color: rgba(255,255,255,.10);
}

.sk-btn-ghost{
  background: rgba(255,255,255,.04);
}

@media (max-width: 520px){
  .sk-dialog{ margin: 18px auto; }
  .sk-content{ max-height: 60vh; }
}
.panduan-slider-wrapper {
    max-height: 75vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .panduan-dialog {
        max-width: 98vw;
        max-height: 92vh;
        padding: 16px;
        border-radius: 16px;
    }

    .panduan-image {
        max-height: 300px;
    }
}

/* ===== IMAGE ZOOM FULLSCREEN (Panduan) ===== */
.panduan-image-zoom{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.panduan-image-zoom.is-open{ display:flex; }

.panduan-image-zoom-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.9);
}

.panduan-image-zoom img{
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.9);
  cursor: zoom-out;
}

.panduan-zoom-close{
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  border: none;
  background: rgba(255,255,255,0.15);
  color:#fff;
  font-size: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.panduan-zoom-close:hover{
  background: rgba(255,255,255,0.3);
}

.sk-note{
  display:flex;
  gap:12px;
  align-items:flex-start;
  background: rgba(25,118,210,.08);
  border: 1px solid rgba(25,118,210,.18);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.sk-badge{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(25,118,210,.16);
}
.sk-linkrow{ margin-top: 14px; }
.sk-link{ text-decoration:none; font-weight:600; }

.as-sidebar{ transform: translateX(-260px); }
.as-sidebar.is-open{ transform: translateX(0); }

/* 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;
}

/* =========================
   DESKTOP-FIRST SIDEBAR
   ========================= */

:root{ --sidebar-w: 260px; }

/* Sidebar base */
.as-sidebar{
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 6000;
  transition: transform .25s ease;
  will-change: transform;
}

/* Overlay base */
.as-sidebar-overlay{
  position: fixed;
  inset: 0;
  z-index: 5500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.as-task-card{
  position: relative;
}
/* =========================
   BADGE OPEN/CLOSED FIX: pojok kanan atas CARD
   ========================= */

/* 1) card jadi anchor */
.as-task-card{
  position: relative !important;
}

/* 2) badge dipaksa absolute ke kanan atas card */
.as-task-card > .as-task-right > .as-status-pill{
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 50 !important;
  margin: 0 !important;
}


/* 4) biar tombol kerjakan tidak ketabrak badge, kasih jarak atas pada body */
.as-task-body{
  padding-right: 120px; /* ruang untuk badge di kanan */
}

/* =========================================
   FINAL: BADGE OPEN/CLOSED DI POJOK KANAN ATAS CARD
   ========================================= */

/* card jadi anchor */
.as-task-card{
  position: relative !important;
}

/* badge selalu pojok kanan atas card */
.as-task-card .as-status-pill{
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 999 !important;
  margin: 0 !important;
}

/* jangan pakai relative di thumb (hapus efek nempel kiri) */
.as-task-thumb{
  position: static !important;
}

/* biar teks tidak ketiban badge */
.as-task-body{
  padding-right: 140px !important;
}

/* supaya tombol "Kerjakan" tetap rapi di kanan bawah */
.as-task-right{
  width: 260px;              /* ruang kanan untuk tombol */
  align-items: flex-end;
}

/* mobile tweak */
@media (max-width: 768px){
  .as-task-card .as-status-pill{
    top: 10px !important;
    right: 10px !important;
    font-size: 11px;
    padding: 5px 12px;
  }
  .as-task-body{
    padding-right: 120px !important;
  }
  .as-task-right{
    width: 210px;
  }
}

.as-task-card{ position: relative !important; }

.as-status-pin{
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 9999 !important;
  margin: 0 !important;
}

/* teks "Tugas ditutup" benar2 center di dalam card */
.as-task-card--closed{
  position: relative;
}

.as-task-card--closed .as-task-right{
  width: 100%;
  min-width: 0 !important;
  align-items: center !important;
}

.as-task-card--closed .as-task-closed-note{
  display: block;
  width: 100%;
  text-align: center !important;
  margin: 12px 0 0 0;
  font-weight: 600;
  opacity: .85;
}

/* pastikan card jadi anchor */
.as-task-card{ position: relative; }

/* badge pojok kanan atas */
.as-status-pin{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1000;
  margin: 0;
}

/* khusus closed: bikin area kanan jadi full lebar untuk teks */
.as-task-card--closed .as-task-right{
  width: 100% !important;
  min-width: 0 !important;
  align-items: center !important;
}

/* bikin badge nempel ke card, bukan ke layar */
.as-task-card{
  position: relative;      /* WAJIB */
  overflow: hidden;        /* opsional: biar badge gak keluar radius card */
}

/* posisinya tetap pojok kanan atas card */
.as-task-card .as-status-pill{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  margin: 0;
}

/* ===== Opsi B Aman: badge ikut alur, tanpa ubah layout card ===== */

/* biarkan card tetap layout horizontal */
.as-task-card{
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 20px;
}

/* badge ikut alur (tidak absolute) */
.as-task-card .as-status-pill{
  position: static !important;
  flex: 0 0 auto;            /* jangan menyusut */
  align-self: flex-start;    /* nempel atas */
  margin: 0 8px 0 0;         /* jarak ke thumb */
}

/* supaya badge terlihat "nempel" ke kartu (bukan mengambang jauh) */
.as-task-card{
  padding-top: 22px;         /* tetap */
}
/* =========================
   SAMAKAN TOMBOL MODAL (Kembali vs Ya)
   ========================= */

/* pastikan kedua tombol punya ukuran sama */
.tc-modal-actions .btn-admin{
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
}

/* tombol kembali: pill + ungu (bukan kotak) */
.tc-modal-actions .btn-admin-outline,
.tc-modal-actions .tc-btn-back{
  background: linear-gradient(135deg,#7B61FF,#9F5DFF) !important;
  border: 0 !important;
  box-shadow: 0 0 14px rgba(123,97,255,.35) !important;
  color: #fff !important;
}

/* hover biar konsisten */
.tc-modal-actions .btn-admin-outline:hover,
.tc-modal-actions .tc-btn-back:hover{
  filter: brightness(1.08);
}

/* tombol OK tetap hijau pill (punyamu sudah) */
.tc-modal-actions .btn-admin-green,
.tc-modal-actions .tc-btn-ok{
  border: 0 !important;
  border-radius: 999px !important;
}

/* supaya konten tidak ketiban topbar */
.page-content,
.as-main{
  padding-top: var(--topbar-h);
}

.as-main{
  padding-top: 70px;
}

/* DEFAULT: sidebar tertutup */
.as-sidebar{
  transform: translateX(-100%);
}

/* saat dibuka (class di body) */
body.as-sidebar-open .as-sidebar{
  transform: translateX(0);
}

/* overlay hanya aktif saat open */
.as-sidebar-overlay{
  opacity: 0;
  pointer-events: none;
}
body.as-sidebar-open .as-sidebar-overlay{
  opacity: 1;
  pointer-events: auto;
}
.as-burger{
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.as-burger{
  cursor:pointer;
  pointer-events:auto;
  position:relative;
  z-index:10001;
  background:transparent;
  border:0;
}

.as-topbar{
  position: sticky; /* atau fixed kalau kamu pakai fixed */
  top: 0;
  z-index: 10050;
}

.as-sidebar{
  z-index: 10040;
}

.as-sidebar-overlay{
  z-index: 10030;
}

/* ==========================================================
   TOPBAR + SIDEBAR – FINAL SINGLE SOURCE OF TRUTH
   Class toggle: body.as-sidebar-open
   ========================================================== */

:root{
  --topbar-h: 64px;
  --sidebar-w: 260px;
}

/* ===== TOPBAR ===== */
.as-topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: #2b193d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 10050;
}

.as-topbar-left{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.as-topbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== BURGER ===== */
.as-burger{
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 10060;        /* di atas overlay */
  position: relative;
}

.as-burger span{
  display:block;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
}

/* ===== BRAND ===== */
.as-brand-link{
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  min-width: 0;
}

.as-brand-inner{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.as-logo-img{
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}

.as-brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.as-logo-text{
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}

.as-tagline{
  font-size: 11px;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

/* ===== USER BLOCK (kanan topbar) ===== */
.as-user-block{
  display:flex;
  align-items:center;
  gap: 8px;
}

.as-user-avatar{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.35);
  background: #4b2b7f;
}

.as-user-avatar--placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.as-user-name{
  font-size: 14px;
  white-space: nowrap;
}

/* ===== BUTTONS (rapih) ===== */
.as-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}

.as-btn-primary{ background:#7B61FF; color:#fff; }
.as-btn-primary:hover{ filter:brightness(1.07); }
.as-btn-outline{ background:transparent; border:1px solid rgba(255,255,255,.7); color:#fff; }

/* ===== SPACING KONTEN (biar tidak ketiban topbar) ===== */
.as-main,
.page-content{
  padding-top: calc(var(--topbar-h) + 14px);
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.as-sidebar{
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #201033;
  box-shadow: 6px 0 22px rgba(0,0,0,.45);
  transform: translateX(-105%);
  transition: transform .25s ease;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* buka sidebar (HANYA INI yang dipakai) */
body.as-sidebar-open .as-sidebar{
  transform: translateX(0);
}

/* header sidebar */
.as-sidebar-header{
  height: var(--topbar-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.as-sidebar-title{
  color:#fff;
  font-weight:700;
}

.as-sidebar-close{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* user box */
.as-sidebar-user{
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.as-sidebar-user-top{
  display:flex;
  align-items:center;
  gap: 10px;
}

.as-sidebar-avatar{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.18);
}

.as-sidebar-avatar--placeholder{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #6b4bb1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight: 800;
}

.as-sidebar-user-name{ color:#fff; font-weight:700; }
.as-sidebar-user-role{ color:#b5a7ff; font-size:12px; }

/* nav */
.as-sidebar-nav{
  padding: 10px 8px 14px;
  overflow:auto;
  flex: 1;
}

.as-nav-item{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  margin: 2px 4px;
  color: #d6d6d6;
  text-decoration:none;
  font-size: 14px;
  transition: background .15s, color .15s;
}

.as-nav-item:hover{
  background: rgba(255,255,255,.06);
  color:#fff;
}

.as-nav-item.active{
  background: linear-gradient(90deg,#7B61FF,#a37bff);
  color:#fff;
}

.as-nav-heading{
  font-weight: 700;
  opacity: .95;
  cursor: default;
}

.as-nav-sub{
  padding-left: 36px;
  font-size: 13px;
  opacity: .95;
}

/* ===== OVERLAY ===== */
.as-sidebar-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10030;
}

body.as-sidebar-open .as-sidebar-overlay{
  opacity: 1;
  pointer-events: auto;
}

/* saat sidebar terbuka: disable scroll body (optional tapi enak) */
body.as-sidebar-open{
  overflow: hidden;
}

/* Mobile: rapihin tagline biar ga kepanjangan */
@media (max-width: 520px){
  .as-tagline{ display:none; }
  .as-logo-img{ width: 40px; height: 40px; }
}

/* Desktop optional: jangan paksa konten geser (hapus kalau tidak perlu) */
/* @media (min-width: 1024px){
  body.as-sidebar-open .page-content{ margin-left: var(--sidebar-w); }
} */

/* =========================================================
   SIDEBAR HP: lebih besar + mudah ditap
   (tempel di main.css paling bawah)
   ========================================================= */
@media (max-width: 768px){

  /* Sidebar lebih lebar */
  .as-sidebar{
    width: min(92vw, 480px) !important;      /* dulu biasanya ~280px */
    max-width: 92vw !important;
  }

  /* Header sidebar */
  .as-sidebar-header{
    padding: 16px 16px !important;
  }
  .as-sidebar-title{
    font-size: 16px !important;
    letter-spacing: .2px;
  }
  .as-sidebar-close{
    width: 44px !important;
    height: 44px !important;
    font-size: 28px !important;
    line-height: 44px !important;
    border-radius: 12px;
  }

  /* Biar bisa scroll nyaman */
  .as-sidebar-nav{
    padding: 10px 10px 14px !important;
    max-height: calc(100dvh - 72px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Perbesar area tap semua item */
  .as-nav-item{
    min-height: 52px !important;             /* tap target besar */
    padding: 14px 14px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin: 6px 0 !important;
  }

  /* Icon & label lebih jelas */
  .as-nav-icon{
    font-size: 18px !important;
    width: 28px !important;
    display: inline-flex;
    justify-content: center;
  }
  .as-nav-label{
    font-size: 15px !important;
  }

  /* Heading grup (Akun/Admin) lebih tegas */
  .as-nav-heading{
    min-height: 54px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
  }

  /* Submenu (bullet) lebih besar + tidak terlalu mepet */
  .as-nav-sub{
    min-height: 48px !important;
    padding: 12px 14px 12px 18px !important;
    font-size: 14.5px !important;
  }

  /* Area user info lebih lega */
  .as-sidebar-user{
    padding: 14px 16px !important;
  }
  .as-sidebar-avatar{
    width: 44px !important;
    height: 44px !important;
  }
  .as-sidebar-user-name{
    font-size: 15px !important;
  }
  .as-sidebar-user-role{
    font-size: 13px !important;
    opacity: .9;
  }
}
/* slide hanya tampil yang aktif */
.panduan-slide { display: none; }
.panduan-slide.is-active { display: block; }

/* opsional: dots */
.panduan-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; margin: 0 5px;
  opacity: .35; cursor: pointer;
}
.panduan-dot.is-active { opacity: 1; }

/* =========================
   SYARAT & KETENTUAN (SNK)
   ========================= */

#skOkBtn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

#skOkBtn:not(:disabled) {
  cursor: pointer;
  pointer-events: auto;
}

