/* assets/css/style.css */

:root {
  --primary:     #1a3a6b;
  --primary-dark:#122a52;
  --accent:      #2563eb;
  --accent-light:#3b82f6;
  --success:     #16a34a;
  --warning:     #d97706;
  --danger:      #dc2626;
  --info:        #0891b2;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --white:       #ffffff;
  --sidebar-w:   260px;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
  --shadow-md:   0 4px 24px rgba(0,0,0,.12);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter','Segoe UI',sans-serif; font-size:14px; color:var(--gray-800); background:var(--gray-50); }
a { text-decoration:none; color:inherit; }
img { max-width:100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:var(--gray-100); }
::-webkit-scrollbar-thumb { background:var(--gray-400); border-radius:3px; }

/* ═══════════════════════════════════
   PUBLIC LAYOUT (Mobile-first)
═══════════════════════════════════ */
.pub-header {
  background: var(--primary);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top:0; z-index:100;
}
.pub-header .brand { display:flex; align-items:center; gap:10px; }
.pub-header .brand-icon {
  width:36px; height:36px; background:rgba(255,255,255,.15);
  border-radius:8px; display:flex; align-items:center; justify-content:center;
  font-size:18px;
}
.pub-header .brand-text h1 { font-size:13px; font-weight:700; line-height:1.2; }
.pub-header .brand-text p  { font-size:11px; opacity:.8; }

.pub-container { max-width:480px; margin:0 auto; padding:20px 16px 40px; }

.pub-card {
  background:var(--white);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px 20px;
  margin-bottom:16px;
}
.pub-card h2 { font-size:18px; font-weight:700; color:var(--gray-800); margin-bottom:4px; }
.pub-card .subtitle { font-size:13px; color:var(--gray-600); margin-bottom:20px; }

.section-title {
  font-size:13px; font-weight:600; color:var(--accent);
  margin-bottom:14px; padding-bottom:8px;
  border-bottom:2px solid var(--gray-100);
}

/* ── Form ── */
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:14px; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:12px; font-weight:600; color:var(--gray-600); margin-bottom:6px; }
.form-group label span.req { color:var(--danger); }

.form-control {
  width:100%; padding:10px 12px; font-size:14px;
  border:1.5px solid var(--gray-200); border-radius:8px;
  background:var(--white); color:var(--gray-800);
  transition:border-color .2s, box-shadow .2s;
  font-family:inherit;
}
.form-control:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.form-control[readonly] { background:var(--gray-50); color:var(--gray-600); }

select.form-control { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:36px; }

textarea.form-control { resize:vertical; min-height:100px; }
.char-count { font-size:11px; color:var(--gray-400); text-align:right; margin-top:3px; }

/* Upload area */
.upload-area {
  border:2px dashed var(--gray-200); border-radius:8px; padding:20px;
  text-align:center; cursor:pointer; transition:border-color .2s, background .2s;
}
.upload-area:hover { border-color:var(--accent); background:rgba(37,99,235,.03); }
.upload-area .upload-icon { font-size:28px; margin-bottom:8px; color:var(--gray-400); }
.upload-area p { font-size:13px; color:var(--gray-600); }
.upload-area small { font-size:11px; color:var(--gray-400); }
.upload-area input[type=file] { display:none; }
.upload-preview { margin-top:10px; display:none; }
.upload-preview img { max-height:160px; border-radius:6px; }

