*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f1117;
  --bg2:      #1a1d2e;
  --bg3:      #252840;
  --border:   #2e3150;
  --text:     #e2e8f0;
  --text2:    #94a3b8;
  --accent:   #6366f1;
  --accent2:  #818cf8;
  --success:  #22c55e;
  --warn:     #f59e0b;
  --danger:   #ef4444;
  --radius:   8px;
  --shadow:   0 2px 12px rgba(0,0,0,.4);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.page { padding: 32px 0; }

/* Navbar */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  display: flex; align-items: center; gap: 24px;
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  height: 56px;
}
.navbar-brand { font-weight: 700; font-size: 18px; color: var(--accent2); }
.navbar-brand span { color: var(--text2); font-weight: 400; font-size: 13px; }
.navbar-links { display: flex; gap: 8px; flex: 1; }
.navbar-links a {
  padding: 6px 12px; border-radius: var(--radius);
  color: var(--text2); font-size: 14px;
  transition: background .15s, color .15s;
}
.navbar-links a:hover, .navbar-links a.active {
  background: var(--bg3); color: var(--text); text-decoration: none;
}
.navbar-right { display: flex; gap: 8px; margin-left: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; border: none;
  cursor: pointer; transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* Cards */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-card img {
  width: 100%; height: 180px; object-fit: cover;
  background: var(--bg3);
}
.project-card-body { padding: 16px; }
.project-card-title { font-weight: 600; margin-bottom: 6px; }
.project-card-meta { color: var(--text2); font-size: 13px; display: flex; gap: 12px; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text2); }
input, textarea, select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 100px; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(239,68,68,.15); border: 1px solid var(--danger); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.15); border: 1px solid var(--success); color: #86efac; }
.alert-warn    { background: rgba(245,158,11,.15); border: 1px solid var(--warn); color: #fcd34d; }
.alert-info    { background: rgba(99,102,241,.15); border: 1px solid var(--accent); color: var(--accent2); }

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}
.badge-pending   { background: rgba(245,158,11,.2); color: var(--warn); }
.badge-approved  { background: rgba(34,197,94,.2); color: var(--success); }
.badge-rejected  { background: rgba(239,68,68,.2); color: var(--danger); }
.badge-draft     { background: rgba(148,163,184,.2); color: var(--text2); }
.badge-suspended { background: rgba(239,68,68,.2); color: var(--danger); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--text2); font-weight: 500; background: var(--bg3); }
tr:hover td { background: rgba(255,255,255,.02); }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 24px; justify-content: center; }
.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.pagination button.active { background: var(--accent); border-color: var(--accent); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* Misc */
.stars { color: var(--warn); letter-spacing: 2px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text2); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Loading spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* File Drop Zone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); }
.dropzone p { color: var(--text2); margin-top: 8px; font-size: 13px; }

/* Sidebar layout */
.layout-2col { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 0;
  height: fit-content;
  position: sticky;
  top: 72px;
}
.sidebar a {
  display: block;
  padding: 10px 20px;
  color: var(--text2);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.sidebar a:hover, .sidebar a.active {
  background: var(--bg3);
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 768px) {
  .layout-2col { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; flex-wrap: wrap; }
  .card-grid { grid-template-columns: 1fr; }
}
