@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --color-primary: #1B6EDB;
  --color-primary-dark: #0D3B6E;
  --color-accent: #FF6B2C;
  --color-yellow: #FFD23F;
  --color-success: #27AE60;
  --color-warning: #F39C12;
  --color-danger: #E74C3C;
  --color-bg-light: #F4F8FD;
  --color-white: #FFFFFF;
  --color-text: #2C3E50;
  --color-text-muted: #7F8C8D;
  --color-border: #E0E6ED;

  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Poppins', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-hover: 0 15px 25px rgba(27, 110, 219, 0.15);

  --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dark); }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 800; color: var(--color-text); margin-bottom: 0.5em; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
p { margin-bottom: 1rem; }

/* Layout Utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius-pill);
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: var(--transition); text-align: center;
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-primary { background: var(--color-primary); color: var(--color-white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-secondary { background: var(--color-white); color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-secondary:hover { background: var(--color-bg-light); transform: translateY(-2px); }
.btn-accent { background: var(--color-accent); color: var(--color-white); box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: #E65A20; transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-danger { background: var(--color-danger); color: var(--color-white); }
.btn-danger:hover { background: #C0392B; color: white; }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--color-text); }

/* Components */
.card {
  background: var(--color-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 1.5rem; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }

.badge {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-safe { background: rgba(39, 174, 96, 0.1); color: var(--color-success); }
.badge-pending { background: rgba(243, 156, 18, 0.1); color: var(--color-warning); }
.badge-held { background: rgba(231, 76, 60, 0.1); color: var(--color-danger); }
.badge-new { background: rgba(27, 110, 219, 0.1); color: var(--color-primary); }

.alert {
  padding: 1rem; border-radius: var(--radius-md); margin-bottom: 1rem;
  font-weight: 500; display: flex; align-items: center; gap: 0.75rem;
}
.alert-info { background: rgba(27, 110, 219, 0.1); color: var(--color-primary-dark); border-left: 4px solid var(--color-primary); }
.alert-success { background: rgba(39, 174, 96, 0.1); color: #1E8449; border-left: 4px solid var(--color-success); }
.alert-warning { background: rgba(243, 156, 18, 0.1); color: #B9770E; border-left: 4px solid var(--color-warning); }
.alert-danger { background: rgba(231, 76, 60, 0.1); color: #922B21; border-left: 4px solid var(--color-danger); }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--color-text); }
.form-control {
  width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--color-border);
  border-radius: var(--radius-md); font-family: var(--font-body); font-size: 1rem;
  transition: var(--transition); background: var(--color-white);
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(27, 110, 219, 0.2); }
.form-error { color: var(--color-danger); font-size: 0.875rem; margin-top: 0.5rem; display: block; }

/* Navigation */
.nav-bar {
  background: var(--color-white); box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 100; padding: 1rem 0;
}
.nav-bar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 900; color: var(--color-primary-dark); display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--color-text); font-weight: 600; }
.nav-links a:hover { color: var(--color-primary); }

/* Layouts */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--color-white); border-right: 1px solid var(--color-border); padding: 2rem 1.5rem; display: flex; flex-direction: column; }
.main-content { flex: 1; padding: 2rem; overflow-y: auto; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; background: var(--color-border); flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 120px; height: 120px; }

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-dialog {
  background: var(--color-white); border-radius: var(--radius-lg); padding: 2rem;
  width: 100%; max-width: 500px; transform: scale(0.95); transition: var(--transition);
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal-overlay.active .modal-dialog { transform: scale(1); }
.modal-close { float: right; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text-muted); }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 2rem; }
.p-4 { padding: 1rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.animate-fade { animation: fadeIn 0.5s ease forwards; }
.animate-slide { animation: slideUp 0.5s ease forwards; }
