/* ============================================
     CATEGORY BOARD VIEW
     ============================================ */

  .category-board-container {
    min-height: calc(100vh - 120px);
  }

  .board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .board-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .board-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .board-category-badge.kurumsal {
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.25);
  }

  .board-category-badge.kisisel {
    background: rgba(236, 72, 153, 0.12);
    color: #db2777;
    border: 1px solid rgba(236, 72, 153, 0.25);
  }

  .board-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.4px;
  }

  .btn-add-board-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-btn);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow-violet);
    transition: var(--transition-base);
  }

  .btn-add-board-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-violet), var(--shadow-glow-pink);
  }

  /* Board Grid */
  .board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
  }

  /* Board Card */
  .board-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    overflow: hidden;
    animation: cardSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  .board-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
  }

  .board-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border-color);
  }

  .board-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .board-card-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
  }

  .board-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .btn-board-delete {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-base);
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .btn-board-delete:hover {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  /* Board Card Body Sections */
  .board-card-section {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
  }

  .board-card-section:last-child {
    border-bottom: none;
  }

  .board-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
  }

  .board-section-label svg {
    opacity: 0.7;
  }

  /* Notes section */
  .board-notes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }

  .board-note-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(0,0,0,0.025);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.83rem;
    color: var(--text-primary);
    line-height: 1.45;
    transition: background 0.2s;
  }

  .board-note-item:hover {
    background: rgba(0,0,0,0.045);
  }

  .board-note-text {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .board-note-delete {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    background: transparent;
    border: none;
    margin-top: 1px;
  }

  .board-note-delete:hover {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  .board-note-add {
    display: flex;
    gap: 8px;
    align-items: flex-end;
  }

  .board-note-input {
    flex: 1;
    font-size: 0.83rem;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    min-height: 60px;
    resize: vertical;
  }

  .btn-board-note-save {
    padding: 8px 14px;
    background: var(--accent-violet);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    height: fit-content;
  }

  .btn-board-note-save:hover {
    background: #6d28d9;
  }

  /* Attachments section */
  .board-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
  }

  .board-attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.025);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.8rem;
    transition: background 0.2s;
  }

  .board-attachment-item:hover {
    background: rgba(0,0,0,0.045);
  }

  .board-attachment-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-weight: 500;
  }

  .board-attachment-name a {
    color: var(--accent-violet);
    text-decoration: none;
    font-weight: 600;
  }

  .board-attachment-name a:hover {
    text-decoration: underline;
  }

  .board-att-delete {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    background: transparent;
    border: none;
  }

  .board-att-delete:hover {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  .board-attachment-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .btn-board-attach {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
  }

  .btn-board-attach:hover {
    border-color: var(--accent-violet);
    color: var(--accent-violet);
    background: var(--accent-violet-dim);
  }

  .board-link-form {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding: 10px;
    background: rgba(0,0,0,0.025);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
  }

  .board-link-form input {
    font-size: 0.82rem;
    padding: 7px 10px;
    min-height: unset;
  }

  .board-link-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
  }

  .btn-board-link-add {
    padding: 6px 14px;
    background: var(--accent-cyan);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .btn-board-link-add:hover {
    background: #0770a0;
  }

  .btn-board-link-cancel {
    padding: 6px 12px;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .btn-board-link-cancel:hover {
    background: rgba(0,0,0,0.04);
  }

  /* Empty board state */
  .board-empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
  }

  .board-empty-state svg {
    opacity: 0.35;
    margin-bottom: 16px;
  }

  .board-empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-secondary);
  }

  .board-empty-state p {
    font-size: 0.88rem;
  }

  /* Calendar Body highlighting */
  .cal-day-cell.has-tasks {
    background: var(--accent-green-dim) !important;
    border-color: var(--accent-green) !important;
  }

  /* Budget Summary Bar */
  .budget-summary-bar {
    display: flex;
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    align-items: center;
    gap: 32px;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, #ffffff, #fafafa);
  }

  .budget-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
  }

  .budget-summary-item .label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .budget-summary-item .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-green);
    font-feature-settings: "tnum";
  }

  #total-completed-budget {
    color: var(--accent-cyan);
  }

  .budget-summary-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.08);
  }

  /* === CSS Variables (Design Tokens) === */
  /* Theme variables — Light Mode */
  :root {
    --bg-body: #f5f0e8;
    --bg-sidebar: #faf7f2;
    --bg-card: #faf7f2;
    --bg-card-hover: #f0ede5;
    --bg-secondary: #faf7f2;
    --bg-input: #ede9e0;
    --bg-input-focus: #e3dfd4;
    --border-color: #ddd9ce;
    --border-color-hover: #c8c3b5;
    --text-primary: #1a1d2e;
    --text-secondary: #4a5568;
    --text-muted: #8a94a6;
    --accent-cyan: #0891b2;
    --accent-cyan-rgb: 8, 145, 178;
    --accent-violet: #7c3aed;
    --accent-violet-rgb: 124, 58, 237;
    --accent-violet-dim: rgba(124, 58, 237, 0.12);
    --accent-pink: #db2777;
    --accent-pink-dim: rgba(219, 39, 119, 0.1);
    --accent-cyan-dim: rgba(8, 145, 178, 0.1);
    --accent-green: #059669;
    --accent-green-dim: rgba(5, 150, 105, 0.12);
    --accent-amber: #d97706;
    --accent-amber-dim: rgba(217, 119, 6, 0.12);
    --accent-red: #dc2626;
    --accent-red-dim: rgba(220, 38, 38, 0.12);
    --accent-yellow: #f59e0b;
    --accent-yellow-dim: rgba(245, 158, 11, 0.12);


    --cat-erasmus: #3b82f6;
    /* Blue */
    --cat-horizon: #8b5cf6;
    /* Violet */
    --cat-eit: #f59e0b;
    /* Amber */
    --cat-inst: #06b6d4;
    /* Cyan */
    --cat-personal: #ec4899;
    /* Pink */

    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-btn: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 50%, #ec4899 100%);

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --shadow-glow-violet: 0 0 20px rgba(124, 58, 237, 0.18);
    --shadow-glow-pink: 0 0 20px rgba(219, 39, 119, 0.15);

    /* Spacing */
    --sidebar-width: 280px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

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

  html {
    font-size: 16px;
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    /* explicit auto scroll */
    -webkit-font-smoothing: antialiased;
  }

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

  input,
  textarea,
  select {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    outline: none;
    transition: var(--transition-base);
    width: 100%;
  }

  input:focus,
  textarea:focus,
  select:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px var(--accent-violet-dim);
  }

  textarea {
    resize: vertical;
    min-height: 80px;
  }

  select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
  }

  select option {
    color: var(--text-primary);
    background-color: var(--bg-card);
  }

  /* === Animated Background Blobs (hidden in light mode) === */
  .bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.06;
    /* very subtle in light mode */
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
  }

  .blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-violet);
    top: -150px;
    left: -100px;
    animation-delay: 0s;
  }

  .blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-pink);
    bottom: -100px;
    right: -80px;
    animation-delay: -7s;
  }

  .blob-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
  }

  @keyframes float {

    0%,
    100% {
      transform: translate(0, 0) scale(1);
    }

    25% {
      transform: translate(30px, -20px) scale(1.05);
    }

    50% {
      transform: translate(-20px, 30px) scale(0.95);
    }

    75% {
      transform: translate(20px, 20px) scale(1.02);
    }
  }

  /* === App Layout === */
  .app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
  }

  /* === Sidebar === */
  .sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    --accent-amber: #d97706;
    --accent-amber-dim: rgba(217, 119, 6, 0.12);
    --accent-red: #dc2626;
    --accent-red-dim: rgba(220, 38, 38, 0.12);
    --accent-yellow: #f59e0b;
    --accent-yellow-dim: rgba(245, 158, 11, 0.12);


    --cat-erasmus: #3b82f6;
    /* Blue */
    --cat-horizon: #8b5cf6;
    /* Violet */
    --cat-eit: #f59e0b;
    /* Amber */
    --cat-inst: #06b6d4;
    /* Cyan */
    --cat-personal: #ec4899;
    /* Pink */

    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-btn: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 50%, #ec4899 100%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-glow-violet: 0 4px 15px rgba(124, 58, 237, 0.25);
    --shadow-glow-pink: 0 4px 15px rgba(219, 39, 119, 0.2);

    /* Spacing */
    --sidebar-width: 280px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Calendar Premium Tokens */
    --cal-bg: rgba(255, 255, 255, 0.4);
    --cal-glass-border: rgba(255, 255, 255, 0.3);
    --cal-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --cal-day-bg: rgba(255, 255, 255, 0.5);
    --cal-day-border: rgba(255, 255, 255, 0.1);
    --cal-day-hover: rgba(255, 255, 255, 0.8);
    --cal-today-glow: 0 0 15px rgba(124, 58, 237, 0.3);
    --cal-event-glass: rgba(255, 255, 255, 0.15);
  }

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

  html {
    font-size: 16px;
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    /* explicit auto scroll */
    -webkit-font-smoothing: antialiased;
  }

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

  input,
  textarea,
  select {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    outline: none;
    transition: var(--transition-base);
    width: 100%;
  }

  input:focus,
  textarea:focus,
  select:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px var(--accent-violet-dim);
  }

  textarea {
    resize: vertical;
    min-height: 80px;
  }

  select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
  }

  select option {
    color: var(--text-primary);
    background-color: var(--bg-card);
  }

  /* === Animated Background Blobs (hidden in light mode) === */
  .bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.06;
    /* very subtle in light mode */
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
  }

  .blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-violet);
    top: -150px;
    left: -100px;
    animation-delay: 0s;
  }

  .blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-pink);
    bottom: -100px;
    right: -80px;
    animation-delay: -7s;
  }

  .blob-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
  }

  @keyframes float {

    0%,
    100% {
      transform: translate(0, 0) scale(1);
    }

    25% {
      transform: translate(30px, -20px) scale(1.05);
    }

    50% {
      transform: translate(-20px, 30px) scale(0.95);
    }

    75% {
      transform: translate(20px, 20px) scale(1.02);
    }
  }

  /* === App Layout === */
  .app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
  }

  /* === Sidebar === */
  .sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
  }

  .sidebar::-webkit-scrollbar {
    width: 5px;
  }

  .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
  }

  .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
  }

  .sidebar-header {
    margin-bottom: 32px;
    padding: 0 8px;
  }

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

  .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow-violet);
  }

  .logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
  }

  /* Sidebar Navigation */
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
  }

  .nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.25s ease;
  }

  .nav-item:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
  }

  .nav-item.active {
    color: var(--accent-violet);
    background: rgba(124, 58, 237, 0.08);
    font-weight: 700;
  }

  .nav-item.active svg {
    color: var(--accent-violet);
    stroke-width: 2.5;
  }

  .nav-item.active::before {
    transform: scaleY(1);
    width: 4px;
    box-shadow: 2px 0 8px rgba(124, 58, 237, 0.3);
  }

  .nav-item:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
    transform: translateX(4px);
  }

  .nav-item.drag-over {
    background: var(--accent-violet-dim) !important;
    outline: 2px dashed var(--accent-violet) !important;
    outline-offset: -2px;
    transform: scale(1.02);
  }

  /* Sidebar Categories */
  .sidebar-categories {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .category-filter {
    padding: 8px 16px;
  }

  .category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  }

  .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .category-badge .category-dot {
    margin-right: 4px;
  }

  .nav-item.active::before {
    transform: scaleY(1);
  }

  .nav-item.active svg {
    color: var(--accent-violet);
  }

  .nav-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    min-width: 28px;
    text-align: center;
  }

  .nav-badge.pending {
    background: var(--accent-amber-dim);
    color: var(--accent-amber);
  }

  .nav-badge.completed {
    background: var(--accent-green-dim);
    color: var(--accent-green);
  }

  /* Sidebar Stats */
  .sidebar-stats {
    margin-top: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
  }

  .stats-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
  }

  .progress-ring-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
  }

  .progress-ring {
    transform: rotate(-90deg);
  }

  .progress-ring-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-width: 6;
  }

  .progress-ring-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 263.89;
    stroke-dashoffset: 263.89;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .stats-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
  }

  /* === Main Content === */
  .main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 40px;
    min-height: 100vh;
    min-width: 0;
    /* CRITICAL for flex items to prevent them from growing beyond container */
    overflow-x: hidden;
    /* Prevent horizontal scroll on the entire page */
    overflow-y: visible;
    /* Ensure page scroll is natural */
  }

  /* Header */
  .main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
    padding: 10px 0;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 16px !important;
    margin-left: auto;
  }

  .btn-add-project {
    background: var(--gradient-btn) !important;
    color: white !important;
    border: none !important;
    padding: 10px 22px !important;
    box-shadow: var(--shadow-glow-violet) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
  }

  .btn-add-project:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow-violet), 0 8px 20px rgba(124, 58, 237, 0.3) !important;
    filter: brightness(1.1);
  }

  .btn-add-project:active {
    transform: translateY(0) scale(0.98);
  }

  .btn-add-project::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
  }

  .btn-add-project:hover::after {
    left: 100%;
    top: 100%;
  }

  .menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-base);
  }

  .menu-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
  }

  .header-info h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
  }

  .header-date {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 4px;
  }

  .btn-add-task {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-btn);
    background-size: 200% 200%;
    color: white;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow-violet);
    transition: var(--transition-base);
    animation: gradientShift 4s ease infinite;
  }

  .btn-add-task:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-violet), var(--shadow-glow-pink);
  }

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

  @keyframes gradientShift {

    0%,
    100% {
      background-position: 0% 50%;
    }

    50% {
      background-position: 100% 50%;
    }
  }

  /* === Task List === */
  .task-list-container {
    position: relative;
  }

  .task-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  /* Task Card — compact list row */
  .project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-base);
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
    transform: translateY(8px);
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    user-select: none;
  }

  .project-card.is-dragging {
    opacity: 0.5;
    background: var(--bg-card-hover) !important;
    border: 1px dashed var(--accent-violet) !important;
    transform: scale(0.98);
    cursor: grabbing !important;
  }

  .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    transition: var(--transition-base);
  }

  .project-card[data-priority="high"]::before {
    background: var(--accent-red);
  }

  .project-card[data-priority="medium"]::before {
    background: var(--accent-amber);
  }

  .project-card[data-priority="low"]::before {
    background: var(--accent-green);
  }

  .project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-violet-dim);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-violet-dim);
  }

  .project-card.completed-card {
    background: rgba(16, 185, 129, 0.04);
    border-left: 4px solid var(--accent-green);
  }

  .project-card.completed-card:hover {
    background: rgba(16, 185, 129, 0.08);
  }

  .project-card.removing {
    animation: slideOut 0.35s ease forwards;
  }

  @keyframes slideIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slideOut {
    to {
      opacity: 0;
      transform: translateX(60px) scale(0.95);
    }
  }

  /* Checkbox */
  .task-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color-hover);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-spring);
    margin-top: 0;
    position: relative;
  }

  .task-checkbox:hover {
    border-color: var(--accent-violet);
    background: var(--accent-violet-dim);
    transform: scale(1.1);
  }

  .task-checkbox.checked {
    background: #10b981;
    border-color: #10b981;
    animation: checkBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .task-checkbox.checked svg {
    opacity: 1;
    transform: scale(1);
  }

  .task-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-spring);
  }

  @keyframes checkBounce {
    0% {
      transform: scale(1);
    }

    50% {
      transform: scale(1.3);
    }

    100% {
      transform: scale(1);
    }
  }

  /* Task Content */
  .task-content {
    flex: 1;
    min-width: 0;
  }

  .task-title-text {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
    transition: var(--transition-base);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
  }

  .project-card.completed-card .task-title-text {
    color: var(--text-primary);
  }

  .task-desc-text {
    display: none;
    /* hide description in compact list view */
  }

  .task-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    margin-top: 2px;
  }

  .task-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.04);
  }

  .task-meta-item.priority-high {
    color: var(--accent-red);
    background: var(--accent-red-dim);
  }

  .task-meta-item.priority-medium {
    color: var(--accent-amber);
    background: var(--accent-amber-dim);
  }

  .task-meta-item.priority-low {
    color: var(--accent-green);
    background: var(--accent-green-dim);
  }

  .task-meta-item.overdue {
    color: var(--accent-red);
    background: var(--accent-red-dim);
  }

  /* Task Progress Section — hidden in compact list */
  .task-progress-section {
    display: none;
  }

  .task-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
  }

  .task-progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
    position: relative;
  }

  .task-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    animation: shimmer 2s ease-in-out infinite;
  }

  @keyframes shimmer {
    0% {
      transform: translateX(-100%);
    }

    100% {
      transform: translateX(100%);
    }
  }

  .task-progress-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
  }

  /* Task Progress Steps — hidden in compact list */
  .task-progress-steps {
    display: none;
  }

  .progress-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 6px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-base);
    user-select: none;
  }

  .progress-step:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
  }

  .progress-step.active {
    background: var(--accent-violet-dim);
    border-color: rgba(139, 92, 246, 0.3);
  }

  .progress-step-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color-hover);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-spring);
    flex-shrink: 0;
  }

  .progress-step-checkbox:hover {
    border-color: var(--accent-violet);
    transform: scale(1.15);
  }

  .progress-step-checkbox.checked {
    background: var(--accent-violet);
    border-color: transparent;
    animation: checkBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .progress-step-checkbox svg {
    width: 11px;
    height: 11px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-spring);
  }

  .progress-step-checkbox.checked svg {
    opacity: 1;
    transform: scale(1);
  }

  .progress-step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
  }

  .progress-step.active .progress-step-label {
    color: var(--accent-violet);
    font-weight: 600;
  }

  /* Task Actions */
  .project-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition-fast);
    flex-shrink: 0;
  }

  .project-card:hover .project-actions {
    opacity: 1;
  }

  .project-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-base);
  }

  .project-action-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
  }

  .project-action-btn.delete:hover {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  /* === Empty State === */
  .empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    animation: fadeIn 0.5s ease;
  }

  .empty-state.visible {
    display: flex;
  }

  /* Budget Summary Bar */
  .budget-summary-bar {
    display: flex;
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    align-items: center;
    gap: 32px;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, #ffffff, #fafafa);
  }

  .budget-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
  }

  .budget-summary-item .label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .budget-summary-item .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-green);
    font-feature-settings: "tnum";
  }

  #total-completed-budget {
    color: var(--accent-cyan);
  }

  .budget-summary-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.08);
  }

  @media (max-width: 600px) {
    .budget-summary-bar {
      flex-direction: column;
      gap: 16px;
    }

    .budget-summary-divider {
      width: 80%;
      height: 1px;
    }
  }

  /* Specific budget styles */
  #pd-budget-value {
    font-feature-settings: "tnum";
  }

  .budget-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--accent-green-dim);
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 700;
  }

  /* Calendar Day Highlighting */
  .cal-day-cell.has-tasks {
    background: rgba(16, 124, 16, 0.05);
    /* Very light green */
    position: relative;
  }

  .cal-day-cell.has-tasks::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: #107c10;
    border-radius: 50%;
  }

  .cal-week-day.has-tasks {
    background: rgba(16, 124, 16, 0.03);
  }

  .empty-icon {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-violet);
    animation: pulse 3s ease-in-out infinite;
  }

  @keyframes pulse {

    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 var(--accent-violet-dim);
    }

    50% {
      transform: scale(1.05);
      box-shadow: 0 0 0 20px transparent;
    }
  }

  .empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* === Modal === */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
  }

  .modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .modal {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    /* changed from no height limit to fit screen */
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 16px;
    display: flex;
    flex-direction: column;
    z-index: 1001 !important;
  }

  .modal-overlay.active .modal {
    transform: scale(1) translateY(0);
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-shrink: 0;
  }

  .modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
  }

  .modal form,
  .modal>div:not(.modal-header):not(.modal-close) {
    overflow-y: auto;
    padding-right: 4px;
    /* Space for scrollbar */
  }

  .modal-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-base);
  }

  .modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    transform: rotate(90deg);
  }

  /* Form */
  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }

  .optional {
    font-weight: 400;
    color: var(--text-muted);
  }

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

  .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
  }

  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition-base);
  }

  .btn-primary {
    background: var(--gradient-btn);
    background-size: 200% 200%;
    color: white;
    box-shadow: var(--shadow-glow-violet);
    animation: gradientShift 4s ease infinite;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-violet), var(--shadow-glow-pink);
  }

  .btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
  }

  .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
  }

  /* === Toast Notifications === */
  .toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
  }

  .toast.removing {
    animation: toastOut 0.3s ease forwards;
  }

  .toast-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .toast.success .toast-icon {
    background: var(--accent-green-dim);
    color: var(--accent-green);
  }

  .toast.error .toast-icon {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  .toast.info .toast-icon {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
  }

  @keyframes toastIn {
    from {
      opacity: 0;
      transform: translateX(40px) scale(0.95);
    }

    to {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
  }

  @keyframes toastOut {
    to {
      opacity: 0;
      transform: translateX(40px) scale(0.95);
    }
  }

  /* === Attachments & Links === */
  .attachment-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

  .btn-attach {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
  }

  .btn-attach:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
  }

  .link-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .link-form {
    display: flex;
    gap: 6px;
    animation: fadeIn 0.3s ease;
  }

  .link-form input {
    padding: 6px 10px;
    font-size: 0.8rem;
    height: 32px;
  }

  .link-form input#link-title {
    width: 120px;
  }

  .link-form input#link-url {
    width: 180px;
  }

  .pending-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px 4px 10px;
    font-size: 0.75rem;
    color: var(--text-primary);
    max-width: 250px;
  }

  .attachment-pill.type-link {
    border-left: 3px solid var(--accent-cyan);
  }

  .attachment-pill.type-file {
    border-left: 3px solid var(--accent-pink);
  }

  .attachment-pill .pill-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .attachment-pill .btn-remove-pill {
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
  }

  .attachment-pill .btn-remove-pill:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
  }

  .task-attachments {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .task-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    text-decoration: none;
    transition: var(--transition-base);
    width: fit-content;
    max-width: 100%;
  }

  .task-attachment-item:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
  }

  .task-attachment-item.type-link {
    color: var(--accent-cyan);
  }

  .task-attachment-item.type-link:hover {
    background: var(--accent-cyan-dim);
  }

  .task-attachment-item.type-file {
    color: var(--text-primary);
  }

  .task-attachment-item.type-file:hover {
    background: var(--accent-pink-dim);
    border-color: rgba(236, 72, 153, 0.3);
  }

  .task-attachment-item .item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* === Project Mode Toggle === */
  .toggle-group {
    margin-bottom: 24px;
  }

  .toggle-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
  }

  .toggle-container input[type="checkbox"] {
    display: none;
  }

  .toggle-slider {
    width: 44px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    position: relative;
    transition: var(--transition-base);
  }

  .toggle-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .toggle-container input:checked+.toggle-slider {
    background: var(--gradient-primary);
  }

  .toggle-container input:checked+.toggle-slider::before {
    transform: translateX(20px);
  }

  .toggle-label-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
  }

  /* === Project Dashboard Modal === */
  .project-modal {
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }

  .project-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    margin-bottom: 0;
  }

  #pd-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .pd-meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

  .pd-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .pd-progress-section {
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .pd-progress-bar-container {
    flex-grow: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
  }

  .pd-progress-fill {
    height: 100%;
    background: var(--gradient-success);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .pd-progress-text {
    font-weight: 700;
    color: var(--accent-cyan);
    white-space: nowrap;
  }

  .pd-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
  }

  .pd-main {
    flex: 1;
    padding: 24px 32px 32px 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    min-width: 0;
    position: relative;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
  }

  .pd-main::-webkit-scrollbar {
    width: 6px;
  }

  .pd-main::-webkit-scrollbar-track {
    background: transparent;
  }

  .pd-main::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
  }

  .pd-main::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
  }

  .pd-main > *:not(.pd-tabs-container) {
    min-width: 0;
  }

  .pd-sidebar {
    width: 280px; /* Slimmer sidebar */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    background: var(--bg-body);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
  }

  .pd-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .pd-section.collapsed {
    padding-bottom: 20px;
  }

  .pd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
  }

  .pd-section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .pd-section-header h3 svg {
    color: var(--accent-violet);
    opacity: 0.8;
  }

  .pd-section-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .btn-collapse {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.2s;
  }

  .btn-collapse:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
  }

  .pd-section.collapsed .btn-collapse {
    transform: rotate(-90deg);
  }

  .pd-section-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
  }

  .pd-section.collapsed .pd-section-content {
    display: none;
  }

  /* Phases & Subtasks */
  .pd-phases {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .pd-phase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
  }

  .pd-phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--accent-violet);
  }

  .pd-phase-title {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .pd-subtask-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }

  .pd-subtask-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
  }

  .pd-subtask-item:hover {
    background: rgba(0, 0, 0, 0.06);
  }

  .pd-subtask-item.completed {
    background: rgba(16, 185, 129, 0.10);
    border-left: 3px solid #10b981;
    border-radius: 6px;
    padding-left: 10px;
  }

  .pd-subtask-item.completed .pd-subtask-text {
    color: var(--text-primary);
  }

  .pd-subtask-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition-fast);
  }

  .pd-subtask-item.completed .pd-subtask-checkbox {
    background: #10b981;
    border-color: #10b981;
    color: white;
  }

  .pd-subtask-text {
    flex-grow: 1;
    font-size: 0.9rem;
  }

  .pd-add-subtask-form {
    display: flex;
    gap: 8px;
  }

  .pd-add-subtask-form input {
    flex-grow: 1;
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  /* Person Month Table */
  .pm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 500px;
  }

  .pm-table th,
  .pm-table td {
    border: 1px solid var(--border-color);
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
  }

  .pm-table thead th {
    background: rgba(139, 92, 246, 0.08);
    font-weight: 700;
    font-size: 0.70rem;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    max-width: 120px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    padding: 5px 8px;
  }

  .pm-table thead th:hover {
    background: rgba(139, 92, 246, 0.12);
  }

  .pm-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.02);
    min-width: 120px;
  }

  .pm-table .pm-input {
    width: 55px;
    padding: 3px 4px;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
  }

  .pm-table .pm-input:hover {
    border-color: var(--border-color-hover);
    background: rgba(0, 0, 0, 0.03);
  }

  .pm-table .pm-input:focus {
    border-color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.05);
    outline: none;
  }

  .pm-table .pm-total-cell {
    font-weight: 700;
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-green);
  }

  .pm-table tfoot td {
    font-weight: 700;
    background: rgba(139, 92, 246, 0.06);
    color: var(--accent-violet);
  }

  .pm-table tfoot td:first-child {
    font-weight: 700;
    background: rgba(139, 92, 246, 0.06);
  }

  .pm-empty-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
  }


  /* === Project Dashboard Tabs === */
  .pd-tabs-wrapper {
    display: flex;
    flex-direction: column;
    flex: none !important;
    min-height: 0;
  }

  .pd-tabs-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-sidebar);
    padding: 0 16px;
  }

  .pd-tab-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-violet) transparent;
    -webkit-overflow-scrolling: touch;
  }

  /* Custom scrollbar for tab bar */
  .pd-tab-bar::-webkit-scrollbar {
    height: 4px;
  }
  .pd-tab-bar::-webkit-scrollbar-track {
    background: transparent;
  }
  .pd-tab-bar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
  }
  .pd-tab-bar:hover::-webkit-scrollbar-thumb {
    background: var(--accent-violet);
  }

  .pd-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: grab;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
  }

  .pd-tab-btn:active {
    cursor: grabbing;
  }

  .pd-tab-btn.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    background: rgba(139, 92, 246, 0.1);
  }

  .pd-tab-btn.drag-over {
    border: 1px dashed var(--accent-violet);
    background: rgba(139, 92, 246, 0.05);
    transform: scale(1.02);
  }

  .pd-tab-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--accent-violet);
    transform: translateY(-1px);
  }

  .pd-tab-btn.active {
    background: var(--accent-violet);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
  }

  .pd-tab-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
  }

  .pd-tab-btn:hover .pd-tab-icon {
    background: rgba(139, 92, 246, 0.15);
  }

  .pd-tab-btn.active .pd-tab-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
  }

  /* Divider removed for reorderable tabs */

  /* Sub-tabs for Phases */
  .pd-sub-tab-bar {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    align-items: center;
  }
  .pd-sub-tab-bar::-webkit-scrollbar { display: none; }

  .pd-sub-tab-btn {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }

  .pd-sub-tab-btn:hover {
    background: rgba(139, 92, 246, 0.05);
    color: var(--accent-violet);
  }

  .pd-sub-tab-btn.active {
    background: #fff;
    color: var(--accent-violet);
    border-color: var(--accent-violet);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }

  /* Action buttons inside tab header */
  .pd-tab-pm-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
  }

  .pd-tab-pm-actions .btn-icon {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 5px;
    font-size: 0.7rem;
  }

  .pd-tab-btn .btn-icon-small {
    width: 22px;
    height: 22px;
    margin-left: 4px;
  }

  /* Tab panels */
  .pd-tab-panel {
    display: none;
    padding: 0;
    margin: 0;
    border: none;
  }

  .pd-tab-panel.active {
    display: block !important;
  }

  .pd-tab-panel-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 10px;
  }

  .pd-tab-panel-actions {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .pd-tab-panel-actions .btn-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 18px !important;
    height: 38px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border: none !important;
    cursor: pointer !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    color: #ffffff !important;
    text-decoration: none !important;
  }

  .btn-icon-excel {
    background: #10b981 !important;
  }
  .btn-icon-excel:hover {
    background: #059669 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }

  .btn-icon-clear {
    background: #ef4444 !important;
  }
  .btn-icon-clear:hover {
    background: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  }

  .pd-tab-panel-actions .btn-icon svg {
    stroke: #ffffff !important;
    fill: none !important;
    width: 16px !important;
    height: 16px !important;
  }

  @keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .pd-section-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
    width: 100%;
    overflow: hidden;
  }

  .pd-section-actions {
    display: flex !important;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
  }

  .btn-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    height: 32px;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0 !important;
  }

  .btn-icon-excel {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--accent-green) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
  }

  .btn-icon-clear {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--accent-red) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
  }

  .btn-icon:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
  }

  .btn-icon svg {
    width: 14px;
    height: 14px;
    min-width: 14px;
  }

  .pd-section-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 100px;
  }

  .btn-icon-small {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .btn-icon-small:hover {
    background: var(--accent-violet-dim);
    color: var(--accent-violet);
    border-color: rgba(139, 92, 246, 0.3);
  }

  .pd-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .pd-list-item {
    background: rgba(0, 0, 0, 0.03);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-amber);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .pd-list-item.partner {
    border-left-color: var(--accent-pink);
  }

  .pd-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .pd-quick-add {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
  }

  .pd-quick-add input {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  /* Timeline Placeholder */
  .pd-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 16px;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
  }

  .timeline-node {
    position: relative;
  }

  .timeline-node::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-dim);
  }

  .timeline-date {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 700;
    margin-bottom: 4px;
  }

  .timeline-title {
    font-size: 0.9rem;
    color: var(--text-primary);
  }

  /* Form inputs overriding for dark mode */
  .pd-quick-add input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
  }

  /* Modify normal task cards for projects */
  .project-card.is-project {
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(139, 92, 246, 0.1);
  }

  .project-card.is-project .task-title-text::before {
    content: 'Proje';
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--gradient-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
  }

  .btn-open-project {
    padding: 6px 14px;
    background: var(--accent-violet-dim);
    color: var(--text-primary);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .btn-open-project:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--accent-violet);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
  }

  /* === View Toggle === */
  .view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
  }

  .view-toggle-btn {
    width: 40px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-base);
  }

  .view-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
  }

  .view-toggle-btn.active {
    background: var(--accent-violet-dim);
    color: var(--accent-violet);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    user-select: none;
  }

  .project-card.is-dragging {
    opacity: 0.5;
    background: var(--bg-card-hover) !important;
    border: 1px dashed var(--accent-violet) !important;
    transform: scale(0.98);
    cursor: grabbing !important;
  }

  /* === Calendar === */
  .calendar-container {
    animation: fadeIn 0.4s ease;
  }

  .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
  }

  .calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .calendar-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
  }

  .calendar-nav-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    transform: scale(1.05);
  }

  .calendar-title {
    font-size: 1.3rem;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
  }

  .calendar-modes {
    display: flex;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
  }

  .cal-mode-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-base);
  }

  .cal-mode-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
  }

  .cal-mode-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow-violet);
  }

  /* === Premium Calendar UI (Glassmorphism) === */
  .premium-calendar-wrapper {
    background: var(--cal-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--cal-glass-border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--cal-glass-shadow);
    margin: 0 auto;
    animation: premiumFadeIn 0.6s ease-out;
  }

  @keyframes premiumFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
  }

  .cal-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 10px 0;
    opacity: 0.8;
  }

  .cal-day-cell {
    min-height: 110px;
    position: relative;
    border-radius: var(--radius-lg);
    transition: var(--transition-spring);
    cursor: pointer;
  }

  .cal-day-card-inner {
    height: 100%;
    background: var(--cal-day-bg);
    border: 1px solid var(--cal-day-border);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-base);
  }

  .cal-day-cell:hover .cal-day-card-inner {
    background: var(--cal-day-hover);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-violet-dim);
  }

  .cal-day-cell.other-month {
    opacity: 0.35;
    filter: grayscale(0.5);
  }

  .cal-day-cell.today .cal-day-card-inner {
    background: white;
    border: 2px solid var(--accent-violet);
    box-shadow: var(--cal-today-glow);
  }

  .cal-day-cell.today .cal-day-number {
    background: var(--gradient-primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
  }

  .cal-day-number-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cal-day-number {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
  }

  .cal-holiday-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-amber);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-amber);
  }

  .cal-holiday {
    font-size: 0.65rem;
    font-weight: 700;
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cal-day-projects {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
  }

  .cal-project-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: flex-start;
    line-height: 1.3;
    gap: 4px;
    min-height: 24px;
    transition: var(--transition-fast);
    border: 1px solid transparent;
  }

  .cal-project-pill:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    z-index: 10;
  }

  .cal-project-pill.priority-high {
    background: var(--accent-red-dim);
    color: var(--accent-red);
    border-color: rgba(220, 38, 38, 0.1);
  }

  .cal-project-pill.priority-medium {
    background: var(--accent-violet-dim);
    color: var(--accent-violet);
    border-color: rgba(124, 58, 237, 0.1);
  }

  .cal-project-pill.priority-low {
    background: var(--accent-green-dim);
    color: var(--accent-green);
    border-color: rgba(5, 150, 105, 0.1);
  }

  .cal-project-pill.priority-google {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(4px);
  }

  .cal-project-pill.completed {
    opacity: 0.5;
    text-decoration: line-through;
    filter: grayscale(0.8);
  }

  .cal-project-more {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-align: center;
    padding: 2px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
  }

  /* Weekly view revamp */
  .cal-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
  }

  .cal-week-day {
    background: var(--cal-day-bg);
    border: 1px solid var(--cal-day-border);
    border-radius: var(--radius-xl);
    padding: 20px 14px;
    min-height: 300px;
    transition: var(--transition-spring);
    cursor: pointer;
  }

  .cal-week-day:hover {
    background: var(--cal-day-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
  }

  .cal-week-day.today {
    border: 2px solid var(--accent-violet);
    box-shadow: var(--cal-today-glow);
    background: white;
  }

  .cal-week-day-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .cal-week-day-name {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
  }

  .cal-week-day-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-top: 4px;
  }

  .cal-week-day.today .cal-week-day-num {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .cal-week-projects {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .cal-week-project-item {
    padding: 12px;
    border-radius: var(--radius-md);
    background: white;
    border-left: 4px solid var(--accent-violet);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--transition-base);
  }

  .cal-week-project-item:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  /* Daily View Revamp */
  .cal-daily-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
  }

  .cal-daily-header {
    background: white;
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    text-align: center;
  }

  .cal-daily-date {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .cal-daily-project {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-spring);
    box-shadow: var(--shadow-sm);
  }

  .cal-daily-project:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-violet);
  }

  .cal-daily-project-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
  }

  .cal-daily-project-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
    word-break: break-word;
  }

  .cal-daily-project-priority {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
  }
  }

  .cal-daily-task:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  .cal-daily-task.completed {
    opacity: 0.5;
  }

  .cal-daily-task-title {
    font-weight: 600;
    font-size: 0.95rem;
  }

  .cal-daily-task.completed .cal-daily-task-title {
    text-decoration: line-through;
    color: var(--text-muted);
  }

  .cal-daily-task-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
  }

  .cal-daily-task-priority {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
  }

  .cal-daily-task-priority.priority-high {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  .cal-daily-task-priority.priority-medium {
    background: var(--accent-amber-dim);
    color: var(--accent-amber);
  }

  .cal-daily-task-priority.priority-low {
    background: var(--accent-green-dim);
    color: var(--accent-green);
  }

  .cal-daily-task-priority.priority-google {
    background: rgba(66, 133, 244, 0.15);
    color: #4285F4;
  }

  /* PROJECT PILLS (Calendar Grid) */
  .cal-project-pill.priority-google {
    background: #4285F4 !important;
    color: white !important;
    border-color: #357ae8 !important;
  }
  
  .cal-week-project-item.priority-google {
    background: #4285F4 !important;
    color: white !important;
  }

  .cal-daily-project.priority-google {
    border-left: 4px solid #4285F4 !important;
  }

  .cal-no-tasks {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
  }

  .cal-no-tasks svg {
    margin-bottom: 12px;
    opacity: 0.5;
  }

  /* Calendar has tasks */
  .cal-week-day.has-tasks {
    background: var(--bg-card);
  }

  @media (max-width: 600px) {
    .budget-summary-bar {
      flex-direction: column;
      gap: 16px;
    }

    .budget-summary-divider {
      width: 80%;
      height: 1px;
    }
  }

  /* Specific budget styles */
  #pd-budget-value {
    font-feature-settings: "tnum";
  }

  .budget-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--accent-green-dim);
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 700;
  }

  /* === Responsive === */
  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
    }

    .sidebar.open {
      transform: translateX(0);
      box-shadow: var(--shadow-lg);
    }

    .main-content {
      margin-left: 0;
      padding: 20px 16px;
    }

    .menu-toggle {
      display: flex;
    }

    .header-info h1 {
      font-size: 1.3rem;
    }

    .btn-add-task span {
      display: none;
    }

    .btn-add-task {
      padding: 12px;
      border-radius: var(--radius-full);
      width: 48px;
      height: 48px;
      justify-content: center;
    }

    .project-card {
      padding: 16px;
    }

    .project-actions {
      opacity: 1;
    }

    .form-row,
    .dashboard-grid {
      grid-template-columns: 1fr;
      display: flex;
      flex-direction: column;
    }

    .pdb-header {
      flex-direction: column;
      align-items: flex-start !important;
    }

    .pdb-header>div {
      flex-direction: column;
      width: 100%;
    }

    .pdb-header input,
    .pdb-header select,
    .pdb-header button {
      width: 100%;
      margin-left: 0 !important;
    }

    .pd-body {
      flex-direction: column;
      overflow-y: auto;
    }

    .pd-main {
      border-right: none;
      border-bottom: 1px solid var(--border-color);
      padding: 16px;
    }

    .pd-sidebar {
      padding: 16px;
    }

    .project-modal-header {
      padding: 16px;
    }

    .pd-meta {
      flex-direction: column;
      gap: 8px;
    }
  }

  @media (max-width: 480px) {
    .modal {
      padding: 24px 20px;
      border-radius: var(--radius-lg);
      max-height: 95vh;
    }

    .cal-week-grid {
      display: flex;
      flex-direction: column;
    }

    .cal-week-day {
      min-height: auto;
    }

    .toast-container {
      left: 16px;
      right: 16px;
      bottom: 16px;
    }

    .toast {
      max-width: 100%;
    }
  }

  /* Sidebar overlay for mobile */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Project Dashboard Elements */
  .dash-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Critical for grid children truncation */
  }

  .dash-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dash-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }

  /* Custom scrollbar for dash-list */
  .dash-list::-webkit-scrollbar {
    width: 4px;
  }

  .dash-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
  }

  .dash-item {
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--accent-violet);
    transition: var(--transition-fast);
    min-width: 0;
  }

  .dash-item:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(3px);
  }
  /* Premium Filter Bar */
  .premium-filter-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 8px 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    gap: 0;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  
  .premium-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    padding: 4px 16px;
    min-width: 180px;
  }

  .filter-group label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .filter-group label i {
    font-size: 0.7rem;
    opacity: 0.7;
    color: var(--accent-violet);
  }

  .filter-group .filter-select {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
    background-position: right 0 center !important;
    box-shadow: none !important;
  }

  .filter-group .filter-select:focus {
    color: var(--accent-violet) !important;
  }

  .filter-divider {
    width: 1px;
    height: 32px;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
  }

  @media (max-width: 768px) {
    .premium-filter-bar {
      width: 100%;
      flex-direction: column;
      align-items: stretch;
      padding: 12px;
      gap: 0;
    }
    
    .filter-group {
      padding: 12px 0;
      min-width: 0;
    }
    
    .filter-divider {
      width: 100%;
      height: 1px;
      margin: 0;
    }
  }

  .filter-select {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
  }

  .filter-select:focus {
    border-color: var(--accent-violet);
  }

  .pdb-row:hover {
    background: rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
  }

  /* Coordinator Badge Styles */
  .coordinator-badge {
    background: var(--accent-yellow-dim);
    color: var(--accent-yellow);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .pd-list-item.partner.coordinator {
    border-left: 4px solid var(--accent-yellow);
    background: rgba(245, 158, 11, 0.05);
  }

  .pd-list-item.partner.coordinator:hover {
    background: rgba(245, 158, 11, 0.08);
  }

  /* Highlight days with tasks - Green background */
  .cal-day-cell.has-tasks,
  .cal-week-day.has-tasks {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
  }

  .cal-day-cell.has-tasks:hover,
  .cal-week-day.has-tasks:hover {
    background-color: rgba(16, 185, 129, 0.25) !important;
  }

  /* Today is still primary if it's today */
  .cal-day-cell.today.has-tasks,
  .cal-week-day.today.has-tasks {
    background-color: rgba(139, 92, 246, 0.1) !important;
    border: 2px solid var(--accent-violet) !important;
  }

  /* Budget Summary Bar */
  .budget-summary-bar {
    display: flex;
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    align-items: center;
    gap: 32px;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, #ffffff, #fafafa);
  }

  .budget-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
  }

  .budget-summary-item .label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .budget-summary-item .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-green);
    font-feature-settings: "tnum";
  }

  #total-completed-budget {
    color: var(--accent-cyan);
  }

  .budget-summary-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.08);
  }

  @media (max-width: 600px) {
    .budget-summary-bar {
      flex-direction: column;
      gap: 16px;
    }

    .budget-summary-divider {
      width: 80%;
      height: 1px;
    }
  }

  /* Specific budget styles */
  #pd-budget-value {
    font-feature-settings: "tnum";
  }

  .budget-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--accent-green-dim);
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 700;
  }

  /* Call Tracking Specific Styles */
  .call-tracking-container {
    animation: fadeIn 0.4s ease;
  }

  #call-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  #call-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
  }

  .status-pill.active {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
  }

  .status-pill.pending {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
  }

  @media (max-width: 768px) {
    .call-tracking-container {
      padding: 10px !important;
    }

    #call-search {
      min-width: 100% !important;
    }
  }

  /* === Partner & Call Tracking Modern UI Enhancements === */
  .pdb-table-wrapper {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition-base);
  }

  .pdb-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .pdb-table th:nth-child(1) { width: 32%; }
  .pdb-table th:nth-child(2) { width: 12%; }
  .pdb-table th:nth-child(3) { width: 14%; }
  .pdb-table th:nth-child(4) { width: 10%; }
  .pdb-table th:nth-child(5) { width: 12%; }
  .pdb-table th:nth-child(6) { width: 12%; }
  .pdb-table th:nth-child(7) { width: 8%; }

  .pdb-table thead th {
    background: rgba(0, 0, 0, 0.02);
    padding: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
  }

  .pdb-row {
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  }

  .pdb-row:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: translateX(4px);
  }

  .pdb-cell {
    padding: 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
  }

  .pdb-cell-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .badge-expertise {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 2px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .badge-program {
    background: var(--accent-violet-dim);
    color: var(--accent-violet);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 2px;
    display: inline-block;
    border: 1px solid rgba(124, 58, 237, 0.1);
  }

  .pdb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
  }

  .pdb-cell-name {
    font-weight: 600;
    color: var(--text-primary);
  }

  .pdb-cell-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    transition: var(--transition-base);
  }

  .badge-manual {
    background: var(--accent-violet);
    color: #fff;
    border-color: transparent;
    padding: 2px 8px;
    margin-left: 8px;
  }

  /* Financial Module Styles */
  .badge-locked {
    background: #fff1f0;
    color: #f5222d;
    border: 1px solid #ffa39e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
  }

  .badge-open {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
  }

  .category-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
    border: 1px solid rgba(24, 144, 255, 0.2);
  }

  #financial-report-analysis .card {
    margin-top: 20px;
  }

  #financial-report-analysis .data-table th {
    background: #465a73;
    color: white;
  }

  #financial-report-analysis .data-table tr:hover {
    background: rgba(70, 90, 115, 0.05);
  }

  .stat-card .stat-value.text-success {
    color: #10b981 !important;
  }

  /* Financial Module General Styles */
  .pd-tabs-container {
    background: #fff;
    padding: 0 0 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: -24px; /* Offset pd-main padding */
    z-index: 100;
    margin: 0 0 20px 0;
  }

  .view-content .card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  }

  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
  }

  .data-table th {
    text-align: left;
    padding: 12px 16px;
    background: #465a73;
    color: white;
    font-weight: 600;
  }

  .data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .data-table tr:hover {
    background: rgba(70, 90, 115, 0.04);
  }

  .category-badge {
    background: var(--accent-violet-dim);
    color: var(--accent-violet);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
  }

  .badge-locked {
    background: var(--accent-red-dim);
    color: var(--accent-red);
  }

  .badge-open {
    background: var(--accent-green-dim);
    color: var(--accent-green);
  }

  /* Financial Module Improved Tabs */
  .financial-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
    margin-top: 20px;
  }

  .tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    color: var(--text-secondary) !important;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
  }

  .tab-btn i {
    font-size: 2.8rem !important;
    transition: transform 0.3s ease !important;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .tab-btn span {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    text-align: center;
    color: var(--text-primary) !important;
  }

  .tab-btn:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--accent-violet) !important;
  }

  .tab-btn:hover i {
    transform: scale(1.15) !important;
  }

  .tab-btn.active {
    background: var(--gradient-btn) !important;
    border-color: transparent !important;
    box-shadow: var(--shadow-glow-violet) !important;
    transform: translateY(-4px) !important;
  }

  .tab-btn.active i {
    -webkit-text-fill-color: white !important;
    color: white !important;
    transform: scale(1.1) !important;
  }

  .tab-btn.active span {
    color: white !important;
  }

  .tab-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: 0.6s !important;
  }

  .tab-btn:hover::after {
    transform: translateX(100%);
  }

  /* Footer Styles */
