
/* ========================================
   1. GLOBAL VARIABLES & RESET
   ======================================== */

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;

  color: #243c38;
  background: #f7f9f8;
  font-synthesis: none;

  /* Theme Colors */
  --green: #246b55;
  --muted: #7a8985;
  --line: #e1e8e4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #86b8a5;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}


/* ========================================
   2. TYPOGRAPHY
   ======================================== */

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 40px;
  letter-spacing: -1.8px;
  line-height: 1.1;
}

h2 {
  font-size: 29px;
  letter-spacing: -1px;
}

/* Logo / Brand */

.brand {
  font-size: 26px;
  letter-spacing: -1px;
  font-weight: 750;
  text-decoration: none;
  color: inherit;
}

/* Small Uppercase Labels */

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.9px;
  font-weight: 750;
  color: var(--muted);
}


/* ========================================
   3. AUTHENTICATION PAGE
   ======================================== */

/* Two-Column Layout */

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

/* Left Introduction Panel */

.intro {
  padding: 50px 12%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #e9f0e9;
  min-height: 700px;
}

.intro h1 {
  font-size: 76px;
  letter-spacing: -4px;
}

.intro p:not(.eyebrow) {
  line-height: 1.8;
  color: #637c70;
}

.intro > small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #73877b;
}


/* ========================================
   4. SAMPLE TASK CARD
   ======================================== */

.sample {
  display: flex;
  gap: 15px;
  align-items: center;

  padding: 22px;
  margin-top: 40px;

  background: #ffffffb8;
  border: 1px solid #fff;
  border-radius: 14px;

  transform: rotate(-3deg);
  box-shadow: 0 15px 50px #274b3610;
}

.sample small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: var(--muted);
}

/* Checkmark and User Avatar */

.check,
.avatar {
  display: grid;
  place-items: center;

  width: 35px;
  height: 35px;
  border-radius: 50%;

  background: #d6e7db;
  color: #246b55;
}

/* Today Label */

.pill {
  margin-left: auto;
  font-size: 11px;
  background: #e9eee9;
  padding: 5px 9px;
  border-radius: 5px;
}


/* ========================================
   5. AUTHENTICATION FORM
   ======================================== */

.auth-panel {
  display: grid;
  place-items: center;
  background: #fff;
  padding: 40px;
}

.auth-panel form {
  width: 100%;
  max-width: 350px;
}

.auth-panel h2 {
  margin: 16px 0 10px;
}

.auth-panel p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
}


/* ========================================
   6. FORM INPUTS
   ======================================== */

/* Field Labels */

label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin: 22px 0 0;
}

/* Text Inputs, Textareas and Dropdowns */

input,
textarea,
select {
  display: block;
  width: 100%;

  margin-top: 9px;
  padding: 12px 14px;

  border: 1px solid #dbe3df;
  border-radius: 7px;

  background: white;
  color: #243c38;
  outline: none;
}

/* Focus State */

input:focus,
textarea:focus,
select:focus {
  border-color: #5b937b;
  box-shadow: 0 0 0 3px #246b5510;
}

/* Placeholder Text */

input::placeholder,
textarea::placeholder {
  color: #a1aba7;
  font-size: 13px;
}


/* ========================================
   7. BUTTONS
   ======================================== */

/* Primary Button */

.primary {
  border: 0;
  background: var(--green);
  color: white;

  border-radius: 7px;
  padding: 13px 21px;

  font-size: 13px;
  font-weight: 650;
}

.primary:hover {
  background: #19523f;
}

/* Full-Width Button */

.full {
  width: 100%;
  margin-top: 12px;
}

/* Secondary Button */

.secondary {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;

  padding: 11px 17px;
  font-size: 12px;
  color: #425d53;
}

/* Text Link Button */

.link {
  border: 0;
  background: none;
  color: var(--green);

  font-size: 13px;
  padding: 0;
  font-weight: 650;
}

/* Login / Registration Switch */

.switch {
  text-align: center;
  margin-top: 25px;
}

/* Form Error Messages */

.error {
  color: #b34837 !important;
  font-size: 12px;
  line-height: 1.5;
  min-height: 6px;
  margin: 12px 0;
}


/* ========================================
   8. WORKSPACE LAYOUT
   ======================================== */

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


/* ========================================
   9. SIDEBAR
   ======================================== */

aside {
  background: #fff;
  border-right: 1px solid var(--line);

  padding: 34px 22px;

  display: flex;
  flex-direction: column;
}

/* Sidebar Brand */

aside .brand {
  margin-bottom: 63px;
}

