/* ==========================================================================
   IBNU ZAIN POS - Design System
   Minimalist, Clean, Modern
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #D1FAE5;
  --primary-blue: #10B981;
  --success-green: #10B981;
  --accent: #10B981;
  --accent-dark: #059669;
  --accent-light: #D1FAE5;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --success: #10B981;
  --success-light: #D1FAE5;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(16, 185, 129, 0.2);
  --shadow-focus-accent: 0 0 0 3px rgba(14, 165, 233, 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
}


/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  display: block;
}


/* --------------------------------------------------------------------------
   3. UTILITY CLASSES
   -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--primary);
}

.text-center {
  text-align: center;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.1;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

button:hover,
.btn:hover {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

button:active,
.btn:active {
  transform: scale(0.97);
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary,
.btn-accent,
.btn-ghost {
  background: var(--primary);
  color: #fff;
  border: none !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover,
.btn-accent:hover,
.btn-ghost:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
}

.btn-danger:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}


/* --------------------------------------------------------------------------
   4. FORM ELEMENTS
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 80px;
}


/* --------------------------------------------------------------------------
   5. LOGIN SCREEN
   -------------------------------------------------------------------------- */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #F0FDF4 0%, #ECFDF5 30%, #F0F9FF 70%, #EFF6FF 100%);
  position: relative;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

#login-screen::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.6s ease, slideUp 0.6s ease;
}

.login-card .app-logo {
  height: 250px;
  width: auto;
  margin: -20px auto 8px;
  display: block;
  object-fit: contain;
  transform: rotate(270deg);
}

.login-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.login-card h1 .accent {
  color: var(--primary);
  font-weight: 300;
  font-size: 0.9rem;
  display: inline-block;
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 1px;
}

.login-card .tagline {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 32px;
  font-weight: 400;
}

.login-card .form-group {
  text-align: left;
}

#login-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 16px;
  text-align: left;
}

.login-card .btn-primary {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  margin-top: 8px;
}

.login-footer {
  margin-top: 32px;
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   6. DASHBOARD LAYOUT
   -------------------------------------------------------------------------- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}


/* --------------------------------------------------------------------------
   7. SIDEBAR
   -------------------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 22px 20px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.sidebar-subtitle {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-top: 2px;
}

.sidebar-logo {
  height: 150px;
  width: auto;
  display: block;
  object-fit: contain;
  transform: rotate(270deg);
  margin: -16px auto -16px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  margin-bottom: 2px;
}

.nav-btn:hover {
  background: var(--border-light);
  color: var(--text);
}

.nav-btn.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border-light);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.user-avatar {
  font-size: 1.5rem;
}

.user-info strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
}

.user-info small {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.logout-btn {
  color: var(--danger) !important;
  font-weight: 500 !important;
}

.logout-btn:hover {
  background: var(--danger-light) !important;
  color: var(--danger) !important;
}


/* --------------------------------------------------------------------------
   8. MAIN CONTENT
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg);
  min-height: 100vh;
}


/* --------------------------------------------------------------------------
   8. WIDGET GRID
   -------------------------------------------------------------------------- */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
  animation: fadeIn 0.5s ease;
}

.widget-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
  border-left: 4px solid transparent;
}

.widget-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.widget-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.widget-card h3 {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
  font-weight: 500;
}

.widget-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}


/* --------------------------------------------------------------------------
   9. PANEL STYLES
   -------------------------------------------------------------------------- */
.panel {
  animation: fadeIn 0.4s ease;
}

.panel.hidden {
  display: none !important;
}

.active-panel {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  width: 100%;
}

.dashboard-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.info-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.info-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
}