.app-footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px 40px;
  margin-left: var(--sidebar-width);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  font-weight: 500;
  flex-shrink: 1;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-violet);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px 20px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  white-space: nowrap;
}

.footer-contact-link:hover {
  background: rgba(124, 58, 237, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.3);
}

.footer-contact-link i {
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .app-footer {
    padding: 25px 30px;
  }
}

@media (max-width: 768px) {
  .app-footer {
    margin-left: 0;
    padding: 25px 20px;
    border-radius: 0;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}

    .financial-tabs {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Detailed Reporting Tables (Excel-like) */
  .report-detailed-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 15px;
  }

  .report-detailed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
  }

  .report-detailed-table th,
  .report-detailed-table td {
    border: 1px solid #e2e8f0;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
  }

  .report-detailed-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .report-detailed-table thead tr.sub-header th {
    background: #edf2f7;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 4px;
  }

  .report-detailed-table th.wp-header,
  .report-detailed-table td.wp-cell {
    position: sticky;
    left: 0;
    background: #f1f5f9;
    z-index: 11;
    border-right: 2px solid #cbd5e1;
  }

  .report-detailed-table .planned-cell {
    background: #fdf2f8;
    /* Very light pink/violet for planned stats */
  }

  .report-detailed-table .actual-cell {
    background: #f0fdf4;
    /* Very light green for actual stats */
  }

  .report-detailed-table .total-row {
    background: #f8fafc;
    font-weight: 800;
  }

  .report-detailed-table .percentage-bar-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
  }

  .report-detailed-table .percentage-bar {
    height: 100%;
    background: var(--accent-violet);
    transition: width 0.3s ease;
  }

  .report-detailed-table .percentage-text {
    font-size: 0.7rem;
    font-weight: 600;
  }

  /* Timesheet Matrix */
  .timesheet-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .timesheet-matrix-table th,
  .timesheet-matrix-table td {
    border: 1px solid #e2e8f0;
    padding: 10px;
    text-align: center;
  }

  .timesheet-matrix-table th {
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
  }

  .timesheet-input {
    width: 65px !important;
    padding: 6px !important;
    text-align: center;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    background: white !important;
  }

  .timesheet-input:focus {
    border-color: var(--accent-violet) !important;
    box-shadow: 0 0 0 2px var(--accent-violet-dim) !important;
  }

  .wp-inactive {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
  }

  .wp-inactive-cell {
    background-color: #f8fafc !important;
    position: relative;
  }

  .wp-inactive-cell::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(241, 245, 249, 0.7);
    z-index: 1;
    pointer-events: none;
  }

  .wp-inactive-cell .timesheet-input {
    background: transparent !important;
    border: 1px dashed #cbd5e1 !important;
    color: #94a3b8 !important;
    opacity: 0.5;
    pointer-events: none;
  }

  /* === Horizon Europe Specialized Modules === */
  .pd-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
  }

  .pd-module-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
  }

  .pd-module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-violet);
  }

  .pd-status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .status-pending { background: var(--accent-amber-dim); color: var(--accent-amber); }
  .status-submitted { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
  .status-approved { background: var(--accent-green-dim); color: var(--accent-green); }

  .deliverable-badge {
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.85rem;
    color: white;
  }

  .badge-milestone { background: var(--accent-pink); box-shadow: 0 4px 12px var(--accent-pink-dim); }
  .badge-deliverable { background: var(--accent-violet); box-shadow: 0 4px 12px var(--accent-violet-dim); }

  /* Reporting Grid */
  .reporting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
  }

  .reporting-card {
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
  }

  .reporting-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-green);
  }

  /* Meeting Logs */
  .meeting-log {
    border-left: 2px solid var(--border-color);
    padding-left: 24px;
    margin-left: 12px;
    position: relative;
    padding-bottom: 32px;
  }

  .meeting-log::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--accent-violet);
  }

  .decision-item {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
  }

  /* === Financial Project Selector Premium Styles === */
  .project-selector-wrapper {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }

  .project-selector-wrapper h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
  }

  .project-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    justify-content: center;
  }

  .project-selector-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
  }

  .project-selector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
  }

  .project-selector-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-violet);
  }

  .project-selector-card:hover::before {
    opacity: 0.03;
  }

  .project-selector-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-violet-dim);
    color: var(--accent-violet);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
  }

  .project-selector-card:hover .project-selector-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-violet);
    color: white;
  }

  .project-selector-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
  }

  .project-selector-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 1;
  }

  .category-badge-horizon { background: var(--accent-violet-dim); color: var(--accent-violet); }
  .category-badge-erasmus { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
  .category-badge-eit { background: var(--accent-amber-dim); color: var(--accent-amber); }
  .category-badge-other { background: rgba(0,0,0,0.05); color: var(--text-muted); }

  .no-projects-state {
    padding: 60px;
    color: var(--text-muted);
  }