aside .eyebrow {
  padding: 0 12px;
}

/* Navigation Buttons */

nav button {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  border: 0;
  background: none;

  color: #71817a;
  text-align: left;

  padding: 13px;
  border-radius: 7px;
  margin: 4px 0;

  font-size: 13px;
}

/* Active Navigation Item */

nav button.active {
  background: #eaf1ec;
  color: #246b55;
  font-weight: 650;
}

/* Navigation Task Count */

nav b {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
}

/* Sidebar Motivational Note */

.aside-note {
  margin: auto 12px 50px;
  padding-top: 80px;

  color: #9caaa3;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.5px;
}


/* ========================================
   10. USER PROFILE
   ======================================== */

.profile {
  display: flex;
  gap: 10px;
  align-items: center;

  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.profile strong {
  font-size: 12px;
  display: block;
  max-width: 135px;
  overflow-wrap: anywhere;
}

.profile small {
  font-size: 10px;
  color: var(--muted);
}


/* ========================================
   11. MAIN CONTENT AREA
   ======================================== */

main {
  max-width: 1400px;
  width: 100%;

  padding: 0 52px;
  margin: 0 auto;
}

/* Top Header */

header {
  height: 85px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid var(--line);

  font-size: 11px;
  color: var(--muted);
}

/* Private Workspace Indicator */

.private {
  font-size: 10px;
  color: #7d9283;
}


/* ========================================
   12. PAGE HEADING
   ======================================== */

.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin: 45px 0 32px;
}

.heading h1 {
  margin: 10px 0 13px;
}

.heading p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}


/* ========================================
   13. TASK STATISTICS CARDS
   ======================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;

  margin-bottom: 35px;
}

/* Individual Statistics Card */

.stats > div {
  padding: 23px 25px;

  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* Statistics Label */

.stats span {
  display: block;
  font-size: 12px;
  color: #7a8985;
}

/* Statistics Number */

.stats strong {
  display: block;
  font-size: 32px;

  margin: 12px 0 8px;
  font-weight: 550;
}

/* Supporting Text */

.stats small {
  font-size: 10px;
  color: #8d9b95;
}

/* Completed Tasks Card */

.stats > div:last-child {
  background: #edf3ee;
}


/* ========================================
   14. TASK TOOLBAR
   ======================================== */

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

  margin-bottom: 18px;
}


/* ========================================
   15. STATUS FILTER TABS
   ======================================== */

.tabs {
  display: flex;
  padding: 4px;
  background: #ecf0ed;
  border-radius: 7px;
  gap: 3px;
}

.tabs button {
  border: 0;
  background: none;

  font-size: 11px;
  padding: 9px 14px;

  color: #73847b;
  border-radius: 5px;
  white-space: nowrap;
}

/* Selected Filter */

.tabs .active {
  background: white;
  color: #295e49;
  box-shadow: 0 1px 3px #0000000c;
}

/* Task Search */

#search {
  margin: 0;
  width: 220px;

  background: transparent;
  padding: 10px 14px;
}


/* ========================================
   16. TASK LIST ITEMS
   ======================================== */

.task {
  display: flex;
  align-items: center;
  gap: 17px;

  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;

  padding: 21px 20px;
  margin-bottom: 9px;
}


/* ========================================
   17. TASK CHECKBOX
   ======================================== */

.task-check {
  width: 20px;
  height: 20px;

  border: 1.5px solid #cbd7cf;
  border-radius: 6px;

  flex-shrink: 0;
  background: white;
  color: var(--green);

  padding: 0;
}

/* Completed Task Checkbox */

.completed .task-check {
  background: #e6f0e9;
  border-color: #a4c0ad;
}


/* ========================================
   18. TASK CONTENT
   ======================================== */

.task-content {
  flex: 1;
  text-align: left;

  border: 0;
  background: none;

  min-width: 0;
  color: inherit;
  padding: 0;
}

/* Task Title */

