/* styles.css
   Elaksi-inspired UI: airy hero, pill search, rounded cards, soft gradients.
   Original implementation (not copied) — paste into public/styles.css
*/

/* ---------- Theme variables ---------- */
:root{
  --bg-100: #fbfdff;
  --page-bg: linear-gradient(180deg,#fbfefe 0%, #ffffff 60%);
  --muted: #6b7280;
  --text: #0b1220;
  --brand-1: #19b38a;    /* fresh green */
  --brand-2: #8b61ff;    /* purple accent */
  --accent-light: rgba(24,160,140,0.08);
  --card-bg: #ffffff;
  --pill-bg: #f3fbf9;
  --soft-border: #e9eef6;
  --radius-lg: 22px;
  --radius-md: 12px;
  --shadow-sm: 0 6px 18px rgba(9,20,35,0.06);
  --shadow-lg: 0 18px 50px rgba(9,20,35,0.08);
  font-synthesis: none;
  color-scheme: light;
}

/* ---------- Reset & base ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: var(--page-bg);
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}

/* ---------- Layout container ---------- */
.container{
  max-width:1200px;
  margin:22px auto;
  padding:20px;
}

/* ---------- Header / nav ---------- */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:20px 0;
  gap:18px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  font-size:1.4rem;
}
.brand .brand-accent{ color: var(--brand-1); }

/* ---------- Pill search (in header) ---------- */
.search-pill{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:360px;
  background:var(--pill-bg);
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--soft-border);
  box-shadow: 0 8px 30px rgba(9,20,35,0.04);
}
.search-pill input{
  border:0;
  outline:0;
  background:transparent;
  font-size:14px;
  color:var(--text);
  width:100%;
}

/* ---------- Hero area now matches panels ---------- */
.hero{
  display:block;
  gap:0;
  margin-top:10px;
}
.hero-card{
  background:var(--card-bg);
  border-radius:14px;
  padding:18px;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--soft-border);
  position:relative;
  overflow:visible;
}
.hero-card .tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--pill-bg);
  color: var(--muted);
  font-weight:700;
  font-size:13px;
}
.hero-card h1{
  margin:12px 0 8px 0;
  font-size:32px;
  line-height:1.05;
  color:var(--text);
}
.hero-card p.lead{
  margin:8px 0 12px 0;
  color:var(--muted);
  font-size:15px;
}

/* CTA group */
.cta-row{
  display:flex;
  gap:18px;
  align-items:center;
  margin-top:14px;
}

/* ---------- Buttons ---------- */
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #2d8cff, #4285f4);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(66, 133, 244, 0.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-submit:hover{ transform: translateY(-2px); box-shadow: 0 14px 36px rgba(66,133,244,0.18); }
.btn-submit:active{ transform:none; box-shadow: 0 6px 18px rgba(66,133,244,0.12); }

/* brand variation (green) */
.btn-submit.brand {
  background: linear-gradient(90deg, #18b886, #0ea58d);
  box-shadow: 0 10px 30px rgba(14,165,164,0.14);
}

/* plain (reset) variant */
.btn-submit.plain {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--soft-border);
  box-shadow: none;
}

/* ---------- Panels / forms ---------- */
.panels{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:20px;
  margin-top:22px;
}
.panel{
  background:var(--card-bg);
  border-radius:14px;
  padding:18px;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--soft-border);
}
.panel h2{ margin:0 0 12px 0; font-size:1.1rem; }

/* form fields */
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.field label{ font-size:0.85rem; color:var(--muted); }
.field input, .field select, .field textarea{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--soft-border);
  background: #fff;
  font-size:14px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus{
  box-shadow: 0 8px 24px rgba(24,160,140,0.06);
  border-color: rgba(24,160,140,0.35);
}

/* ---------- Search area & results ---------- */
.search-section{ margin-top:22px; }
.search-controls{
  display:flex;
  gap:8px;
  align-items:center;
}
.search-controls input{
  flex:1;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--soft-border);
  font-size:14px;
}
.results{
  margin-top:12px;
  background:var(--card-bg);
  border-radius:12px;
  padding:12px;
  box-shadow:var(--shadow-sm);
  overflow:auto;
}
table{ width:100%; border-collapse:collapse; min-width:700px; }
thead th{ text-align:left; padding:12px 14px; color:var(--muted); font-weight:700; border-bottom:1px solid #f3f6fa; }
tbody td{ padding:12px 14px; border-bottom:1px solid #f7f9fb; vertical-align:middle; font-size:14px; }

/* small utils */
.helper-row{ display:flex; gap:8px; align-items:center; margin-top:12px; }
.small{ font-size:0.9rem; color:var(--muted) }

/* responsive */
@media (max-width:1080px){
  .panels{ grid-template-columns: 1fr; }
  .search-pill{ min-width:260px; }
  table{ min-width:600px; }
}

/* ---------- Delete button (destructive variant) ---------- */
.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #ff5252, #ff1744);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 23, 68, 0.25);
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background: linear-gradient(90deg, #ff1744, #ff5252);
  box-shadow: 0 8px 22px rgba(255, 23, 68, 0.35);
  transform: translateY(-1px);
}

.btn-delete:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(255, 23, 68, 0.25);
}

/* Edit button (neutral) */
.btn-edit {
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: linear-gradient(90deg,#ffffff,#f8fafc);
  color:var(--text);
  border:1px solid var(--soft-border);
  font-weight:600;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  box-shadow: 0 6px 18px rgba(9,20,35,0.03);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-edit:hover{ transform: translateY(-2px); box-shadow: 0 10px 30px rgba(9,20,35,0.05); }

/* Modal overlay + panel */
._modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 15, 28, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
._modal {
  width: 720px;
  max-width: 100%;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(2,6,23,0.35);
  border: 1px solid var(--soft-border);
}
._modal h3{ margin:0 0 12px 0; font-size:1.15rem }
._modal .row{ display:flex; gap:12px }
._modal .col{ flex:1 }
._modal .actions{ display:flex; gap:8px; justify-content:flex-end; margin-top:14px }
._modal input, ._modal select { width:100%; padding:10px 12px; border-radius:8px; border:1px solid var(--soft-border) }

/* ---------- Actions column alignment fix (CSS-only) ---------- */
/* Targets the last cell (Actions) and forces proper vertical centering & right alignment */
table tbody td:last-child {
  display: flex;
  align-items: center;          /* vertical center */
  justify-content: flex-end;    /* right align buttons */
  gap: 12px;
  padding-right: 20px;          /* space from table edge */
  white-space: nowrap;
}

/* Ensure header aligns with actions column */
thead th:last-child {
  text-align: right;
  padding-right: 20px;
}

/* Buttons inside actions cell should not alter row height */
table tbody td:last-child > button {
  margin: 0;
  vertical-align: middle;
}

/* If you render actions inside a container, keep it flexible */
table tbody td .actions-container {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-end;
}

/* small-screen tweak to avoid overflow */
@media (max-width: 640px) {
  table tbody td:last-child { padding-right: 10px; gap:8px; }
  .btn-delete { padding:6px 12px; font-size:13px; }
  .btn-edit { padding:6px 10px; font-size:13px; }
}
