/* TakeItHonest — Restored global styles (light theme)
   This file restores header/nav buttons, cards, inputs, dashboard grid,
   and editor panel widths. Append-only patches should not replace this again.
*/

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  color: #0f172a; /* slate-900 */
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(167,139,250,.12), transparent 60%),
    radial-gradient(1000px 700px at 110% -20%, rgba(96,165,250,.12), transparent 70%),
    #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
/* Grids used for vertical form spacing */
.grid {
  display: block;
  padding: 0 16px;
}

/* When .grid is used as a row container (inside editors), align inline elements properly */
.grid.inline,
.grid.flex {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Specialized for password-protection toggle */
.pw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin-top: 8px;
}

.pw-toggle input[type="checkbox"] {
  margin-right: 6px;
}


main .container { padding-top: 12px; padding-bottom: 24px; }

/* Header / Navigation */
.header { background: transparent; border-bottom: 1px solid #f1f5f9; }
.brand { display:inline-block; padding: 14px 8px; color:#2563eb; font-weight:700; text-decoration:none; }
.header .nav { display:flex; justify-content:space-between; align-items:center; gap:8px; padding-top: 6px; padding-bottom: 6px;}

.btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px; border-radius: 12px; border: 1px solid #e5e7eb; cursor:pointer;
  font-weight:600; text-decoration:none; background:#fff; color:#1f2937;
}
.btn-ghost { background:#ffffff; color:#1f2937; }
.btn-ghost:hover { background:#f8fafc; }
.btn-primary {
  color:#fff; border:0;
  background-image: linear-gradient(135deg, #7c3aed, #2563eb);
  box-shadow: 0 12px 28px rgba(37,99,235,.28);
}

/* Cards */
.card {
  background:#fff; border:1px solid #e5e7eb; border-radius: 14px;
  box-shadow: 0 8px 20px rgba(17,24,39,.08); padding: 16px;
}

/* Forms */
.label { display:block; font-weight:700; font-size:14px; margin: 6px 0 6px; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; max-width: 100%;
  padding: 12px 14px; border:1px solid #e5e7eb; border-radius: 12px; outline: none;
  background:#ffffff;
}
.input:focus, input:focus, textarea:focus, select:focus { border-color:#93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.2); }

/* Rows */
.form-row { display:block; margin-bottom: 14px; }
.form-row.two { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 640px){ .form-row.two { grid-template-columns: 1fr; } }

/* Editor panel width */
.form-panel { width: min(100%, 800px); margin-left:auto; margin-right:auto; }
.form-panel .form-row { min-width:0; }
.form-panel .input,
.form-panel input[type=text],
.form-panel input[type=number],
.form-panel textarea,
.form-panel select { width:100%; max-width:100%; }

/* Dashboard */
.dash-head { display:flex; justify-content:space-between; align-items:center; margin:18px 0 12px; }
.dash-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:16px; }
@media (min-width: 1000px){ .dash-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px){ .dash-grid { grid-template-columns: 1fr; } }

.form-card { position:relative; padding-right: 56px; } /* space for status & menu */
.form-card-menu { position:absolute; top:10px; right:10px; z-index:3; }
.status-pill {
  position:absolute; top:14px; right:46px; z-index:2;
  font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid #e5e7eb; background:#f8fafc;
}

/* Alerts / flashes */
.alert, .notice, .flash { margin:24px 0; padding:14px 18px; border-radius:12px; }
.alert.success { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.alert.error   { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }

/* Editor required row + description width (safe, minimal) */
.q-required{ display:inline-flex; align-items:center; gap:8px; margin:6px 0 10px }
.tih-editor textarea[name="description"], .tih-editor #desc,
.form-panel textarea[name="description"] { width:100%; max-width:100%; box-sizing:border-box; }

/* Utilities */
.mt-2{margin-top:.5rem} .mt-3{margin-top:.75rem} .mt-4{margin-top:1rem}
.mb-2{margin-bottom:.5rem} .mb-3{margin-bottom:.75rem} .mb-4{margin-bottom:1rem}


/* --- Custom: improve vertical spacing for form sections --- */
section.grid h2 {
  margin-bottom: 16px; /* adds space under the title */
}

section.grid .card {
  margin-top: 12px; /* adds space above each card/form box */
  margin-bottom: 12px; /* optional, keeps consistent bottom gap */
}

section.grid form .btn {
  margin-top: 12px; /* adds space above the submit button */
}
