@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/inter/Inter-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/static/fonts/inter/Inter-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/static/fonts/inter/Inter-Bold.woff2") format("woff2");
}

:root {
    --cyan: #00bcd4;
    --magenta: #e91e63;
    --yellow: #ffc107;
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body {
    font-family: var(--font-family);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.accent-cyan {
    color: var(--cyan);
}

.accent-magenta {
    color: var(--magenta);
}

.accent-yellow {
    color: var(--yellow);
}

.tag.is-cyan {
    background-color: var(--cyan);
    color: #fff;
}

.tag.is-magenta {
    background-color: var(--magenta);
    color: #fff;
}

.tag.is-yellow {
    background-color: var(--yellow);
    color: #000;
}

/* Navbar color zones */
.navbar {
    background-color: #fff;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    background-color: #fff;
}

.navbar-brand .navbar-item {
    color: #000;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.01em;
    border-bottom: 3px solid var(--cyan);
}

.navbar-brand .navbar-item:hover,
.navbar-brand .navbar-item:focus {
    background-color: #f0fdff !important;
    color: #000 !important;
}

.navbar-brand .navbar-burger span {
    background-color: #000;
}

.navbar-start .navbar-item {
    color: #000;
    background-color: #fff;
    border-bottom: 3px solid var(--yellow);
}

.navbar-start .navbar-item:hover,
.navbar-start .navbar-item:focus {
    background-color: #fffde7 !important;
    color: #000 !important;
}

.navbar-start .navbar-workspace {
    color: #000;
    border-bottom: 3px solid var(--magenta);
}

.navbar-start .navbar-workspace:hover,
.navbar-start .navbar-workspace:focus {
    background-color: #fce4ec !important;
    color: #000 !important;
}

/* Workspace switcher: override yellow border on the wrapper div */
.navbar-start .navbar-workspace-switcher.navbar-item {
    border-bottom: none;
    padding: 0;
}

/* Workspace switcher dropdown */
.navbar-workspace-switcher > .navbar-dropdown {
    border-top: 3px solid var(--magenta);
    padding-top: 0;
}

.navbar-start .navbar-dropdown .navbar-item {
    border-bottom: 3px solid #000;
}

.navbar-start .navbar-item.is-active {
    color: #000 !important;
    background-color: #fff !important;
}

.navbar-running-task {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    color: var(--cyan) !important;
    text-decoration: none;
}

.navbar-timer {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.navbar-task-desc {
    font-size: 0.7rem;
    opacity: 0.9;
}

.navbar-running-task:hover {
    color: var(--cyan) !important;
    text-decoration: underline;
}

.navbar-end {
    background-color: #000;
}

.navbar-end .navbar-item {
    color: #fff !important;
    border-bottom: 3px solid #000;
}

.navbar-end .navbar-item:hover,
.navbar-end .navbar-item:focus {
    background-color: #222 !important;
    color: #fff !important;
}

/* Mobile/tablet: the desktop navbar uses colored borders and a black account
   bar that look messy once the burger menu stacks vertically. Flatten it into
   a clean white list of rows. */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        padding: 0.25rem 0 0.5rem;
        border-top: 1px solid #f0f0f0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    }

    .navbar-menu .navbar-item {
        color: #000 !important;
        background-color: #fff !important;
        border-bottom: 1px solid #f3f3f3 !important;
        justify-content: flex-start;
        padding: 0.7rem 1rem;
    }

    .navbar-menu .navbar-item:hover,
    .navbar-menu .navbar-item:focus {
        background-color: #f7f7f7 !important;
        color: #000 !important;
    }

    /* Drop the black account bar. */
    .navbar-end {
        background-color: #fff;
    }

    /* Workspace name reads as the heading of its group; nested workspaces indent. */
    .navbar-start .navbar-workspace {
        font-weight: 700;
    }
    .navbar-workspace-switcher > .navbar-dropdown {
        border-top: none;
        box-shadow: none;
        padding: 0;
    }
    .navbar-start .navbar-dropdown .navbar-item {
        padding-left: 1.75rem !important;
    }

    /* Faint grey links (Support, account) need contrast on the white menu. */
    .navbar-menu a.has-text-grey-light {
        color: #363636 !important;
    }

    /* Running task: a normal left-aligned row instead of right-stacked, with a
       dark description and the timer kept as the cyan accent. */
    .navbar-item .navbar-running-task {
        flex-direction: row;
        align-items: baseline;
        gap: 0.4rem;
        color: #363636 !important;
    }
    .navbar-item .navbar-running-task .navbar-timer {
        color: var(--cyan);
    }

    /* Log out: a clear, full-width action. */
    .navbar-end .navbar-item form {
        width: 100%;
    }
    .navbar-end .navbar-item .button {
        width: 100%;
        justify-content: center;
    }
}

/* App layout: sidebar + main */
.app-layout {
    display: flex;
    min-height: calc(100vh - 52px);
}

.app-sidebar {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid #f0f0f0;
    background-color: #fafafa;
    overflow-y: auto;
}

.app-main {
    flex: 1;
    min-width: 0;
}

/* Sidebar menu tweaks */
.app-sidebar .menu-label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding-left: 0.25rem;
}

.app-sidebar .menu-list a {
    border-radius: 4px;
    color: #333;
}

.app-sidebar .menu-list a:hover {
    background-color: #f0f0f0;
    color: #000;
}

.app-sidebar .menu-list a.is-active {
    background-color: #000;
    color: #fff;
}

.app-sidebar .menu-list .menu-list {
    border-left: 1px solid #e8e8e8;
    margin-left: 0.5rem;
}

/* Mobile: the sidebar becomes an off-canvas drawer opened from the navbar. */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    background: transparent;
    border: none;
    border-right: 1px solid #f0f0f0;
    color: #000;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    background: #f0fdff;
}

