:root {
  /* Palette Warna Resmi Branding */
  --brand-blue: #344abf;
  --brand-blue-hover: #293a9c;
  --brand-dark: #212121;
  --brand-grey: #9e9e9e;
  --brand-white: #ffffff;

  --bg-app: #f4f5f8;
  --bg-surface: #ffffff;
  --sidebar-bg: #14171f;
  --text-main: #212121;
  --text-muted: #9e9e9e;
  --border-color: #eaecef;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
  --danger: #ef4444;
  --success: #10b981;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: "Plus Jakarta Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.mono {
  font-family: "JetBrains Mono", monospace;
}
#root {
  height: 100vh;
  width: 100vw;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
select {
  font-family: inherit;
}

/* Sembunyikan overlay login secara default */
#loginOverlay {
  display: flex;
}

/* ==========================================
   MODERN LOGIN OVERLAY STYLES
   ========================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.75); /* Dark semi-transparent */
  backdrop-filter: blur(8px); /* Effect blur background */
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  border-radius: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid #e2e8f0;
  animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header .login-brand-icon {
  width: 68px;
  height: 68px;
  background-color: #0f172a; /* Dark background senada dengan logo */
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  margin: 0 auto 20px;
  padding: 0; /* Hilangkan padding agar gambar full menyatu */
  overflow: hidden; /* Memotong sudut tajam gambar hitam */
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-header .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Biar mengisi penuh tanpa celah putih */
}

/* Efek Hover Lingkaran Logo */
.login-card:hover .login-brand-icon {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 24px -4px rgba(0, 0, 0, 0.12);
  border-color: #cbd5e1;
}

.login-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 28px;
}

/* Google Button Styling */
.btn-google-login {
  width: 100%;
  height: 48px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-google-login:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-google-login:active {
  transform: translateY(0);
}

.google-icon {
  width: 20px;
  height: 20px;
}

.login-footer {
  margin-top: 24px;
  font-size: 12px;
  color: #94a3b8;
}

body:not(.is-logged-in):not(.is-loading) #loginOverlay {
  display: flex;
}

/* App Layout Container */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Dark Left Sidebar */
.sidebar {
  width: 72px;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 20;
  position: relative;
}

.sidebar-brand-v {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
}

.sidebar-brand-v img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sidebar-nav,
.sidebar-bottom-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.sidebar-bottom-nav {
  margin-top: auto;
}

.sidebar-bottom-nav .nav-icon-btn svg {
  margin-top: 0;
}

.nav-icon-btn {
  width: 100%;
  height: 46px;
  border: none;
  background: transparent;
  color: var(--brand-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  transition: color 0.2s ease;
}

.nav-icon-btn:hover {
  background: transparent;
  color: #ffffff;
}

.nav-icon-btn.active {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
}

.nav-icon-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 26px;
  background: #ffffff;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Main Content Canvas */
.main-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 21px;
  background: var(--bg-app);
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 0px 12px 0px;
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.search-wrapper {
  margin-left: 0;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  width: 360px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.search-wrapper svg {
  color: var(--brand-grey);
  flex-shrink: 0;
}
.search-wrapper input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  margin-left: 10px;
  font-size: 14px;
  color: var(--brand-dark);
}
.search-wrapper input::placeholder {
  color: var(--brand-grey);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 0;
}

.icon-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
  position: relative;
  transition: all 0.2s;
}

.icon-action-btn:hover {
  background: #f9fafb;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background-color: var(--brand-blue);
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
}

.user-profile-badge:hover {
  background: rgba(0, 0, 0, 0.03);
}

.user-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: #101828;
  line-height: 1.2;
  display: block;
}

.header-store-name {
  font-size: 12px;
  font-weight: 500;
  color: #98a2b3;
  line-height: 1.2;
  display: block;
}