/* --------------------------------------------------------------------------
   10. TABLE STYLES
   -------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

thead,
thead tr {
  background: var(--border-light) !important;
  color: var(--text-secondary) !important;
}

thead th {
  padding: 13px 16px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  text-align: left;
  border-bottom: 1px solid var(--border) !important;
}

tbody td {
  padding: 13px 16px;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

.empty-state {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Search bar */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar input {
  padding-left: 16px;
  padding-right: 16px;
  font-size: 0.95rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-lg);
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.search-result-item:hover {
  background: var(--primary-light);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item .item-name {
  font-weight: 500;
}

.search-result-item .item-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.search-result-item .item-price {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

.search-result-item .item-stock {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* Total area */
.total-area {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.total-amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

/* Action bar */
.action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}

/* Qty controls */
.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--border-light);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-controls button:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.qty-controls span {
  min-width: 36px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 4px;
}


/* --------------------------------------------------------------------------
   11. MODAL STYLES
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.modal-box.modal-lg {
  max-width: 600px;
}

.modal-box h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.modal-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.modal-actions-vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}


/* --------------------------------------------------------------------------
   12. LOADER ANIMATION
   -------------------------------------------------------------------------- */
.loader {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}


/* --------------------------------------------------------------------------
   13. RECEIPT / STRUK STYLES
   -------------------------------------------------------------------------- */
.struk {
  background: #FFFFF0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  text-align: left;
  margin: 16px 0;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  color: #333;
}

.struk .struk-header {
  text-align: center;
  border-bottom: 1px dashed #999;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.struk .struk-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.struk .struk-header p {
  font-size: 0.72rem;
  color: #666;
}

.struk .struk-line {
  border-top: 1px dashed #999;
  margin: 10px 0;
}

.struk .struk-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.struk .struk-items {
  margin: 8px 0;
}

.struk .struk-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 0.78rem;
}

.struk .struk-item-name {
  flex: 1;
}

.struk .struk-total {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 0;
  border-top: 2px dashed #333;
  border-bottom: 2px dashed #333;
  margin: 8px 0;
}

.struk .struk-footer {
  text-align: center;
  padding-top: 12px;
  font-size: 0.72rem;
  color: #999;
}

.struk .struk-ttd {
  margin-top: 30px;
  text-align: center;
  font-size: 0.75rem;
  color: #666;
}

.struk .struk-ttd-line {
  border-bottom: 1px solid #333;
  width: 120px;
  margin: 24px auto 6px;
}


/* --------------------------------------------------------------------------
   14. TOAST NOTIFICATION
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  z-index: 9999;
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}

.toast.hidden {
  display: none !important;
}

.toast.success {
  background: var(--primary-dark);
}

.toast.error {
  background: var(--danger);
}

.toast.warning {
  background: var(--warning);
  color: #1E293B;
}


/* --------------------------------------------------------------------------
   15. BADGE STYLES
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-aktif,
.badge-belum-lunas {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-lunas {
  background: var(--success-light);
  color: var(--primary-dark);
}

.badge-tunai {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-utang {
  background: var(--warning-light);
  color: #92400E;
}


/* --------------------------------------------------------------------------
   16. PAGINATION & EMPTY STATE
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 0;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}


/* --------------------------------------------------------------------------
   17. FORM GROUP (additional)
   -------------------------------------------------------------------------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}


/* --------------------------------------------------------------------------
   18. CARD HOVER EFFECTS
   -------------------------------------------------------------------------- */
.card-hover {
  transition: all var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}


/* --------------------------------------------------------------------------
   19. CUSTOM SCROLLBAR
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.modal-box::-webkit-scrollbar {
  width: 4px;
}


/* --------------------------------------------------------------------------
   20. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .widget-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
  }

  .nav-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .main-content {
    padding: 20px 16px;
  }

  .widget-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .widget-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    margin: 16px;
    padding: 32px 24px;
  }

  .modal-box {
    padding: 24px 20px;
    margin: 12px;
  }

  table {
    font-size: 0.82rem;
  }

  thead th,
  tbody td {
    padding: 10px 10px;
  }

  .panel-header h1 {
    font-size: 1.15rem;
  }
}


/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* --------------------------------------------------------------------------
   PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  body * {
    visibility: hidden;
  }

  .struk,
  .struk * {
    visibility: visible !important;
  }

  .struk {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    border: none;
    box-shadow: none;
    padding: 10px;
    background: #fff;
  }

  .modal-overlay {
    display: none !important;
  }
}


/* --------------------------------------------------------------------------
   SAW RESULT STYLES
   -------------------------------------------------------------------------- */
.saw-result {
  text-align: left;
  padding: 16px 0;
}

.saw-result .saw-status {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.saw-result .saw-status.layak {
  background: var(--success-light);
  color: var(--primary-dark);
}

.saw-result .saw-status.tidak-layak {
  background: var(--danger-light);
  color: var(--danger);
}

.saw-result .saw-status h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
}

.saw-result .saw-status .skor {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
}

.saw-result table {
  margin-top: 12px;
  font-size: 0.82rem;
}

.saw-result table th {
  font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
   14. TRANSAKSI KASIR REDESIGN
   -------------------------------------------------------------------------- */
.kasir-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 15px;
}

.kasir-left {
  flex: 1;
}

.kasir-right {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.kasir-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  border: 1px solid var(--border-light);
}

.kasir-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.total-box {
  background: #334155;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: right;
  color: white;
  box-shadow: var(--shadow-md);
}

.total-box .total-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.total-box .total-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #10b981;
}

