* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0a2463;
  --navy-light: #0f3375;
  --green: #80BC00;
  --white: #ffffff;
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #666;
  --border: #e5e5e5;
  --radius: 10px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 18px; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.search-bar { margin: 24px 32px 0; }
.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.search-bar input:focus { border-color: var(--navy); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 16px 32px;
  overflow-x: auto;
}
.tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  white-space: nowrap;
}
.tab.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 8px 32px 32px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 48px;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.card-meta { font-size: 12px; color: var(--text-light); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.badge-category { background: #e8edf5; color: var(--navy); }
.badge-draft { background: #fff3cd; color: #856404; }
.badge-final { background: #d4edda; color: #155724; }
.badge-archived { background: #e2e3e5; color: #383d41; }
.card-actions {
  display: flex;
  gap: 8px;
  padding: 8px 16px 14px;
}
.card-actions button {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.card-actions button:hover { background: var(--bg); }

.btn-new {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-new:hover { filter: brightness(1.1); }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
}
.modal h2 { margin-bottom: 20px; font-size: 18px; }
.modal label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; }
.modal input, .modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--white);
}
.modal-actions .btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }

.user-avatar { width: 32px; height: 32px; border-radius: 50%; }

.empty-state {
  text-align: center;
  padding: 80px 32px;
  color: var(--text-light);
}
.empty-state p { font-size: 15px; }
