/* ============================================================
   Multi Koneksi Bersama - Premium Wi-Fi Kasir System
   Style: Green & Orange Theme + Light Mode + Modern Sidebar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  /* Primary: Orange */
  --primary:       #F97316;
  --primary-dark:  #EA580C;
  --primary-light: #FED7AA;
  --primary-glow:  rgba(249, 115, 22, 0.30);

  /* Secondary: Green */
  --secondary:     #16A34A;
  --secondary-dark:#15803D;
  --secondary-light:#BBF7D0;
  --secondary-glow: rgba(22, 163, 74, 0.30);

  /* Status colors */
  --danger:       #EF4444;
  --warning:      #F59E0B;
  --info:         #3B82F6;
  --success:      #22C55E;

  /* Sidebar styling (Soft cream-white to dark green gradient) */
  --sidebar-active-bg: rgba(255, 255, 255, 0.35);
  --sidebar-text:      #2E4A3C;
  --sidebar-text-hover:#1F3A2E;
  --sidebar-border:    rgba(46, 74, 60, 0.15);

  /* Content background - soft pastel gradient cream-orange */
  --bg-main:      linear-gradient(135deg, #FDF6EA 0%, #FBEAD2 40%, #F3F7EE 100%);
  --bg-card:      #FFFFFF;
  --bg-card-hover:#FFFFFF;
  --border:       #E2E8F0;
  --border-card:  #E2E8F0;

  /* Text - for light background */
  --text-primary:  #1F3A2E;
  --text-secondary:#374151;
  --text-muted:    #6B7280;

  --sidebar-w: 260px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: #FDF6EA;
  background-image: linear-gradient(135deg, #FDF6EA 0%, #FBEAD2 40%, #F3F7EE 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-height: 100vh;
}


a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(79, 117, 102, 0.25); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Layout ──────────────────────────────────────────────────── */
.wrapper {
  display: flex;
  min-height: 100vh;
  background: transparent;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(160deg, #F4EDE0 0%, #DCE8D8 35%, #8FAC8F 70%, #4F7566 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow: hidden;
}

/* Green stripe accent on right edge */
.sidebar::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(79, 117, 102, 0.2);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(34,197,94,0.45);
}

.sidebar-logo-text h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; font-weight: 700;
  color: #1F3A2E;
  line-height: 1.2;
}

.sidebar-logo-text small {
  font-size: 10px;
  color: #4F7566;
  display: block;
  margin-top: 2px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(46,74,60,0.6);
  padding: 12px 12px 6px;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 3px;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.20);
  color: var(--sidebar-text-hover);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: #1F3A2E;
  font-weight: 700;
  box-shadow: none;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: #1F3A2E;
  border-radius: 0 4px 4px 0;
}

.nav-item .nav-icon {
  width: 34px; height: 34px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.5);
}

.nav-item:hover .nav-icon {
  background: rgba(255, 255, 255, 0.40);
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-date {
  font-size: 11px;
  color: rgba(46,74,60,0.7);
}

.sidebar-date strong {
  display: block;
  font-size: 12px;
  color: #1F3A2E;
  margin-bottom: 2px;
}

/* ── Main Content ────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(22,163,74,0.08);
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-icon {
  width: 38px; height: 38px;
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* ── Page Content ────────────────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-title h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

.page-header-title p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.neutral::after { background: linear-gradient(90deg, #94A3B8, #CBD5E1); }
.stat-card.green::after   { background: linear-gradient(90deg, #16A34A, #22C55E); }
.stat-card.red::after     { background: linear-gradient(90deg, #EF4444, #F87171); }
.stat-card.yellow::after  { background: linear-gradient(90deg, #F97316, #FB923C); }
.stat-card.blue::after    { background: linear-gradient(90deg, #3B82F6, #60A5FA); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.neutral { background: rgba(148,163,184,0.12); color: #64748B; }
.stat-icon.green   { background: rgba(22,163,74,0.12);  color: #16A34A; }
.stat-icon.red     { background: rgba(239,68,68,0.12);   color: #EF4444; }
.stat-icon.yellow  { background: rgba(249,115,22,0.12);  color: #F97316; }
.stat-icon.blue    { background: rgba(59,130,246,0.12);  color: #3B82F6; }

.stat-info { flex: 1; }

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Grid Layouts ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-success {
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: white;
  box-shadow: 0 4px 14px rgba(22,163,74,0.30);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22,163,74,0.40);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  box-shadow: 0 4px 14px rgba(239,68,68,0.30);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239,68,68,0.40);
}

.btn-warning {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: white;
  box-shadow: 0 4px 14px rgba(249,115,22,0.30);
}

.btn-outline {
  background: white;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.btn-outline:hover {
  background: #F0FDF4;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

/* ── Badges / Pills ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: rgba(22,163,74,0.12);   color: #16A34A; }
.badge-danger  { background: rgba(239,68,68,0.12);   color: #EF4444; }
.badge-warning { background: rgba(249,115,22,0.12);  color: #F97316; }
.badge-info    { background: rgba(59,130,246,0.12);  color: #3B82F6; }
.badge-purple  { background: rgba(139,92,246,0.12);  color: #8B5CF6; }

/* ── Table ───────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead tr {
  border-bottom: 2px solid #E2E8F0;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
  background: rgba(241,245,249,0.8);
}

tbody tr {
  border-bottom: 1px solid #F1F5F9;
  transition: background var(--transition);
}

tbody tr:hover { background: rgba(249,115,22,0.04); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 14px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.td-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: white;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control option {
  background: white;
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-card);
}

/* ── Alert / Notification ────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
}

.alert-success { background: rgba(22,163,74,0.08);  border: 1px solid rgba(22,163,74,0.25);  color: #15803D; }
.alert-danger  { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.25);  color: #DC2626; }
.alert-warning { background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.25); color: #EA580C; }
.alert-info    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); color: #2563EB; }

.alert .alert-icon { font-size: 18px; flex-shrink: 0; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: scaleIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
}

.modal-close {
  width: 32px; height: 32px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.20);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--danger);
  font-size: 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(239,68,68,0.15);
  border-color: var(--danger);
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-success{ color: var(--secondary) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted  { color: var(--text-muted) !important; }
.fw-bold     { font-weight: 700; }
.fw-600      { font-weight: 600; }
.mt-auto     { margin-top: auto; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.mb-0        { margin-bottom: 0; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.pagination-link {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.pagination-link:hover:not(.disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pagination-ellipsis {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.93); } to { opacity: 1; transform: scale(1); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Loader ──────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-card);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); --sidebar-w: 260px; }
  .main { margin-left: 0; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .form-actions { flex-direction: column; }
}

/* ── Dropdown Aksi ───────────────────────────────────────────── */
.dropdown-aksi {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 99;
  min-width: 175px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  margin-top: 4px;
}

.dropdown-menu a {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  text-align: left;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.15s ease;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: #F8FAFC;
  color: var(--text-primary);
}

.dropdown-menu a.text-danger:hover {
  background: #FEF2F2;
  color: var(--danger);
}