.task-content strong {
  font-size: 13px;
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Task Description Preview */

.task-content small {
  display: block;

  font-size: 11px;
  color: #95a19b;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  max-width: 350px;
  margin-top: 7px;
}

/* Completed Task Title */

.completed .task-content strong {
  text-decoration: line-through;
  color: #8b9b92;
}


/* ========================================
   19. TASK METADATA
   ======================================== */

.task-meta {
  display: flex;
  gap: 17px;
  align-items: center;

  font-size: 10px;
}


/* ========================================
   20. TASK PRIORITY LABELS
   ======================================== */

.priority {
  text-transform: capitalize;
  white-space: nowrap;
}

/* High Priority */

.priority.high {
  color: #b67a5c;
}

/* Medium Priority */

.priority.medium {
  color: #af9a57;
}

/* Low Priority */

.priority.low {
  color: #769182;
}


/* ========================================
   21. TASK STATUS BADGES
   ======================================== */

.state {
  padding: 5px 8px;
  border-radius: 4px;

  background: #f0f3f1;
  color: #7d8d84;

  white-space: nowrap;
}

/* In Progress */

.state.doing {
  background: #edf0fa;
  color: #7c8cb4;
}

/* Completed */

.state.done {
  background: #eaf4ec;
  color: #6c967b;
}


/* ========================================
   22. DUE DATE LABELS
   ======================================== */

.due {
  color: #8a9890;
  white-space: nowrap;
}

/* Overdue Tasks */

.due.overdue {
  color: #b66d5b;
}


/* ========================================
   23. ICON BUTTONS
   ======================================== */

.icon {
  border: 0;
  background: none;

  color: #85948a;
  padding: 4px;

  font-size: 20px;
}


/* ========================================
   24. EMPTY TASK LIST
   ======================================== */

.empty {
  text-align: center;
  padding: 60px 20px;

  border: 1px dashed #d1ded5;
  border-radius: 10px;
}

/* Empty State Icon */

.empty > span {
  font-size: 44px;
  color: #8eb09c;
}

/* Empty State Heading */

.empty h2 {
  font-size: 20px;
  margin: 16px 0 10px;
}

/* Empty State Description */

.empty p {
  font-size: 13px;
  color: var(--muted);
}


/* ========================================
   25. FOOTER
   ======================================== */

footer {
  text-align: center;
  font-size: 10px;
  color: #a2afa7;
  padding: 35px;
}


/* ========================================
   26. TASK EDITOR MODAL
   ======================================== */

dialog {
  border: 1px solid var(--line);
  border-radius: 15px;

  width: 460px;
  max-width: calc(100vw - 32px);

  padding: 28px;
  color: #243c38;

  box-shadow: 0 25px 100px #123d302b;
}

/* Darkened Background Behind Modal */

dialog::backdrop {
  background: #18352d70;
  backdrop-filter: blur(3px);
}


/* ========================================
   27. MODAL HEADER
   ======================================== */

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-heading h2 {
  font-size: 23px;
  margin: 0;
}


/* ========================================
   28. MODAL FORM LAYOUT
   ======================================== */

/* Status and Priority Fields */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Form Action Buttons */

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;

  margin-top: 20px;
}

/* Delete Task Button */

.danger {
  margin-right: auto;
  border: 0;

  color: #ad5747;
  background: none;

  font-size: 12px;
}


/* ========================================
   29. TOAST NOTIFICATIONS
   ======================================== */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;

  transform: translateX(-50%);

  background: #244e3d;
  color: white;

  padding: 14px 25px;
  border-radius: 8px;

  font-size: 13px;
  box-shadow: 0 4px 25px #0002;

  z-index: 10;
}


/* ========================================
   30. RESPONSIVE DESIGN
   TABLETS & SMALLER DESKTOPS
   Max Width: 1100px
   ======================================== */

@media (max-width: 1100px) {

  /* Main Content */

  main {
    padding: 0 25px;
  }

  /* Task Metadata */

  .task-meta {
    gap: 8px;
  }

  /* Hide Due Dates */

  .due {
    display: none;
  }

}


/* ========================================
   31. RESPONSIVE DESIGN
   MOBILE DEVICES
   Max Width: 760px
   ======================================== */

