/* ==========================================================================
   ASET SMALIE - Modern Asset Management System Stylesheet
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Brand colors */
  --color-primary: #0d6efd;
  --color-primary-hover: #0b5ed7;
  --color-primary-light: #e7f1ff;
  --color-secondary: #6c757d;
  --color-success: #198754;
  --color-success-hover: #157347;
  --color-warning: #ffc107;
  --color-warning-hover: #ffca2c;
  --color-danger: #dc3545;
  --color-danger-hover: #bb2d3b;
  
  /* Sidebar dark palette */
  --sidebar-bg: #1e242d;
  --sidebar-hover: #29313d;
  --sidebar-active: #2b3648;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  
  /* Layout colors */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
.login-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-badge {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0d6efd, #0052cc);
  color: #fff;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-control {
  padding-right: 2.75rem;
}

.btn-toggle-pwd {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
}

.hint-badge {
  display: inline-block;
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  color: #475569;
  margin-bottom: 1.25rem;
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   APP LAYOUT (SIDEBAR + MAIN)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s ease, transform 0.25s ease;
  z-index: 100;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar.collapsed {
  width: 75px;
}

.sidebar.collapsed .brand-name,
.sidebar.collapsed .sidebar-nav span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-logout span {
  display: none;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.brand-icon {
  color: #38bdf8;
  font-size: 1.35rem;
}

.sidebar-nav {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item i {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
  color: #ffffff;
}

.nav-item.active {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.user-info {
  overflow: hidden;
}

.user-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: block;
  font-size: 0.75rem;
  color: var(--sidebar-text);
}

.nav-logout {
  color: #f87171 !important;
}

.nav-logout:hover {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.main-content-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background-color: #1e242d;
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #2d3748;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  background: #2b3648;
  border: 1px solid #475569;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-toggle-btn:hover {
  background: #3b485d;
}

.topbar-title-mobile {
  display: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-search {
  display: flex;
  align-items: center;
  position: relative;
}

.search-input {
  background: #2d3748;
  border: 1px solid #4a5568;
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-size: 0.88rem;
  width: 220px;
  transition: width 0.25s, border-color 0.25s;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  width: 280px;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-submit-btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  padding: 0.45rem 0.85rem !important;
}

/* ==========================================================================
   PAGE CONTAINER & HEADER
   ========================================================================== */
.page-container {
  padding: 1.75rem 2rem;
  flex-grow: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   STATS CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.bg-blue-subtle { background: #e0f2fe; }
.text-blue { color: #0284c7; }

.bg-purple-subtle { background: #f3e8ff; }
.text-purple { color: #9333ea; }

.bg-emerald-subtle { background: #d1fae5; }
.text-emerald { color: #059669; }

.bg-amber-subtle { background: #fef3c7; }
.text-amber { color: #d97706; }

.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.2rem;
}

/* ==========================================================================
   TABLE SECTION & DATA TABLE
   ========================================================================== */
.table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.table-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
  background-color: #fafbfc;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.entries-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.entries-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.table-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.input-with-clear {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
}

/* Table Responsive wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-aset {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}

.table-aset th {
  background-color: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-color);
  user-select: none;
  font-size: 0.82rem;
}

.th-sortable {
  cursor: pointer;
  transition: background-color 0.15s;
}

.th-sortable:hover {
  background-color: #f1f5f9;
}

.th-sortable i {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 0.35rem;
}

.th-internal {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

.table-aset td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  color: #1e293b;
  vertical-align: middle;
}

.table-aset tbody tr:hover {
  background-color: #f8fafc;
}

/* Specific Columns */
.th-no, .td-no {
  text-align: center;
  width: 45px;
  font-weight: 600;
}

.td-nama-barang {
  font-weight: 600;
}

.link-barang {
  color: #0284c7;
  text-decoration: underline;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
}

.link-barang:hover {
  color: #0369a1;
}

.badge-internal {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: monospace;
  font-size: 0.82rem;
  border: 1px solid #bfdbfe;
}

.badge-keterangan {
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.badge-keterangan.bosreg {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Asset Thumbnail in table */
.img-thumb-wrap {
  width: 55px;
  height: 55px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.15s;
}

.img-thumb-wrap:hover {
  transform: scale(1.08);
}

.img-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Action buttons in table */
.action-buttons-wrap {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}

.btn-action-edit {
  background-color: #ffc107;
  color: #000;
  border: 1px solid #e0a800;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-action-edit:hover {
  background-color: #e0a800;
}

.btn-action-delete {
  background-color: #dc3545;
  color: #ffffff;
  border: 1px solid #bd2130;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-action-delete:hover {
  background-color: #bd2130;
}

/* Pagination Footer */
.table-pagination-footer {
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  background-color: #fafbfc;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pagination-numbers {
  display: flex;
  gap: 0.25rem;
}

.page-num-btn {
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-num-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
}
.btn-success:hover {
  background-color: var(--color-success-hover);
}

.btn-secondary {
  background-color: #64748b;
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: #475569;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover:not(:disabled) {
  background-color: #f1f5f9;
}

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline-primary:hover {
  background-color: var(--color-primary-light);
}

.btn-outline-danger {
  background-color: transparent;
  border-color: #ef4444;
  color: #ef4444;
}
.btn-outline-danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-group {
  display: inline-flex;
  gap: 0.5rem;
}

.form-control,
.form-select {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-control-sm,
.form-select-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #334155;
}

.required-label::after {
  content: " *";
  color: #dc3545;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.input-with-action {
  display: flex;
  gap: 0.35rem;
}

/* ==========================================================================
   MODAL WINDOWS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-xl { max-width: 1050px; }
.modal-lg { max-width: 760px; }
.modal-md { max-width: 520px; }

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.btn-close-modal:hover {
  color: #0f172a;
}

.modal-form {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.form-sections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
}

.form-section-card {
  background: #fafbfc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.section-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.col-md-6 { flex: 1; }
.col-md-4 { flex: 1; }
.col-md-8 { flex: 2; }

.calculated-price-box {
  background: #ecfdf5;
  border: 1px dashed #10b981;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #047857;
  text-align: right;
}

/* Image Uploader area */
.image-uploader-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.image-preview-area {
  height: 130px;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.image-preview-area img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  padding: 0.5rem;
}

.upload-actions {
  display: flex;
  gap: 0.5rem;
}

.modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #f8fafc;
}

/* Dropzone for Import */
.dropzone-area {
  border: 2px dashed #3b82f6;
  background: #f0f7ff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropzone-area:hover {
  background-color: #e0f0fe;
}

.import-preview-table-wrap {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.table-sm-preview {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.table-sm-preview th,
.table-sm-preview td {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border-color);
}

.table-sm-preview th {
  background-color: #f8fafc;
  font-weight: 600;
}

/* ==========================================================================
   ALERTS & TOASTS
   ========================================================================== */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast-item {
  min-width: 280px;
  background: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  animation: slideInRight 0.25s ease-out;
}

.toast-item.success { border-left-color: var(--color-success); }
.toast-item.danger { border-left-color: var(--color-danger); }
.toast-item.warning { border-left-color: var(--color-warning); }

/* Utilities */
.d-none { display: none !important; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-start { text-align: left; }
.m-0 { margin: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.p-4 { padding: 1.5rem; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .form-sections-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    height: 100%;
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .topbar-title-mobile {
    display: block;
  }
  .d-none-sm {
    display: none;
  }
  .search-input {
    width: 140px;
  }
  .search-input:focus {
    width: 180px;
  }
  .page-container {
    padding: 1rem;
  }
}

/* ==========================================================================
   BULK ACTION BAR & CHECKBOXES
   ========================================================================== */
.bulk-action-bar {
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeIn 0.2s ease-in-out;
}

.bulk-info {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-actions-buttons {
  display: flex;
  gap: 0.5rem;
}

.th-check, .td-check {
  width: 40px;
  text-align: center;
}

.table-check-input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* ==========================================================================
   ANALYTICS SECTION
   ========================================================================== */
.analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

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

.analytics-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.analytics-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chart-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.chart-bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease-out;
}

/* ==========================================================================
   STICKER LABELS & PRINT FORMATTING
   ========================================================================== */
.labels-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  max-height: 500px;
  overflow-y: auto;
}

.asset-sticker-card {
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sticker-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sticker-brand {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.sticker-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: #0f172a;
  color: #ffffff;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.sticker-body {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.sticker-qr {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.sticker-details {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.sticker-code {
  font-family: monospace;
  font-weight: 800;
  font-size: 0.85rem;
  color: #1d4ed8;
}

.sticker-name {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticker-meta {
  color: #64748b;
  font-size: 0.7rem;
}

/* ==========================================================================
   OFFICIAL INVENTORY REPORT (PRINT STYLES)
   ========================================================================== */
.report-paper {
  background: #ffffff;
  color: #000000;
  padding: 2.5rem;
  border-radius: var(--radius-md);
  font-family: 'Times New Roman', Times, serif;
}

.report-kop {
  text-align: center;
  border-bottom: 3px double #000000;
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
}

.report-kop h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  font-weight: bold;
}

.report-kop h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-weight: bold;
}

.report-kop p {
  font-size: 0.85rem;
  margin: 0;
}

.report-title-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.report-title-section h4 {
  font-size: 1.1rem;
  text-decoration: underline;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.table-report {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

.table-report th,
.table-report td {
  border: 1px solid #000000;
  padding: 0.45rem 0.5rem;
}

.table-report th {
  background-color: #f1f5f9;
  font-weight: bold;
  text-align: center;
}

.report-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 0 2rem;
}

.signature-block {
  text-align: center;
  width: 220px;
}

.sig-space {
  height: 70px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printableArea, #printableArea * {
    visibility: visible;
  }
  #printableArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   KONDISI BADGES & DARK THEME SUPPORT
   ========================================================================== */
.badge-kondisi {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-kondisi.baik {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-kondisi.rusak-ringan {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-kondisi.rusak-berat {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Divider text */
.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider-text span {
  padding: 0 0.75rem;
}

/* Camera box */
.camera-scanner-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.scanner-video {
  width: 100%;
  max-width: 340px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Log Timeline in Detail Modal */
.log-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.log-timeline-item {
  background: #f8fafc;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
}

.log-timeline-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: #0f172a;
}

.log-timeline-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ==========================================================================
   DARK THEME PALETTE
   ========================================================================== */
body.dark-theme {
  --bg-body: #0b1120;
  --bg-card: #1e293b;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  background-color: #0b1120;
  color: #f8fafc;
}

body.dark-theme .stat-card,
body.dark-theme .table-card,
body.dark-theme .analytics-card,
body.dark-theme .modal-content,
body.dark-theme .form-section-card {
  background-color: #1e293b;
  border-color: #334155;
}

body.dark-theme .table-toolbar,
body.dark-theme .table-pagination-footer,
body.dark-theme .modal-header,
body.dark-theme .modal-footer {
  background-color: #162032;
  border-color: #334155;
}

body.dark-theme .table-aset th {
  background-color: #162032;
  color: #cbd5e1;
  border-color: #334155;
}

body.dark-theme .table-aset td {
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-theme .table-aset tbody tr:hover {
  background-color: #243044;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .page-title,
body.dark-theme .stat-value,
body.dark-theme .analytics-card-title,
body.dark-theme .modal-title {
  color: #f8fafc;
}

body.dark-theme .page-num-btn {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

body.dark-theme .camera-scanner-box,
body.dark-theme .log-timeline-item {
  background: #162032;
  border-color: #334155;
}
