:root {
    --pp-primary: #4f46e5;
    --pp-primary-dark: #4338ca;
    --pp-bg: #f4f5fb;
    --pp-surface: #ffffff;
    --pp-text: #1f2233;
    --pp-sidebar: #171a2e;
    --pp-border: #e6e7f0;
    --pp-text-muted: #6b7280;
    --pp-radius: 24px;
    --pp-radius-sm: 14px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--pp-bg);
    color: var(--pp-text);
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.55;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    letter-spacing: -.01em;
}

/* Smaller, calmer form text — Bootstrap's defaults (1rem) read oversized
   next to the app's .92rem body baseline. */
.form-label {
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.form-control, .form-select, textarea.form-control {
    font-size: .85rem;
}
.form-control::placeholder {
    font-size: .85rem;
}
.form-text {
    font-size: .78rem;
}
.form-check-label {
    font-size: .85rem;
}

/* Pill-shaped buttons, matching the app's rounded card language */
.btn {
    border-radius: 999px;
    font-weight: 600;
    font-size: .85rem;
    padding: 8px 20px;
}
.btn-sm {
    padding: 6px 16px;
    font-size: .8rem;
}
.btn.btn-sm.btn-outline-secondary,
.btn.btn-sm.btn-outline-danger,
.btn.btn-sm.btn-outline-primary {
    padding: 6px 12px;
}
.btn-primary {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--pp-primary-dark);
    border-color: var(--pp-primary-dark);
}

/* ---------- Auth screen ---------- */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #171a2e 100%);
    padding: 20px;
}
.auth-card {
    background: #fff;
    border-radius: 32px;
    padding: 44px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,.25);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; }