/* Dashboard Report Styling */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-title-row h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
}
.dash-select-pill {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-dark);
  outline: none;
  cursor: pointer;
}
.dash-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.metric-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-grey);
}
.metric-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f4f5f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.metric-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 12px 0 8px;
}
.metric-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-dark);
}
.metric-unit {
  font-size: 11px;
  color: var(--brand-grey);
  font-weight: 600;
}
.metric-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}
.badge-growth {
  background: #ecfdf5;
  color: #059669;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.dash-middle-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 18px;
}

.graph-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.card-head-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.card-head-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-svg-container {
  width: 100%;
  height: 180px;
  margin: 10px 0;
}

.graph-bottom-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.sub-stat-box {
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
}
.sub-stat-label {
  font-size: 11px;
  color: var(--brand-grey);
  margin-bottom: 4px;
}
.sub-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-dark);
}

/* Favorite Product */
.fav-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.fav-search-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f4f5f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  cursor: pointer;
}
.fav-table-header-pills {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  margin-top: 4px !important;
}

.fav-table-header-pills .fav-header-pill {
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
}

.fav-item-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
.fav-item-row:last-child {
  border-bottom: none;
}
.fav-item-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.fav-img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  overflow: hidden !important;
}

.fav-item-left > div:first-child {
  width: 50px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.fav-item-row > div:last-child {
  width: 100px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.fav-item-left > div:last-child {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}
.fav-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fav-name {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--brand-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-cat-tag {
  font-size: 9.5px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 700;
  background: #f0f3ff;
  color: var(--brand-blue);
}
.fav-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-dark);
}
.fav-count-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-grey);
  margin-left: 3px;
}

/* All Orders Table */
.orders-table-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
}
.orders-filter-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.orders-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #9e9e9e;
}

.filter-pill-input {
  background: #ffffff;
  border: 1px solid #eaecef;
  border-radius: 999px;
  padding: 6px 10px 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  position: relative;
  cursor: pointer;
}

.filter-pill-input input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #212121;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  width: 85px;
  text-align: center;
}

.input-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #f0f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #344abf;
  flex-shrink: 0;
  pointer-events: none;
}

.filter-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f5f8;
  border: 1px solid #eaecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #212121;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-icon-btn:hover {
  background: #e2e8f0;
}

.filter-pill-input input::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

.table-data-custom {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.table-data-custom td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--brand-dark);
  vertical-align: middle;
  text-align: center;
}
.table-data-custom th {
  padding: 0 4px 12px 4px;
  font-weight: normal;
  border-bottom: none;
}

.table-data-custom th .th-pill {
  width: 100%;
  box-sizing: border-box;
}

/* Kasir View */
.kasir-layout-grid {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  position: relative;
}

.kasir-left-content {
  flex: 1;
  min-width: 0;
}

.category-pills-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.category-pills-row::-webkit-scrollbar {
  display: none;
}
.pill-btn {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--brand-grey);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s;
}
.pill-btn.active {
  background: var(--brand-dark);
  color: #ffffff;
  border-color: var(--brand-dark);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.modern-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.2s, box-shadow 0.2s;
}
.modern-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.stock-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #f0f2f8;
  color: var(--brand-blue);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.card-img-box {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 12px;
}
.card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-emoji-box {
  font-size: 48px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--brand-dark);
}
.card-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.card-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-dark);
}
.btn-add-order {
  width: 100%;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--brand-dark);
  border-radius: var(--radius-pill);
  padding: 99px;
  padding: 9px;
  font-weight: 700;
  font-size: 12.5px;
  transition: all 0.2s;
  margin-top: auto;
}
.btn-add-order:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.stepper-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-blue);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  margin-top: auto;
}
.stepper-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 2px 8px;
}

.order-side-panel {
  width: 320px !important;
  flex-shrink: 0;
  margin-top: 0 !important;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-summary-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}
.order-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.order-section-head h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-dark);
}
.ordered-count-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-grey);
}

