/* Lumbung Soal Digital - Korwil Sine
   Pelengkap gaya di luar utility Tailwind */

/* ============ LAYOUT SHELL ============ */
.app-shell { display: flex; min-height: 100vh; background: #f2f6f6; }

.sidebar {
  width: 258px;
  flex-shrink: 0;
  background: linear-gradient(180deg,#1c3b40 0%,#2c5057 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-group-label {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #64748b; margin: 16px 10px 6px;
}
.sidebar-group-label:first-child { margin-top: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: #c3cbe0; font-size: 13.5px; font-weight: 600;
  text-decoration: none; margin-bottom: 3px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-link.active { background: #1a73a8; color: #fff; box-shadow: 0 4px 12px rgba(26,115,168,.35); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #1a73a8; color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-logout { margin-left: auto; color: #94a3b8; padding: 6px; border-radius: 8px; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 45;
}
.sidebar-overlay.show { display: block; }

.main-area { flex: 1; margin-left: 258px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 62px; flex-shrink: 0;
  background: #fff; border-bottom: 1px solid #e6e9f2;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-weight: 800; color: #1e293b; font-size: 15px; }
.topbar-clock { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #64748b; }
.topbar-burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 6px; cursor: pointer; }
.topbar-burger span { width: 20px; height: 2px; background: #334155; border-radius: 2px; }

.main-content { flex: 1; padding: 26px 30px; max-width: 1800px; width: 100%; margin: 0 auto; }
.site-footer { text-align: center; font-size: 11.5px; color: #94a3b8; padding: 22px; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .topbar-burger { display: flex; }
}

/* ============ SIMPLE MONOCHROME ICONS (no emoji) ============ */
.sidebar-ico { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.ico-home   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6H11v6H6v-9H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6H11v6H6v-9H3z'/%3E%3C/svg%3E"); }
.ico-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 105.3 14l5 5 1.7-1.7-5-5A8 8 0 0010 2zm0 2a6 6 0 110 12 6 6 0 010-12z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 105.3 14l5 5 1.7-1.7-5-5A8 8 0 0010 2zm0 2a6 6 0 110 12 6 6 0 010-12z'/%3E%3C/svg%3E"); }
.ico-book   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h8a3 3 0 013 3v13a2.5 2.5 0 00-2.5-2.5H4V4zm16 0h-8v13.5h7.5A2.5 2.5 0 0120 20V4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h8a3 3 0 013 3v13a2.5 2.5 0 00-2.5-2.5H4V4zm16 0h-8v13.5h7.5A2.5 2.5 0 0120 20V4z'/%3E%3C/svg%3E"); }
.ico-plus   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E"); }
.ico-layers { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l9 5-9 5-9-5 9-5zm-9 9l9 5 9-5v3l-9 5-9-5v-3zm0 5l9 5 9-5v3l-9 5-9-5v-3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l9 5-9 5-9-5 9-5zm-9 9l9 5 9-5v3l-9 5-9-5v-3zm0 5l9 5 9-5v3l-9 5-9-5v-3z'/%3E%3C/svg%3E"); }
.ico-users  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 12a4 4 0 100-8 4 4 0 000 8zm7-1a3 3 0 100-6 3 3 0 000 6zm-7 3c-4 0-7 2-7 4.5V21h14v-2.5c0-2.5-3-4.5-7-4.5zm8.5.3c1.9.7 3.5 2.1 3.5 4.2V21h3v-2.5c0-2.1-2.4-3.5-6.5-4.2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 12a4 4 0 100-8 4 4 0 000 8zm7-1a3 3 0 100-6 3 3 0 000 6zm-7 3c-4 0-7 2-7 4.5V21h14v-2.5c0-2.5-3-4.5-7-4.5zm8.5.3c1.9.7 3.5 2.1 3.5 4.2V21h3v-2.5c0-2.1-2.4-3.5-6.5-4.2z'/%3E%3C/svg%3E"); }
.ico-school { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 8l10 5 8-4.3V16h2V8L12 2zM6 12.4V17c0 1.9 3 3.5 6 3.5s6-1.6 6-3.5v-4.6l-6 3.2-6-3.2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 8l10 5 8-4.3V16h2V8L12 2zM6 12.4V17c0 1.9 3 3.5 6 3.5s6-1.6 6-3.5v-4.6l-6 3.2-6-3.2z'/%3E%3C/svg%3E"); }
.ico-logout { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3H5a2 2 0 00-2 2v14a2 2 0 002 2h5v-2H5V5h5V3zm7.6 8l-3.3-3.3-1.4 1.4L14.8 11H9v2h5.8l-1.9 1.9 1.4 1.4L17.6 13H21v-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3H5a2 2 0 00-2 2v14a2 2 0 002 2h5v-2H5V5h5V3zm7.6 8l-3.3-3.3-1.4 1.4L14.8 11H9v2h5.8l-1.9 1.9 1.4 1.4L17.6 13H21v-2z'/%3E%3C/svg%3E"); }

/* ============ DASHBOARD (Beranda) ============ */
.dash-hero {
  background: linear-gradient(135deg,#1c3b40 0%,#2c5057 100%);
  border-radius: 20px; padding: 28px 30px; color: #fff; margin-bottom: 22px;
  position: relative; overflow: hidden;
}
.dash-hero::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(26,115,168,.35), transparent 70%);
}
.stat-card {
  background: #fff; border-radius: 16px; padding: 18px 20px; border: 1px solid #eef0f6;
  display: flex; align-items: center; gap: 14px;
}
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-card {
  background: #fff; border-radius: 16px; padding: 20px; border: 1px solid #eef0f6;
  transition: transform .15s ease, box-shadow .15s ease; cursor: pointer;
}
.menu-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(30,41,59,.08); }
.menu-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; margin-top: 8px; overflow: visible; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-chart .bar-fill { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg,#2ba9c9,#1a73a8); min-height: 4px; }
.bar-chart .bar-label { font-size: 10.5px; color: #64748b; font-weight: 700; text-align: center; }

.card-soal {
  transition: transform .18s ease, box-shadow .18s ease;
  border-left: 5px solid #1a73a8;
}
.card-soal:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(26,115,168,.12);
}

.sticky-draft { position: sticky; top: 96px; }

.badge-pgk { background:#fef3c7; color:#92400e; }

.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.tab-btn.active {
  color: #1a73a8;
  border-color: #1a73a8;
  background: #eaf4fb;
}

/* Floating visitor stats widget */
.visitor-widget {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 148px; background: #fff; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15,45,50,.16); border: 1px solid #e6edf0;
  font-family: inherit; overflow: hidden;
  transition: transform .2s ease, opacity .2s ease;
}
.visitor-widget.collapsed .visitor-widget-body { display: none; }
.visitor-widget-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 9px; background: linear-gradient(135deg,#1c3b40,#2c5057);
  cursor: pointer; user-select: none;
}
.visitor-widget-head .vw-title { display: flex; align-items: center; gap: 5px; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .2px; }
.visitor-widget-head .vw-toggle { color: rgba(255,255,255,.75); font-size: 10px; transition: transform .2s ease; }
.visitor-widget.collapsed .vw-toggle { transform: rotate(180deg); }
.visitor-widget-body { padding: 9px 9px 7px; }
.vw-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 38px; margin-bottom: 5px; }
.vw-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.vw-bar-value { font-size: 8.5px; font-weight: 800; color: #1c3b40; margin-bottom: 2px; }
.vw-bar { width: 100%; max-width: 15px; border-radius: 3px 3px 2px 2px; background: linear-gradient(180deg,#2ba9c9,#1a73a8); min-height: 3px; }
.vw-bar-label { font-size: 7.5px; font-weight: 700; color: #94a3b8; margin-top: 3px; text-transform: uppercase; letter-spacing: .2px; }
.vw-foot { font-size: 7px; color: #b4c0c3; text-align: center; border-top: 1px dashed #edf1f2; padding-top: 5px; }

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px);} to {opacity:1; transform:translateY(0);} }

.rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.rich-content p { margin: 0 0 6px; }
.rich-content table { border-collapse: collapse; }
.rich-content table td, .rich-content table th { border: 1px solid #cbd5e1; padding: 4px 8px; }

