/* -------------------------
   RAECOS Base Style
   Black + Rose Palette
------------------------- */

:root {
  --bg: #0f0f12;
  --panel: #17171d;
  --text: #f2f2f4;
  --muted: #a0a0ad;

  --rose: #d16c8a;
  --rose-soft: #b85c77;
  --rose-dark: #8e3f55;

  --border: #2a2a33;
  --panel-2: #121218;
}

/* Reset-ish */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
}

/* Layout */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* -------------------------
   Top Bar / Navigation
------------------------- */

.topbar {
  background: #000;
  border-bottom: 1px solid var(--border);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--rose);
}

.nav a {
  color: var(--muted);
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

/* Hover */
.nav a:hover {
  color: var(--rose);
}

/* ACTIVE NAV ITEM */
.nav a.is-active {
  color: var(--rose);
  border-bottom-color: var(--rose);
}

/* Optional: admin link pill */
.nav a.nav-admin {
  border: 1px solid rgba(209, 108, 138, 0.45);
  border-bottom: 1px solid rgba(209, 108, 138, 0.45); /* override underline */
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.85rem;
  color: rgba(242, 242, 244, 0.92);
}

.nav a.nav-admin:hover {
  border-color: rgba(209, 108, 138, 0.9);
  color: var(--rose);
}

.nav a.nav-admin.is-active {
  background: rgba(209, 108, 138, 0.12);
  color: var(--rose);
  border-color: rgba(209, 108, 138, 0.9);
}

/* Buttons-as-links (for top-right actions like "+ New Task") */
a.btn {
  display: inline-block;
  background: var(--rose);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

a.btn:hover { background: var(--rose-soft); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  color: var(--muted);
}

/* Headings */
h1, h2, h3 {
  color: var(--text);
  margin-top: 0;
}

h1 {
  font-size: 1.65rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

/* Forms */
label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

textarea,
input[type="text"],
input[type="password"],
select {
  width: 100%;
  background: #0b0b0e;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.65rem 0.7rem;
  font-size: 0.95rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--rose);
}

/* Buttons */
button {
  background: var(--rose);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: var(--rose-soft); }

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.btn-danger {
  background: transparent;
  color: #ffb6c1;
  border: 1px solid #5a2a38;
}

.btn-danger:hover {
  border-color: var(--rose);
  color: var(--rose);
}

/* Lists */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  background: var(--rose-dark);
  color: #fff;
}

/* Links */
a {
  color: var(--muted);
}

a:hover {
  color: var(--rose);
}

a.meta {
  text-decoration: none;
  border-bottom: 1px dashed rgba(160, 160, 173, 0.35);
}

a.meta:hover {
  border-bottom-color: rgba(209, 108, 138, 0.6);
}

/* Utility */
.spacer { height: 1rem; }
.spacer-sm { height: 0.5rem; }

.actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.inline-form { display: inline; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  .nav a { margin-left: 0.6rem; }
}

/* -------------------------
   Accordion Cards
------------------------- */

.card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: border-color 120ms ease;
}

.card:hover {
  border-color: rgba(209, 108, 138, 0.45);
}

.card summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card summary::-webkit-details-marker { display: none; }

.card .summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.card .title {
  font-weight: 900;
}

.card .pill {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.card[open] summary {
  border-bottom: 1px solid var(--border);
  background: rgba(209, 108, 138, 0.06);
}

.card .body {
  padding: 0.9rem 1rem 1rem;
}

.compact textarea { min-height: 110px; }
.compact label { margin-top: 0.25rem; }
