/* Bank Sampah Mobile - Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #d1fae5;
  --primary-dark: #064e3b;
  --accent: #10b981;
  --secondary: #3b82f6;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --dark-border: #334155;
  --light-bg: #f8fafc;
  --light-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* App Container for Mobile Viewport centered on Desktop */
.app-container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background: #0f172a;
  position: relative;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  padding-bottom: 90px;
}

/* Top App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #334155;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #34d399;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
  text-decoration: none;
}

.header-btn:hover, .header-btn:active {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  transform: scale(1.05);
}

/* Main Content Wrapper */
.app-content {
  padding: 20px;
  flex: 1;
}

/* Cards & Components */
.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-gradient {
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

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

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: #10b981;
}

/* Stat Badge & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* User Balance & Profile Card */
.balance-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: var(--shadow-glow);
  margin-bottom: 16px;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.balance-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a7f3d0;
  font-weight: 700;
}

.balance-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 6px 0 14px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.balance-amount span {
  font-size: 1.1rem;
  font-weight: 600;
  color: #a7f3d0;
}

.user-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.user-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.user-meta h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.user-meta p {
  font-size: 0.83rem;
  color: #d1fae5;
}

/* Feature Grid / Shortcut Buttons */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.shortcut-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  text-align: center;
  text-decoration: none;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.shortcut-item:hover, .shortcut-item:active {
  background: #334155;
  border-color: #10b981;
  transform: translateY(-2px);
}

.shortcut-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.shortcut-label {
  font-size: 0.78rem;
  font-weight: 700;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.form-label i {
  color: #10b981;
  margin-right: 6px;
}

.form-control, .form-select {
  width: 100%;
  padding: 12px 14px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 16px; /* Prevents auto-zoom on iOS */
  transition: var(--transition);
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  min-height: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover, .btn-primary:active {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff;
}

/* Modern Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #334155;
  background: #1e293b;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.modern-table th {
  background: #0f172a;
  color: #94a3b8;
  font-weight: 700;
  padding: 12px 14px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #334155;
}

.modern-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.modern-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  height: 68px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: var(--radius-md);
}

.nav-item i {
  font-size: 1.25rem;
}

.nav-item:hover, .nav-item.active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

/* Slide Drawer Overlay Menu */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 290px;
  height: 100%;
  background: #1e293b;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #334155;
  box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

.sidebar-overlay.active + .sidebar-menu, .sidebar-menu.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
}

.sidebar-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-close {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  border-radius: var(--radius-sm) !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: var(--transition) !important;
}

.sidebar-close:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  transform: scale(1.05) !important;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.sidebar-link i {
  width: 24px;
  color: #10b981;
  font-size: 1.1rem;
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.sidebar-link.text-danger i {
  color: #ef4444;
}

.sidebar-link.text-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}
