/* ==========================================================================
   SIMPEL ASET - FULL APPLICATION STYLESHEET (css/style.css)
   Mobile-first, sentuhan jempol minimal 48px, kontras tinggi luar ruangan
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --bg-app: #f8fafc;
  --surface: #ffffff;
  --surface-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: #0f172a;
  color: var(--text-main);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
}

/* App Container */
.app-container {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.25);
  padding-bottom: 74px; /* Space for bottom nav */
}

.app-container.locked-mode {
  padding-bottom: 0;
}

/* ==========================================================================
   Header & App Bar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-icon:active {
  transform: scale(0.92);
  background-color: var(--surface-border);
}

/* ==========================================================================
   Officer Switcher Bar
   ========================================================================== */
.officer-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.officer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.officer-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: #e0e7ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid #c7d2fe;
}

.officer-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.officer-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.officer-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.officer-action-btn {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.officer-action-btn:active {
  transform: scale(0.95);
  background: #dbeafe;
}

.officer-action-btn.lock-btn {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.officer-action-btn.lock-btn:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* ==========================================================================
   Connection Status & Freshness Banner
   ========================================================================== */
.status-banner {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  border-bottom: 1px solid var(--surface-border);
  background: white;
}

.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 11px;
}

.api-badge.connected {
  background: var(--success-bg);
  color: #065f46;
}

.api-badge.disconnected {
  background: var(--danger-bg);
  color: #991b1b;
}

.api-badge.checking {
  background: var(--warning-bg);
  color: #92400e;
}

.freshness-info {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

/* ==========================================================================
   Main Content Area & Views
   ========================================================================== */
.main-content {
  padding: 16px;
  flex: 1;
}

.view {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.view.active {
  display: block;
}

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

/* ==========================================================================
   LOGIN & LOCK SCREEN STYLES
   ========================================================================== */
.login-screen-wrapper {
  padding: 24px 16px;
  max-width: 440px;
  margin: 0 auto;
}

.login-hero {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
  margin-bottom: 12px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Officer Selection List on Login Screen */
.officer-select-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.officer-list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.officer-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f8fafc;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 54px;
}

.officer-pick-item:hover, .officer-pick-item:active {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(0.99);
}

.officer-pick-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.officer-pick-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: #e0e7ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.officer-pick-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

/* PIN Verification Panel */
.pin-panel {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.pin-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.pin-dots-container {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 2px solid #cbd5e1;
  background: white;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

.pin-error-msg {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  min-height: 20px;
  margin-bottom: 12px;
}

/* Onscreen Numeric Keypad */
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto 16px auto;
}

.keypad-btn {
  height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: #f8fafc;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  box-shadow: var(--shadow-sm);
}

.keypad-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.keypad-btn.action {
  font-size: 16px;
  color: var(--text-muted);
}

/* Shake Animation for Wrong PIN */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake-anim {
  animation: shake 0.35s ease-in-out;
}

/* ==========================================================================
   Bottom Navigation Bar (Mobile Tab Bar)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  height: 64px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
  padding: 0 4px;
}

.nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 4px 0;
  min-height: 48px;
}

.nav-item .nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
  display: block;
  transition: transform 0.15s;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 800;
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* ==========================================================================
   Cards & Layout Components
   ========================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Dashboard Greeting */
.dashboard-greeting {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.dashboard-greeting h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.dashboard-greeting p {
  font-size: 13px;
  color: #bfdbfe;
}

/* Dashboard Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.stat-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-card.total { border-left: 4px solid #2563eb; }
.stat-card.belum { border-left: 4px solid #64748b; }
.stat-card.sebagian { border-left: 4px solid #f59e0b; }
.stat-card.lengkap { border-left: 4px solid #10b981; }

/* Dashboard KIB Tiles */
.kib-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kib-tile {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.kib-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kib-tile:active {
  transform: scale(0.98);
  background: #f8fafc;
}

.kib-tile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.kib-tile-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.kib-tile-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.kib-tile-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.kib-tile-count {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
}

.kib-tile-btn {
  margin-top: 12px;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: #f1f5f9;
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  pointer-events: none; /* Klik pada tile atau button sama-sama mentrigger tile */
  transition: all 0.15s ease;
}

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

/* ==========================================================================
   Buttons (Thumb-Friendly min 48px)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
  width: 100%;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
  width: auto;
}

/* ==========================================================================
   Tabs & Filters
   ========================================================================== */
.kib-tabs-bar {
  display: flex;
  background: #e2e8f0;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  gap: 4px;
}

.kib-tab-btn {
  flex: 1;
  padding: 8px 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.kib-tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Filter controls strip */
.filter-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-select {
  width: 100%;
  height: 40px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}

/* Search Bar */
.search-container {
  position: relative;
  margin-bottom: 12px;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 10px 16px 10px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  font-size: 15px;
  background: var(--surface);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

/* ==========================================================================
   Asset Card (List Item)
   ========================================================================== */
.asset-item-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.asset-item-card:active {
  transform: scale(0.98);
  background-color: #fafbfc;
}

.asset-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.asset-id-tag {
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
  color: #1e293b;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.asset-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.asset-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.asset-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Badges Status Dokumentasi */
.badge-doc {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-doc.belum {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.badge-doc.sebagian {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

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

.badge-arsip {
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Detail View
   ========================================================================== */
.detail-header-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}

.detail-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.detail-table td {
  padding: 8px 4px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-table td:first-child {
  color: #94a3b8;
  width: 38%;
}

.detail-table td:last-child {
  color: white;
  font-weight: 600;
}

/* Collapsible All Data Accordion */
.accordion-box {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}

.accordion-header {
  padding: 12px 16px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.accordion-header.active {
  border-bottom-color: var(--surface-border);
}

.accordion-content {
  display: none;
  padding: 12px 16px;
  background: white;
  font-size: 13px;
}

.accordion-content.active {
  display: block;
}

.raw-data-table {
  width: 100%;
  border-collapse: collapse;
}

.raw-data-table td {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.raw-data-table td:first-child {
  color: var(--text-muted);
  width: 45%;
  font-size: 12px;
}

.raw-data-table td:last-child {
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
}

/* ==========================================================================
   Documentation 3-Photo Slots (Dekat, Jauh, Label)
   ========================================================================== */
.photo-slot-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.photo-slot-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.photo-preview-box {
  width: 100%;
  height: 200px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin: 10px 0;
}

.photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.photo-preview-placeholder span {
  font-size: 36px;
  display: block;
  margin-bottom: 6px;
}

.photo-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.compression-stats {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 12px;
}

.compression-stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.reduction-badge {
  background: #dcfce7;
  color: #166534;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.hidden-file-input {
  display: none !important;
}

/* ==========================================================================
   Forms (Tambah / Edit Aset)
   ========================================================================== */
.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  background: var(--surface);
  color: var(--text-main);
  transition: all 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ==========================================================================
   Reports View & Tables
   ========================================================================== */
.report-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: white;
  margin-top: 12px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.report-table th {
  background: #1e293b;
  color: white;
  padding: 10px 8px;
  font-weight: 700;
  white-space: nowrap;
}

.report-table td {
  padding: 8px;
  border-bottom: 1px solid var(--surface-border);
  white-space: nowrap;
}

.report-table tr:hover {
  background: #f8fafc;
}

.table-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* ==========================================================================
   FASE 6: Reporting & Data Export Engine Styles
   ========================================================================== */
.stat-mini-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.stat-mini-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.stat-mini-val {
  font-size: 15px;
  font-weight: 800;
}

.text-success { color: #16a34a !important; }
.text-danger { color: #dc2626 !important; }
.text-warning { color: #d97706 !important; }
.text-primary { color: #2563eb !important; }
.text-muted { color: #64748b !important; }

/* Responsive Mobile Cards for Reporting (Touch target >= 48px) */
.report-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.report-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.report-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
}

.report-card-row {
  display: flex;
  flex-direction: column;
}

.report-card-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.report-card-val {
  font-weight: 600;
  color: var(--text);
}

.report-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.report-card-actions button,
.report-card-actions a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

@media (max-width: 768px) {
  .report-table-wrapper {
    display: none !important;
  }
  .report-cards-container {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
}

@media (min-width: 769px) {
  .report-table-wrapper {
    display: block !important;
  }
  .report-cards-container {
    display: none !important;
  }
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: 92%;
  width: 380px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease-out;
}

.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.warning { background: #92400e; }

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

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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