:root {
  --brand: #7c3f1d;
  --brand-hover: #653115;
  --brand-soft: rgba(124, 63, 29, 0.1);
  --light-bg: #f8f6f3;
  --light-card: #ffffff;
  --light-border: #e7e2dc;
  --light-text: #18181b;
  --light-muted: #64748b;

  --bg: #f8f6f3;
  --panel: #ffffff;
  --card: #ffffff;
  --border: #e7e2dc;
  --text: #18181b;
  --muted: #64748b;
  --emerald: #059669;
  --rose: #e11d48;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

/* Bright, Crisp Executive Light Sign-In & Invite Pages */
.auth-wrap {
  min-height: 100%;
  background: linear-gradient(160deg, #ffffff 0%, #f6f2ec 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(124, 63, 29, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 26px;
}

.brand-logo {
  width: 180px;
  height: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--light-text);
  letter-spacing: -0.2px;
}

h1, h2, h3 { margin: 0; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }

label.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #d6d0c8;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 63, 29, 0.12);
}

.field { margin-bottom: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-ghost {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-full { width: 100%; }

.alert-err {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
}

.alert-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
}

.avatar-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px dashed rgba(124, 63, 29, 0.35);
  background: #fdfbf9;
  margin-bottom: 16px;
}
.avatar-preview {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #f1ece6;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--brand);
}

.install-banner {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--brand);
}

/* Workspace Layout */
.shell {
  display: flex;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2px;
}

.nav-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 10px 6px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.nav-item:hover { background: #f3efe9; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.user-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: #f1ece6;
  border: 1.5px solid var(--brand);
  flex-shrink: 0;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}
@media (max-width: 1024px) {
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; max-height: 230px; border-right: 0; border-bottom: 1px solid var(--border); }
  .board { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .content { padding: 14px 16px; }
}

.col {
  background: #f2eee8;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
}
.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 2px 4px;
}

.task-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.task-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(124, 63, 29, 0.08);
}
.task-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--text); }
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: #f1ece6;
  color: #334155;
}
.pill-high { background: #ffe4e6; color: #be123c; }
.pill-medium { background: #fef3c7; color: #b45309; }
.pill-low { background: #f1f5f9; color: #475569; }

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.att-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.att-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.pdf-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fdfbf9;
  color: var(--brand);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.pdf-card:hover { border-color: var(--brand); }
