/* ============================================================
   MAK PORTAL — Minimal Dark UI
   Resend.com-inspired: near-black, clean whites, zero neon
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Backgrounds */
  --bg-base:        #0F0F0F;
  --bg-surface:     #191919;
  --bg-card:        #141414;
  --bg-card-hover:  #1C1C1C;
  --bg-input:       #181818;

  /* Borders — hairline only */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-active:  rgba(255, 255, 255, 0.18);

  /* Text — greyscale ramp */
  --text-white:     #FFFFFF;
  --text-primary:   #E8E8E8;
  --text-secondary: #909090;
  --text-muted:     #525252;
  --text-dim:       #363636;

  /* Accent — white only, no hue */
  --accent:         #FFFFFF;
  --accent-hover:   rgba(255, 255, 255, 0.88);

  /* Status — greyscale only, differentiated by brightness not hue */
  --status-pending:     #4A4A4A;   /* dim grey */
  --status-in-progress: #8A8A8A;   /* mid grey — active = brighter */
  --status-done:        #606060;   /* settled grey */
  --status-blocked:     #6A5A5A;   /* ever-so-slightly warm grey, not red */

  /* Urgency — greyscale only */
  --urgency-low:      #3A3A3A;
  --urgency-medium:   #5A5A5A;
  --urgency-high:     #7A7A7A;
  --urgency-critical: #A0A0A0;   /* brightest = highest urgency, no colour */

  /* Typography */
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --radius-card: 12px;
  --radius-sm:   8px;
  --radius-pill: 9999px;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-base);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* === THREE.JS CANVAS === */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Site wrapper floats above canvas */
.site-wrap {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

/* === TYPOGRAPHY === */
h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-white);
}

h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-white);
}

h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 48px;
  padding-top: 52px;
  padding-bottom: 80px;
}

@media (max-width: 768px) {
  .container { padding-inline: 20px; padding-top: 28px; }
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  transition: all 0.2s ease;
  min-height: 36px;
}

.back-arrow:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.user-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* === PORTAL CARD (base for all cards) === */
.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    border-color 0.3s ease,
    background 0.25s ease,
    box-shadow 0.3s ease;
}

.portal-card:hover {
  border-color: var(--border-default);
  background: var(--bg-card-hover);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.75);
}

/* Top-edge inset shine */
.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.10) 40%,
    rgba(255, 255, 255, 0.10) 60%,
    transparent 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  pointer-events: none;
  z-index: 1;
}

/* Glare layer — appears on tilt */
.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.portal-card:hover .card-glare {
  opacity: 1;
}

/* === LANDING GRID === */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  align-items: start;
}

/* Card 1: Idrees Tasks — full width */
.landing-card:nth-child(1) { grid-column: 1 / -1; }

/* Cards 2-3: half width */
.landing-card:nth-child(2),
.landing-card:nth-child(3) { grid-column: span 6; }

/* Cards 4-5: half width */
.landing-card:nth-child(4),
.landing-card:nth-child(5) { grid-column: span 6; }

.landing-card {
  display: block;
  padding: 32px;
  cursor: pointer;
  text-decoration: none;
}

.landing-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.landing-card-content { flex: 1; }

.landing-card-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.landing-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.landing-card:nth-child(1) .landing-card-title {
  font-size: 1.5rem;
}

.landing-card-right {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}

.landing-card-arrow {
  font-size: 1.125rem;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.landing-card:hover .landing-card-arrow {
  color: var(--text-primary);
  transform: translate(3px, -3px);
}

/* Counter badge — clean, no neon */
.counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}

.counter-badge.has-count {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-default);
  color: var(--text-primary);
}

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 32px;
}

.filter-pill:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
}

.filter-pill.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-active);
  color: var(--text-white);
}

/* === TASK CARDS === */
.task-card {
  padding: 0;
  margin-bottom: 12px;
  cursor: pointer;
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

.task-card-title-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-card-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.task-card.done .task-card-title {
  color: var(--text-muted);
  text-decoration: line-through;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pin-indicator {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.due-date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.due-date.overdue {
  color: var(--status-blocked);
}

.task-card-body {
  display: none;
  border-top: 1px solid var(--border-subtle);
  padding: 18px 22px;
  gap: 12px;
  flex-direction: column;
}

.task-card.expanded .task-card-body {
  display: flex;
}

.task-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* === PROPOSAL CARDS === */
.proposal-card {
  padding: 0;
  margin-bottom: 16px;
  cursor: pointer;
}

.proposal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px;
}

.proposal-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.proposal-card-body {
  display: none;
  border-top: 1px solid var(--border-subtle);
  padding: 22px 28px;
  flex-direction: column;
  gap: 14px;
}

.proposal-card.expanded .proposal-card-body { display: flex; }

.proposal-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proposal-benefits li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
}

.proposal-benefits li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.proposal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* === PROJECT CARDS === */
.project-card {
  padding: 0;
  margin-bottom: 16px;
  cursor: pointer;
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
}

.project-card-info { flex: 1; }

.project-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 100px;
}