@media (max-width: 760px) {

  /* ----------------------------------------
     Authentication Page
     ---------------------------------------- */

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

  .intro {
    min-height: 260px;
    padding: 25px 30px;
  }

  .intro h1 {
    font-size: 44px;
    margin: 25px 0 10px;
  }

  /* Hide Decorative Content on Mobile */

  .intro .eyebrow,
  .intro > small,
  .sample,
  .intro p:not(.eyebrow) {
    display: none;
  }

  .intro h1 br {
    display: none;
  }

  .auth-panel {
    padding: 40px 25px;
  }


  /* ----------------------------------------
     Workspace Layout
     ---------------------------------------- */

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


  /* ----------------------------------------
     Mobile Sidebar
     ---------------------------------------- */

  aside {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  aside .brand {
    margin: 0 0 20px;
  }

  /* Hide Sidebar Extras */

  aside .eyebrow,
  .aside-note,
  .profile {
    display: none;
  }


  /* ----------------------------------------
     Mobile Navigation
     ---------------------------------------- */

  nav {
    display: flex;
    gap: 5px;
  }

  nav button {
    justify-content: center;
    padding: 10px;
    font-size: 11px;
  }

  /* Sign Out Button */

  aside > .secondary {
    position: absolute;
    top: 21px;
    right: 20px;
  }


  /* ----------------------------------------
     Main Content
     ---------------------------------------- */

  main {
    padding: 0 20px;
  }

  header {
    height: 60px;
  }


  /* ----------------------------------------
     Page Heading
     ---------------------------------------- */

  .heading {
    margin: 30px 0;
    gap: 15px;
  }

  .heading h1 {
    font-size: 32px;
  }

  .heading .eyebrow {
    font-size: 8px;
  }

  .heading p:not(.eyebrow) {
    font-size: 11px;
    max-width: 210px;
  }

  .heading .primary {
    white-space: nowrap;
    padding: 12px;
  }


  /* ----------------------------------------
     Statistics Cards
     ---------------------------------------- */

  .stats {
    gap: 8px;
  }

  .stats > div {
    padding: 16px 12px;
  }

  .stats small {
    display: none;
  }

  .stats span {
    font-size: 10px;
  }

  .stats strong {
    font-size: 26px;
    margin-bottom: 0;
  }


  /* ----------------------------------------
     Task Toolbar & Search
     ---------------------------------------- */

  .toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  #search {
    width: 100%;
  }


  /* ----------------------------------------
     Task List Items
     ---------------------------------------- */

  .task {
    padding: 16px 12px;
    gap: 11px;
  }

  .task-meta {
    flex-direction: column;
    align-items: flex-end;
  }

  .task-content small {
    max-width: 160px;
  }


  /* ----------------------------------------
     Private Workspace Indicator
     ---------------------------------------- */

  .private {
    font-size: 9px;
  }

}

/* Friends and shared goals */
.social-card, .friend-row {
 background: #fff; border: 1px solid var(--line); border-radius: 16px;
 padding: 24px; margin-bottom: 16px;
}
.social-card h2 { font-size: 22px; letter-spacing: -.5px; }
.social-card { overflow-wrap: anywhere; }
.social-subtitle { font-size: 21px; margin: 30px 0 16px; }
.social-actions, .friend-row, .goal-heading, .member-row {
 display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.social-actions { flex-wrap: wrap; }
.friend-row small { display: block; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.friend-row > div:first-child { min-width: 0; }
.social-empty, .goal-due, .goal-summary { color: var(--muted); font-size: 14px; line-height: 1.6; }
.goal-description { white-space: pre-wrap; line-height: 1.6; }
.goal-heading { align-items: flex-start; }
.goal-heading h2 { margin: 0 0 16px; }
.goal-heading button { flex-shrink: 0; }
.goal-card progress { width: 100%; height: 8px; accent-color: var(--green); margin-bottom: 16px; }
.member-row { padding: 14px 0; border-top: 1px solid var(--line); }
.member-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.member-row label { margin: 0; font-size: 12px; color: var(--muted); }
.member-row select { margin-top: 5px; min-width: 145px; color: #243c38; }
.friend-picker { border: 1px solid var(--line); border-radius: 10px; margin-top: 20px; padding: 16px; }
.friend-picker p { font-size: 13px; color: var(--muted); }
#goal-friends { max-height: 220px; overflow-y: auto; }
.friend-choice { display: flex; align-items: center; gap: 10px; margin: 12px 0; overflow-wrap: anywhere; }
.friend-choice input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
@media (max-width: 600px) {
 .social-card, .friend-row { padding: 16px; }
 .friend-row { align-items: flex-start; flex-direction: column; }
 .goal-heading { flex-wrap: wrap; }
 .member-row { gap: 8px; }
}
@media (max-width: 900px) {
 nav { flex-wrap: wrap; }
 nav button { flex: 1 0 100px; }
}

/* Verification and password recovery */
.account-screen { min-height: 100vh; padding: 36px 24px; background: #f7f9f8; }
.account-screen > .brand { display: block; max-width: 460px; margin: 0 auto 36px; }
.account-box { max-width: 460px; margin: 0 auto; padding: 32px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.account-box h1 { font-size: 30px; }
.account-box > p, #reset-fields > p { line-height: 1.6; color: var(--muted); }
.account-box .error { color: #b34242; }
.account-message { color: var(--green) !important; white-space: pre-wrap; }
.account-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 500px) { .account-box { padding: 24px 20px; } }
