/* ===== MODERN ELEGANT THEME - KKMP CIKIWUL ===== */

:root{
  --bg: #f6f7fb;
  --bg-soft: #fbfcfe;
  --surface: #ffffff;
  --surface-2: #fcfcfd;
  --border: #e7e9ee;
  --border-strong: #d9dee7;

  --text: #1f2937;
  --heading: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;

  --accent: #8b1e2d;
  --accent-hover: #741826;
  --accent-soft: #f8ebee;
  --accent-border: #efcfd6;

  --success: #15803d;
  --warning: #b45309;
  --info: #1d4ed8;
  --danger: #b91c1c;

  --shadow-xs: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.07);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --font-base: 14px;
  --font-sm: 12.5px;
  --font-xs: 11.5px;
}

*{
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: var(--font-base);
  line-height: 1.55;
  letter-spacing: 0;
}

img{
  max-width: 100%;
  height: auto;
}

a{
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover{
  color: var(--accent);
}

h1, h2, h3, h4, h5, h6{
  color: var(--heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

h1{ font-size: 1.5rem; }
h2{ font-size: 1.28rem; }
h3{ font-size: 1.08rem; }
h4{ font-size: 1rem; }
h5{ font-size: 0.93rem; }
h6{ font-size: 0.86rem; }

p, span, li, td, th, label, input, select, textarea, .form-control, .form-select, .btn{
  font-size: 0.875rem;
}

small, .small{
  font-size: var(--font-sm);
}

.text-muted{
  color: var(--muted) !important;
  font-size: var(--font-sm) !important;
}

.text-faint{
  color: var(--faint) !important;
}

.text-red,
.text-danger,
.text-primary{
  color: var(--accent) !important;
}

.bg-light{
  background: var(--bg-soft) !important;
}

.container,
.container-fluid{
  padding-left: 18px;
  padding-right: 18px;
}

/* ===== HEADER / TOPBAR ===== */
.hdr,
.header,
.topbar,
.navbar{
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-xs);
}

.hdr .wrap,
.header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
}

.brand{
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.search{
  flex: 1;
  max-width: 420px;
}

.search input{
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: none;
}

.search input:focus{
  border-color: #d6a8b0;
  box-shadow: 0 0 0 3px rgba(139, 30, 45, 0.08);
}

/* ===== SIDEBAR ===== */
.sidebar{
  background: #ffffff !important;
  border-right: 1px solid var(--border);
}

.sidebar .nav-link{
  color: #4b5563 !important;
  font-size: 0.855rem !important;
  font-weight: 500;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  transition: all 0.22s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active{
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

/* ===== PAGE TITLE ===== */
.page-title{
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 4px;
}

.page-subtitle{
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ===== CARD ===== */
.card{
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
}

.card:hover{
  box-shadow: var(--shadow-md) !important;
}

.card-header{
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 15px 17px !important;
}

.card-header h5,
.card-header .mb-0{
  margin: 0;
  color: var(--heading);
  font-size: 0.9rem !important;
  font-weight: 600;
}

.card-body{
  padding: 17px !important;
}

.card-footer{
  background: var(--surface-2) !important;
  border-top: 1px solid var(--border) !important;
  padding: 13px 17px !important;
}

/* ===== KPI / SUMMARY CARD ===== */
.stat-card,
.kpi-card,
.summary-card,
.metric-card{
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
  box-shadow: var(--shadow-sm);
  padding: 17px;
}

.stat-card .label,
.kpi-card .label,
.summary-card .label,
.metric-card .label{
  font-size: 0.74rem !important;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card .value,
.kpi-card .value,
.summary-card .value,
.metric-card .value{
  font-size: 1.2rem !important;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

.stat-icon,
.metric-icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
}

/* ===== BUTTON ===== */
.btn{
  border-radius: 12px !important;
  font-weight: 600;
  font-size: 0.82rem !important;
  padding: 9px 13px !important;
  box-shadow: none !important;
  transition: all 0.22s ease;
}

.btn:focus{
  box-shadow: 0 0 0 3px rgba(139, 30, 45, 0.08) !important;
}

.btn-primary,
.btn-danger{
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-danger:hover{
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.btn-light,
.btn-outline-secondary,
.btn-outline-light{
  background: #fff !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.btn-light:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover{
  background: var(--bg-soft) !important;
  color: var(--accent) !important;
}

/* ===== BADGE ===== */
.badge{
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.7rem !important;
  font-weight: 600;
}

.badge-soft-red{
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* ===== FORM ===== */
.form-control,
.form-select{
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  min-height: 40px;
  background: #fff;
  color: var(--text);
  box-shadow: none !important;
  font-size: 0.84rem !important;
}

.form-control:focus,
.form-select:focus{
  border-color: #d6a8b0 !important;
  box-shadow: 0 0 0 3px rgba(139, 30, 45, 0.08) !important;
}

textarea.form-control{
  min-height: 96px;
}

/* ===== TABLE ===== */
.table{
  margin-bottom: 0;
}

.table th{
  font-size: 0.76rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom-color: var(--border) !important;
  background: #fbfbfc;
}

.table td{
  font-size: 0.82rem !important;
  color: var(--text);
  vertical-align: middle;
  border-color: var(--border) !important;
}

.table-hover tbody tr:hover{
  background: #fafafb;
}

/* ===== DASHBOARD PRODUCT TEXT ===== */
.table td strong,
.table td b,
.card-body strong,
.card-body b,
.list-group-item strong,
.list-group-item b{
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
  color: var(--heading);
}

.table td a,
.card-body a,
.list-group-item a{
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
}

.table td small,
.card-body small,
.list-group-item small{
  font-size: 0.72rem !important;
  color: var(--muted) !important;
}

.table td,
.list-group-item,
.card-body p,
.card-body div{
  font-size: 0.82rem;
}

/* ===== LIST ===== */
.list-group-item{
  border-color: var(--border) !important;
  padding-top: 13px !important;
  padding-bottom: 13px !important;
  background: transparent !important;
}

/* ===== ALERT ===== */
.alert{
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.alert-success{
  background: #edf9f0;
  color: var(--success);
  border-color: #cdeed7;
}

.alert-warning{
  background: #fff7ed;
  color: var(--warning);
  border-color: #fed7aa;
}

.alert-danger{
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

/* ===== UTILITIES ===== */
.shadow-sm{
  box-shadow: var(--shadow-sm) !important;
}

.rounded-lg{
  border-radius: var(--radius-lg) !important;
}

.border-red,
.border-danger,
.border-primary{
  border-color: var(--border) !important;
}

.bg-red-gradient,
.bg-danger,
.bg-primary{
  background: var(--surface) !important;
  color: var(--text) !important;
}

.fs-1{
  font-size: 1.8rem !important;
}

.fs-2{
  font-size: 1.38rem !important;
}

.fs-3{
  font-size: 1.18rem !important;
}

.fs-4{
  font-size: 1rem !important;
}

.fw-semibold{
  font-weight: 600 !important;
}

/* ===== EMPTY STATE ===== */
.empty-state{
  text-align: center;
  padding: 26px 16px;
  color: var(--muted);
}

.empty-state i{
  font-size: 1.8rem;
  color: #c4c9d4;
  margin-bottom: 10px;
}

/* ===== BOTTOM BAR ===== */
.bottom-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 10px;
  z-index: 45;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}

.bb-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
  flex: 1;
  padding: 7px 6px;
  border-radius: 12px;
}

.bb-item:hover{
  color: var(--accent);
  background: var(--accent-soft);
}

.bb-item.active{
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
}

.bb-item i,
.bb-item svg{
  font-size: 16px;
  line-height: 1;
}

/* ===== ANIMATION ===== */
@keyframes fadeInUp{
  from{
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to{
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fade-in-up{
  animation: fadeInUp 0.5s ease-out;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 992px){
  .hdr .wrap,
  .header .wrap{
    padding: 10px 12px;
    gap: 10px;
  }

  .brand{
    font-size: 14px;
  }

  .search{
    flex: 1;
    max-width: none;
  }

  .search input{
    padding: 8px 12px;
    font-size: 12.5px;
  }

  .page-title{
    font-size: 1.3rem;
  }

  .card-header,
  .card-body,
  .card-footer{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .stat-card,
  .kpi-card,
  .summary-card,
  .metric-card{
    padding: 15px;
  }

  .table td strong,
  .table td b,
  .card-body strong,
  .card-body b,
  .list-group-item strong,
  .list-group-item b{
    font-size: 0.78rem !important;
  }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px){
  body{
    font-size: 13.2px;
  }

  h1{ font-size: 1.28rem; }
  h2{ font-size: 1.1rem; }
  h3{ font-size: 0.96rem; }
  h4, h5{ font-size: 0.88rem; }

  .container,
  .container-fluid{
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-title{
    font-size: 1.2rem;
  }

  .page-subtitle{
    font-size: 0.76rem;
  }

  .btn{
    font-size: 0.79rem !important;
    padding: 8px 11px !important;
  }

  .form-control,
  .form-select{
    min-height: 38px;
  }

  .table th{
    font-size: 0.72rem !important;
  }

  .table td{
    font-size: 0.79rem !important;
  }

  .table td strong,
  .table td b,
  .card-body strong,
  .card-body b,
  .list-group-item strong,
  .list-group-item b{
    font-size: 0.76rem !important;
  }

  .table td small,
  .card-body small,
  .list-group-item small{
    font-size: 0.69rem !important;
  }

  .stat-card .value,
  .kpi-card .value,
  .summary-card .value,
  .metric-card .value{
    font-size: 1.05rem !important;
  }

  .bottom-bar{
    padding: 7px 8px;
  }

  .bb-item{
    font-size: 10.5px;
    padding: 6px 4px;
  }

  .bb-item i,
  .bb-item svg{
    font-size: 15px;
  }
}

/* ===== RESPONSIVE - SMALL MOBILE ===== */
@media (max-width: 480px){
  .hdr .wrap,
  .header .wrap{
    padding: 10px;
  }

  .brand{
    font-size: 13.5px;
  }

  .search input{
    font-size: 12px;
    padding: 8px 10px;
  }

  .page-title{
    font-size: 1.12rem;
  }

  .card-header,
  .card-body,
  .card-footer{
    padding: 12px !important;
  }

  .stat-card,
  .kpi-card,
  .summary-card,
  .metric-card{
    padding: 13px;
  }

  .fs-1{
    font-size: 1.6rem !important;
  }

  .fs-2{
    font-size: 1.2rem !important;
  }
}