.ordered-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}
.ordered-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}
.ordered-item-left {
  display: flex;
  gap: 10px;
  color: #515867;
  font-weight: 600;
}
.ordered-qty-tag {
  color: var(--brand-grey);
  font-weight: 600;
}
.ordered-item-price {
  font-weight: 700;
  color: var(--brand-dark);
}

.dashed-divider {
  border: none;
  border-top: 1.5px dashed #e2e8f0;
  margin: 12px 0;
}

.payment-summary-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-item-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--brand-grey);
  font-weight: 500;
}
.summary-item-line .val-bold {
  font-weight: 700;
  color: var(--brand-dark);
}
.btn-change-promo {
  background: var(--brand-dark);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.total-payable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.total-payable-row span:first-child {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-dark);
}
.total-payable-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-dark);
}

.payment-method-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}
.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pay-method-btn {
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #6a7282;
  cursor: pointer;
  transition: all 0.2s;
}
.pay-method-btn.active {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: #f0f3ff;
}

.bottom-actions-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}
.btn-print-action {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.btn-place-order {
  flex: 1;
  background: var(--brand-blue);
  border: none;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(52, 74, 191, 0.25);
  transition: background 0.2s;
}
.btn-place-order:hover {
  background: var(--brand-blue-hover);
}
.btn-place-order:disabled {
  background: #b0baf0;
  box-shadow: none;
  cursor: not-allowed;
}

/* Panel Box & Management Views */
.panel-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
}
.prod-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.btn-primary-blue {
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.btn-primary-blue:hover {
  background: var(--brand-blue-hover);
}

.prod-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.prod-manage-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}
.prod-manage-img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #f4f5f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  flex-shrink: 0;
}
.prod-manage-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod-manage-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.prod-manage-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-manage-meta {
  font-size: 11.5px;
  color: var(--brand-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-actions-row {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-soft.btn-edit {
  background-color: #eff6ff;
  color: #2563eb;
}

.btn-icon-soft.btn-edit:hover {
  background-color: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-icon-soft.btn-delete {
  background-color: #fef2f2;
  color: #ef4444;
}

.btn-icon-soft.btn-delete:hover {
  background-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Riwayat Transaksi */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.history-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.history-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}
.history-info-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-id {
  font-weight: 800;
  font-size: 15px;
  color: var(--brand-dark);
}
.history-meta {
  font-size: 12.5px;
  color: var(--brand-grey);
}
.history-info-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.history-total {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-dark);
  text-align: right;
}

/* Modal Forms */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 33, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.modal-card-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-card-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--brand-dark);
}
.btn-close-modal {
  border: none;
  background: #f4f5f8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
}
.modal-card-body {
  padding: 24px;
}
.form-group-item {
  margin-bottom: 16px;
}
.form-group-item label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 6px;
}
.form-group-item input,
.form-group-item select {
  width: 100%;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  color: var(--brand-dark);
  transition: border 0.2s;
}
.form-group-item input:focus,
.form-group-item select:focus {
  border-color: var(--brand-blue);
}
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Settings Menu Overlay */
.settings-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-left: 72px;
  padding-bottom: 60px;
}

.settings-menu-card {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 280px;
  padding: 8px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.settings-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #e3e3e3;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.settings-item-btn svg {
  color: #9e9e9e;
  flex-shrink: 0;
}

.settings-item-btn:hover svg {
  color: #ffffff;
}

/* Dropdown Notifikasi Header */
.notif-dropdown-card {
  position: absolute;
  right: 0;
  top: 48px;
  width: 310px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  z-index: 1000;
  overflow: hidden;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.notif-header h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-dark);
}

.btn-clear-notif {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.notif-list {
  max-height: 280px;
  overflow-y: auto;
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--brand-grey);
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-dark);
}

.notif-msg {
  font-size: 11.5px;
  color: #475569;
  margin-top: 2px;
  word-break: break-word;
}

