:root {
  --accent1: #8b5cf6;
  --accent2: #06b6d4;
  --bg: #0B0F1A;
  --surface: #111827;
  --text: #f1f5f9;
  --radius: 0.75rem;
}

/* ===== Global ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Inter", Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== Header ===== */
.header {
  background: var(--surface);
  border-bottom: 1px solid #1f2937;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-weight: 800; letter-spacing: .2px; }
.header nav a { color: var(--text); text-decoration: none; }

/* ===== Layout ===== */
.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }

/* ===== Card Shell ===== */
.card {
  background: var(--surface);
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.card h2 {
  margin: 0 0 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent2), #3b82f6);
  font-size: 1.05rem;
}
.meta { opacity: .8; font-size: .9rem; }

/* ===== Buttons (generic) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid #1f2937;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent2);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Primary/gradient button (e.g., Submit) */
.btn.grad {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #0B0F1A;
  border: none;
}
.btn.grad:hover { filter: brightness(1.02); }

/* Button sizes & layout helpers */
.btn.sm { padding: 8px 12px; font-size: .9rem; }
.btn.lg { padding: 14px 18px; font-size: 1.05rem; }
.btn-row { display: grid; gap: 16px; } /* vertical stack */

/* ===== Index: Action Cards (button-as-card) ===== */
.action-card {
  display: block;
  background: var(--surface);
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent2);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.action-card h3 { margin: 0 0 8px 0; font-size: 1.1rem; font-weight: 800; }
.action-card p  { margin: 0; opacity: .85; font-size: .95rem; }

/* Optional: action (button + small description block) */
.action { display: grid; gap: 6px; }
.action .desc { margin: 0; opacity: .85; font-size: .95rem; }

/* ===== Forms (share.php) ===== */
.form-grid { display: grid; gap: 12px; }
.input, .textarea, .search {
  width: 100%;
  background: #1e293b;
  color: var(--text);
  border: 1px solid #243041;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.input:focus, .textarea:focus, .search:focus { border-color: var(--accent2); }
.textarea { resize: vertical; }

/* Flash messages */
.flash {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(6,182,212,.15);
  border: 1px solid var(--accent2);
}
.flash.error {
  background: rgba(255, 76, 76, .12);
  border-color: #ef4444;
}

/* ===== FIND LIST (find.php) ===== */

/* Grid container for cards */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

/* Each item card */
.item-card {
  background: linear-gradient(180deg, #121a28 0%, #0f1724 100%);
  border: 1px solid #1f2937;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6,182,212,.45);
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}

/* Card header (Subject) */
.item-header {
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(139,92,246,.18), rgba(6,182,212,.18));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.item-subject {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* Card body */
.item-body {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

/* Field row: label + value (with colon) */
.field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.field:last-child { border-bottom: none; }

.field label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent2);
  margin-right: 10px;
  flex: 0 0 110px; /* fixed label width */
  text-align: left;
}
.field label::after {
  content: ":";
  margin-left: 2px;
  color: var(--text);
  opacity: .8;
}

.field .value {
  flex: 1;
  text-align: left;
  font-size: .95rem;
  color: var(--text);
  word-break: break-word;
}

/* Copy area (right side for CC Number / Date) */
.copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Copy button */
.copy-btn {
  padding: 4px 8px;
  font-size: .8rem;
  border-radius: 6px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border: none;
  color: #0B0F1A;
  font-weight: 700;
  white-space: nowrap;
}
.copy-btn:hover { opacity: .95; }

/* Timestamp at bottom */
.time {
  opacity: .7;
  font-size: .82rem;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255,255,255,.07);
}

/* ===== Extras (older helpers retained so nothing breaks) ===== */

/* Older tool grid (if you reuse elsewhere) */
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* A generic hoverable small card/button style */
.tool-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--surface);
  border: 1px solid #1f2937; border-radius: var(--radius);
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.tool-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
  border-color: var(--accent2); color: var(--accent2);
}

/* Small utility text styles */
.note { opacity: .95; line-height: 1.45; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block;
  font-size: .8rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6,182,212,.18);
  border: 1px solid rgba(6,182,212,.35);
}