.progress-bar-track {
  width: 100px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 1px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
  transition: width 0.4s ease;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.project-card-body {
  display: none;
  border-top: 1px solid var(--border-subtle);
  padding: 22px 28px;
  flex-direction: column;
  gap: 14px;
}

.project-card.expanded .project-card-body { display: flex; }

.project-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* === STATUS & URGENCY PILLS (muted, no neon) === */
.urgency-pill,
.status-pill,
.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.urgency-low      { background: rgba(255,255,255,0.03); color: var(--text-muted);   border-color: var(--border-subtle); }
.urgency-medium   { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); }
.urgency-high     { background: rgba(255,255,255,0.05); color: var(--text-primary);   border-color: var(--border-default); }
.urgency-critical { background: rgba(255,255,255,0.07); color: var(--text-white);     border-color: var(--border-default); font-weight: 600; }

.status-pending     { background: rgba(255,255,255,0.03); color: var(--text-muted);     border-color: var(--border-subtle); }
.status-in_progress { background: rgba(255,255,255,0.06); color: var(--text-primary);   border-color: var(--border-default); }
.status-done        { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); }
.status-blocked     { background: rgba(255,255,255,0.03); color: var(--text-secondary); border-color: var(--border-subtle); font-style: italic; }

.status-new        { background: rgba(255,255,255,0.03); color: var(--text-muted);     border-color: var(--border-subtle); }
.status-active     { background: rgba(255,255,255,0.06); color: var(--text-primary);   border-color: var(--border-default); }
.status-paused     { background: rgba(255,255,255,0.03); color: var(--text-muted);     border-color: var(--border-subtle); }
.status-completed  { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); }

.category-automation  { background: rgba(255,255,255,0.03); color: var(--text-muted); border-color: var(--border-subtle); }
.category-new_project { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); }
.category-improvement { background: rgba(255,255,255,0.03); color: var(--text-muted); border-color: var(--border-subtle); }

/* === BUTTONS === */

/* Primary: white solid (Resend-style) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--text-white);
  color: #0F0F0F;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  min-height: 48px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

/* Secondary: dark outline */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
}

.btn-secondary:hover {
  border-color: var(--border-active);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

/* Destructive */
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid rgba(192,100,90,0.2);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
}

.btn-danger:hover {
  background: rgba(192,100,90,0.18);
  border-color: rgba(192,100,90,0.35);
}

/* Confirm/Accept */
.btn-success {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(95,173,142,0.2);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
}

.btn-success:hover {
  background: rgba(95,173,142,0.18);
  border-color: rgba(95,173,142,0.35);
}

/* === FORMS === */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.form-input,
.form-textarea,
.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 9px 13px;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 48px;
}

.form-textarea { min-height: 100px; resize: vertical; }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--border-active);
  background: rgba(255,255,255,0.03);
}

.form-select option { background: #141414; color: var(--text-primary); }

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
}

.modal-overlay.hidden { display: none; }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: 0 32px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  pointer-events: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  justify-content: flex-end;
}

/* === EMPTY STATE === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  gap: 10px;
  text-align: center;
}

.empty-state-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

.empty-state-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === LOGIN === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.02em;
  text-align: center;
}

.login-sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: -12px;
}

.login-error {
  background: rgba(192,100,90,0.08);
  border: 1px solid rgba(192,100,90,0.2);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: none;
}

.login-btn { width: 100%; justify-content: center; }

/* Helper text */
.helper-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.blockers-text {
  font-size: 0.875rem;
  color: var(--status-blocked);
}

.divider {
  height: 1px;
  background: var(--border-subtle);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .landing-card:nth-child(1),
  .landing-card:nth-child(2),
  .landing-card:nth-child(3),
  .landing-card:nth-child(4),
  .landing-card:nth-child(5) { grid-column: 1 / -1; }
  .landing-card { padding: 24px 20px; }
  .modal-content { padding: 24px; }
  .task-card-header,
  .proposal-card-header,
  .project-card-header { padding: 14px 18px; }
  .task-card-body,
  .proposal-card-body,
  .project-card-body { padding: 14px 18px; }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}

*:focus-visible {
  outline: 1px solid rgba(255,255,255,0.4);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ================================================================
   TASK ROW — redesigned card layout
   ================================================================ */

.task-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.task-row:hover { border-color: var(--border-default); }
.task-row.done .task-row-title { color: var(--text-muted); text-decoration: line-through; }

/* Top-edge shine */
.task-row::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  pointer-events: none;
}
.task-row { position: relative; }

/* Main clickable row */
.task-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  min-height: 52px;
}

.task-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.task-row-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Urgency dot — small coloured circle */
.urgency-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.urgency-dot-low      { background: rgba(255,255,255,0.20); }
.urgency-dot-medium   { background: rgba(255,255,255,0.38); }
.urgency-dot-high     { background: rgba(255,255,255,0.58); }
.urgency-dot-critical { background: rgba(255,255,255,0.85); }

