/* LogStock - ERP Styles */
:root {
  --primary: #1a5fb4;
  --primary-light: #3b82f6;
  --primary-dark: #0f3e81;
  --accent: #ff6600;
  --accent-light: #fb923c;
  --success: #2d8f3c;
  --danger: #dc2626;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }

body { margin: 0; overflow-x: hidden; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Sidebar */
.sidebar { transition: width 0.3s ease, transform 0.3s ease; }
.sidebar.collapsed { width: 64px !important; }
.sidebar.collapsed .sidebar-label { display: none; }
.sidebar.collapsed .sidebar-header-text { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in { animation: slideIn 0.3s ease-out; }
.animate-scale-in { animation: scaleIn 0.2s ease-out; }

/* Cards */
.stat-card { transition: all 0.2s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: #f8fafc; position: sticky; top: 0; z-index: 1; }
.data-table th { padding: 12px 16px; text-align: left; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: #f8fafc; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s; }
.modal-content { background: white; border-radius: 12px; padding: 24px; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; animation: scaleIn 0.2s; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px; font-weight: 500; font-size: 0.875rem; cursor: pointer; transition: all 0.15s; border: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #ea580c; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: transparent; border: 1px solid #d1d5db; color: #374151; }
.btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-ghost { background: transparent; color: #6b7280; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }

/* Form inputs */
.form-input { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.875rem; transition: all 0.15s; outline: none; background: white; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,95,180,0.1); }
.form-label { display: block; font-weight: 500; font-size: 0.875rem; color: #374151; margin-bottom: 4px; }
.form-group { margin-bottom: 16px; }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; animation: slideIn 0.3s ease-out; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.toast-success { background: #166534; color: white; }
.toast-error { background: #991b1b; color: white; }
.toast-warning { background: #92400e; color: white; }

/* Status dots */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.active { background: #22c55e; }
.status-dot.inactive { background: #ef4444; }
.status-dot.warning { background: #f59e0b; }

/* Tab navigation */
.tab-nav { display: flex; gap: 4px; border-bottom: 2px solid #e5e7eb; padding-bottom: 0; }
.tab-btn { padding: 8px 16px; font-size: 0.875rem; font-weight: 500; color: #6b7280; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 40; transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .modal-content { width: 95%; margin: 16px; }
}