/* Buttons */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 20px; font-size:14px; font-weight:600; border:none;
  border-radius:8px; cursor:pointer; transition:all .2s; font-family:inherit;
  text-decoration:none;
}
.btn-primary  { background:var(--accent); color:var(--white); width:100%; }
.btn-primary:hover  { background:#1d4ed8; }
.btn-success  { background:var(--success); color:var(--white); }
.btn-danger   { background:var(--danger); color:var(--white); }
.btn-outline  { background:transparent; color:var(--accent); border:1.5px solid var(--accent); }
.btn-sm { padding:7px 14px; font-size:12px; }
.btn-block { width:100%; }

/* Success page */
.success-icon {
  width:72px; height:72px; background:var(--success); border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:32px; color:var(--white); margin:0 auto 16px;
}
.success-title { font-size:20px; font-weight:700; text-align:center; margin-bottom:8px; }
.success-sub { font-size:13px; color:var(--gray-600); text-align:center; margin-bottom:20px; }

.info-table { width:100%; border-collapse:collapse; }
.info-table td { padding:8px 4px; font-size:13px; }
.info-table td:first-child { color:var(--gray-600); width:40%; }
.info-table td:last-child { font-weight:600; }

.notice-box {
  background:rgba(37,99,235,.07); border-left:3px solid var(--accent);
  border-radius:6px; padding:12px 14px; font-size:12px; color:var(--gray-600);
  margin:16px 0; display:flex; gap:10px; align-items:flex-start;
}

.footer-note { font-size:11px; color:var(--gray-400); text-align:center; margin-top:16px; display:flex; align-items:center; justify-content:center; gap:5px; }

/* ═══════════════════════════════════
   ADMIN LAYOUT
═══════════════════════════════════ */
.admin-layout { display:flex; min-height:100vh; }

/* Sidebar */
.sidebar {
  width:var(--sidebar-w); background:var(--primary-dark); color:var(--white);
  display:flex; flex-direction:column; position:fixed; top:0; left:0; height:100vh;
  z-index:200; transition:transform .3s;
}
.sidebar-brand {
  padding:18px 20px; display:flex; align-items:center; gap:12px;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.sidebar-brand .brand-icon {
  width:40px; height:40px; background:var(--accent); border-radius:10px;
  display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0;
}
.sidebar-brand .brand-text h2 { font-size:12px; font-weight:700; line-height:1.3; }
.sidebar-brand .brand-text p  { font-size:10px; opacity:.6; }

.sidebar-nav { flex:1; padding:14px 0; overflow-y:auto; }
.nav-item {
  display:flex; align-items:center; gap:12px;
  padding:12px 20px; font-size:13px; font-weight:500; color:rgba(255,255,255,.7);
  cursor:pointer; transition:all .2s; border-left:3px solid transparent;
}
.nav-item:hover { background:rgba(255,255,255,.07); color:var(--white); }
.nav-item.active { background:rgba(37,99,235,.3); color:var(--white); border-left-color:var(--accent-light); }
.nav-item .nav-icon { font-size:17px; width:20px; text-align:center; }

.sidebar-footer {
  padding:14px 20px; border-top:1px solid rgba(255,255,255,.1);
  display:flex; align-items:center; gap:12px;
}
.sidebar-footer .avatar {
  width:36px; height:36px; border-radius:50%; object-fit:cover;
  background:var(--accent); display:flex; align-items:center; justify-content:center;
  font-size:16px; color:var(--white); flex-shrink:0; overflow:hidden;
}
.sidebar-footer .user-info p { font-size:12px; font-weight:600; }
.sidebar-footer .user-info small { font-size:11px; opacity:.6; }
.online-dot { width:8px; height:8px; background:#22c55e; border-radius:50%; display:inline-block; margin-right:4px; }

/* Topbar */
.topbar {
  position:fixed; top:0; left:var(--sidebar-w); right:0; height:60px;
  background:var(--white); border-bottom:1px solid var(--gray-200);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 24px; z-index:100; box-shadow:0 1px 4px rgba(0,0,0,.05);
}
.topbar-left { display:flex; align-items:center; gap:12px; }
.hamburger { background:none; border:none; font-size:20px; cursor:pointer; color:var(--gray-600); display:none; }
.page-title { font-size:16px; font-weight:700; color:var(--gray-800); }

.topbar-right { display:flex; align-items:center; gap:16px; }
.notif-btn {
  position:relative; background:none; border:none; font-size:20px;
  cursor:pointer; color:var(--gray-600); padding:4px;
}
.notif-badge {
  position:absolute; top:-4px; right:-4px;
  background:var(--danger); color:var(--white); font-size:10px; font-weight:700;
  width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center;
}
.user-menu { display:flex; align-items:center; gap:10px; cursor:pointer; }
.user-menu .avatar { width:36px; height:36px; border-radius:50%; background:var(--accent); display:flex; align-items:center; justify-content:center; color:var(--white); font-weight:700; font-size:14px; }
.user-menu .user-name { font-size:13px; font-weight:600; }
.user-menu .user-role { font-size:11px; color:var(--gray-400); }

/* Main content */
.main-content {
  margin-left:var(--sidebar-w); padding-top:60px; min-height:100vh;
  background:var(--gray-50);
}
.content-area { padding:24px; }

/* Stats cards */
.stats-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; margin-bottom:24px; }
.stat-card {
  background:var(--white); border-radius:var(--radius); padding:18px 20px;
  box-shadow:var(--shadow); display:flex; align-items:center; gap:16px;
}
.stat-icon {
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0;
}
.stat-icon.blue   { background:#dbeafe; }
.stat-icon.yellow { background:#fef3c7; }
.stat-icon.green  { background:#dcfce7; }
.stat-icon.red    { background:#fee2e2; }
.stat-label { font-size:12px; color:var(--gray-400); margin-bottom:4px; }
.stat-value { font-size:26px; font-weight:700; color:var(--gray-800); line-height:1; }
.stat-sub   { font-size:11px; color:var(--gray-400); margin-top:4px; }

/* Card */
.card {
  background:var(--white); border-radius:var(--radius);
  box-shadow:var(--shadow); margin-bottom:20px;
}
.card-header {
  padding:16px 20px; border-bottom:1px solid var(--gray-100);
  display:flex; align-items:center; justify-content:space-between;
}
.card-title { font-size:15px; font-weight:700; }
.card-body  { padding:20px; }

/* Table */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th { font-size:12px; font-weight:600; color:var(--gray-600); text-transform:uppercase; letter-spacing:.5px; padding:10px 14px; background:var(--gray-50); border-bottom:2px solid var(--gray-200); text-align:left; white-space:nowrap; }
td { padding:12px 14px; font-size:13px; border-bottom:1px solid var(--gray-100); vertical-align:middle; }
tr:hover td { background:var(--gray-50); }
tr:last-child td { border-bottom:none; }

/* Badges */
.badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.badge-menunggu  { background:#f1f5f9; color:#64748b; }
.badge-diproses  { background:#fef3c7; color:#92400e; }
.badge-selesai   { background:#dcfce7; color:#166534; }
.badge-ditunda   { background:#fee2e2; color:#991b1b; }
.badge-dikirim   { background:#dbeafe; color:#1e40af; }
.badge-hardware  { background:#dbeafe; color:#1e40af; }
.badge-software  { background:#f3e8ff; color:#6b21a8; }
.badge-jaringan  { background:#d1fae5; color:#065f46; }
.badge-pendukung { background:#fef3c7; color:#92400e; }

/* Action buttons */
.action-btn {
  width:32px; height:32px; border-radius:8px; border:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; font-size:15px;
  transition:all .2s;
}
.action-btn.view   { background:#dbeafe; color:var(--accent); }
.action-btn.edit   { background:#fef3c7; color:var(--warning); }
.action-btn.delete { background:#fee2e2; color:var(--danger); }
.action-btn:hover  { transform:scale(1.1); }

/* Filter bar */
.filter-bar { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.filter-bar .form-control { width:auto; }
.search-wrap { position:relative; }
.search-wrap input { padding-left:36px; }
.search-wrap .search-icon { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--gray-400); }

/* Detail page */
.detail-grid { display:grid; grid-template-columns:1fr 340px; gap:20px; }
.detail-row { display:flex; gap:8px; margin-bottom:12px; font-size:13px; }
.detail-row .dl { color:var(--gray-400); width:130px; flex-shrink:0; }
.detail-row .dv { font-weight:500; }

.status-timeline { list-style:none; }
.status-timeline li { display:flex; gap:12px; padding-bottom:16px; position:relative; }
.status-timeline li:not(:last-child)::before {
  content:''; position:absolute; left:7px; top:18px; bottom:0; width:2px; background:var(--gray-200);
}
.tl-dot { width:16px; height:16px; border-radius:50%; background:var(--gray-300); flex-shrink:0; margin-top:2px; }
.tl-dot.active { background:var(--accent); }
.tl-time { font-size:11px; color:var(--gray-400); }
.tl-note { font-size:12px; color:var(--gray-600); margin-top:2px; }

/* Chart wrapper */
.chart-grid { display:grid; grid-template-columns:1fr 320px; gap:20px; margin-bottom:20px; }
.chart-wrap { position:relative; height:240px; }

/* Pagination */
.pagination { display:flex; align-items:center; gap:6px; margin-top:16px; justify-content:flex-end; }
.page-btn {
  width:32px; height:32px; border-radius:8px; border:1.5px solid var(--gray-200);
  background:var(--white); color:var(--gray-600); font-size:13px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:all .2s;
}
.page-btn.active { background:var(--accent); color:var(--white); border-color:var(--accent); }
.page-btn:hover:not(.active) { border-color:var(--accent); color:var(--accent); }
.page-info { font-size:12px; color:var(--gray-400); margin-right:auto; }

/* Login page */
.login-wrap {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  padding:20px;
}
.login-card { background:var(--white); border-radius:16px; padding:40px 36px; width:100%; max-width:400px; box-shadow:var(--shadow-md); }
.login-logo { text-align:center; margin-bottom:28px; }
.login-logo .logo-icon { width:60px; height:60px; background:var(--accent); border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:28px; color:var(--white); margin:0 auto 12px; }
.login-logo h1 { font-size:20px; font-weight:700; margin-bottom:4px; }
.login-logo p  { font-size:13px; color:var(--gray-400); }

/* Alert */
.alert { padding:12px 16px; border-radius:8px; font-size:13px; margin-bottom:16px; display:flex; align-items:center; gap:10px; }
.alert-success { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.alert-error   { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.alert-info    { background:#dbeafe; color:#1e40af; border:1px solid #bfdbfe; }

/* Modal */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:500;
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; pointer-events:none; transition:opacity .2s;
}
.modal-overlay.open { opacity:1; pointer-events:all; }
.modal {
  background:var(--white); border-radius:12px; width:100%; max-width:500px;
  max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-md);
  transform:scale(.95); transition:transform .2s;
}
.modal-overlay.open .modal { transform:scale(1); }
.modal-header { padding:18px 20px; border-bottom:1px solid var(--gray-100); display:flex; justify-content:space-between; align-items:center; }
.modal-header h3 { font-size:16px; font-weight:700; }
.modal-close { background:none; border:none; font-size:20px; cursor:pointer; color:var(--gray-400); }
.modal-body   { padding:20px; }
.modal-footer { padding:16px 20px; border-top:1px solid var(--gray-100); display:flex; gap:10px; justify-content:flex-end; }

/* QR Code page */
.qr-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:20px; }
.qr-card {
  background:var(--white); border-radius:var(--radius); padding:20px;
  text-align:center; box-shadow:var(--shadow);
}
.qr-card h3 { font-size:15px; font-weight:700; margin-bottom:4px; }
.qr-card p  { font-size:12px; color:var(--gray-400); margin-bottom:12px; }
.qr-card canvas { border:1px solid var(--gray-100); border-radius:6px; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .detail-grid { grid-template-columns:1fr; }
  .chart-grid  { grid-template-columns:1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform:translateX(-100%); }
  .sidebar.open { transform:translateX(0); }
  .topbar { left:0; }
  .main-content { margin-left:0; }
  .hamburger { display:block; }
  .stats-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns:1fr; }
  .form-row { grid-template-columns:1fr; }
}
