/* PPDO DMS Shared Styles */
/* Location: /ppdo/assets/style.css */

[x-cloak] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f8fafc;
}

/* Tabs */
.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
}
.tab-btn:hover { color: #374151; }
.tab-btn.active { border-bottom-color: #2563eb; color: #2563eb; font-weight: 500; }

/* Inputs */
.inp {
  width: 100%;
  font-size: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #111827;
}
.inp:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,0.25); }
.inp:read-only { background: #f9fafb; color: #9ca3af; cursor: default; }

/* Buttons */
.btn { padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
.btn-ghost:hover { background: #f9fafb; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-amber { background: #f59e0b; color: #fff; }
.btn-amber:hover { background: #d97706; }

/* Cards */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; }
.card-inner { border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; transition: border-color 0.15s; }
.card-inner:hover { border-color: #bfdbfe; }

/* Badges */
.badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; display: inline-block; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-amber  { background: #fef9c3; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }
.badge-teal   { background: #ccfbf1; color: #065f46; }

/* AI block */
.ai-block {
  background: #eff6ff;
  border-left: 3px solid #93c5fd;
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
}

/* Leave card */
.leave-card { border-left: 4px solid #10b981; }
.to-card    { border-left: 4px solid #f59e0b; }

/* Search highlight */
mark { background: #fef08a; padding: 0 2px; border-radius: 2px; }

/* Autocomplete dropdown */
.autocomplete-list {
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-height: 180px;
  overflow-y: auto;
  width: 100%;
  top: calc(100% + 4px);
  left: 0;
}
.autocomplete-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
}
.autocomplete-item:hover { background: #f0f9ff; }

/* Upload drop zone */
.drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.drop-zone:hover, .drop-zone.drag { border-color: #2563eb; background: #eff6ff; }

/* Stat card */
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111827;
  color: #f9fafb;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