.notif-time {
  font-size: 10px;
  color: var(--brand-grey);
  margin-top: 4px;
}

/* Styling Komponen Verifikasi Email Akun & Keamanan */
.email-input-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.status-verify-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.status-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-status.success {
  background: #dcfce7;
  color: #15803d;
}

.badge-status.warning {
  background: #fef3c7;
  color: #b45309;
}

.btn-text-reload {
  background: none;
  border: none;
  color: var(--brand-blue, #2563eb);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-text-reload:hover {
  text-decoration: underline;
}

/* Struk Print Thermal */
.receipt-divider {
  border: none;
  border-top: 1px dashed #000;
  margin: 6px 0;
  width: 100%;
}

.receipt-preview-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #000;
  margin: 16px 0;
  max-height: 350px;
  overflow-y: auto;
}

@media print {
  @page {
    margin: 0;
  }

  body * {
    visibility: hidden !important;
  }

  #print-area,
  #print-area * {
    visibility: visible !important;
  }

  #print-area {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 8px !important;
    font-family: "JetBrains Mono", monospace !important;
    color: #000 !important;
    background: #fff !important;
    border: none !important;
  }

  body.paper-80mm #print-area {
    width: 72mm !important;
    font-size: 12px !important;
  }

  body.paper-58mm #print-area {
    width: 48mm !important;
    font-size: 10px !important;
  }
}