.auth-brand h1 { font-size: 1.3rem; font-weight: 600; margin: 0; }
.brand-icon {
    width: 56px; height: 56px; border-radius: 18px;
    background: var(--pp-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #fff; border: 1px solid #dcdfe6; border-radius: 999px;
    padding: 12px 16px; font-weight: 600; margin-top: 20px;
}
.btn-google:hover { background: #f8f9fb; }
.auth-note {
    margin-top: 22px; font-size: .82rem; color: var(--pp-text-muted);
    background: #f4f5fb; border-radius: 18px; padding: 12px;
}
.auth-note i { margin-right: 6px; }

/* ---------- App shell ---------- */
#app-shell { min-height: 100vh; }
.app-sidebar {
    width: 250px; background: #fff; color: #1f2233;
    border-right: 1px solid var(--pp-border);
    display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; font-weight: 600; font-size: .95rem; color: #1f2233; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar-nav .nav-link {
    color: #6b7280; padding: 10px 14px; border-radius: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 10px; font-size: .88rem;
}
.sidebar-nav .nav-link i { width: 18px; text-align: center; font-size: .95rem; }
.sidebar-nav .nav-link:hover { background: #f4f5fb; color: #1f2233; }
.sidebar-nav .nav-link.active { background: rgba(79,70,229,.1); color: var(--pp-primary); font-weight: 700; }

.sidebar-collapse-toggle { width: 100%; border: none; }
.sidebar-collapse-caret { transition: transform .2s ease; font-size: .75rem; }
.sidebar-collapse-toggle[aria-expanded="true"] .sidebar-collapse-caret { transform: rotate(180deg); }
.sidebar-submenu { display: flex; flex-direction: column; gap: 2px; padding-left: 30px; margin-top: 2px; }
.sidebar-submenu .nav-sublink { padding: 8px 14px; font-size: .84rem; }
.sidebar-quicknotes {
    color: #6b7280; padding: 10px 14px; border-radius: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 10px; font-size: .88rem;
    border: none; background: transparent; width: calc(100% - 0px); text-align: left; margin-bottom: 8px;
}
.sidebar-quicknotes i { width: 18px; text-align: center; font-size: .95rem; }
.sidebar-quicknotes:hover { background: #f4f5fb; color: #1f2233; }
.sidebar-footer { padding: 10px 8px; }

.app-main { flex: 1; min-width: 0; }
.app-navbar {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 26px; background: #fff; border-bottom: 1px solid var(--pp-border);
    position: sticky; top: 0; z-index: 10;
}
.navbar-title { font-weight: 600; font-size: .95rem; }
.user-menu-btn { background: transparent; border: none; }
.app-content { padding: 26px; }

/* ---------- Avatars ---------- */
.avatar-sm, .avatar-xs {
    border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pp-primary); color: #fff; font-weight: 700;
}
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; }
.avatar-xs { width: 26px; height: 26px; font-size: .68rem; margin-left: -8px; border: 2px solid #fff; }
.avatar-xs:first-child { margin-left: 0; }
.avatar-stack { display: flex; align-items: center; }
.avatar-more {
    background: #e6e7f0; color: #333; width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; margin-left: -8px; border: 2px solid #fff;
}

/* ---------- Page header / stats ---------- */
.page-header { margin-bottom: 24px; }
.page-header h2 { font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; margin-bottom: 4px; }
.stat-cards { margin-bottom: 26px; }
.stat-card { background: #fff; border-radius: var(--pp-radius); padding: 18px 20px; border: 1px solid var(--pp-border); }
.stat-card .stat-value { font-size: 1.35rem; font-weight: 600; letter-spacing: -.005em; }
.stat-card .stat-label { color: var(--pp-text-muted); font-size: .85rem; }
.stat-card-danger .stat-value { color: #dc3545; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 14px; }
.section-header h3 { font-size: .98rem; font-weight: 600; margin: 0; }
.link-see-all { font-size: .85rem; text-decoration: none; font-weight: 600; }

/* ---------- Project card ---------- */
.project-card {
    display: block; background: #fff; border: 1px solid var(--pp-border); border-radius: var(--pp-radius);
    padding: 18px; text-decoration: none; color: inherit; height: 100%; transition: box-shadow .15s, transform .15s;
}
.project-card:hover { box-shadow: 0 10px 24px rgba(31,34,51,.08); transform: translateY(-2px); color: inherit; }
.project-card h4 { font-size: .92rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -.005em; }
.project-card-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .78rem; color: var(--pp-text-muted); margin-top: 8px;
}
.project-card-row:first-of-type { margin-top: 0; }
.status-badge { font-weight: 600; font-size: .72rem; padding: 5px 10px; border-radius: 20px; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--pp-text-muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: 10px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); padding: 30px; max-width: 720px; }
.form-card.form-card-flex { max-width: none; }
.developer-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--pp-border); border-radius: 18px; }
.developer-check {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; font-size: .85rem; cursor: pointer;
    border: 1px solid transparent; transition: background-color .15s ease;
}
.developer-check:hover { background: #f4f5fb; }
.developer-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}
.developer-check:has(input:checked) {
    background: rgba(79, 70, 229, .1);
    border-color: rgba(79, 70, 229, .25);
}

/* ---------- Project show ---------- */
.meta-box { background: #fff; border: 1px solid var(--pp-border); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.panel { background: #fff; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); padding: 20px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-header h3 { font-size: .95rem; font-weight: 600; margin: 0; }

.task-list { display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; }
.task-item { border: 1px solid var(--pp-border); border-radius: 18px; padding: 14px; }
.task-item-main { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.task-item h5 { font-size: .88rem; font-weight: 600; margin-bottom: 3px; }
.task-meta { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.task-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.status-form .form-select { min-width: 130px; }

/* ---------- Notes / chat ---------- */
.notes-panel { display: flex; flex-direction: column; }
.chat-window { flex: 1; max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 6px 4px; margin-bottom: 12px; }
.chat-bubble { display: flex; gap: 10px; }
.chat-avatar img, .chat-avatar .avatar-initials { width: 32px; height: 32px; border-radius: 50%; }
.chat-content { background: #f4f5fb; border-radius: 18px; padding: 10px 14px; max-width: 85%; }
.chat-bubble-me .chat-content { background: #eef0ff; }
.chat-meta { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.chat-meta strong { font-size: .82rem; }
.chat-author-link { color: inherit; text-decoration: none; }
.chat-author-link:hover { color: var(--pp-primary); }
.chat-text { font-size: .88rem; white-space: pre-wrap; word-break: break-word; }
.chat-input-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-input-form textarea { resize: none; }

@media (max-width: 991px) {
    .app-sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s; box-shadow: 10px 0 30px rgba(0,0,0,.2); }
    .app-sidebar.show { left: 0; }
}

/* ---------- Notifications ---------- */
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: #dc3545; color: #fff; font-size: .62rem; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notif-dropdown { width: 340px; max-width: 90vw; padding: 0; max-height: 420px; overflow-y: auto; }
.notif-item {
    display: flex; gap: 10px; padding: 10px 14px; text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--pp-border);
}
.notif-item:hover { background: #f4f5fb; color: inherit; }
.notif-item i { font-size: 1.1rem; color: var(--pp-primary); margin-top: 2px; }
.notif-item.notif-unread { background: #f7f7ff; }
.notif-title { font-weight: 600; font-size: .85rem; }
.notif-body { font-size: .8rem; }
.notif-time { font-size: .7rem; margin-top: 2px; }
.notif-item-lg { padding: 14px 18px; }
.notif-item-lg i { font-size: 1.3rem; }

.pp-toast {
    position: fixed; bottom: 20px; right: 20px; z-index: 2000;
    background: #fff; border: 1px solid var(--pp-border); border-radius: 20px;
    padding: 12px 16px; box-shadow: 0 12px 30px rgba(0,0,0,.15);
    max-width: 320px; opacity: 0; transform: translateY(10px); transition: all .25s;
}
.pp-toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Header search ---------- */
.header-search {
    position: relative;
    flex: 0 1 420px;
    max-width: 480px;
    margin-right: 16px;
}
.header-search i.bi-search {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--pp-text-muted); font-size: .9rem; pointer-events: none;
}
.header-search input {
    padding-left: 34px; background: #f4f5fb; border: 1px solid transparent;
}
.header-search input:focus {
    background: #fff; border-color: var(--pp-primary); box-shadow: none;
}
.search-results {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--pp-border); border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12); max-height: 420px; overflow-y: auto; z-index: 1040;
}
.search-results.show { display: block; }
.search-group-label {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    color: var(--pp-text-muted); padding: 10px 14px 4px;
}
.search-result-item {
    display: flex; gap: 10px; padding: 8px 14px; text-decoration: none; color: inherit;
}
.search-result-item:hover { background: #f4f5fb; color: inherit; }
.search-result-item i { color: var(--pp-primary); font-size: 1rem; margin-top: 2px; }
.search-result-title { font-weight: 600; font-size: .85rem; }
.search-result-meta { font-size: .74rem; color: var(--pp-text-muted); }
.search-empty { padding: 16px; text-align: center; font-size: .82rem; color: var(--pp-text-muted); }

@media (max-width: 767px) {
    .header-search { flex: 1 1 auto; margin: 0 10px; }
}

/* ---------- Rich text editor (Quill) ---------- */
.rich-editor .ql-toolbar.ql-snow {
    border-color: var(--pp-border);
    border-radius: 18px 18px 0 0;
    background: #f8f9fb;
}
.rich-editor .ql-container.ql-snow {
    border-color: var(--pp-border);
    border-radius: 0 0 18px 18px;
}
.rich-editor .ql-editor {
    min-height: 140px;
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
}
.rich-editor .ql-editor.ql-blank::before {
    font-style: normal;
    color: #9ca0b3;
}

/* ---------- Rendered rich content (project/task descriptions) ---------- */
.rich-content { font-size: .9rem; line-height: 1.55; }
.rich-content p { margin-bottom: .6em; }
.rich-content ul, .rich-content ol { padding-left: 1.4em; margin-bottom: .6em; }
.rich-content a { color: var(--pp-primary); text-decoration: underline; }
.rich-content blockquote {
    border-left: 3px solid var(--pp-border); margin: .6em 0; padding: .2em 0 .2em 12px; color: #555;
}
.rich-content pre, .rich-content code {
    background: #f4f5fb; border-radius: 8px; padding: 2px 6px; font-size: .82em;
}
.rich-content pre { padding: 10px 12px; overflow-x: auto; }
.rich-content-sm { font-size: .8rem; }
.rich-content-sm .ql-editor, .rich-content-sm p { margin-bottom: .4em; }

/* ---------- Project detail: breadcrumb, tabs, detail panels ---------- */
.pp-breadcrumb { font-size: .85rem; color: var(--pp-text-muted); display: flex; align-items: center; gap: 6px; }
.pp-breadcrumb a { color: var(--pp-text-muted); text-decoration: none; }
.pp-breadcrumb a:hover { color: var(--pp-primary); }
.pp-breadcrumb span { color: #1f2233; font-weight: 600; }
.pp-breadcrumb i { font-size: .7rem; }

.pp-tabs { border-bottom: 1px solid var(--pp-border); gap: 4px; }
.pp-tabs .nav-link {
    border: none; border-bottom: 2px solid transparent; border-radius: 0;
    color: var(--pp-text-muted); font-weight: 600; font-size: .88rem; padding: 10px 6px; margin-right: 22px;
}
.pp-tabs .nav-link i { margin-right: 6px; }
.pp-tabs .nav-link:hover { color: #1f2233; }
.pp-tabs .nav-link.active { color: var(--pp-primary); border-bottom-color: var(--pp-primary); background: none; }

.detail-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--pp-text-muted); }
.detail-section { padding: 14px 0; border-bottom: 1px solid var(--pp-border); }
.detail-section:first-child { padding-top: 0; }
.detail-section:last-child { padding-bottom: 0; border-bottom: none; }
.detail-person { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.detail-person:last-child { margin-bottom: 0; }
.detail-person-name { font-size: .85rem; font-weight: 600; }
a.detail-person:hover .detail-person-name { color: var(--pp-primary); }

/* Colored "pill" status selects, monday.com-style */
.status-select {
    border: none; border-radius: 20px; font-weight: 600; font-size: .78rem;
    padding: 5px 30px 5px 12px; cursor: pointer;
}
.status-select.bg-success { background-color: #d1f5e0 !important; color: #157347 !important; }
.status-select.bg-primary { background-color: #dbe4ff !important; color: #3a4fd6 !important; }
.status-select.bg-warning { background-color: #fff3cd !important; color: #916a00 !important; }
.status-select.bg-secondary { background-color: #e9ecef !important; color: #495057 !important; }

/* ---------- Monday.com-style task table ---------- */
.monday-table-wrap { overflow-x: auto; }
.monday-table thead th {
    background: #f8f9fb; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--pp-text-muted); border-bottom: 1px solid var(--pp-border); font-weight: 700; padding: 10px 16px;
}
.monday-table td { padding: 12px 16px; border-bottom: 1px solid var(--pp-border); vertical-align: middle; }
.monday-table tbody tr:last-child td { border-bottom: none; }
.monday-table tbody tr:hover { background: #fafbfe; }

/* ---------- Pagination ---------- */
.pagination { gap: 4px; }
.page-link {
    border: 1px solid var(--pp-border); color: #1f2233; font-size: .85rem; font-weight: 500;
    border-radius: 10px !important; padding: 6px 12px; margin: 0;
}
.page-link:hover { background: #f4f5fb; color: var(--pp-primary); }
.page-item.active .page-link { background: var(--pp-primary); border-color: var(--pp-primary); color: #fff; font-weight: 600; }
.page-item.disabled .page-link { color: #b6b9c9; background: #fff; }

/* ---------- Completion report ---------- */
.completion-report-list { display: flex; flex-direction: column; gap: 14px; }
.completion-report-row { padding: 10px 0; border-bottom: 1px solid var(--pp-border); font-size: .88rem; }
.completion-report-row:last-child { border-bottom: none; }
.completion-report-thumb { max-width: 260px; border-radius: 12px; border: 1px solid var(--pp-border); margin-top: 4px; }

/* ---------- Modal scrolling ---------- */
/* Explicit height/overflow so long forms (like the completion checklist)
   always scroll inside the modal, regardless of viewport size. */
.modal-dialog-scrollable .modal-content {
    max-height: 85vh;
}
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 140px);
}

/* ---------- Task title links (tables) ---------- */
.task-title-link {
    color: #1f2233;
    font-weight: 600;
    text-decoration: none;
}
.task-title-link:hover {
    color: var(--pp-primary);
    text-decoration: underline;
}

/* ---------- DataTables — match the app's rounded/light styling ---------- */
.dataTables_wrapper { font-size: .85rem; }
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: .85rem;
    margin-left: 6px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--pp-primary);
}
.dataTables_wrapper .dataTables_info {
    color: var(--pp-text-muted);
    font-size: .8rem;
    padding-top: 12px;
}
.dataTables_wrapper .dataTables_paginate .page-link {
    border-radius: 10px !important;
}
table.dataTable thead th {
    border-bottom: 1px solid var(--pp-border) !important;
}
table.dataTable tbody td {
    border-bottom: 1px solid var(--pp-border);
}

/* The wrapping .panel uses p-0 so the table sits flush, but that also
   strips padding from DataTables' own filter/info/pagination rows —
   add it back just on those, leaving the table itself flush. */
.dataTables_wrapper > .row:first-child {
    padding: 16px 16px 4px;
}
.dataTables_wrapper > .row:last-child {
    padding: 12px 16px 16px;
    align-items: center;
}

/* ---------- Highlight a task row jumped to from search/dashboard ---------- */
.monday-table td {
    transition: background-color 1.8s ease;
}
.task-row-highlight td {
    background-color: rgba(79, 70, 229, .14) !important;
}

/* ---------- Timeline (status change history) ---------- */
.timeline-list { position: relative; }
.timeline-item { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: -6px;
    width: 2px;
    background: var(--pp-border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
    width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
    position: relative; z-index: 1; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--pp-border);
}
.timeline-content { flex: 1; }
.timeline-text { font-size: .88rem; line-height: 1.7; flex: 1 1 auto; min-width: 200px; }
.timeline-text .badge { font-size: .7rem; margin: 0 2px; }
.timeline-time { margin-top: 2px; }
.timeline-duration {
    background: #f4f5fb; border-radius: 20px; padding: 3px 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 4px;
}

/* ---------- Filter toolbar (developer profile tables) ---------- */
.filter-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--pp-border); border-radius: 14px;
    padding: 10px 14px;
}
.filter-toolbar select, .filter-toolbar input[type="date"] {
    max-width: 170px;
}
.filter-label {
    font-size: .78rem; color: var(--pp-text-muted); font-weight: 600; margin: 0;
}

/* ---------- Quick Notes (sticky notes) ---------- */
.quick-notes-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px;
}
.quick-note {
    border-radius: 6px; padding: 12px; min-height: 150px;
    display: flex; flex-direction: column; gap: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,.1);
    transform: rotate(-1.2deg);
    transition: transform .15s ease, box-shadow .15s ease;
}
.quick-note:nth-child(even) { transform: rotate(1.2deg); }
.quick-note:nth-child(3n) { transform: rotate(-0.6deg); }
.quick-note:hover { transform: rotate(0deg) scale(1.03); box-shadow: 0 10px 20px rgba(0,0,0,.14); z-index: 1; }
.quick-note-yellow { background: #fff3a3; }
.quick-note-pink { background: #ffd3e6; }
.quick-note-blue { background: #c9e6ff; }
.quick-note-green { background: #cdf3d3; }
.quick-note-purple { background: #e3d6ff; }
.quick-note-colors { display: flex; align-items: center; gap: 6px; }
.quick-note-dot {
    width: 14px; height: 14px; border-radius: 50%; padding: 0; cursor: pointer;
    border: 1px solid rgba(0,0,0,.15);
}
.quick-note-dot-yellow { background: #fff3a3; }
.quick-note-dot-pink { background: #ffd3e6; }
.quick-note-dot-blue { background: #c9e6ff; }
.quick-note-dot-green { background: #cdf3d3; }
.quick-note-dot-purple { background: #e3d6ff; }
.quick-note-delete {
    margin-left: auto; background: none; border: none; padding: 0;
    color: rgba(0,0,0,.35); font-size: .85rem;
}
.quick-note-delete:hover { color: #dc3545; }
.quick-note-body {
    flex: 1; background: transparent; border: none; resize: none;
    font-size: .84rem; font-family: 'Plus Jakarta Sans', sans-serif; color: #1f2233;
}
.quick-note-body:focus { outline: none; }
.quick-note-body::placeholder { color: rgba(0,0,0,.35); }

/* ---------- Report progress bars ---------- */
.report-bar-row { margin-bottom: 12px; }
.report-bar-row:last-child { margin-bottom: 0; }
.report-bar-label {
    display: flex; justify-content: space-between; font-size: .78rem; color: var(--pp-text-muted);
    margin-bottom: 4px;
}
.report-progress { height: 8px; border-radius: 20px; background: #f0f1f7; }
.report-progress .progress-bar { border-radius: 20px; }

/* ---------- Flatpickr date-range picker — match app's primary color ---------- */
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--pp-primary) !important; border-color: var(--pp-primary) !important;
}
.flatpickr-day.inRange {
    background: rgba(79,70,229,.12) !important; border-color: transparent !important; box-shadow: none !important;
}
.flatpickr-day.today { border-color: var(--pp-primary); }
.flatpickr-input { width:200px; }

/* =====================================================================
   DARK THEME
   Toggled via [data-bs-theme="dark"] on <html> — same attribute Bootstrap
   5.3 itself looks for, so standard Bootstrap components (buttons, forms,
   modals, dropdowns, tables) already re-color themselves automatically.
   Everything below covers the app's own custom classes.
   ===================================================================== */
[data-bs-theme="dark"] {
    --pp-bg: #12141f;
    --pp-surface: #1b1e2e;
    --pp-text: #e8e9f3;
    --pp-border: #2b2e42;
    --pp-text-muted: #9297ab;
}

[data-bs-theme="dark"] .auth-card,
[data-bs-theme="dark"] .btn-google,
[data-bs-theme="dark"] .app-sidebar,
[data-bs-theme="dark"] .app-navbar,
[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .project-card,
[data-bs-theme="dark"] .form-card,
[data-bs-theme="dark"] .meta-box,
[data-bs-theme="dark"] .panel,
[data-bs-theme="dark"] .notif-dropdown,
[data-bs-theme="dark"] .search-results,
[data-bs-theme="dark"] .pp-toast,
[data-bs-theme="dark"] .filter-toolbar,
[data-bs-theme="dark"] .page-item.disabled .page-link {
    background: var(--pp-surface);
    color: var(--pp-text);
    border-color: var(--pp-border);
}

[data-bs-theme="dark"] .sidebar-brand { color: var(--pp-text); }
[data-bs-theme="dark"] .sidebar-nav .nav-link,
[data-bs-theme="dark"] .sidebar-quicknotes,
[data-bs-theme="dark"] .nav-sublink { color: var(--pp-text-muted); }
[data-bs-theme="dark"] .sidebar-nav .nav-link:hover,
[data-bs-theme="dark"] .sidebar-quicknotes:hover { background: rgba(255,255,255,.06); color: var(--pp-text); }
[data-bs-theme="dark"] .sidebar-nav .nav-link.active { background: rgba(129,120,255,.18); color: #a5b4fc; }
[data-bs-theme="dark"] .btn-google:hover { background: #23273a; }
[data-bs-theme="dark"] .auth-note { background: #23273a; }

[data-bs-theme="dark"] .pp-breadcrumb span { color: var(--pp-text); }
[data-bs-theme="dark"] .pp-tabs { border-bottom-color: var(--pp-border); }
[data-bs-theme="dark"] .pp-tabs .nav-link:hover { color: var(--pp-text); }

[data-bs-theme="dark"] .header-search input { background: #23273a; color: var(--pp-text); }
[data-bs-theme="dark"] .header-search input::placeholder { color: var(--pp-text-muted); }
[data-bs-theme="dark"] .header-search input:focus { background: var(--pp-surface); }

[data-bs-theme="dark"] .notif-item:hover,
[data-bs-theme="dark"] .search-result-item:hover,
[data-bs-theme="dark"] .developer-check:hover,
[data-bs-theme="dark"] .monday-table tbody tr:hover,
[data-bs-theme="dark"] .task-item:hover { background: rgba(255,255,255,.04); }
[data-bs-theme="dark"] .notif-item.notif-unread { background: rgba(129,120,255,.1); }
[data-bs-theme="dark"] .notif-title, [data-bs-theme="dark"] .search-result-title { color: var(--pp-text); }

[data-bs-theme="dark"] .developer-checklist { border-color: var(--pp-border); }
[data-bs-theme="dark"] .developer-check:has(input:checked) { background: rgba(129,120,255,.15); border-color: rgba(129,120,255,.35); }

[data-bs-theme="dark"] .monday-table thead th { background: #23273a; border-color: var(--pp-border); }
[data-bs-theme="dark"] .monday-table td { border-color: var(--pp-border); }

[data-bs-theme="dark"] .chat-content { background: #23273a; }
[data-bs-theme="dark"] .chat-bubble-me .chat-content { background: rgba(129,120,255,.18); }
[data-bs-theme="dark"] .chat-text { color: var(--pp-text); }

[data-bs-theme="dark"] .rich-content pre,
[data-bs-theme="dark"] .rich-content code,
[data-bs-theme="dark"] .report-progress { background: #23273a; }
[data-bs-theme="dark"] .rich-content { color: var(--pp-text); }
[data-bs-theme="dark"] .rich-editor .ql-toolbar.ql-snow { background: #23273a; border-color: var(--pp-border); }
[data-bs-theme="dark"] .rich-editor .ql-container.ql-snow { border-color: var(--pp-border); }
[data-bs-theme="dark"] .rich-editor .ql-editor { color: var(--pp-text); }
[data-bs-theme="dark"] .ql-snow .ql-stroke { stroke: var(--pp-text-muted); }
[data-bs-theme="dark"] .ql-snow .ql-picker { color: var(--pp-text-muted); }

[data-bs-theme="dark"] .detail-person-name,
[data-bs-theme="dark"] .timeline-text,
[data-bs-theme="dark"] .project-card h4,
[data-bs-theme="dark"] .task-title-link { color: var(--pp-text); }
[data-bs-theme="dark"] .timeline-duration { background: #23273a; }

[data-bs-theme="dark"] .badge.bg-light.text-dark,
[data-bs-theme="dark"] .badge.border { background: #23273a !important; color: var(--pp-text) !important; border-color: var(--pp-border) !important; }

[data-bs-theme="dark"] .empty-state { color: var(--pp-text-muted); }

[data-bs-theme="dark"] .flatpickr-calendar { background: var(--pp-surface); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .flatpickr-day { color: var(--pp-text); }
[data-bs-theme="dark"] .flatpickr-day.flatpickr-disabled,
[data-bs-theme="dark"] .flatpickr-day.prevMonthDay,
[data-bs-theme="dark"] .flatpickr-day.nextMonthDay { color: var(--pp-text-muted); }
[data-bs-theme="dark"] .flatpickr-months, [data-bs-theme="dark"] .flatpickr-weekdays { background: var(--pp-surface); }
[data-bs-theme="dark"] .flatpickr-current-month, [data-bs-theme="dark"] .flatpickr-weekday { color: var(--pp-text); }

/* ---------- Theme toggle button ---------- */
.theme-toggle-btn { position: relative; }
.theme-toggle-btn .bi-sun { display: none; }
.theme-toggle-btn .bi-moon-stars { display: inline; }
[data-bs-theme="dark"] .theme-toggle-btn .bi-sun { display: inline; }
[data-bs-theme="dark"] .theme-toggle-btn .bi-moon-stars { display: none; }

/* ---------- Developer profile inner sidebar ---------- */
.profile-inner-nav {
    background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: var(--pp-radius-sm);
    padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 20px;
}
.profile-inner-nav-link {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    color: var(--pp-text-muted); text-decoration: none; font-size: .85rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.profile-inner-nav-link i { font-size: .95rem; width: 18px; text-align: center; }
.profile-inner-nav-link span:not(.profile-inner-nav-count) { flex: 1; }
.profile-inner-nav-link:hover { background: rgba(79,70,229,.06); color: var(--pp-text); }
.profile-inner-nav-link.active { background: rgba(79,70,229,.1); color: var(--pp-primary); font-weight: 700; }
.profile-inner-nav-count {
    font-size: .68rem; font-weight: 700; color: var(--pp-text-muted); background: rgba(0,0,0,.05);
    border-radius: 20px; padding: 2px 8px; min-width: 22px; text-align: center;
}
.profile-inner-nav-link.active .profile-inner-nav-count { background: var(--pp-primary); color: #fff; }
[data-bs-theme="dark"] .profile-inner-nav-count { background: rgba(255,255,255,.08); }

/* ---------- Highlighting a specific row/note when landing from a notification ---------- */
@keyframes highlightFlash {
    0%, 100% { background-color: transparent; }
    20%, 60% { background-color: rgba(79,70,229,.14); }
}
.row-highlight { animation: highlightFlash 2s ease-in-out; }
.note-highlight .chat-content { animation: highlightFlash 2s ease-in-out; border-radius: 14px; }

/* ---------- Online/offline status dot ---------- */
.avatar-status-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.user-status-dot {
    position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px;
    border-radius: 50%; border: 2px solid var(--pp-surface);
    background: #adb5bd; /* offline default, until presence data arrives */
}
.user-status-dot.status-online { background: #22c55e; }
.user-status-dot.status-offline { background: #adb5bd; }