.payment-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.payment-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.btn-bayar {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.1s, filter 0.2s;
}

.btn-bayar:active {
  transform: scale(0.98);
}

.btn-bayar:hover {
  filter: brightness(1.1);
}

.btn-bayar-tunai {
  background: #10b981;
}

.btn-bayar-utang {
  background: #f59e0b;
}

@media (max-width: 900px) {
  .kasir-layout {
    flex-direction: column;
  }

  .kasir-right {
    width: 100%;
  }
}



/* ==========================================================================
   MULTI-TENANT SYSTEM COMPATIBILITY BRIDGES
   ========================================================================== */
#error-message,
.login-error-alert {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 12px;
  margin-bottom: 12px;
  text-align: left;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.nav-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  margin-bottom: 4px;
}

.nav-menu li:hover {
  background: var(--border-light);
  color: var(--text);
  border-left: none;
}

.nav-menu li.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.top-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.content-card {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.btn-logout:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.print-only {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  #tempatTabelLaporan,
  #tempatTabelLaporan * {
    visibility: visible;
  }


  #tempatTabelLaporan {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .print-only {
    display: block !important;
  }
}

/* ==========================================================================
   OCR INVOICE & INVENTORY SYNC STYLES
   ========================================================================== */
.ocr-upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.ocr-dropzone {
  border: 2px dashed var(--border);
  background: #fbfcfe;
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  margin: 16px 0;
}

.ocr-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.ocr-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
}

.ocr-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text);
  border: 1px solid var(--border);
}

