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

:root {
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --warning: #f59e0b;
}

body {
  margin: 0;
  font-family: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.25), transparent 18%),
    radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.2), transparent 20%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-subtitle { color: var(--muted); }

.topbar-logout button {
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.panel,
.auth-card {
  background: var(--surface);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.auth-card {
  max-width: 420px;
  margin: 6vh auto;
}

.panel h1,
.panel h2,
.panel h3,
.panel h4 {
  margin-top: 0;
}

.project-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.project-card {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 0.8rem;
  background: var(--surface-soft);
}

.project-card a {
  color: var(--accent-2);
  text-decoration: none;
}

.panel-sub,
.messages-list {
  margin-top: 1rem;
  border-top: 1px solid #334155;
  padding-top: 0.75rem;
}

.timeline {
  margin: 0;
  padding-left: 1.2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  margin: 0.45rem 0;
}

form.form-vertical {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

input,
textarea,
select,
button {
  font: inherit;
}

textarea,
input[type="text"],
input[type="password"],
input[type="file"],
select {
  width: min(100%, 520px);
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0b1220;
  color: var(--text);
  padding: 0.45rem;
}

button {
  width: fit-content;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
}

.file-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 2fr 1fr 1fr auto;
  margin-bottom: 0.45rem;
}

@media (max-width: 640px) {
  .timeline-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .file-row {
    grid-template-columns: 1fr;
  }
}
