/* ==========================================================================
   KOALISI PEREMPUAN INDONESIA PEDULI AL-AQSA (KPIPA) - ADMIN & ISAK 35 STYLESHEET
   Domain: KPIPA.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: #FDFBF7;
  color: #1C1917;
  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: #0A5C36;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
}

.font-mono {
  font-family: Consolas, Menlo, Monaco, monospace;
}

a {
  color: #0A5C36;
  text-decoration: none;
}

a:hover {
  color: #C5A059;
}

/* Admin Layout Wrapper */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Sidebar Navigation */
.admin-sidebar {
  width: 260px;
  background-color: #063821;
  border-right: 1px solid rgba(197, 160, 89, 0.3);
  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;
}

/* ==========================================================================
   MODERN LOGIN PAGE STYLES
   ========================================================================== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(140, 156, 62, 0.15) 0%, rgba(248, 246, 242, 1) 90%), #F8F6F2;
  padding: 24px 16px;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 20px 45px rgba(26, 49, 17, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #E8E4DC;
  position: relative;
  z-index: 10;
  animation: fadeInLogin 0.4s ease-out;
}

@keyframes fadeInLogin {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header .login-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #8C9C3E 0%, #2D4F1E 100%);
  color: #FFFFFF;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(45, 79, 30, 0.25);
}

.login-header h2 {
  font-size: 24px;
  color: #2D4F1E;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 13px;
  color: #687762;
  margin: 0;
}

.password-wrapper {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #8C9C3E;
  padding: 4px;
}

/* Quick Action Hub (Menu Cepat Admin) */
.admin-quick-hub {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E8E4DC;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(45, 79, 30, 0.04);
}

.quick-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F2EFE9;
}

.quick-hub-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #2D4F1E;
}

.quick-hub-subtitle {
  font-size: 11px;
  color: #8C9C3E;
  font-weight: 600;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.admin-quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FAF8F5;
  border: 1px solid #EAE6DE;
  border-radius: 12px;
  text-decoration: none;
  color: #1F2E1B;
  transition: all 0.2s ease;
}

.admin-quick-card:hover {
  background: #FFFFFF;
  border-color: #8C9C3E;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 79, 30, 0.08);
}

.admin-quick-card.highlight-card {
  background: #FEFCE8;
  border-color: #FDE047;
}

.admin-quick-card.highlight-card:hover {
  background: #FEF9C3;
  border-color: #EAB308;
}

.q-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.q-content {
  flex: 1;
  min-width: 0;
}

.q-title {
  font-size: 13px;
  font-weight: 700;
  color: #2D4F1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-sub {
  font-size: 11px;
  color: #687762;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-arrow {
  color: #8C9C3E;
  font-size: 14px;
  font-weight: bold;
  opacity: 0.6;
}

/* Sidebar Close Button in Mobile Drawer */
.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Mobile Sidebar Backdrop & Drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 10, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
}

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

.admin-mobile-toggle {
  display: none;
  background: #2D4F1E;
  color: #FFFFFF;
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

/* Quick Bottom Navigation for Android & Mobile */
.admin-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #1A3111;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 9990;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.admin-bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #D1D5DB;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 48px;
}

.admin-bottom-link .b-icon {
  font-size: 18px;
  margin-bottom: 2px;
  line-height: 1;
}

.admin-bottom-link.active,
.admin-bottom-link:hover {
  color: #FDE047;
  font-weight: 700;
}

/* ==========================================================================
   ADMIN MOBILE & TABLET RESPONSIVE STYLES (≤ 992px)
   Pure Standard CSS without nested media queries (Zero cPanel Errors)
   ========================================================================== */
@media (max-width: 992px) {
  body.admin-body {
    padding-bottom: 68px;
  }

  /* Transform Sidebar into Offscreen Drawer */
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 280px;
    max-width: 85vw;
    z-index: 10000;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.4);
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar-close-btn {
    display: inline-flex !important;
  }

  /* Full Width Main Area */
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0;
  }

  /* Topbar on Mobile */
  .admin-topbar {
    height: 56px;
    padding: 0 14px;
  }

  .admin-mobile-toggle {
    display: inline-flex !important;
  }

  .admin-bottom-nav {
    display: flex !important;
  }

  .topbar-btn-text {
    display: none;
  }

  .topbar-btn-pos,
  .topbar-btn-user,
  .topbar-btn-logout {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* Admin Content Area */
  .admin-content {
    padding: 16px 12px;
    width: 100%;
  }

  /* Quick Hub Grid */
  .admin-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* KPI Stat Grid */
  .stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }

  .stat-card {
    flex: 1 1 calc(50% - 6px);
    padding: 14px 12px;
    min-width: 130px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    margin-bottom: 8px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-value {
    font-size: 18px !important;
  }

  .stat-desc {
    font-size: 9.5px;
  }

  /* Dashboard Columns */
  .dashboard-grid {
    flex-direction: column;
    gap: 16px;
  }

  .dashboard-col-left,
  .dashboard-col-right {
    flex: 1 1 100%;
    width: 100%;
  }

  /* Tables */
  .table-container {
    padding: 14px 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.table th,
  table.table td {
    padding: 10px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* POS Front Desk */
  .pos-layout {
    flex-direction: column;
    gap: 16px;
  }

  .pos-left,
  .pos-right {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* Small Screens (640px and down) */
@media (max-width: 640px) {
  .admin-quick-hub {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 18px;
  }

  .admin-quick-card {
    padding: 10px;
    gap: 8px;
    border-radius: 10px;
  }

  .q-icon-wrap {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .q-title {
    font-size: 12px;
  }

  .q-sub {
    font-size: 10px;
  }

  .q-arrow {
    display: none;
  }
}

/* Tiny Mobile (480px and down) */
@media (max-width: 480px) {
  .date-pill {
    display: none;
  }

  .admin-topbar-actions {
    gap: 6px;
  }

  .admin-quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .q-sub {
    display: none;
  }
}