/* Drawer close (X) button: hidden on desktop (sidebar is in-flow there). */
.sidebar-close {
    display: none;
    position: absolute;
    top: 0.3rem;
    right: 0.5rem;
    z-index: 1;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #555;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}

.sidebar-close:hover,
.sidebar-close:focus {
    color: #000;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.45);
}

/* Account/session footer inside the drawer. Hidden by default (the navbar shows
   these on desktop/tablet); revealed on phones where the drawer is the only menu. */
.sidebar-account {
    display: none;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid #e8e8e8;
}

.sidebar-account a {
    display: block;
    padding: 0.6rem 0.25rem;
    color: #363636;
    border-bottom: 1px solid #f3f3f3;
}

.sidebar-account a:hover {
    color: #000;
}

.sidebar-account .button {
    width: 100%;
    margin-top: 0.75rem;
    justify-content: center;
}

.sidebar-account-task .navbar-timer {
    color: var(--cyan);
}

.sidebar-account-task-desc {
    margin-left: 0.4rem;
    font-size: 0.85rem;
    color: #363636;
}

@media screen and (max-width: 768px) {
    .sidebar-toggle {
        display: inline-flex;
    }

    /* One menu on phones: the drawer. Remove the second (navbar) hamburger. */
    .navbar-burger {
        display: none !important;
    }

    .sidebar-account {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 82%;
        max-width: 300px;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    /* Shadow only while open, otherwise the off-screen drawer's edge shadow
       bleeds into the viewport as a dark gradient on the left. */
    .app-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
    }

    /* Close (X) button at the top of the drawer; menu clears space for it. */
    .sidebar-close {
        display: block;
    }
    .app-sidebar .menu {
        padding-top: 2.75rem;
    }

    .sidebar-backdrop.is-open {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* Notebooks: page list pane + content (Obsidian/Joplin style) */
.notebook-layout {
    display: flex;
    align-items: flex-start;
}

.notebook-pane {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid #f0f0f0;
    background-color: #fafafa;
    padding: 1rem;
    position: sticky;
    top: 52px;
    min-height: calc(100vh - 52px);
    max-height: calc(100vh - 52px);
    overflow-y: auto;
}

.notebook-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}

.notebook-pane .panel-heading a {
    color: #363636;
}

.notebook-pane .panel-block.is-active {
    background-color: #000;
    color: #fff;
    border-left-color: #000;
}

.notebook-pane .panel-block:not(.is-active):hover {
    background-color: #f0f0f0;
}

.notebook-mobile-back {
    display: none;
    padding: 1rem 1.5rem 0;
    font-weight: 600;
}

@media screen and (max-width: 768px) {
    .notebook-layout {
        display: block;
    }

    .notebook-pane {
        width: auto;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        position: static;
        min-height: 0;
        max-height: none;
    }

    .notebook-layout.is-index .notebook-content {
        display: none;
    }

    .notebook-layout.is-detail .notebook-pane {
        display: none;
    }

    .notebook-mobile-back {
        display: block;
    }
}

/* Checklist checkbox button */
.checklist-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    border: 2px solid #b5b5b5;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
}

.checklist-checkbox.is-checked {
    background: #48c78e;
    border-color: #48c78e;
    color: #fff;
}

/* Timesheet today highlight */
.timesheet-today td {
    background-color: #e0f7fa;
}

/* Timesheet: collapse table into cards on mobile */
@media screen and (max-width: 768px) {
    .timesheet-table thead {
        display: none;
    }

    .timesheet-table tbody tr {
        display: block;
        border: 1px solid #dbdbdb;
        border-radius: 6px;
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #fff;
    }

    .timesheet-table tbody tr.has-background-light {
        background: #f5f5f5;
    }

    .timesheet-table tbody tr.timesheet-today {
        border-color: var(--cyan);
        border-width: 2px;
    }

    .timesheet-table tbody tr.timesheet-today td {
        background: transparent;
    }

    .timesheet-table td {
        display: grid;
        grid-template-columns: 7rem 1fr;
        align-items: center;
        border: none;
        padding: 0.3rem 0;
    }

    .timesheet-table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 600;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .timesheet-table td:empty {
        display: none;
    }

    .timesheet-table tfoot {
        display: block;
        border: 1px solid #dbdbdb;
        border-radius: 6px;
        padding: 0.75rem;
        background: #fafafa;
    }

    .timesheet-table tfoot tr {
        display: flex;
        justify-content: space-between;
    }

    .timesheet-table tfoot th,
    .timesheet-table tfoot td {
        display: block;
        border: none;
        padding: 0;
    }
}

/* Unstyled inline button matches <a> link appearance */
.comment-action {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    vertical-align: baseline;
    display: inline;
    text-decoration: none;
}

/* OpenMoji */
img.openmoji {
    display: inline-block;
    vertical-align: middle;
    filter: none !important;
    background-color: transparent !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

img.openmoji-lg {
    width: 2rem !important;
    height: 2rem !important;
}

/* Slightly larger in sidebar */
.app-sidebar img.openmoji {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* Large on dashboard and workspace cards */
.box img.openmoji {
    width: 2.5rem !important;
    height: 2.5rem !important;
}

.openmoji-picker-ui {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.openmoji-picker-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2rem;
}

.openmoji-picker-preview img.openmoji {
    width: 2rem !important;
    height: 2rem !important;
}

.openmoji-picker-clear {
    border: none;
    background: none;
    color: #888;
    cursor: pointer;
    padding: 0 0.25rem;
    font-size: 1.1rem;
    line-height: 1;
}

.openmoji-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
}

.openmoji-picker-grid:empty { display: none; }

.openmoji-picker-btn {
    border: 1px solid transparent;
    background: none;
    padding: 3px;
    border-radius: 4px;
    cursor: pointer;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.openmoji-picker-btn:hover { border-color: #ddd; background: #f5f5f5; }
.openmoji-picker-btn img.openmoji { width: 1.5rem !important; height: 1.5rem !important; }

/* Autosave status indicator */
.autosave-status {
    font-size: 0.75rem;
    color: #aaa;
    min-width: 1rem;
    display: inline-block;
}
