/* ===============================================
   SAS TokoRumah - Global Styles
   =============================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f7fb; color: #333; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ===== Owner Login ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 20px; }
.login-box { background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.2); max-width: 400px; width: 100%; }
.login-box h1 { text-align: center; margin-bottom: 8px; color: #333; font-size: 28px; }
.login-box p.sub { text-align: center; color: #888; margin-bottom: 28px; font-size: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #555; }
.form-control { width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; transition: border-color .2s; }
.form-control:focus { outline: none; border-color: #667eea; }
.btn { display: inline-block; padding: 12px 20px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-primary { background: #667eea; color: #fff; width: 100%; }
.btn-primary:hover { background: #5568d3; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #229954; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warn { background: #f39c12; color: #fff; }
.btn-warn:hover { background: #d68910; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fee; color: #c0392b; border-left: 4px solid #c0392b; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.mt-20 { margin-top: 20px; }
.text-center { text-align: center; }

/* ===== Modern Admin Layout (Shadcn-style) ===== */
* { box-sizing: border-box; }
body.admin-body { font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; background: #fafafa; color: #1a1a1a; line-height: 1.5; }

.admin-wrap { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* ===== Bottom Navigation (Mobile) ===== */
.bottom-nav { display: none; }
@media(max-width: 900px) {
  .admin-wrap { grid-template-columns: 1fr; padding-bottom: 64px; }
  .admin-main { padding-bottom: 16px; }
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex; z-index: 100;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,.04);
  }
  .bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #6b7280; font-size: 10px; font-weight: 500;
    padding: 4px; position: relative; gap: 2px;
  }
  .bottom-nav-item .ic { font-size: 20px; line-height: 1; }
  .bottom-nav-item .lb { line-height: 1; }
  .bottom-nav-item.active { color: var(--tema, #111); }
  .bottom-nav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 30px; height: 2px; background: var(--tema, #111); border-radius: 0 0 2px 2px;
  }
  .bottom-nav-item .badge-num { position: absolute; top: 0; right: 20%; background: #ef4444; color: #fff; font-size: 9px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
  .admin-content { padding: 14px; }
  .page-header, .page-title, .page-subtitle { padding: 0; margin: 0; }
}

/* ===== Floating Action Button (FAB) ===== */
.fab {
  position: fixed; bottom: 84px; right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--tema, #111); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  border: none; cursor: pointer; z-index: 95;
  transition: transform .15s;
}
.fab:hover { transform: scale(1.05); }
@media(min-width: 901px) { .fab { bottom: 24px; right: 24px; } }
@media(max-width: 900px) { .fab { bottom: 80px; right: 16px; } }
@media(max-width: 900px) { .admin-wrap { grid-template-columns: 1fr; } }

/* Sidebar */
.admin-sidebar { background: #fff; border-right: 1px solid #e5e7eb; padding: 20px 0; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.sidebar-brand { padding: 0 20px 20px; border-bottom: 1px solid #f3f4f6; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.sidebar-brand .logo-box { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--tema, #ff6b35), var(--tema, #ff6b35)); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0; }
.sidebar-brand h2 { font-size: 14px; line-height: 1.2; font-weight: 700; color: #111; }
.sidebar-brand small { font-size: 11px; color: #6b7280; }
.sidebar-section { padding: 0 12px; margin-bottom: 8px; }
.sidebar-section-title { font-size: 11px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 8px 12px; }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: #4b5563; font-size: 14px; font-weight: 500; border-radius: 6px; margin-bottom: 2px; transition: all .15s; }
.sidebar-link:hover { background: #f3f4f6; color: #111; }
.sidebar-link.active { background: #f3f4f6; color: #111; font-weight: 600; }
.sidebar-link .icon { width: 18px; text-align: center; font-size: 16px; }
.sidebar-link .badge-num { margin-left: auto; background: #ef4444; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: 600; }
.sidebar-divider { height: 1px; background: #f3f4f6; margin: 12px 20px; }

/* Main area */
.admin-main { display: flex; flex-direction: column; min-width: 0; }

/* Top header */
.admin-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 30; }
.admin-header-left { display: flex; align-items: center; gap: 12px; }
.admin-header .menu-btn { background: none; border: 1px solid #e5e7eb; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 18px; color: #6b7280; }
.admin-header .menu-btn:hover { background: #f3f4f6; }
.admin-header h1 { font-size: 17px; font-weight: 700; color: #111; margin: 0; }
.breadcrumb { font-size: 13px; color: #6b7280; margin-top: 2px; }
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #111; }
.admin-header-right { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; background: #f3f4f6; padding: 7px 12px; border-radius: 8px; width: 240px; }
.search-box input { border: none; background: transparent; outline: none; flex: 1; font-size: 13px; }
.search-box kbd { background: #fff; border: 1px solid #e5e7eb; padding: 1px 6px; border-radius: 4px; font-size: 11px; color: #6b7280; }
.icon-btn { background: #f3f4f6; border: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #4b5563; }
.icon-btn:hover { background: #e5e7eb; color: #111; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #ff6b35, #f7931e); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; cursor: pointer; }

/* Page content */
.admin-content { padding: 24px; flex: 1; }
.page-title { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 4px; }
.page-subtitle { color: #6b7280; font-size: 14px; margin-bottom: 20px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* Card shadcn-style */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 16px; font-weight: 700; color: #111; margin: 0; }
.card-desc { font-size: 13px; color: #6b7280; margin-top: 2px; }
.card-body { padding: 20px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin-bottom: 20px; }
.tab { padding: 10px 14px; font-size: 14px; font-weight: 500; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; }
.tab:hover { color: #111; }
.tab.active { color: #111; border-bottom-color: var(--tema, #ff6b35); font-weight: 600; }

/* Buttons shadcn */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; border: 1px solid transparent; text-decoration: none; font-family: inherit; }
.btn-primary { background: #111; color: #fff; }
.btn-primary:hover { background: #1f2937; }
.btn-secondary { background: #fff; color: #111; border-color: #e5e7eb; }
.btn-secondary:hover { background: #f9fafb; border-color: #d1d5db; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn-ghost { background: transparent; color: #6b7280; }
.btn-ghost:hover { background: #f3f4f6; color: #111; }

/* Stat cards shadcn */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; transition: border-color .2s; }
.stat-card:hover { border-color: #d1d5db; }
.stat-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #6b7280; font-weight: 500; }
.stat-label .icon { font-size: 16px; }
.stat-value { font-size: 26px; font-weight: 700; color: #111; margin-top: 8px; }
.stat-change { font-size: 12px; color: #10b981; margin-top: 4px; font-weight: 500; }
.stat-change.down { color: #ef4444; }

/* Table shadcn */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table.dataTable { font-size: 14px; width: 100% !important; border-collapse: separate; border-spacing: 0; min-width: 600px; }
table.dataTable thead th { background: #fafafa; color: #6b7280 !important; border: none !important; border-bottom: 1px solid #e5e7eb !important; padding: 12px 16px !important; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
table.dataTable tbody td { padding: 14px 16px !important; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
table.dataTable tbody tr { transition: background .15s; }
table.dataTable tbody tr:hover { background: #fafafa; }
table.dataTable tbody tr:last-child td { border-bottom: none; }
.dt-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.dataTables_wrapper .dataTables_filter { display: none; }
.dataTables_wrapper .dataTables_length { color: #6b7280; font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dataTables_wrapper .dataTables_length select { border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 8px; margin: 0 4px; }
.dataTables_wrapper .dataTables_info { color: #6b7280; font-size: 13px; padding-top: 16px; }
.dataTables_wrapper .dataTables_paginate { padding-top: 12px; }
.dataTables_wrapper .dataTables_paginate .paginate_button { padding: 6px 12px !important; border-radius: 6px !important; border: 1px solid #e5e7eb !important; margin: 0 2px; color: #4b5563 !important; background: #fff !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: #f3f4f6 !important; color: #111 !important; border-color: #d1d5db !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: #111 !important; color: #fff !important; border-color: #111 !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: .5; cursor: not-allowed; }

/* Responsive table helpers */
@media(max-width: 700px) {
  table.dataTable thead th { font-size: 10px; padding: 10px 8px !important; }
  table.dataTable tbody td { padding: 12px 8px !important; font-size: 13px; }
  .table-wrap { margin: 0 -16px; border-radius: 0; }
  .dataTables_wrapper { padding: 0 16px; }
  /* Hide some columns on mobile */
  table.dataTable.hide-col-mobile th:nth-child(2),
  table.dataTable.hide-col-mobile td:nth-child(2),
  table.dataTable.hide-col-mobile th:nth-child(3),
  table.dataTable.hide-col-mobile td:nth-child(3),
  table.dataTable.hide-col-mobile th:nth-child(4),
  table.dataTable.hide-col-mobile td:nth-child(4),
  table.dataTable.hide-col-mobile th:nth-child(6),
  table.dataTable.hide-col-mobile td:nth-child(6) { display: none; }
  .table-actions-stack { display: flex; flex-direction: column; gap: 4px; }
}

/* Card List (Mobile e-commerce style) */
.mobile-cards { display: none; }
.card-list-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start; }
.card-list-item .img { width: 60px; height: 60px; border-radius: 8px; background: #f3f4f6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 24px; }
.card-list-item .img img { width: 100%; height: 100%; object-fit: cover; }
.card-list-item .body { flex: 1; min-width: 0; }
.card-list-item .body h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.card-list-item .body p { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.card-list-item .body .price { font-weight: 700; color: var(--tema, #111); font-size: 14px; }
.card-list-item .body .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.card-list-item .actions { display: flex; flex-direction: column; gap: 4px; }

@media(max-width: 700px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter { display: none; }
  /* Show mobile card list, hide desktop table */
  .dataTables_wrapper { display: none !important; }
  .mobile-cards { display: block; }
  .mobile-cards-loading { text-align: center; padding: 30px 20px; color: #6b7280; }
}
@media(min-width: 701px) {
  .mobile-only { display: none !important; }
}

/* Mobile top bar */
@media(max-width: 900px) {
  .admin-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .3s; }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-content { padding: 16px; }
  .search-box { display: none; }
  .admin-header .menu-btn { display: flex; }
  .admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 49; }
  .admin-overlay.show { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: span 1; }
}

/* Form shadcn */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; transition: all .15s; font-family: inherit; background: #fff; }
.form-control:focus { outline: none; border-color: var(--tema, #ff6b35); box-shadow: 0 0 0 3px var(--tema-light, rgba(255,107,53,.15)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: span 2; }

/* Modal shadcn */
.admin-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.admin-modal.show { display: flex; animation: fadeIn .2s; }
.admin-modal-content { background: #fff; width: 100%; max-width: 600px; max-height: 90vh; border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); display: flex; flex-direction: column; animation: slideUp .25s; }
.admin-modal-content.lg { max-width: 800px; }
.admin-modal-head { padding: 18px 24px; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.admin-modal-head h3 { font-size: 17px; color: #111; font-weight: 700; }
.admin-modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.admin-modal-foot { padding: 14px 24px; border-top: 1px solid #f3f4f6; display: flex; justify-content: flex-end; gap: 8px; background: #fafafa; border-radius: 0 0 12px 12px; flex-shrink: 0; }
.admin-modal-close { background: none; border: none; width: 32px; height: 32px; border-radius: 6px; font-size: 20px; color: #6b7280; cursor: pointer; }
.admin-modal-close:hover { background: #f3f4f6; color: #111; }

/* Mobile modal - bottom sheet style */
@media(max-width: 700px) {
  .admin-modal { padding: 0; align-items: flex-end; }
  .admin-modal-content {
    width: 100%; max-width: 100%; max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: slideUpSheet .3s;
  }
  .admin-modal-content.lg { max-width: 100%; }
  .admin-modal-foot {
    border-radius: 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .admin-modal-body { padding: 18px; }
  /* Swipe handle for bottom sheet */
  .admin-modal-content::before {
    content: '';
    display: block; width: 40px; height: 4px;
    background: #d1d5db; border-radius: 2px;
    margin: 8px auto 0;
  }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; background: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); z-index: 9999; transform: translateX(120%); transition: transform .3s; display: flex; align-items: center; gap: 10px; min-width: 280px; border-left: 4px solid #10b981; }
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #3b82f6; }

/* Mobile sidebar */
@media(max-width: 900px) {
  .admin-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .3s; }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-content { padding: 16px; }
  .search-box { display: none; }
  .admin-header .menu-btn { display: flex; }
  .admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 49; }
  .admin-overlay.show { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: span 1; }
}

/* Stat Cards - lebih modern */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 22px; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.04); display: flex; align-items: center; gap: 16px; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.stat-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.stat-icon.orange { background: linear-gradient(135deg, #ff9a56, #ff6b35); color: #fff; box-shadow: 0 4px 12px rgba(255,107,53,.3); }
.stat-icon.green { background: linear-gradient(135deg, #2ecc71, #27ae60); color: #fff; box-shadow: 0 4px 12px rgba(39,174,96,.3); }
.stat-icon.blue { background: linear-gradient(135deg, #5dade2, #3498db); color: #fff; box-shadow: 0 4px 12px rgba(52,152,219,.3); }
.stat-icon.purple { background: linear-gradient(135deg, #bb8fce, #8e44ad); color: #fff; box-shadow: 0 4px 12px rgba(142,68,173,.3); }
.stat-info h3 { font-size: 13px; color: #95a5a6; font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.stat-info .num { font-size: 26px; font-weight: 700; color: #2c3e50; }

/* Card */
.card { background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.04); margin-bottom: 20px; overflow: hidden; }
.card-head { padding: 18px 22px; border-bottom: 1px solid #f0f3f7; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(180deg, #fafbfc, #fff); }
.card-head h2 { font-size: 16px; color: #2c3e50; font-weight: 700; }
.card-body { padding: 22px; }

/* Button modern */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #5dade2, #3498db); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(52,152,219,.3); }
.btn-success { background: linear-gradient(135deg, #2ecc71, #27ae60); color: #fff; }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(39,174,96,.3); }
.btn-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(231,76,60,.3); }
.btn-warn { background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; }
.btn-warn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(243,156,18,.3); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Mini icon button */
.btn-mini { width: 32px; height: 32px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.btn-mini.btn-edit { background: #fff3e0; color: #e67e22; }
.btn-mini.btn-edit:hover { background: #e67e22; color: #fff; }
.btn-mini.btn-del { background: #fee; color: #c0392b; }
.btn-mini.btn-del:hover { background: #c0392b; color: #fff; }
.btn-mini.btn-view { background: #e3f2fd; color: #1976d2; }
.btn-mini.btn-view:hover { background: #1976d2; color: #fff; }

/* DataTable custom */
table.dataTable { font-size: 13px; border-collapse: separate; border-spacing: 0; width: 100% !important; }
table.dataTable thead th { background: linear-gradient(135deg, #34495e, #2c3e50); color: #fff !important; border: none !important; padding: 14px 12px !important; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
table.dataTable thead th:first-child { border-radius: 10px 0 0 0; }
table.dataTable thead th:last-child { border-radius: 0 10px 0 0; }
table.dataTable tbody td { padding: 14px 12px !important; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
table.dataTable tbody tr { transition: background .15s; }
table.dataTable tbody tr:hover { background: #f8fafc; }
.dt-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.dataTables_wrapper .dataTables_filter input { border: 1.5px solid #e0e7ed !important; border-radius: 8px !important; padding: 6px 12px !important; font-size: 13px; }
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: #3498db !important; }
.dataTables_wrapper .dataTables_length select { border: 1.5px solid #e0e7ed !important; border-radius: 8px !important; padding: 4px 8px !important; }
.dataTables_wrapper .dataTables_info { color: #7f8c8d; font-size: 12px; padding-top: 14px; }
.dataTables_wrapper .dataTables_paginate .paginate_button { padding: 6px 12px !important; border-radius: 6px !important; margin: 0 2px; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: linear-gradient(135deg, #3498db, #2980b9) !important; color: #fff !important; border: none !important; }

/* Modal modern */
.admin-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.admin-modal.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.admin-modal-content { background: #fff; width: 90%; max-width: 600px; max-height: 90vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; animation: slideDown .3s; }
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.admin-modal-content.lg { max-width: 800px; }
.admin-modal-head { padding: 18px 24px; border-bottom: 1px solid #f0f3f7; display: flex; justify-content: space-between; align-items: center; }
.admin-modal-head h3 { font-size: 18px; color: #2c3e50; font-weight: 700; }
.admin-modal-close { background: #f0f3f7; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: #7f8c8d; cursor: pointer; transition: all .2s; }
.admin-modal-close:hover { background: #e74c3c; color: #fff; }
.admin-modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.admin-modal-foot { padding: 16px 24px; border-top: 1px solid #f0f3f7; display: flex; justify-content: flex-end; gap: 10px; background: #fafbfc; border-radius: 0 0 16px 16px; }

/* Form modern */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group.full { grid-column: span 2; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #555; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid #e0e7ed; border-radius: 8px; font-size: 14px; transition: border-color .2s; font-family: inherit; }
.form-control:focus { outline: none; border-color: #3498db; }
textarea.form-control { resize: vertical; min-height: 70px; }

/* Toast notification */
.toast { position: fixed; top: 20px; right: 20px; background: #fff; padding: 14px 20px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); z-index: 9999; transform: translateX(120%); transition: transform .3s; display: flex; align-items: center; gap: 10px; min-width: 280px; }
.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid #27ae60; }
.toast.error { border-left: 4px solid #e74c3c; }
.toast.info { border-left: 4px solid #3498db; }

@media(max-width: 768px) {
  .sidebar { width: 100%; position: relative; height: auto; }
  .dash-wrap { flex-direction: column; }
  .main-content { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .admin-modal-content { width: 95%; }
}/* ===== USER / PELANGGAN VIEW (Mobile First) ===== */
.user-wrap { max-width: 480px; margin: 0 auto; background: var(--tema, #ff6b35); min-height: 100vh; color: #fff; padding-bottom: 80px; }
.user-header { padding: 20px 16px 16px; text-align: center; }
.user-header .logo-circle { width: 70px; height: 70px; border-radius: 50%; background: #fff; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.user-header .logo-circle img { width: 100%; height: 100%; object-fit: cover; }
.user-header h1 { font-size: 22px; margin-bottom: 4px; }
.user-header p { font-size: 13px; opacity: .9; }
.user-body { background: #fff; color: #333; border-radius: 20px 20px 0 0; min-height: 70vh; padding: 20px 16px; }
.user-section-title { font-size: 16px; font-weight: 700; margin: 16px 0 12px; color: #333; display: flex; justify-content: space-between; align-items: center; }

.produk-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.produk-item { display: flex; gap: 12px; padding: 12px; background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.produk-foto { width: 80px; height: 80px; border-radius: 10px; background: #f0f0f0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 32px; }
.produk-foto img { width: 100%; height: 100%; object-fit: cover; }
.produk-info { flex: 1; }
.produk-info h4 { font-size: 15px; margin-bottom: 4px; }
.produk-info .harga { color: var(--tema, #ff6b35); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.produk-info .desc { font-size: 12px; color: #888; margin-bottom: 6px; }
.produk-action { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 28px; height: 28px; border: none; background: var(--tema, #ff6b35); color: #fff; border-radius: 6px; font-size: 16px; font-weight: 700; }
.qty-btn.minus { background: #ddd; color: #333; }
.qty-input { width: 40px; text-align: center; border: 1px solid #ddd; border-radius: 6px; padding: 4px; font-weight: 700; }

/* Cart floating */
.cart-fab { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; border-radius: 50%; background: var(--tema, #ff6b35); color: #fff; border: none; font-size: 24px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 100; }
.cart-badge { position: absolute; top: -4px; right: -4px; background: #e74c3c; color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; padding: 0 4px; }

/* Form */
.form-group-mobile { margin-bottom: 14px; }
.form-group-mobile label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #555; }
.form-group-mobile input, .form-group-mobile textarea, .form-group-mobile select { width: 100%; padding: 11px 12px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; }
.form-group-mobile input:focus, .form-group-mobile textarea:focus, .form-group-mobile select:focus { outline: none; border-color: var(--tema, #ff6b35); }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: flex-end; }
.modal.show { display: flex; }
.modal-content { background: #fff; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 20px 20px 0 0; padding: 20px; max-height: 90vh; overflow-y: auto; animation: slideUp .3s; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.modal-head h3 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 24px; color: #888; }

/* Order Summary */
.order-summary { background: #f8f9fa; padding: 12px; border-radius: 10px; margin: 12px 0; }
.order-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.order-summary-total { border-top: 1px solid #ddd; padding-top: 8px; margin-top: 8px; font-weight: 700; font-size: 16px; }

.payment-option { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px solid #eee; border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.payment-option.active { border-color: var(--tema, #ff6b35); background: #fff8f3; }
.payment-option input { width: 18px; height: 18px; }
.rek-info { background: #e3f2fd; padding: 12px; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.rek-info strong { color: #1976d2; }

.checkbox-row { display: flex; align-items: flex-start; gap: 8px; padding: 10px; background: #fff3cd; border-radius: 8px; margin: 10px 0; font-size: 13px; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; }

.wa-button { display: block; width: 100%; padding: 14px; background: #25D366; color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 700; text-align: center; margin-top: 12px; }
.wa-button:hover { background: #1ebd5a; }

@media(max-width: 768px) {
  .sidebar { width: 100%; position: relative; height: auto; }
  .dash-wrap { flex-direction: column; }
  .main-content { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: span 1; }
}
