/* css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #e3bb5c; /* Main Gold */
  --primary-hover: #d3a745;
  --primary-focus: rgba(227, 187, 92, 0.3);
  --primary-shadow-strong: rgba(227, 187, 92, 0.35);
  --bg-soft: #f7f2e9;
  --surface: #ffffff;
  --surface-muted: #f2ecde;
  --text-main: #2f2617;
  --text-strong: #3a3013;
  --text-muted: #6b5f46;
  --border-color: #e2d7c2;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.06);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-soft);
  color: var(--text-main);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Minimal surface utilities */
.glass {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(227, 187, 92, 0.18);
  box-shadow: var(--shadow-soft);
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--surface-muted); 
}
::-webkit-scrollbar-thumb {
  background: var(--primary); 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover); 
}

/* Inputs & Forms */
.input-field {
  width: 100%; padding: 0.625rem 1rem; border-radius: 0.75rem; background-color: var(--surface); border: 1px solid var(--border-color); color: var(--text-main); outline: none; transition: all 0.2s;
}
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-focus); }

.select-field {
  width: 100%; padding: 0.625rem 1rem; border-radius: 0.75rem; background-color: var(--surface); border: 1px solid var(--border-color); color: var(--text-main); outline: none; transition: all 0.2s; -webkit-appearance: none; appearance: none;
}
.select-field:focus { border-color: var(--primary); }

.label-text {
  display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.375rem;
}

/* Buttons */
.btn-primary {
  width: 100%; background-color: var(--primary); color: var(--text-strong); font-weight: 700; padding: 0.75rem 1rem; border-radius: 0.75rem; transition: all 0.2s; box-shadow: 0 10px 20px -3px var(--primary-shadow-strong); border: none; cursor: pointer;
}
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-0.125rem); }

.btn-secondary {
  width: 100%; background-color: var(--surface-muted); color: var(--text-main); font-weight: 600; padding: 0.75rem 1rem; border-radius: 0.75rem; transition: all 0.2s; border: 1px solid var(--border-color); cursor: pointer;
}
.btn-secondary:hover { background-color: #e8dec3; }

.btn-danger {
  width: 100%; background-color: #e11d48; color: #fff; font-weight: 600; padding: 0.75rem 1rem; border-radius: 0.75rem; transition: all 0.2s; box-shadow: 0 10px 15px -3px rgba(225, 29, 72, 0.2); border: none; cursor: pointer;
}
.btn-danger:hover { background-color: #be123c; transform: translateY(-0.125rem); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9999;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { background-color: #10b981; }
.toast.error { background-color: #ef4444; }

/* Table styles */
.table-container {
  width: 100%; overflow-x: auto; border-radius: 0.75rem; border: 1px solid var(--border-color); background-color: var(--surface);
}
.data-table {
  width: 100%; text-align: left; border-collapse: collapse;
}
.data-table th {
  background-color: var(--surface-muted); padding: 1rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border-color);
}
.data-table td {
  padding: 1rem; border-bottom: 1px solid rgba(226, 215, 194, 0.8); font-size: 0.9rem; color: var(--text-main);
}
.data-table tr:hover td {
  background-color: #f9f4e7;
}
.badge {
  padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
}
.badge-pending { background-color: rgba(227, 187, 92, 0.18); color: #8a6a1a; border: 1px solid rgba(227, 187, 92, 0.35); }
.badge-received { background-color: rgba(16, 185, 129, 0.15); color: #0f7a55; border: 1px solid rgba(16, 185, 129, 0.3); }

/* Light theme overrides for legacy dark utilities */
.text-white { color: var(--text-main) !important; }
.text-slate-500 { color: #7a6d56 !important; }
.text-slate-400 { color: #8c7d63 !important; }
.text-slate-300 { color: #9b8c72 !important; }
.text-slate-200 { color: #b3a78f !important; }

.bg-slate-800 { background-color: var(--surface) !important; }
.bg-slate-800\/50 { background-color: rgba(255, 255, 255, 0.5) !important; }
.bg-slate-800\/30 { background-color: rgba(255, 255, 255, 0.7) !important; }
.bg-slate-800\/80 { background-color: rgba(255, 255, 255, 0.9) !important; }
.bg-slate-800\/90 { background-color: rgba(255, 255, 255, 0.95) !important; }
.bg-slate-700 { background-color: var(--surface-muted) !important; }
.bg-slate-700\/50 { background-color: rgba(242, 236, 222, 0.5) !important; }
.bg-slate-900 { background-color: var(--bg-soft) !important; }
.bg-slate-900\/80 { background-color: rgba(0, 0, 0, 0.25) !important; }

.border-slate-700,
.border-slate-800,
.border-slate-600 { border-color: var(--border-color) !important; }
.border-slate-700\/50 { border-color: rgba(226, 215, 194, 0.7) !important; }

/* Dashboard layout hiding/showing */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.view-section.active {
  display: block;
}
