/* ===== CSS VARIABLES ===== */
:root {
  /* Color Palette */
  --neutral-white: #FFFFFF;
  --neutral-gray: #2C3E50;
  --light-gray: #F8F9FA;
  --border-gray: #999;
  
  /* Typography */
  --font-body: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  
  /* Layout */
  --container-max-width: 960px;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body {
  background-color: #F3EEE2;
  font-family: var(--font-body);
  font-weight: 400;
  font-style: normal;
  font-size: 1.2rem;
  margin: 0;
  padding: 0;
}

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-md) 0;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem;}
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 var(--space-md) 0;
}

p.small {
  font-size: 0.8rem;
  color: #666;
}

p.smallish {
  font-size: 0.9rem;
  color: #333;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.preformatted {
  font-family: monospace;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  word-break: break-all;
  word-break: break-word;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

.small-date {
  font-size: 0.8rem;
  color: #666;
}

.invite-code {
  font-family: monospace;
  font-size: 1rem;
  color: #000;
  padding: 2px 10px;
  background-color: #FFFF00;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
}

.action-col {
  display: flex;
  justify-content: center;
}
/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.center {
  text-align: center;
}

.mt-xs {
  margin-top: var(--space-xs);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-xs {
  margin-bottom: var(--space-xs);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

/* ===== FORMS ===== */
.button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid #4A4A4A;
  border-radius: 5px;
  color: #4A4A4A;
  background-color: #FFFFFF;
  transition: all 0.3s ease;
}

.button:hover {
  background-color: #4A4A4A;
  color: #FFFFFF;
  text-decoration: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: #1f1f1f;
  background-color: #fff;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: none;
  margin: var(--space-xs) 0;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: #4A4A4A;
  background-color: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

button,
.button {
  margin: var(--space-xs) 0;
}

.big-button {
  font-size: 1.2rem;
  padding: 12px 24px;
}

img {
  max-width: 100%;
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin: 1rem 0;
}

.input-group-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group label {
  font-weight: 600;
}

.input-group select {
  font: inherit;
  padding: 6px 10px;
  border: 2px solid #4A4A4A;
  border-radius: 5px;
  background-color: #FFFFFF;
  color: #4A4A4A;
}

.welcome-form form {
width: 60%;
margin: 0 auto;
min-width: 300px;
}
#canvas-holder {
  margin-top: 1rem;
  border: 1px solid #999;
  width: 100%;
  height: 100%;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-sm);
}

th, td {
  padding: 10px 12px;
  text-align: left;
}

th {
  font-weight: 700;
  border-bottom: 2px solid var(--border-gray);
}

tbody tr:nth-child(odd) {
  background-color: var(--light-gray);
}

tbody tr:nth-child(even) {
  background-color: #fff;
}

tbody tr:hover {
  background-color: #f1f1f1;
}

/* ===== NAV ===== */
.top-nav {
  border-bottom: 1px solid var(--border-gray);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-sm);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.8rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: #000;
}

.nav-right form {
  margin: 0;
}

div#ask-ai-answer {
  background-color: #f5f5f5;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  word-break: break-all;
  word-break: break-word;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

.ai-suggestions {
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.ai-suggestions code {
  display: block;
  margin: 6px 0;
  padding: 6px 8px;
  background-color: #fff;
  cursor: pointer;
  color: #2c3e50;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  font-size: 0.8rem;
}

.ai-suggestions code:hover {
  background-color: #eef3ff;
  border-color: #b5c7ff;
}