.paper-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.paper-option-btn {
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.paper-option-btn.active {
  border-color: var(--brand-blue);
  background: #f0f3ff;
  color: var(--brand-blue);
}

.paper-option-btn h5 {
  margin: 0 0 4px 0;
  font-size: 13.5px;
  font-weight: 700;
}

.paper-option-btn span {
  font-size: 11px;
  color: var(--brand-grey);
}

.btn-dash-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 4px 5px 4px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.btn-dash-action-pill:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.action-circle-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-circle-icon.blue {
  background: #2563eb;
  color: #ffffff;
}

.action-circle-icon.soft-blue {
  background: #eff6ff;
}

.action-circle-icon.soft-green {
  background: #ecfdf5;
}

.action-circle-icon.soft-red {
  background: #fef2f2;
}

/* Mobile Responsive Adjustments */
.mobile-hamburger-btn {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-backdrop-mobile {
  display: none;
}

/* Styling Kolom PIN */
.form-group-pin {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pin-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pin-input-wrapper input {
  width: 140px;
  letter-spacing: 4px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.btn-save-pin {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save-pin:hover {
  background-color: #1d4ed8;
}

.pin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 320px;
  margin-top: 4px;
}

.pin-status {
  color: #64748b;
  font-size: 12px;
}

.btn-link-forgot {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-link-forgot:hover {
  color: #1d4ed8;
}

@media screen and (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 !important;
    padding: 0 !important;
  }

  #root, .app-layout {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .main-canvas {
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    padding: 12px 12px 16px 12px !important;
  }

  .kasir-layout-grid,
  .kasir-left-content,
  .products-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 16px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    z-index: 9999 !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
    touch-action: none !important;
    overscroll-behavior: none !important;
  }

  .sidebar-bottom-nav {
    margin-top: auto !important;
    padding-bottom: 10px !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-backdrop-mobile {
    display: block;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9998 !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
  }

  .mobile-hamburger-btn { display: flex !important; }

  .top-header {
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

  .search-wrapper {
    width: 100% !important;
    order: 3;
    margin-top: 4px;
  }

  .header-right { gap: 6px; }
  .user-meta { max-width: 110px; }
  .user-name, .header-store-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .category-pills-row {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
    margin-bottom: 16px !important;
    -webkit-overflow-scrolling: touch;
  }
  .category-pills-row::-webkit-scrollbar { display: none; }
  .pill-btn {
    flex-shrink: 0 !important;
    padding: 7px 16px !important;
    font-size: 12px !important;
  }

  .kasir-layout-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .modern-card { padding: 12px !important; border-radius: 16px !important; }
  .stock-tag { top: 10px !important; left: 10px !important; font-size: 9.5px !important; padding: 2px 8px !important; }
  .card-emoji-box { font-size: 32px !important; height: 70px !important; }
  .card-img-box { height: 75px !important; }
  .card-title, .card-price { font-size: 13px !important; }
  .btn-add-order { padding: 7px 4px !important; font-size: 11.5px !important; }
  .stepper-control { padding: 2px 8px !important; }

  .order-side-panel {
    width: 100% !important;
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    margin-top: 10px !important;
  }

  .order-summary-card, .payment-method-card { padding: 16px !important; border-radius: 16px !important; }
  .payment-method-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .pay-method-btn { padding: 8px 4px !important; font-size: 12px !important; }
  .bottom-actions-row { gap: 10px !important; }
  .btn-print-action { padding: 12px 16px !important; }
  .btn-place-order { padding: 12px !important; font-size: 13.5px !important; }

  .dash-top-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dash-top-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100% !important;
    gap: 8px !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch;
  }
  .dash-top-actions::-webkit-scrollbar { display: none; }
  .btn-dash-action-pill { flex-shrink: 0 !important; white-space: nowrap !important; font-size: 11.5px !important; padding: 4px 8px !important; }

  .dash-metrics-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .metric-card { padding: 12px; }
  .metric-val { font-size: 18px; }
  .dash-middle-grid { grid-template-columns: 1fr !important; }
  .graph-bottom-stats { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
  .sub-stat-box { padding: 8px 4px !important; text-align: center !important; }
  .sub-stat-label { font-size: 9px !important; white-space: nowrap !important; }
  .sub-stat-val { font-size: 11.5px !important; }

  .orders-filter-controls .filter-label,
  .orders-filter-controls .filter-pill-input,
  .orders-filter-controls > span { display: none !important; }

  .orders-filter-top-bar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
  }
  .orders-filter-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: auto !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }
  .filter-icon-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #f4f5f8 !important;
    border: 1px solid #eaecef !important;
    flex-shrink: 0 !important;
  }

  .orders-table-card { padding: 14px !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; margin-bottom: 20px !important; }
  .table-data-custom { min-width: 620px !important; }
  .table-data-custom th, .table-data-custom td { padding: 8px 6px !important; font-size: 12px !important; }
  .th-pill { padding: 6px 10px !important; font-size: 10.5px !important; white-space: nowrap !important; }

  .modal-card { width: 95% !important; max-height: 85vh; margin: 0 auto; }
  .settings-menu-overlay { padding-left: 0 !important; justify-content: center; }
  .settings-menu-card { width: 90%; margin-bottom: 20px; }

  .panel-box {
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  .profile-settings-container {
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .user-profile-badge {
    margin-left: auto; 
    margin-right: 0;
    padding: 4px 8px !important;
    gap: 6px !important;
  }

  .user-profile-badge .user-avatar-img {
    width: 32px !important;
    height: 32px !important;
  }

  .user-profile-badge .user-name {
    font-size: 12px !important;
  }

  .user-profile-badge .header-store-name {
    font-size: 10px !important;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .notif-dropdown-card {
    position: fixed !important;
    top: 60px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2) !important;
    z-index: 10000 !important;
  }

  .notif-list {
    max-height: 60vh !important;
  }

  .email-input-wrapper {
    flex-direction: column;
  }

  /* Fix Tampilan Riwayat Transaksi di Layar HP */
  .history-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .history-info-left {
    width: 100% !important;
  }

  .history-info-right {
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
    gap: 8px !important;
  }

  .history-total {
    font-size: 15px !important;
    text-align: left !important;
  }

  .responsive-2col-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .responsive-sticky-sidebar {
    position: static !important;
    width: 100% !important;
  }

  .responsive-header-center {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
}