@font-face {
  font-family:'Co Headline';
  src:url('assets/fonts/co-headline-300.otf') format('opentype');
  font-weight:300;
  font-style:normal
}
@font-face {
  font-family:'Co Headline';
  src:url('assets/fonts/co-headline-400.otf') format('opentype');
  font-weight:400;
  font-style:normal
}
@font-face {
  font-family:'Co Headline';
  src:url('assets/fonts/co-headline-700.otf') format('opentype');
  font-weight:700;
  font-style:normal
}
:root {
  --purple:#1b033c;
  --purple-mid:#2D1055;
  --purple-light:#3D1A6E;
  --pink:#eb297b;
  --pink-light:#F04D93;
  --pink-soft:#FDE8F1;
  --teal:#1A7A6D;
  --orange:#C55A11;
  --violet:#7030A0;
  --red:#C00000;
  --green:#2D7A3A;
  --bg:#F4F5F8;
  --border:#E2E4EB;
  --text:#1b033c;
  --text-secondary:#5A5672;
  --text-muted:#8B8699;
  --shadow-sm:0 1px 3px rgba(27,3,60,.08);
  --shadow-md:0 4px 12px rgba(27,3,60,.1);
  --shadow-lg:0 8px 30px rgba(27,3,60,.14);
  --radius:10px;
  --radius-sm:6px;
  --font:'Co Headline',-apple-system,sans-serif;
  --mono:'JetBrains Mono',monospace
}
* {
  margin:0;
  padding:0;
  box-sizing:border-box
}
body {
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  min-height:100vh;
  font-weight:400
}
.toast-container {
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:999;
  display:flex;
  flex-direction:column;
  gap:8px
}
.toast {
  padding:10px 18px;
  border-radius:var(--radius-sm);
  color:#fff;
  font-size:13px;
  box-shadow:var(--shadow-md);
  animation:slideIn .25s ease,fadeOut .3s ease 2.7s forwards
}
.toast.success {
  background:var(--green)
}
.toast.error {
  background:var(--red)
}
.toast.info {
  background:var(--purple-mid)
}
@keyframes slideIn {
  from {
    transform:translateX(30px);
    opacity:0
  }
  to {
    transform:translateX(0);
    opacity:1
  }
}
@keyframes fadeOut {
  to {
    opacity:0;
    transform:translateY(10px)
  }
}
.sync-indicator {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  padding:4px 10px;
  border-radius:99px
}
.sync-indicator.connected {
  background:rgba(45,122,58,.15);
  color:var(--green)
}
.sync-indicator.syncing {
  background:rgba(235,41,123,.15);
  color:var(--pink)
}
.sync-indicator.offline {
  background:rgba(192,0,0,.15);
  color:var(--red)
}
.sync-indicator.local {
  background:rgba(197,90,17,.15);
  color:var(--orange)
}
.sync-dot {
  width:7px;
  height:7px;
  border-radius:50%
}
.sync-indicator.connected .sync-dot {
  background:var(--green)
}
.sync-indicator.syncing .sync-dot {
  background:var(--pink);
  animation:pulse 1s infinite
}
.sync-indicator.offline .sync-dot {
  background:var(--red)
}
.sync-indicator.local .sync-dot {
  background:var(--orange)
}
@keyframes pulse {
  0%,100% {
    opacity:1
  }
  50% {
    opacity:.3
  }
}
.topbar {
  background:var(--purple);
  padding:0 32px;
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:sticky;
  top:0;
  z-index:100;
  box-shadow:0 2px 8px rgba(27,3,60,.25)
}
.topbar-brand {
  display:flex;
  align-items:center;
  gap:12px
}
.topbar-logo {
  height:28px;
  width:auto
}
.topbar h1 {
  color:#fff;
  font-size:15px;
  font-weight:300;
  letter-spacing:.02em
}
.topbar-actions {
  display:flex;
  gap:8px;
  align-items:center
}
.btn {
  padding:7px 16px;
  border-radius:var(--radius-sm);
  border:none;
  font-family:var(--font);
  font-size:13px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:all .15s;
  white-space:nowrap
}
.btn-primary {
  background:var(--pink);
  color:#fff
}
.btn-primary:hover {
  background:var(--pink-light)
}
.btn-ghost {
  background:rgba(255,255,255,.1);
  color:#fff
}
.btn-ghost:hover {
  background:rgba(255,255,255,.18)
}
.btn-danger {
  background:var(--red);
  color:#fff
}
.btn-danger:hover {
  opacity:.85
}
.btn-outline {
  background:transparent;
  color:var(--purple);
  border:1.5px solid var(--border)
}
.btn-outline:hover {
  border-color:var(--pink);
  background:var(--pink-soft)
}
.btn-sm {
  padding:5px 10px;
  font-size:12px
}
.btn:disabled {
  opacity:.5;
  cursor:not-allowed
}
.btn-tab {
  padding:8px 18px;
  border-radius:var(--radius-sm);
  border:1.5px solid var(--border);
  background:#fff;
  font-family:var(--font);
  font-size:13px;
  cursor:pointer;
  color:var(--text-secondary);
  transition:all .15s
}
.btn-tab.active {
  background:var(--purple);
  color:#fff;
  border-color:var(--purple);
  font-weight:700
}
.btn-tab:hover:not(.active) {
  border-color:var(--pink);
  color:var(--pink)
}
.btn-teal {
  background:var(--teal);
  color:#fff
}
.btn-teal:hover {
  opacity:.9
}
.nav-bar {
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:0 32px;
  display:flex;
  align-items:stretch;
  box-shadow:var(--shadow-sm);
  overflow-x:auto
}
.nav-tab {
  padding:12px 20px;
  font-size:13px;
  color:var(--text-secondary);
  cursor:pointer;
  border:none;
  background:none;
  font-family:var(--font);
  position:relative;
  transition:color .15s;
  white-space:nowrap
}
.nav-tab:hover {
  color:var(--text)
}
.nav-tab.active {
  color:var(--pink);
  font-weight:700
}
.nav-tab.active::after {
  content:'';
  position:absolute;
  bottom:0;
  left:12px;
  right:12px;
  height:2.5px;
  background:var(--pink);
  border-radius:2px 2px 0 0
}
.nav-tab .tab-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:9px;
  background:var(--pink);
  color:#fff;
  font-size:10px;
  font-weight:700;
  margin-left:6px
}
.main {
  padding:24px 32px 48px;
  max-width:1400px;
  margin:0 auto
}
.setup-container {
  max-width:600px;
  margin:60px auto;
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:var(--shadow-lg);
  overflow:hidden
}
.setup-header {
  background:var(--purple);
  padding:24px 32px;
  color:#fff
}
.setup-header h2 {
  font-size:18px;
  font-weight:700;
  margin-bottom:4px
}
.setup-header p {
  font-size:13px;
  color:rgba(255,255,255,.6);
  font-weight:300
}
.setup-body {
  padding:28px 32px
}
.setup-step {
  margin-bottom:20px
}
.setup-step h3 {
  font-size:14px;
  font-weight:700;
  margin-bottom:4px
}
.setup-step p {
  font-size:12px;
  color:var(--text-secondary);
  margin-bottom:8px;
  line-height:1.6;
  font-weight:300
}
.setup-step code {
  display:block;
  background:#F0F0F5;
  border-radius:var(--radius-sm);
  padding:10px 14px;
  font-family:var(--mono);
  font-size:12px;
  margin:8px 0;
  line-height:1.6;
  white-space:pre-wrap
}
.setup-input {
  width:100%;
  padding:10px 14px;
  border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  font-family:var(--font);
  font-size:13px
}
.setup-input:focus {
  outline:none;
  border-color:var(--pink)
}
.setup-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:24px
}
.setup-divider {
  display:flex;
  align-items:center;
  gap:12px;
  margin:24px 0;
  font-size:12px;
  color:var(--text-muted)
}
.setup-divider::before,.setup-divider::after {
  content:'';
  flex:1;
  border-top:1px solid var(--border)
}
.stats-row {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px;
  margin-bottom:24px
}
.stat-card {
  background:#fff;
  border-radius:var(--radius);
  padding:18px 20px;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm)
}
.stat-card .label {
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--text-muted);
  margin-bottom:6px
}
.stat-card .value {
  font-size:28px;
  font-weight:700;
  letter-spacing:-.02em;
  font-family:var(--mono)
}
.stat-card .value.green {
  color:var(--green)
}
.stat-card .value.red {
  color:var(--red)
}
.stat-card .value.orange {
  color:var(--orange)
}
.stat-card .value.pink {
  color:var(--pink)
}
.stat-card .value.purple {
  color:var(--purple)
}
.section-title {
  font-size:14px;
  font-weight:700;
  margin-bottom:12px;
  display:flex;
  align-items:center;
  gap:8px
}
.section-title .dot {
  width:8px;
  height:8px;
  border-radius:50%
}
.client-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(360px,1fr));
  gap:16px;
  margin-bottom:32px
}
.client-card {
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
  cursor:pointer;
  transition:box-shadow .2s,transform .15s
}
.client-card:hover {
  box-shadow:var(--shadow-md);
  transform:translateY(-1px)
}
.client-card-header {
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--border)
}
.client-card-name {
  font-size:15px;
  font-weight:700
}
.client-card-status {
  font-size:11px;
  font-weight:700;
  padding:3px 10px;
  border-radius:99px;
  text-transform:uppercase;
  letter-spacing:.03em
}
.status-not-started {
  background:#F0F0F0;
  color:#888
}
.status-in-progress {
  background:#FFF4E5;
  color:var(--orange)
}
.status-review-flags {
  background:#FDE8E8;
  color:var(--red)
}
.status-all-done {
  background:#E8F5E9;
  color:var(--green)
}
.client-card-body {
  padding:16px 20px
}
.progress-row {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px
}
.progress-bar-bg {
  flex:1;
  height:8px;
  background:#EDE8F2;
  border-radius:4px;
  overflow:hidden
}
.progress-bar-fill {
  height:100%;
  border-radius:4px;
  transition:width .4s ease;
  background:linear-gradient(90deg,var(--purple-mid),var(--pink))
}
.progress-pct {
  font-family:var(--mono);
  font-size:13px;
  font-weight:700;
  min-width:40px;
  text-align:right
}
.client-card-stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-top:12px
}
.mini-stat {
  text-align:center;
  padding:6px;
  background:var(--bg);
  border-radius:var(--radius-sm)
}
.mini-stat .num {
  font-family:var(--mono);
  font-size:16px;
  font-weight:700
}
.mini-stat .lbl {
  font-size:10px;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.03em
}
.detail-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
  flex-wrap:wrap;
  gap:10px
}
.detail-back {
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--pink);
  cursor:pointer;
  font-size:13px;
  border:none;
  background:none;
  font-family:var(--font)
}
.detail-back:hover {
  text-decoration:underline
}
.client-info-bar {
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  padding:16px 20px;
  margin-bottom:16px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:12px;
  box-shadow:var(--shadow-sm)
}
.info-field label {
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--text-muted);
  display:block;
  margin-bottom:3px
}
.info-field input {
  width:100%;
  padding:6px 10px;
  border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  font-family:var(--font);
  font-size:13px;
  color:var(--text);
  background:var(--bg)
}
.info-field input:focus {
  outline:none;
  border-color:var(--pink);
  background:#fff
}
.info-field input[type="date"] {
  cursor:pointer
}
.info-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor:pointer;
  opacity:.6
}
.week-banner {
  background:var(--purple);
  color:#fff;
  border-radius:var(--radius);
  padding:16px 24px;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:var(--shadow-sm);
  flex-wrap:wrap;
  gap:10px
}
.week-banner h2 {
  font-size:17px;
  font-weight:700
}
.week-banner .week-dates {
  font-size:13px;
  font-weight:300;
  opacity:.7
}
.view-toggle {
  display:flex;
  gap:6px;
  flex-wrap:wrap
}
.task-section {
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  margin-bottom:16px;
  overflow:hidden;
  box-shadow:var(--shadow-sm)
}
.task-section-header {
  padding:10px 20px;
  font-size:13px;
  font-weight:700;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  user-select:none
}
.task-section-header .toggle {
  font-size:11px;
  opacity:.7;
  font-weight:400
}
.task-section-header.weekly {
  background:var(--purple)
}
.task-section-header.fortnightly {
  background:var(--teal)
}
.task-section-header.monthly {
  background:var(--orange)
}
.task-section-header.quarterly {
  background:var(--pink)
}
.task-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px
}
.task-table th {
  padding:8px 12px;
  text-align:center;
  font-size:11px;
  font-weight:700;
  color:var(--text-secondary);
  background:#F8F8FB;
  border-bottom:1px solid var(--border);
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap
}
.task-table th:first-child {
  text-align:left;
  padding-left:20px
}
.task-table td {
  padding:10px 12px;
  border-bottom:1px solid #F0F0F5;
  vertical-align:top
}
.task-table tr:last-child td {
  border-bottom:none
}
.task-table tr:nth-child(even) {
  background:#FBFAFC
}
.task-table td:first-child {
  padding-left:20px;
  font-size:12px;
  line-height:1.4;
  max-width:380px;
  font-weight:300
}
.task-table td.ctr {
  text-align:center
}
.priority-badge {
  display:inline-block;
  font-size:10px;
  font-weight:700;
  padding:2px 8px;
  border-radius:99px;
  text-transform:uppercase
}
.priority-high {
  background:#FDE8E8;
  color:var(--red)
}
.priority-medium {
  background:#FFF4E5;
  color:var(--orange)
}
.priority-low {
  background:#F0F0F0;
  color:#777
}
.status-select {
  width:42px;
  height:32px;
  border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  font-size:15px;
  text-align:center;
  cursor:pointer;
  background:#fff;
  font-family:var(--font);
  appearance:none;
  -webkit-appearance:none;
  padding:0;
  transition:all .15s
}
.status-select:focus {
  outline:none;
  border-color:var(--pink)
}
.status-select.s-done {
  background:#E8F5E9;
  border-color:var(--green)
}
.status-select.s-flagged {
  background:#FDE8E8;
  border-color:var(--red)
}
.status-select.s-not-done {
  background:#FFF4E5;
  border-color:var(--orange)
}
.status-select.s-na {
  background:#F0F0F0;
  border-color:#CCC
}
.note-input {
  width:100%;
  min-width:140px;
  padding:5px 8px;
  border:1.5px solid transparent;
  border-radius:var(--radius-sm);
  font-family:var(--font);
  font-size:11px;
  background:transparent;
  resize:vertical;
  min-height:28px;
  transition:all .15s;
  color:var(--text);
  font-weight:300
}
.note-input:hover {
  background:var(--bg)
}
.note-input:focus {
  outline:none;
  border-color:var(--pink);
  background:#fff;
  box-shadow:0 0 0 3px rgba(235,41,123,.1)
}
.flagged-panel {
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  overflow:hidden
}
.flagged-panel-header {
  padding:12px 20px;
  background:var(--red);
  color:#fff;
  font-weight:700;
  font-size:13px
}
.flagged-item {
  padding:12px 20px;
  border-bottom:1px solid #F0F0F5;
  display:flex;
  align-items:flex-start;
  gap:12px
}
.flagged-item:last-child {
  border-bottom:none
}
.flagged-client {
  font-size:11px;
  font-weight:700;
  color:var(--pink);
  min-width:90px;
  cursor:pointer
}
.flagged-task {
  font-size:12px;
  flex:1;
  font-weight:300
}
.flagged-section-tag {
  font-size:10px;
  font-weight:700;
  padding:2px 8px;
  border-radius:99px;
  white-space:nowrap
}
.empty-state {
  padding:40px;
  text-align:center;
  color:var(--text-muted);
  font-size:13px;
  font-weight:300
}
.history-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  background:#fff;
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm)
}
.history-table th {
  padding:10px 16px;
  text-align:left;
  font-size:11px;
  font-weight:700;
  color:var(--text-secondary);
  background:#F8F8FB;
  border-bottom:1px solid var(--border);
  text-transform:uppercase
}
.history-table td {
  padding:10px 16px;
  border-bottom:1px solid #F0F0F5
}
.history-table tr:last-child td {
  border-bottom:none
}
.history-table tr:nth-child(even) {
  background:#FBFAFC
}
.history-table tr:hover td {
  background:#F4F0FA
}
.history-table tr {
  cursor:pointer
}
.history-bar {
  height:6px;
  border-radius:3px;
  background:#EDE8F2;
  overflow:hidden;
  min-width:80px
}
.history-bar-fill {
  height:100%;
  border-radius:3px;
  background:linear-gradient(90deg,var(--purple-mid),var(--pink))
}
.search-bar {
  display:flex;
  gap:12px;
  margin-bottom:20px;
  align-items:center
}
.search-input {
  flex:1;
  padding:10px 16px;
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  font-family:var(--font);
  font-size:14px;
  background:#fff
}
.search-input:focus {
  outline:none;
  border-color:var(--pink);
  box-shadow:0 0 0 3px rgba(235,41,123,.08)
}
.search-input::placeholder {
  color:var(--text-muted)
}
.client-list-table {
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm)
}
.client-list-table th {
  padding:12px 20px;
  text-align:left;
  font-size:11px;
  font-weight:700;
  color:var(--text-secondary);
  background:#F8F8FB;
  border-bottom:1px solid var(--border);
  text-transform:uppercase
}
.client-list-table td {
  padding:12px 20px;
  border-bottom:1px solid #F0F0F5;
  font-size:13px
}
.client-list-table tr:last-child td {
  border-bottom:none
}
.client-list-table tr:nth-child(even) td {
  background:#FBFAFC
}
.client-list-table tbody tr {
  cursor:pointer;
  transition:background .1s
}
.client-list-table tbody tr:hover td {
  background:#F4F0FA
}
.activity-log {
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
  margin-bottom:16px
}
.activity-log-header {
  padding:12px 20px;
  background:var(--teal);
  color:#fff;
  font-weight:700;
  font-size:13px;
  display:flex;
  align-items:center;
  justify-content:space-between
}
.activity-entry {
  padding:14px 20px;
  border-bottom:1px solid #F0F0F5;
  display:flex;
  gap:14px;
  align-items:flex-start
}
.activity-entry:last-child {
  border-bottom:none
}
.activity-entry:nth-child(even) {
  background:#FBFAFC
}
.activity-date {
  font-family:var(--mono);
  font-size:11px;
  color:var(--text-muted);
  min-width:90px;
  padding-top:2px
}
.activity-who {
  font-size:11px;
  font-weight:700;
  color:var(--teal);
  min-width:70px;
  padding-top:2px
}
.activity-text {
  font-size:12px;
  font-weight:300;
  flex:1;
  line-height:1.5
}
.activity-delete {
  border:none;
  background:none;
  color:var(--text-muted);
  cursor:pointer;
  font-size:14px;
  padding:2px 6px;
  border-radius:4px
}
.activity-delete:hover {
  color:var(--red);
  background:#FDE8E8
}
.modal-overlay {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(27,3,60,.55);
  z-index:200;
  align-items:center;
  justify-content:center;
  backdrop-filter:blur(3px)
}
.modal-overlay.active {
  display:flex
}
.modal {
  background:#fff;
  border-radius:var(--radius);
  padding:28px;
  width:90%;
  max-width:460px;
  box-shadow:var(--shadow-lg)
}
.modal h2 {
  font-size:17px;
  font-weight:700;
  margin-bottom:16px
}
.modal-field {
  margin-bottom:14px
}
.modal-field label {
  display:block;
  font-size:12px;
  font-weight:700;
  margin-bottom:4px;
  color:var(--text-secondary)
}
.modal-field input,.modal-field textarea {
  width:100%;
  padding:8px 12px;
  border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  font-family:var(--font);
  font-size:13px
}
.modal-field input:focus,.modal-field textarea:focus {
  outline:none;
  border-color:var(--pink)
}
.modal-field textarea {
  resize:vertical;
  min-height:60px
}
.modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:20px
}
.hidden {
  display:none!important
}
.loading-spinner {
  display:inline-block;
  width:16px;
  height:16px;
  border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;
  border-radius:50%;
  animation:spin .6s linear infinite
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
@media(max-width:768px) {
  .topbar,.nav-bar,.main {
    padding-left:16px;
    padding-right:16px
  }
  .stats-row {
    grid-template-columns:repeat(2,1fr)
  }
  .client-grid {
    grid-template-columns:1fr
  }
}