.ocr-stat-chip.total {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.ocr-stat-chip.match {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.ocr-stat-chip.new {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.ocr-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.ocr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.ocr-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.ocr-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.ocr-table tbody tr:hover {
  background: #fcfdfd;
}

.ocr-table tbody tr.is-update {
  background: rgba(16, 185, 129, 0.02);
}

.ocr-input {
  width: 100%;
  padding: 8px 10px !important;
  font-size: 0.85rem !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  background: #fff !important;
  color: var(--text) !important;
  transition: all var(--transition-fast) !important;
  box-sizing: border-box !important;
}

.ocr-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15) !important;
  background: #fff !important;
}

.badge-ocr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ocr-update {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.badge-ocr-new {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.stock-preview-chip {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 500;
}

.btn-del-row {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-del-row:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.ocr-raw-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.ocr-raw-summary {
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.ocr-raw-summary:hover {
  background: #f1f5f9;
  color: var(--text);
}

.ocr-raw-content {
  padding: 14px 18px;
  background: white;
  border-top: 1px solid var(--border);
}

/* Modal Popup Hasil Upload */
.ocr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ocr-modal-card {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 32px;
  animation: slideUp 0.3s ease;
}


/* ==========================================================================
   16. IBNUZAIN ANALYTICS TEMPLATE (Logo Brand Green #00B853 & Royal Blue #004AAD)
   ========================================================================== */
:root {
  --logo-green: #00B853;
  --logo-green-dark: #059669;
  --logo-green-soft: #E6F9EE;
  --logo-blue: #004AAD;
  --logo-blue-light: #1D6AE5;
  --logo-blue-soft: #E8F1FF;
  --logo-cyan: #0EA5E9;
  --logo-cyan-soft: #E0F2FE;
  --logo-teal: #14B8A6;
}

.iz-board {
  background: linear-gradient(135deg, #E8F2FF 0%, #F0FDF6 52%, #EBF4FF 100%);
  border-radius: 22px;
  padding: 20px;
  border: 1px solid rgba(0, 74, 173, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 30px rgba(0, 74, 173, 0.06);
}

.iz-grid-top {
  display: grid;
  grid-template-columns: 1.35fr 1.35fr 1.55fr 1.35fr;
  gap: 16px;
  margin-bottom: 16px;
}

.iz-grid-mid {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.95fr;
  gap: 16px;
  margin-bottom: 16px;
}

.iz-grid-bot {
  display: grid;
  grid-template-columns: 1.75fr 1.25fr;
  gap: 16px;
}

@media (max-width: 1380px) {
  .iz-grid-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .iz-grid-mid,
  .iz-grid-bot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .iz-grid-top {
    grid-template-columns: 1fr;
  }
}

.iz-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 6px 18px rgba(0, 74, 173, 0.055), 0 1px 3px rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.iz-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 74, 173, 0.09);
}

.iz-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.iz-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.1px;
  margin: 0;
  text-transform: none;
  white-space: nowrap;
}

.iz-card-sub {
  font-size: 0.74rem;
  color: #94A3B8;
  font-weight: 500;
  white-space: nowrap;
}

/* Chart 02 - Horizontal Dot-Slider Progress */
.iz-slider-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  flex: 1;
}

.iz-slider-row {
  display: grid;
  grid-template-columns: minmax(80px, 115px) 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.iz-slider-label {
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iz-slider-track {
  height: 3px;
  background: #E2E8F0;
  border-radius: 999px;
  position: relative;
}

.iz-slider-fill {
  height: 100%;
  border-radius: 999px;
  position: relative;
}

.iz-slider-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  position: absolute;
  right: -5.5px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px #FFFFFF, 0 2px 5px rgba(0, 0, 0, 0.18);
}

.iz-slider-val {
  text-align: right;
  color: #64748B;
  font-weight: 600;
  font-size: 0.78rem;
}

/* Diagram - 3 Circular Ring Gauges (50% / 70% / 90%) */
.iz-ring-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  flex: 1;
  padding: 4px 0;
}

.iz-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.iz-ring-svg-wrap {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iz-ring-inner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.72rem;
  box-shadow: 0 3px 8px rgba(0, 74, 173, 0.18);
}

.iz-ring-caption {
  font-size: 0.73rem;
  color: #64748B;
  font-weight: 500;
  text-align: center;
  max-width: 82px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dot Legend (Data 01, Data 02, Data 03) */
.iz-dot-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
}

.iz-dot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: #64748B;
}

.iz-dot-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.iz-dot-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.iz-dot-name {
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iz-dot-val {
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
}

/* Total Card - Overlapping Organic Wave Petals (Reference Card "Total 3 150 Active") */
.iz-petal-box {
  position: relative;
  width: 158px;
  height: 158px;
  margin: 4px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iz-petal-layer {
  position: absolute;
  inset: 10px;
  border-radius: 42% 58% 47% 53% / 54% 44% 56% 46%;
  opacity: 0.82;
}

.iz-petal-layer.p1 {
  background: linear-gradient(135deg, #004AAD, #1D6AE5);
  transform: rotate(15deg) scale(1.04, 0.92);
}

.iz-petal-layer.p2 {
  background: linear-gradient(135deg, #00B853, #10B981);
  transform: rotate(72deg) scale(1.05, 0.9);
}

.iz-petal-layer.p3 {
  background: linear-gradient(135deg, #0EA5E9, #38BDF8);
  transform: rotate(132deg) scale(1.03, 0.91);
}

.iz-petal-layer.p4 {
  background: linear-gradient(135deg, #059669, #004AAD);
  transform: rotate(195deg) scale(1.02, 0.9);
}

.iz-petal-center {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 74, 173, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.iz-petal-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.15;
}

.iz-petal-sub {
  font-size: 0.74rem;
  color: #64748B;
  font-weight: 500;
  margin-top: 2px;
}

/* Chart 01 - Vertical Segmented Pill Capsules */
.iz-capsule-cols {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  height: 115px;
  padding: 6px 4px;
}

.iz-capsule-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
}

.iz-capsule-seg {
  width: 7px;
  border-radius: 999px;
  transition: height 0.3s ease;
}

/* Period / Mode Switcher Pills */
.iz-switch-group {
  display: inline-flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 999px;
  gap: 2px;
}

.iz-switch-btn {
  border: none;
  background: #D1FAE5;
  color: #059669;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  box-shadow: none;
  cursor: pointer;
  width: auto;
  transition: all 0.15s ease;
}

.iz-switch-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.iz-switch-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Tenant Monitoring Section Card */
.iz-tenant-board {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(0, 74, 173, 0.1);
  margin-bottom: 20px;
}

.iz-tenant-grid {
  display: grid;
  grid-template-columns: 1.55fr 1.15fr 0.95fr;
  gap: 16px;
}

@media (max-width: 1200px) {
  .iz-tenant-grid {
    grid-template-columns: 1fr;
  }
}
