
:root {
  font-family: Inter, Arial, sans-serif;
  color: #17202b;
  background: #f2f4f7;
  font-size: 16px;
  line-height: 1.5;
  --accent: #b9ef42;
  --muted: #626d7d;
  --line: #e0e5eb;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1,h2,p { margin-top: 0; }
h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.04em; }
h2 { font-size: 1.1rem; margin-bottom: 16px; }
button,input,select { font: inherit; }
button,select,input {
  border: 1px solid #cbd2dc;
  border-radius: 8px;
  background: white;
  padding: 10px 14px;
  color: inherit;
}
button { cursor: pointer; }
button:hover:not(:disabled) { background: #edf1f5; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid #4770dc; outline-offset: 3px; }
.brand { font-size: 1.6rem; font-weight: 900; letter-spacing: -.06em; }
.brand span { color: #83a923; }
#login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #101820;
}
.login-card {
  width: min(100%, 420px);
  padding: 36px;
  border-radius: 16px;
  background: white;
}
.login-card h1 { font-size: 1.6rem; margin: 32px 0 24px; }
.login-card label { display: block; margin: 18px 0 7px; }
.login-card input { width: 100%; }
.primary { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.login-card button { width: 100%; margin-top: 24px; }
.error { color: #b02935; margin: 14px 0 0; }
#app { display: flex; min-height: 100vh; }
aside {
  width: 220px;
  flex-shrink: 0;
  background: #111a23;
  color: #fff;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
}
aside .brand { padding: 0 12px 36px; }
aside .brand span { color: var(--accent); }
nav { display: grid; gap: 8px; }
nav a,nav button {
  padding: 12px 14px;
  text-decoration: none;
  text-align: left;
  border: none;
  border-radius: 8px;
  color: #c6ced8;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
nav a { color: #c6ced8; background: transparent; font-weight: 400; }
nav small { font-size: .75rem; }
.aside-footer { margin-top: auto; padding: 40px 12px 0; color: #a7b2bf; font-size: .875rem; }
.workspace { min-width: 0; flex: 1; }
header {
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.account,.controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account { justify-content: flex-end; }
#user { overflow-wrap: anywhere; }
#dashboard { max-width: 1600px; margin: auto; padding: 32px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.heading h1 { margin-bottom: 0; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.muted,.note { color: var(--muted); font-size: .875rem; }
#status { margin: 20px 0; min-height: 22px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 22px; min-width: 0; }
.metric-label { color: var(--muted); font-size: .875rem; margin-bottom: 14px; }
.metric-value { font-size: 2rem; font-weight: 700; letter-spacing: -.04em; overflow-wrap: anywhere; }
.metric-value small { font-size: 1rem; font-weight: 400; }
.metric-footer { font-size: .875rem; margin-top: 10px; color: var(--muted); }
.grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 20px; }
.full { grid-column: 1/-1; }
.table-wrap { overflow: auto; max-height: 440px; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th,td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 95px; max-width: 420px; overflow-wrap: anywhere; }
th { color: var(--muted); font-weight: 500; background: white; position: sticky; top: 0; }
td { font-variant-numeric: tabular-nums; }
.empty { padding: 20px 0; color: var(--muted); }
.note { margin: 16px 0 0; }
.notice { border-left: 3px solid #dfa426; padding: 12px 16px; background: #fffae9; margin-bottom: 20px; }
@media (max-width:1100px) {
  aside { width: 180px; }
  #dashboard { padding: 24px; }
  .grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width:760px) {
  #app { display: block; }
  aside { width: 100%; padding: 16px; }
  aside .brand { padding: 0 0 16px; }
  nav { display: flex; overflow-x: auto; }
  nav a,nav button { flex-shrink: 0; }
  nav small,.aside-footer { display: none; }
  header { padding: 16px; flex-wrap: wrap; }
  #dashboard { padding: 24px 16px; }
  .metrics { grid-template-columns: minmax(0,1fr); }
  .controls { width: 100%; }
  .controls select { flex: 1; min-width: 0; }
  .card { padding: 18px; }
}


/* =========================================================
   MAV_OS WORKSPACE CSS V1
   ========================================================= */

nav button:not(:disabled) {
  cursor: pointer;
}

nav [aria-current="page"] {
  opacity: 1;
  background: var(--accent);
  color: #17210a;
  font-weight: 700;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.workspace-head h1 {
  margin: 4px 0 8px;
}

.workspace-muted {
  opacity: .58;
}

.workspace-panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}

.workspace-panel h2 {
  margin-top: 0;
}

.workspace-form-panel {
  margin-bottom: 20px;
}

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

.workspace-form label,
.tracker-start label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.workspace-form input,
.workspace-form select,
.tracker-start input,
.tracker-start select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.workspace-span-2 {
  grid-column: span 2;
}

.workspace-form-actions {
  display: flex;
  align-items: flex-end;
}

.workspace-error {
  color: #b42318;
  min-height: 18px;
  margin-bottom: 0;
}

.workspace-table-wrap {
  overflow-x: auto;
}

.workspace-table {
  width: 100%;
  border-collapse: collapse;
}

.workspace-table th,
.workspace-table td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  vertical-align: top;
}

.workspace-table th {
  font-size: 12px;
  opacity: .55;
  font-weight: 600;
}

.workspace-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, .22);
  text-underline-offset: 3px;
}

.tracker-panel {
  min-height: 230px;
}

.tracker-running {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tracker-running h2 {
  margin-bottom: 4px;
}

.tracker-clock {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  margin: 28px 0;
}

.tracker-stop {
  min-width: 140px;
}

.tracker-start {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, .6fr);
  gap: 18px;
  align-items: end;
}

.tracker-check {
  flex-direction: row !important;
  align-items: center;
  padding-bottom: 11px;
}

.tracker-check input {
  width: auto;
}

.tracker-start-button {
  width: 140px;
}

@media (max-width: 760px) {
  .workspace-head {
    flex-direction: column;
  }

  .workspace-form,
  .tracker-start {
    grid-template-columns: 1fr;
  }

  .workspace-span-2 {
    grid-column: auto;
  }
}


/* =========================================================
   MAV_OS TASKS V2
   ========================================================= */

.task-filter-panel {
  padding-top: 18px;
  padding-bottom: 18px;
}

.task-filters {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.task-filters label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 210px;
  font-size: 13px;
}

.task-filters select {
  min-width: 210px;
}

.task-filter-count {
  margin-left: auto;
  padding: 10px 0;
  color: var(--muted);
  font-size: .875rem;
}

.task-cell-muted {
  color: var(--muted);
  font-weight: 400;
}

.task-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f0f2f5;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.task-status-in_progress {
  background: #eef5ff;
}

.task-status-review {
  background: #fff6df;
}

.task-status-done {
  background: #eff8e7;
}

.task-status-cancelled {
  opacity: .58;
}

.task-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.task-summary-card {
  margin-bottom: 0;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.task-summary-card strong {
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}

.task-summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.task-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 20px;
  align-items: start;
}

.task-field-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-timer-panel {
  min-height: 300px;
}

.task-timer-running,
.task-timer-blocked,
.task-timer-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.task-timer-start {
  align-items: stretch;
}

.task-timer-start input[type="text"] {
  width: 100%;
}

.task-timer-start .tracker-check {
  padding-bottom: 0;
}

.task-table td {
  vertical-align: middle;
}

@media (max-width: 1050px) {
  .task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .task-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .task-filters label,
  .task-filters select {
    min-width: 0;
    width: 100%;
  }

  .task-filter-count {
    margin-left: 0;
    padding: 0;
  }

  .task-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MAV_OS PROJECTS V2
   ========================================================= */

.project-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.project-title-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.project-section-head h2 {
  margin-bottom: 4px;
}

.project-section-head p {
  margin-bottom: 0;
}

.project-status-active {
  background: #eff8e7;
}

.project-status-planned {
  background: #eef5ff;
}

.project-status-paused {
  background: #fff6df;
}

.project-status-completed {
  background: #f0f2f5;
  opacity: .72;
}

.project-table td {
  vertical-align: middle;
}

@media (max-width: 760px) {
  .project-head-actions,
  .project-section-head {
    width: 100%;
  }

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


/* =========================================================
   MAV_OS TRACKER V2
   ========================================================= */

.workspace-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.workspace-section-head h2,
.workspace-section-head p {
  margin-bottom: 4px;
}

.tracker-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.tracker-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.tracker-filters select {
  width: 100%;
}

.tracker-manual-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tracker-snapshot-note {
  margin: 14px 0 0;
}

.tracker-history-table td {
  vertical-align: middle;
}

.time-entry-actions {
  white-space: nowrap;
}

.time-entry-actions .workspace-link + .workspace-link {
  margin-left: 10px;
}

.danger-link {
  color: #b42318;
  text-decoration-color: rgba(180, 35, 24, .25);
}

.time-entry-dialog {
  width: min(680px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.time-entry-dialog::backdrop {
  background: rgba(17, 26, 35, .52);
}

.time-entry-dialog-card {
  padding: 24px;
  background: #fff;
}

.time-entry-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.time-entry-dialog-head h2 {
  margin-bottom: 4px;
}

.time-entry-dialog-close {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.time-entry-edit-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.time-entry-snapshot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 14px;
  border-radius: 10px;
  background: #f6f8fa;
  font-size: 13px;
}

.time-entry-snapshot small {
  width: 100%;
  color: var(--muted);
}

@media (max-width: 900px) {
  .tracker-filters,
  .tracker-manual-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .workspace-section-head {
    flex-direction: column;
  }

  .tracker-filters,
  .tracker-manual-form,
  .time-entry-edit-form {
    grid-template-columns: 1fr;
  }

  .time-entry-edit-form .workspace-span-2,
  .tracker-manual-form .workspace-span-2 {
    grid-column: auto;
  }
}
