/* =========================================
   Toko UsahaPay - Clean E-Commerce Theme
   ========================================= */

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --biru: #0f4c81;          
  --biru-light: #3b82c4;    
  --biru-dark: #0a3559;     
  --orange: #ff7a00;        
  --orange-dark: #e06a00;   
  --orange-light: #fff3e6;  
  --bg: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --error: #ef4444;
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6; 
}

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

a { text-decoration: none; }

/* ================= NAVBAR ================= */
.navbar { 
  background: white; 
  border-bottom: 1px solid var(--border); 
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 12px 20px; 
}

.brand { 
  font-size: 1.25rem; 
  font-weight: 800; 
  color: var(--biru);
}

.navbar nav { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

.navbar nav a { 
  padding: 8px 12px; 
  border-radius: 6px; 
  color: var(--muted); 
  font-weight: 600; 
  font-size: 0.95rem;
}

.navbar nav a:hover { 
  color: var(--orange); 
}

.btn-outline { 
  border: 1.5px solid var(--orange) !important; 
  color: var(--orange) !important; 
}

.btn-outline:hover {
  background: var(--orange-light) !important;
}

/* ================= HERO ================= */
.hero { 
  background: linear-gradient(135deg, var(--biru) 0%, var(--biru-light) 100%); 
  color: white; 
  padding: 50px 20px; 
  text-align: center;
}

.hero h1 { 
  font-size: 1.8rem; 
  margin-bottom: 10px; 
  font-weight: 800;
}

.hero p { 
  font-size: 1rem; 
  opacity: .9; 
}

/* ================= GRID & CARDS ================= */
.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--biru);
  margin: 30px 0 15px 0;
  padding-left: 10px;
  border-left: 4px solid var(--orange);
}

.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
  gap: 15px; 
  margin: 20px 0; 
}

.grid-sm { 
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
}

.card { 
  background: white; 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 16px; 
  transition: all .2s; 
  display: flex;
  flex-direction: column;
  color: var(--text); 
  position: relative;
}

.card:hover { 
  border-color: var(--orange); 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(255, 122, 0, 0.1); 
}

.card-active { 
  border-color: var(--orange); 
  background: var(--orange-light); 
}

.card-title { 
  font-weight: 700; 
  font-size: 0.95rem; 
  color: var(--text); 
  line-height: 1.3;
  margin-bottom: 4px;
}

.card-category { 
  font-size: 0.75rem; 
  color: var(--muted); 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.card-price { 
  font-weight: 800; 
  color: var(--orange-dark); 
  font-size: 1rem;
  margin-top: auto; /* Dorong ke bawah */
}

/* ================= BUTTONS ================= */
.btn { 
  display: inline-block; 
  background: var(--orange); 
  color: white; 
  padding: 10px 20px; 
  border-radius: 8px; 
  border: none; 
  font-weight: 700; 
  cursor: pointer; 
  text-align: center; 
  transition: all 0.2s;
  width: 100%;
}

.btn:hover {
  background: var(--orange-dark);
}

.btn-sm { 
  padding: 6px 12px; 
  font-size: .85rem; 
  background: var(--biru); 
  color: white !important; 
  border-radius: 6px; 
  font-weight: 600;
  display: inline-block;
  width: auto;
}

/* ================= SIDEBAR (HAMBURGER) ================= */
.menu-toggle {
  display: none; 
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--biru);
  cursor: pointer;
  padding: 0 10px 0 0;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -280px; 
  width: 250px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 15px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  z-index: 9999;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar.active { left: 0; }

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 9998;
}

.sidebar-overlay.active { display: block; }

.sidebar .brand-side {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--biru);
  padding: 15px 20px;
  border-bottom: 2px solid var(--orange-light);
  margin-bottom: 10px;
}

.sidebar a {
  padding: 14px 20px;
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar a:hover {
  background: var(--orange-light);
  color: var(--orange-dark);
}

.sidebar .logout-link {
  margin-top: auto;
  color: var(--error);
  border-top: 1px solid var(--border);
}

/* ================= ALERTS ================= */
.alert { 
  padding: 12px 16px; 
  border-radius: 8px; 
  background: #eff6ff; 
  border-left: 4px solid var(--biru); 
  margin: 15px 0; 
  font-size: 0.9rem;
}

.alert-error { 
  background: #fef2f2; 
  border-left-color: var(--error); 
  color: #991b1b; 
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .navbar nav { display: none; } 
  .menu-toggle { display: block; }
  
  /* Perbaikan Layout Navbar Mobile */
  .navbar .container { 
    justify-content: flex-start; 
    gap: 5px; 
    padding: 10px 15px;
  }
  
  .hero { padding: 40px 15px; }
  .hero h1 { font-size: 1.5rem; }
  
  .grid { 
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 10px;
  }
  
  .card { padding: 12px; }
  .card-title { font-size: 0.9rem; }
}