@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;

  --color-bg-start: #e2e8f0;
  --color-bg-end: #ede9fe;
  --color-shell: #f8fafc;
  --color-card-bg: #ffffff;
  --color-card-border: rgba(226, 232, 240, 0.8);

  --color-text-dark: #0f172a;
  --color-text-muted: #64748b;
  --color-text-dim: #94a3b8;

  --color-primary-dark: #1e1b4b;
  --color-accent-purple: #a855f7;
  --color-accent-coral: #f97316;
  --color-accent-sky: #38bdf8;
  --color-accent-emerald: #10b981;

  --pastel-blue: #dbeafe;
  --pastel-purple: #ede9fe;
  --pastel-peach: #ffedd5;
  --pastel-coral: #fed7aa;
  --pastel-rose: #ffe4e6;
  --pastel-mint: #d1fae5;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --shadow-shell: 0 25px 60px -15px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.04);
  --shadow-pill: 0 8px 20px -3px rgba(30, 27, 75, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--color-bg-start) 0%, #cbd5e1 50%, var(--color-bg-end) 100%);
  color: var(--color-text-dark);
  min-height: 100vh;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Shell Outer Frame */
.tasklyn-shell {
  width: 100%;
  max-width: 1440px;
  background: var(--color-shell);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-shell);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 1.75rem 2.25rem;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.brand-badge {
  background: var(--color-primary-dark);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.nav-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 6px 8px;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-card-border);
  flex-wrap: wrap;
}

.nav-pill {
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--color-text-dark);
  background: rgba(241, 245, 249, 0.8);
}

.nav-pill.active {
  background: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: var(--shadow-pill);
}

.top-user-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--color-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
  border-color: var(--color-primary-dark);
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 4px 14px 4px 6px;
  border-radius: 9999px;
  border: 1px solid var(--color-card-border);
}

.avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Subheader Bar */
.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
}

.sub-header-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.sub-header-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack-item {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  margin-left: -10px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.avatar-stack-item:first-child {
  margin-left: 0;
}

/* Tasklyn Cards & Panels */
.panel-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-card-border);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.see-all-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
}

.see-all-btn:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

/* Pastel Today Task Cards */
.pastel-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pastel-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pastel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -10px rgba(0,0,0,0.08);
}

.pastel-blue { background: var(--pastel-blue); }
.pastel-purple { background: var(--pastel-purple); }
.pastel-peach { background: var(--pastel-peach); }
.pastel-coral { background: var(--pastel-coral); }

.tag-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.pastel-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0.6rem 0;
  line-height: 1.25;
}

/* Ring Donut Chart Visualization */
.donut-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ring-donut-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 12;
}

.ring-fill-1 {
  fill: none;
  stroke: var(--color-accent-purple);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 280;
  stroke-dashoffset: 140; /* 50% */
}

.ring-fill-2 {
  fill: none;
  stroke: var(--color-accent-coral);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 210;
  stroke-dashoffset: 157; /* 25% */
}

.ring-fill-3 {
  fill: none;
  stroke: var(--color-accent-sky);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 119; /* 15% */
}

/* Tracker Bar Chart */
.tracker-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 130px;
  padding-top: 1rem;
}

.tracker-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.tracker-pill-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 9999px;
  background: var(--pastel-coral);
  position: relative;
  overflow: hidden;
  transition: height 0.4s ease;
}

.tracker-pill-fill {
  width: 100%;
  background: var(--color-accent-coral);
  border-radius: 9999px;
}

/* Buttons */
.btn-dark {
  background: var(--color-primary-dark);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-pill);
}

.btn-dark:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-light {
  background: #f1f5f9;
  color: var(--color-text-dark);
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-card-border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-light:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #ffe4e6;
  color: #e11d48;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #fecdd3;
  cursor: pointer;
}

.btn-danger:hover {
  background: #fecdd3;
}

/* Tables */
.tasklyn-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tasklyn-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-card-border);
}

.tasklyn-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: var(--color-text-dark);
}

.tasklyn-table tr:hover td {
  background: #f8fafc;
}

/* Form Controls */
.input, .select, .textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.input:focus, .select:focus, .textarea:focus {
  background: #ffffff;
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(30, 27, 75, 0.1);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.4rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-shell);
}

/* Alerts */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-error {
  background: #ffe4e6;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

/* Mobile Responsive Drawer Toggle */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 1024px) {
  body {
    padding: 0.75rem;
  }
  .tasklyn-shell {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  .nav-pill-group {
    display: none; /* Collapsible or scrollable on mobile */
    width: 100%;
    overflow-x: auto;
  }
  .nav-pill-group.mobile-open {
    display: flex;
  }
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .top-user-actions {
    width: 100%;
    justify-content: space-between;
  }
}