/* Pin tag */
.pin-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* Status chip — inline display */
.status-chip {
  font-family: var(--font-mono);
  font-size: 0.5875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.status-chip.status-pending     { background: rgba(255,255,255,0.03); color: var(--text-muted);     border-color: var(--border-subtle); }
.status-chip.status-in_progress { background: rgba(255,255,255,0.07); color: var(--text-primary);   border-color: var(--border-default); }
.status-chip.status-blocked     { background: rgba(255,255,255,0.03); color: var(--text-secondary); border-color: var(--border-subtle); font-style: italic; }
.status-chip.status-done        { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); }

/* Due chip */
.due-chip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.due-chip.overdue { color: var(--text-secondary); font-style: italic; }

/* Expand caret */
.expand-caret {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
  line-height: 1;
}

/* Expanded body */
.task-row-body {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}
.task-row.expanded .task-row-body { display: flex; }

.task-desc-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.task-body-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-inline-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Status toggle buttons — greyscale brightness only */
.inline-status-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 30px;
  text-transform: none;
}
.status-btn:hover                { border-color: var(--border-default); color: var(--text-primary); }
.status-btn.active-pending       { background: rgba(255,255,255,0.05); color: var(--text-primary);   border-color: var(--border-default); }
.status-btn.active-in_progress   { background: rgba(255,255,255,0.09); color: var(--text-white);     border-color: var(--border-active); font-weight: 600; }
.status-btn.active-blocked       { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); font-style: italic; }
.status-btn.active-done          { background: rgba(255,255,255,0.04); color: var(--text-secondary); border-color: var(--border-subtle); }

/* Notes textarea */
.notes-ta { min-height: 72px; }

/* Custom free-field input */
.custom-note-row {
  display: flex;
  gap: 8px;
}
.custom-note-in { flex: 1; }
.custom-note-add { flex-shrink: 0; min-height: 48px; }

/* Custom tags */
.custom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.custom-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-primary);
}
.custom-tag-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0 0 1px;
  transition: color 0.15s ease;
}
.custom-tag-remove:hover { color: var(--status-blocked); }

/* Task row actions */
.task-row-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

/* ================================================================
   PINNED URGENT INQUIRY BANNER (Appears on top of page)
   ================================================================ */

.pinned-urgent-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.pinned-urgent-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.pinned-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.pinned-badge {
  font-family: var(--font-mono);
  font-size: 0.5875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  flex-shrink: 0;
}

.pinned-banner-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pinned-banner-author {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.pinned-banner-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-unpin {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-unpin:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
}

/* ================================================================
   COMPACT HOURS SUMMARY BAR (Main Page)
   ================================================================ */

.compact-hours-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 12px 18px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.compact-hours-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-hours-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-white);
}

.compact-hours-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.compact-hours-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.compact-days-strip {
  display: flex;
  gap: 6px;
}

.compact-day-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.compact-day-name {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
}

.compact-day-indicator {
  width: 16px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.compact-day-indicator.is-logged {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

.compact-day-indicator.is-today {
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(255, 255, 255, 0.90);
}

.compact-day-indicator.is-rest {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.4;
}

.compact-hours-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.compact-hours-link:hover {
  color: var(--text-white);
}

/* ================================================================
   COMPACT INQUIRIES SECTION
   ================================================================ */

.inquiries-section {
  margin-bottom: 48px;
}

.inquiries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.inquiries-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

/* ================================================================
   TOP STATUS COLUMN (Session text on top, availability below)
   ================================================================ */

.top-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* ================================================================
   MINIMAL TABBED INQUIRIES CARD
   ================================================================ */

.inquiries-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin-bottom: 48px;
}

.inquiries-tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.inquiries-tabs-nav {
  display: flex;
  gap: 20px;
}

.inq-tab-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  position: relative;
  transition: color 0.15s ease;
}

.inq-tab-btn:hover {
  color: var(--text-primary);
}

.inq-tab-btn.is-active {
  color: var(--text-white);
  font-weight: 600;
}

.inq-tab-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-white);
  border-radius: 1px;
}

.inq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.inq-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.15s ease;
}

.inq-row:hover {
  border-color: var(--border-default);
}

.inq-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.inq-row-question {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-white);
  line-height: 1.4;
}

.inq-row-answer {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 8px;
  border-left: 2px solid var(--border-active);
  margin-top: 3px;
}

.inq-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.inq-badge {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.inq-badge.is-answered {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-pin-inquiry {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-pin-inquiry:hover,
.btn-pin-inquiry.is-pinned {
  color: var(--text-white);
}

.inq-row-reply {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.inq-reply-input {
  flex: 1;
  font-size: 0.75rem;
  min-height: 30px;
}

.inquiry-input-box {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.inquiry-input-field {
  flex: 1;
  font-size: 0.75rem;
  min-height: 34px;
}

/* ================================================================
   MAK SHIFT AVAILABILITY COMPONENT
   ================================================================ */

.mak-avail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.mak-avail-btn:hover {
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.07);
}

.mak-avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  user-select: none;
}

.mak-avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mak-avail-dot.is-online {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.mak-avail-dot.is-away {
  background: rgba(255, 255, 255, 0.20);
  box-shadow: none;
}


