* {
  box-sizing: border-box;
}

:root {
  font-family: Inter, Arial, sans-serif;
  color: #172033;
  background: #f4f7fb;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, #dff7ef, transparent 35%),
    linear-gradient(135deg, #f7fafc, #eef4f8);
}

.auth-card {
  width: min(430px, 100%);
  background: white;
  border-radius: 24px;
  padding: 42px;
  box-shadow: 0 20px 70px rgba(26, 44, 66, .12);
}

.brain {
  font-size: 52px;
}

.eyebrow {
  color: #15936d;
  font-weight: 800;
  letter-spacing: .14em;
  font-size: 12px;
}

.auth-card h1,
header h1 {
  margin: 5px 0 6px;
}

.subtitle {
  color: #697386;
}

label {
  display: block;
  margin: 18px 0 7px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 13px 14px;
  outline: none;
}

input:focus {
  border-color: #15936d;
}

.auth-card button {
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 11px;
  padding: 14px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.message {
  min-height: 24px;
  font-size: 14px;
  color: #b63b3b;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  background: #101827;
  color: white;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 36px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav a {
  padding: 12px 13px;
  border-radius: 10px;
  color: #c8d1df;
}

.sidebar nav a.active {
  color: white;
  background: #1d2b40;
}

.logout {
  margin-top: auto;
  border: 1px solid #36445a;
  background: transparent;
  color: white;
  border-radius: 10px;
  padding: 11px;
  cursor: pointer;
}

.main {
  padding: 38px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.status {
  padding: 9px 13px;
  border-radius: 999px;
  background: #e4f8ef;
  color: #147958;
  font-size: 13px;
  font-weight: 700;
}

.cards {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 18px;
}

.cards article {
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 30px rgba(35, 48, 67, .06);
}

.cards span {
  font-size: 28px;
}

.cards strong {
  display: block;
  font-size: 30px;
  margin-top: 18px;
}

.cards p {
  margin-bottom: 0;
  color: #758094;
}

.welcome {
  margin-top: 22px;
  background: white;
  border-radius: 20px;
  padding: 50px 30px;
  text-align: center;
}

.brain-large {
  font-size: 58px;
}

.loading,
.fatal {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

@media (max-width: 850px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .main {
    padding: 22px;
  }
}

.sidebar nav a {
  cursor: pointer;
}

.note-create,
.notes-list {
  margin-top: 26px;
  background: white;
  border-radius: 20px;
  padding: 28px;
}

.note-create h2,
.notes-list h2 {
  margin-top: 0;
}

.note-create textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 14px;
  font: inherit;
  outline: none;
}

.note-create textarea:focus {
  border-color: #15936d;
}

.note-create button {
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.note-message,
.note-error {
  color: #b63b3b;
}

.note-card {
  padding: 20px 0;
  border-bottom: 1px solid #e8edf3;
}

.note-card:last-child {
  border-bottom: 0;
}

.note-card h3 {
  margin: 0 0 8px;
}

.note-card p {
  white-space: pre-wrap;
  line-height: 1.6;
}

.note-card small {
  color: #8490a3;
}

.empty-notes {
  padding: 35px;
  text-align: center;
  color: #748095;
  background: #f7f9fc;
  border-radius: 14px;
}

.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.notes-toolbar h2 {
  margin-bottom: 3px;
}

.notes-toolbar p {
  margin: 0;
  color: #7a8496;
}

.notes-toolbar input {
  max-width: 340px;
}

.note-card {
  background: #f9fbfd;
  border: 1px solid #edf1f6;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 15px;
}

.note-card-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.note-actions {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
}

.note-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
}

.note-actions button:hover {
  background: #f1f5f9;
}

.note-actions .danger {
  color: #b52d2d;
}

.note-content {
  margin-top: 18px;
  white-space: pre-wrap;
  line-height: 1.65;
}

.note-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.note-tag {
  background: #e5f7f0;
  color: #14795a;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 700px) {

  .notes-toolbar,
  .note-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .notes-toolbar input {
    max-width: none;
  }
}

.project-create,
.projects-list {
  margin-top: 26px;
  background: white;
  border-radius: 20px;
  padding: 28px;
}

.project-create h2,
.projects-list h2 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.project-create select,
.project-create textarea {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 13px 14px;
  font: inherit;
  background: white;
}

.project-create textarea {
  min-height: 120px;
  resize: vertical;
}

.project-create button[type="submit"] {
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.project-card {
  background: #f9fbfd;
  border: 1px solid #edf1f6;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}

.project-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.project-status {
  color: #657186;
  font-size: 14px;
}

.project-actions {
  display: flex;
  gap: 8px;
}

.project-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
}

.project-actions .danger {
  color: #b52d2d;
}

.project-goal {
  margin-top: 20px;
}

.project-description {
  color: #586579;
  line-height: 1.6;
  white-space: pre-wrap;
}

.project-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 20px 0;
  color: #69758a;
}

.project-progress-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.project-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef4;
}

.project-progress > div {
  height: 100%;
  background: #15936d;
  border-radius: 999px;
}

@media (max-width: 700px) {

  .form-grid {
    grid-template-columns: 1fr;
  }

  .project-card-head {
    flex-direction: column;
  }
}

.task-create,
.tasks-list {
  margin-top: 26px;
  background: white;
  border-radius: 20px;
  padding: 28px;
}

.task-create h2,
.tasks-list h2 {
  margin-top: 0;
}

.task-create select,
.task-create textarea {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 13px 14px;
  font: inherit;
  background: white;
}

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

.task-create button[type="submit"] {
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.task-card {
  background: #f9fbfd;
  border: 1px solid #edf1f6;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 15px;
}

.task-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.task-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.task-project {
  color: #15936d;
  font-weight: 700;
  font-size: 14px;
}

.task-description {
  margin-top: 18px;
  color: #586579;
  line-height: 1.6;
  white-space: pre-wrap;
}

.task-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  color: #657186;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
}

.task-actions .danger {
  color: #b52d2d;
}

@media (max-width: 700px) {
  .task-card-head {
    flex-direction: column;
  }
}

.knowledge-create,
.knowledge-list {
  margin-top: 26px;
  background: white;
  border-radius: 20px;
  padding: 28px;
}

.knowledge-create h2,
.knowledge-list h2 {
  margin-top: 0;
}

.knowledge-create select,
.knowledge-create textarea {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 13px 14px;
  font: inherit;
  background: white;
}

.knowledge-create textarea {
  min-height: 180px;
  resize: vertical;
}

.knowledge-create .summary-input {
  min-height: 90px;
}

.knowledge-create button[type="submit"] {
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.knowledge-card {
  background: #f9fbfd;
  border: 1px solid #edf1f6;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}

.knowledge-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.knowledge-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.knowledge-source {
  color: #15936d;
  font-size: 14px;
  font-weight: 700;
}

.knowledge-actions {
  display: flex;
  gap: 8px;
}

.knowledge-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
}

.knowledge-actions .danger {
  color: #b52d2d;
}

.knowledge-summary {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #edf8f4;
}

.knowledge-summary p {
  margin-bottom: 0;
  line-height: 1.6;
}

.knowledge-content {
  margin-top: 20px;
  white-space: pre-wrap;
  line-height: 1.7;
}

.knowledge-url {
  margin-top: 18px;
  overflow-wrap: anywhere;
}

.knowledge-url a {
  color: #14795a;
}

.knowledge-footer {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: #748095;
  font-size: 13px;
}

@media (max-width: 700px) {
  .knowledge-card-head {
    flex-direction: column;
  }
}

.file-upload,
.files-list {
  margin-top: 26px;
  background: white;
  border-radius: 20px;
  padding: 28px;
}

.file-upload h2,
.files-list h2 {
  margin-top: 0;
}

.file-help {
  color: #657186;
  line-height: 1.6;
}

.file-upload input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px dashed #bdc8d8;
  border-radius: 12px;
  background: #f9fbfd;
}

.file-limit {
  margin-top: 12px;
  color: #748095;
  font-size: 13px;
}

.file-upload button {
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.upload-progress {
  margin-top: 18px;
  min-height: 24px;
  font-weight: 700;
  color: #14795a;
}

.file-card {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #f9fbfd;
  border: 1px solid #edf1f6;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}

.file-icon {
  font-size: 36px;
}

.file-info {
  min-width: 0;
}

.file-info h3 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.file-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: #657186;
  margin-bottom: 7px;
}

.file-info small {
  color: #8590a2;
}

.file-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.file-actions button:hover {
  background: #f1f5f9;
}

.file-actions .danger {
  color: #b52d2d;
}

.file-actions button:disabled {
  opacity: .5;
  cursor: wait;
}

@media (max-width: 700px) {

  .file-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .file-actions {
    width: 100%;
    margin-left: 0;
  }
}

.file-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
}

.file-actions .danger {
  color: #b52d2d;
}

.file-actions button:disabled {
  opacity: .5;
}

@media (max-width: 700px) {
  .file-card {
    flex-wrap: wrap;
  }

  .file-actions {
    width: 100%;
    margin-left: 0;
  }
}

.inbox-create,
.inbox-list {
  margin-top: 26px;
  background: white;
  border-radius: 20px;
  padding: 28px;
}

.inbox-create h2,
.inbox-list h2 {
  margin-top: 0;
}

.inbox-create select,
.inbox-create textarea {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 13px 14px;
  font: inherit;
  background: white;
}

.inbox-create textarea {
  min-height: 130px;
  resize: vertical;
}

.inbox-create button[type="submit"] {
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: #15936d;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.inbox-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  flex-wrap: wrap;
}

.inbox-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inbox-filters input,
.inbox-filters select {
  border: 1px solid #d7dee8;
  border-radius: 10px;
  padding: 11px 13px;
  background: white;
}

.inbox-card {
  margin-top: 16px;
  padding: 22px;
  background: #f9fbfd;
  border: 1px solid #edf1f6;
  border-radius: 16px;
}

.inbox-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.inbox-card h3 {
  margin: 10px 0 0;
}

.inbox-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inbox-source,
.inbox-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf8f4;
  font-size: 13px;
}

.inbox-content {
  margin-top: 20px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.inbox-footer {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  color: #748095;
  font-size: 13px;
}

.inbox-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.inbox-actions button {
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
}

.inbox-actions .danger {
  color: #b52d2d;
}

.inbox-actions button:disabled {
  opacity: .5;
}

@media (max-width: 800px) {

  .inbox-card-head {
    flex-direction: column;
  }

  .inbox-filters {
    width: 100%;
  }

  .inbox-filters input,
  .inbox-filters select {
    width: 100%;
  }
}


/* =========================================================
   TEAM FOLDERS V1
========================================================= */

.cards {
  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));
}

.folder-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.folder-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e5eaf2;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.folder-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.folder-card-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 16px;
  background: #eefbf6;
  font-size: 30px;
}

.folder-card h3 {
  margin: 0 0 7px;
  color: #102039;
  font-size: 20px;
}

.folder-card p {
  margin: 0;
  color: #667085;
}

.folder-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid #edf0f5;
  color: #667085;
  font-size: 13px;
}

.folder-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.folder-permissions span {
  padding: 7px 10px;
  color: #08775c;
  background: #e8faf3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.empty-folders {
  padding: 45px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  color: #667085;
  text-align: center;
}

@media (max-width: 720px) {
  .folder-card-meta {
    flex-direction: column;
  }
}


/* =========================================================
   NOTES FOLDER LINK V1
========================================================= */

.note-folder-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 6px 10px;
  color: #08775c;
  background: #e8faf3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.note-create select,
#note-folder-filter {
  width: 100%;
  padding: 12px 14px;
  color: #172033;
  background: #ffffff;
  border: 1px solid #d7deea;
  border-radius: 10px;
  font: inherit;
}

#note-folder-filter {
  max-width: 240px;
}
