/* ==========================================================================
   KAMPUNG BAMBOO BANDUNG - CLEAN ADMIN & POS STYLESHEET
   Domain: kampungbamboo.my.id/admin
   Standardized pure CSS for cPanel editor (Zero syntax errors / warnings)
   ========================================================================== */

html, body, div, p, h1, h2, h3, h4, h5, h6, table, thead, tbody, tr, th, td,
form, input, select, textarea, button, a, span, label, aside, header, section,
footer, nav, ul, ol, li {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #F8F6F2;
  color: #1F2E1B;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
  color: #2D4F1E;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
}

.font-mono {
  font-family: Consolas, Menlo, Monaco, monospace;
}

a {
  color: #2D4F1E;
  text-decoration: none;
}

a:hover {
  color: #1E3713;
}

/* Admin Layout Wrapper */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Sidebar Navigation */
.admin-sidebar {
  width: 260px;
  background-color: #1A3111;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
  padding: 22px 20px 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  background-color: #8C9C3E;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-brand-text h2 {
  font-size: 16px;
  color: #FFFFFF;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  letter-spacing: 0.3px;
}

.sidebar-brand-text p {
  font-size: 11px;
  color: #A3B54C;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 2px 0 0 0;
}

/* Menu Items */
.sidebar-menu {
  padding: 14px 12px;
  list-style: none;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 10px;
  text-transform: uppercase;
  color: #8C9C3E;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 14px 12px 6px 12px;
  margin-top: 4px;
}

.sidebar-item {
  margin-bottom: 3px;
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #E2E8F0;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-link .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background-color: #264319;
  color: #FFFFFF;
  padding-left: 17px;
}

.sidebar-link.active {
  background-color: #2E511F;
  color: #FFFFFF;
  font-weight: 700;
  border-left: 4px solid #8C9C3E;
}

.sidebar-link.pos-highlight {
  background-color: rgba(245, 158, 11, 0.15);
  color: #FDE047;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

.sidebar-link.pos-highlight:hover {
  background-color: rgba(245, 158, 11, 0.25);
  color: #FEF08A;
}

/* User Card in Sidebar */
.sidebar-user {
  margin: 12px;
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-user:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background-color: #8C9C3E;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: #A3B54C;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area & Topbar */
.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.admin-topbar {
  background-color: #FFFFFF;
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E8E4DC;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #2D4F1E;
}

.admin-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #F0F4E8;
  color: #2D4F1E;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-content {
  padding: 28px 32px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* KPI Stat Cards */
.stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  flex: 1 1 220px;
  background-color: #FFFFFF;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid #E8E4DC;
  box-shadow: 0 2px 8px rgba(45, 79, 30, 0.04);
  display: flex;
  flex-direction: column;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
  background-color: #F0F4E8;
  color: #2D4F1E;
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #687762;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #2D4F1E;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 11px;
  color: #687762;
}

/* Dashboard Two-Column Grid */
.dashboard-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}

.dashboard-col-left {
  flex: 1 1 520px;
  min-width: 0;
}

.dashboard-col-right {
  flex: 1 1 360px;
  min-width: 0;
}

/* Tables & Containers */
.table-container {
  background-color: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E8E4DC;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(45, 79, 30, 0.04);
  margin-bottom: 28px;
  overflow-x: auto;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F2EFE9;
}

.table-header h3 {
  font-size: 17px;
  margin: 0;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

table.table th {
  background-color: #FAF8F5;
  padding: 12px 16px;
  font-weight: 700;
  color: #2D4F1E;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 1px solid #E8E4DC;
  border-bottom: 1px solid #E8E4DC;
}

table.table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F2EFE9;
  color: #1F2E1B;
  vertical-align: middle;
}

table.table tbody tr:hover td {
  background-color: #FAF9F6;
}

/* Universal Buttons */
.btn, button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary, button.btn-primary, input[type="submit"].btn-primary {
  background-color: #2D4F1E;
  color: #FFFFFF;
  border-color: #2D4F1E;
  box-shadow: 0 2px 8px rgba(45, 79, 30, 0.2);
}

.btn-primary:hover, button.btn-primary:hover {
  background-color: #1E3713;
  border-color: #1E3713;
  color: #FFFFFF;
}

.btn-outline, button.btn-outline {
  background-color: #FFFFFF;
  color: #2D4F1E;
  border-color: #E8E4DC;
}

.btn-outline:hover, button.btn-outline:hover {
  background-color: #FAF8F5;
  border-color: #2D4F1E;
  color: #2D4F1E;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 14px;
}

/* Badges & Status Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-forest {
  background-color: #EAF0E7;
  color: #2D4F1E;
  border: 1px solid #C8DEC2;
}

.badge-olive {
  background-color: #F1F4E4;
  color: #5D6B1E;
  border: 1px solid #D5DFC0;
}

.badge-amber {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.badge-terracotta, .badge-red {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* Form Controls & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2D4F1E;
  margin-bottom: 7px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 15px;
  border-radius: 12px;
  border: 1px solid #E8E4DC;
  font-size: 13.5px;
  font-family: inherit;
  background-color: #FFFFFF;
  color: #1F2E1B;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #8C9C3E;
  box-shadow: 0 0 0 3px rgba(140, 156, 62, 0.18);
}

/* POS & Layout Helpers */
.pos-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.pos-left {
  flex: 1 1 500px;
  min-width: 0;
}

.pos-right {
  flex: 1 1 360px;
  min-width: 0;
}
