* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
    margin: 0;
    padding: 0;
}

 .app-layout {
    display: block;
    min-height: 100vh;
}

.app-main {
    min-height: 100vh;
    min-width: 0;
    padding: 32px;
    flex: 1;
}

.page-content {
    width: 100%;
    max-width: 100%;
}

.sidebar {
    width: 100%;
}

.app-layout.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    flex: 0 0 0 !important;
    max-width: 0 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    border-right: none;
}

.app-layout.sidebar-collapsed .sidebar .offcanvas-body {
    display: none;
}

.app-layout,
.sidebar,
.app-main,
.calendar-dock {
    transition:
        flex-basis 0.26s ease,
        max-width 0.26s ease,
        min-width 0.26s ease,
        opacity 0.2s ease,
        width 0.26s ease;
}

@media (min-width: 992px) {
    .app-layout {
        display: flex;
        align-items: stretch;
        gap: 0;
    }

    .sidebar {
        width: 240px !important;
        max-width: 240px !important;
        flex: 0 0 240px !important;
        min-width: 180px;
        height: auto;
        position: static !important;
        border-right: 1px solid rgba(0,0,0,.08);
        box-shadow: none;
        transform: none !important;
        visibility: visible !important;
        background: #fff;
        --bs-offcanvas-width: 240px;
        height: 100vh;
        overflow: hidden;
    }

    .sidebar.offcanvas {
        position: static !important;
    }

    .sidebar .offcanvas-body {
        height: calc(100vh - 85px);
        overflow-y: auto;
    }

    .offcanvas-backdrop {
        display: none !important;
    }

    .app-main {
        min-width: 0;
        padding: 32px 32px;
    }

    .calendar-dock.offcanvas-lg {
        --bs-offcanvas-width: 320px;
        background: #fff;
        display: flex !important;
        flex: 0 0 320px !important;
        flex-direction: column;
        height: 100vh;
        max-width: 320px !important;
        min-width: 300px;
        overflow: hidden;
        position: sticky !important;
        top: 0;
        transform: none !important;
        transition:
            flex-basis 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            min-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.18s ease,
            width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        visibility: visible !important;
        width: 320px !important;
        z-index: 1;
    }

    .app-layout.calendar-collapsed .calendar-dock {
        border-left: 0 !important;
        flex: 0 0 0 !important;
        max-width: 0 !important;
        min-width: 0 !important;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        width: 0 !important;
    }

    .calendar-dock-reopen {
        align-items: center;
        background: #212529;
        border: 0;
        border-radius: 8px 0 0 8px;
        box-shadow: 0 8px 18px rgba(0,0,0,.16);
        color: #fff;
        gap: 6px;
        padding: 9px 10px;
        position: fixed;
        right: 0;
        top: 24px;
        transform: translateX(110%);
        transition:
            box-shadow 0.18s ease,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 1020;
    }

    .calendar-dock-reopen strong {
        align-items: center;
        background: #dc3545;
        border-radius: 999px;
        color: #fff;
        display: inline-flex;
        font-size: 0.7rem;
        justify-content: center;
        line-height: 1;
        min-width: 18px;
        padding: 4px 6px;
    }

    .app-layout.calendar-collapsed .calendar-dock-reopen {
        transform: translateX(0);
    }

    .calendar-dock-reopen:hover {
        box-shadow: 0 10px 22px rgba(0,0,0,.22);
    }
}

.sidebar-menu-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
}

.sidebar .offcanvas-title {
    align-items: center;
    display: flex;
    font-weight: 700;
}

.sidebar-user {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #eef0f2;
    border-radius: 8px;
    color: #495057;
    display: flex;
    font-size: 0.9rem;
    gap: 6px;
    padding: 9px 10px;
}

.sidebar-user-text {
    display: block;
    min-width: 0;
}

.sidebar-user-text strong,
.sidebar-user-text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-text strong {
    color: #343a40;
    font-size: 0.88rem;
    font-weight: 600;
}

.sidebar-user-text small {
    color: #7b838b;
    font-size: 0.72rem;
    margin-top: 1px;
}

.sidebar .bi {
    color: #111;
    font-size: 1rem;
    line-height: 1;
    -webkit-text-stroke: 0.25px currentColor;
}

.sidebar .list-group-item {
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 7px;
    color: #495057;
    font-size: 0.94rem;
    gap: 8px;
    margin-bottom: 3px;
    padding: 9px 10px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar .list-group-item:hover {
    background: #f1f3f5;
    color: #111;
    transform: translateX(1px);
}

.sidebar .list-group-item.active {
    background: #e9ecef;
    color: #111;
    font-weight: 600;
}

.sidebar .list-group-item.active .bi {
    color: #111;
}

.sidebar-nav {
    gap: 2px;
}

.sidebar-nav-spaced {
    margin-top: 10px;
}

.sidebar .list-group-item.disabled .bi,
.sidebar .btn-outline-danger .bi {
    color: currentColor;
}

.sidebar-logout-gap {
    padding-top: 18px;
}

@media (min-width: 992px) {
    .sidebar {
        position: static !important;
    }

    .offcanvas-header .btn-close {
        display: none;
    }
}

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

h1 {
    margin: 0;
}

.topbar p {
    margin: 6px 0 0;
    color: #666;
}

.button,
button {
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
}

.search {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

input,
textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 11px;
    font-size: 15px;
}

.notes-grid {
    display: grid;
    gap: 2px;
}

.notes-filter {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    padding: 12px;
}

.notes-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px 170px auto 150px 170px auto;
    gap: 10px;
    align-items: end;
}

.dashboard-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-alert-strip {
    align-items: center;
    background: #fff5f6;
    border: 1px solid #f1aeb5;
    border-left: 6px solid #dc3545;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    padding: 12px 14px;
}

.app-alert-strip-icon {
    align-items: center;
    background: #f8d7da;
    border-radius: 8px;
    color: #b02a37;
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.app-alert-strip-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.app-alert-strip-text strong {
    color: #842029;
    font-size: 0.95rem;
}

.app-alert-strip-text small {
    color: #6c3d43;
    font-size: 0.8rem;
}

.dashboard-item {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    color: #343a40;
    display: flex;
    gap: 10px;
    min-height: 62px;
    padding: 10px 12px;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-item:hover {
    border-color: rgba(13, 110, 253, 0.35);
    box-shadow: 0 0.35rem 0.8rem rgba(0,0,0,.08);
    color: #111;
    transform: translateY(-1px);
}

.dashboard-item strong,
.dashboard-item small {
    display: block;
    line-height: 1.15;
}

.dashboard-item strong {
    font-size: 1.15rem;
}

.dashboard-item small {
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 2px;
}

.dashboard-icon {
    align-items: center;
    background: #f1f3f5;
    border-radius: 8px;
    color: #495057;
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dashboard-item.is-alert {
    border-color: #f1aeb5;
}

.dashboard-item.is-alert .dashboard-icon {
    background: #f8d7da;
    color: #b02a37;
}

.filter-label {
    color: #6c757d;
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.favorite-filter {
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    min-height: 38px;
    padding: 6px 10px;
    white-space: nowrap;
}

.favorite-filter .bi {
    color: #ffc107;
    margin-right: 4px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.note-template-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.note-template-bar .btn {
    align-items: center;
    display: inline-flex;
    font-weight: 500;
    min-height: 32px;
}

.create-note-header {
    align-items: flex-start;
    background:
        linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(25, 135, 84, 0.1)),
        #fff;
    border-bottom: 1px solid #dbe7f6;
    flex: 0 0 auto;
}

.create-note-header .modal-title {
    color: #17324d;
    font-weight: 800;
}

.create-note-dialog .modal-content {
    border: 0;
    box-shadow: 0 22px 60px rgba(24, 39, 75, 0.22);
    max-height: calc(100vh - 56px);
}

.create-note-body {
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(250, 251, 252, 0.98)),
        #fafbfc;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 14px;
}

.create-note-section {
    background: #fff;
    border: 1px solid #dfe8f1;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(35, 54, 88, 0.05);
    margin-bottom: 10px;
    padding: 12px;
}

.create-note-shell {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 132px;
}

.create-note-workspace {
    min-width: 0;
}

.create-note-side-actions {
    background:
        linear-gradient(180deg, #ffffff, #f7fbff);
    border: 1px solid #dbe7f6;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(35, 54, 88, 0.08);
    display: grid;
    gap: 8px;
    padding: 10px;
    position: sticky;
    top: 0;
}

.create-note-side-actions .btn {
    align-items: center;
    display: flex;
    font-size: 0.82rem;
    gap: 7px;
    justify-content: flex-start;
    min-height: 36px;
    white-space: nowrap;
}

.create-note-side-actions .btn-primary {
    background: #1769e0;
    border-color: #1769e0;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.24);
}

.create-note-side-actions .btn-outline-secondary {
    background: #fff;
    border-color: #d8e3ef;
    color: #45515f;
}

.create-note-side-actions .btn-outline-secondary:hover {
    background: #eef6ff;
    border-color: #b8d7ff;
    color: #174a7c;
}

.create-note-side-actions .bi {
    font-size: 0.95rem;
    line-height: 1;
}

.create-note-section-title {
    align-items: center;
    color: #315d9f;
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.note-template-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.note-template-option {
    align-items: center;
    background: #fbfdff;
    border: 1px solid #dce8f5;
    border-radius: 7px;
    color: #3d444b;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 600;
    gap: 7px;
    justify-content: center;
    min-height: 42px;
    padding: 8px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.note-template-option .bi {
    color: #1769e0;
    font-size: 1rem;
    line-height: 1;
}

.note-template-option:hover,
.note-template-option:focus {
    background: #eef6ff;
    border-color: #9ac6ff;
    color: #174a7c;
    outline: 0;
}

.create-note-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.create-note-title-field {
    grid-column: span 2;
    min-width: 0;
}

.create-note-field .form-label {
    color: #6c757d;
    font-size: 0.78rem;
    margin-bottom: 5px;
}

.create-note-advanced {
    border-top: 1px solid #edf0f2;
    margin-top: 14px;
}

.create-note-advanced .accordion-item {
    border: 0;
}

.create-note-advanced .accordion-button {
    background: #fff;
    color: #495057;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 12px 0 0;
}

.create-note-advanced .accordion-button:not(.collapsed) {
    box-shadow: none;
    color: #212529;
}

.create-note-advanced .accordion-button:focus {
    box-shadow: none;
}

.create-note-advanced .accordion-body {
    padding: 12px 0 0;
}

.create-note-advanced-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.create-note-date-display {
    background: #f8fbff;
    color: #495057;
    font-weight: 500;
}

.create-note-content {
    min-height: 130px;
    resize: vertical;
}

.create-note-upload {
    align-items: center;
    background: #f7fbff;
    border: 1px dashed #9fc5ef;
    border-radius: 8px;
    color: #315d9f;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 58px;
    padding: 12px;
}

.create-note-upload .bi {
    color: #1769e0;
    font-size: 1.25rem;
}

.create-note-upload input {
    margin-left: auto;
    max-width: 360px;
}

.create-note-footer {
    background: #fff;
    border-top: 1px solid #edf0f2;
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

@media (max-width: 991px) {
    .dashboard-strip {
        grid-template-columns: 1fr 1fr;
    }

    .note-template-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .create-note-grid {
        grid-template-columns: 1fr 1fr;
    }

    .create-note-advanced-grid {
        grid-template-columns: 1fr;
    }

    .create-note-shell {
        grid-template-columns: 1fr;
    }

    .create-note-side-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        order: -1;
        position: static;
    }

    .create-note-side-actions .btn {
        justify-content: center;
    }

    .notes-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-search,
    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 576px) {
    .app-main {
        padding: 16px 12px;
    }

    .page-content {
        padding-bottom: 24px;
        padding-top: 14px !important;
    }

    .page-content h1 {
        font-size: 1.45rem;
    }

    .app-alert-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-alert-strip .btn {
        width: 100%;
    }

    .dashboard-strip {
        grid-template-columns: 1fr;
    }

    .note-template-grid,
    .create-note-grid {
        grid-template-columns: 1fr;
    }

    .create-note-upload {
        align-items: stretch;
        flex-direction: column;
    }

    .create-note-upload input {
        max-width: 100%;
    }

    .create-note-side-actions {
        grid-template-columns: 1fr 1fr;
    }

    .create-note-side-actions .btn {
        min-height: 40px;
    }

    .notes-filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .notes-summary .badge {
        font-size: 0.72rem;
    }

    .notes-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .note-alert {
        padding: 0.55rem 0.65rem;
    }

    .note-alert > span {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .note-alert > span > span:last-child {
        flex-wrap: wrap;
        width: 100%;
    }

    .modal-dialog.create-note-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .create-note-dialog .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }

    .create-note-body {
        max-height: calc(100vh - 86px);
        padding: 10px;
    }

    .calendar-dock {
        --bs-offcanvas-width: min(100vw, 360px);
    }

    .calendar-dock-body {
        padding: 12px;
    }

    .calendar-dock-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.notes-summary {
    padding: 2px 0;
}

.notes-scroll {
    max-height: calc(100vh - 340px);
    overflow-y: auto;
    padding-right: 4px;
}

.note-alert {
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.75rem;
    background: #fff;
    color: #222;
    border-left-width: 8px;
    border-left-style: solid;
    border-top: 1px solid rgba(0,0,0,.08);
    border-right: 1px solid rgba(0,0,0,.08);
    border-bottom: 1px solid rgba(0,0,0,.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.note-alert:hover,
.note-alert:focus {
    border-color: rgba(13, 110, 253, 0.35);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.08) !important;
    transform: translateY(-1px);
}

.note-alert.is-pinned {
    background: #fbfcff;
}

.note-alert.is-today {
    background: #f7f8fa;
}

.note-alert.is-pinned.is-today {
    background: #f3f6fb;
}

.note-alert-title {
    color: #6c757d;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.favorite-toggle {
    width: 12px;
    height: 12px;
    border: 0;
    background: transparent;
    color: #adb5bd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.55rem;
    line-height: 1;
}

.favorite-toggle .bi {
    font-size: 0.55rem;
    line-height: 1;
}

.favorite-toggle:hover,
.favorite-toggle.is-favorite {
    color: #ffc107;
}

.pin-toggle {
    width: 16px;
    height: 16px;
    border: 0;
    background: transparent;
    color: #adb5bd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
}

.pin-toggle .bi {
    font-size: 0.75rem;
    line-height: 1;
}

.pin-toggle:hover,
.pin-toggle.is-pinned {
    color: #0d6efd;
}

.note-alert-date {
    opacity: 0.65;
}

.note-detail-content {
    white-space: normal;
    overflow-wrap: anywhere;
}

.note-detail-modal {
    border: 0;
}

.note-detail-header {
    align-items: flex-start;
    background: #fff;
    border-bottom: 1px solid #edf0f2;
    padding: 18px 20px;
}

.note-detail-heading {
    min-width: 0;
}

.note-detail-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.note-detail-body {
    background: #fafbfc;
    padding: 18px;
}

.note-detail-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.note-detail-media,
.note-detail-content-panel,
.note-detail-media-strip {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    padding: 14px;
}

.note-detail-section-title {
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.note-detail-content-panel .note-detail-content {
    line-height: 1.55;
    min-height: 180px;
}

.note-detail-media-preview {
    align-items: center;
    display: flex;
    gap: 12px;
}

.note-detail-media-preview img {
    max-height: 150px;
    max-width: 220px;
    object-fit: cover;
}

.note-detail-footer {
    align-items: flex-end;
    background: #fff;
    border-top: 1px solid #edf0f2;
    gap: 10px;
    justify-content: space-between;
}

.note-detail-action-group {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.note-detail-action-group .btn,
.note-detail-action-group form {
    flex: 0 0 auto;
}

.note-detail-action-group .report-send-form {
    align-items: flex-end;
    display: flex;
    gap: 8px;
}

.checklist-item {
    align-items: flex-start;
    display: flex;
    gap: 9px;
    margin: 5px 0;
}

.checklist-item .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.25rem;
}

.checklist-item span {
    overflow-wrap: anywhere;
}

.checklist-item.is-done span {
    color: #8a939b;
    text-decoration: line-through;
}

.checklist-progress-badge {
    align-items: center;
    background: #eef4ff;
    border: 1px solid #d8e6ff;
    border-radius: 999px;
    color: #315d9f;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    padding: 4px 7px;
}

.note-status-badge,
.note-reminder-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    padding: 4px 7px;
    white-space: nowrap;
}

.note-status-pending {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #8a6200;
}

.note-status-progress {
    background: #cff4fc;
    border: 1px solid #9eeaf9;
    color: #087990;
}

.note-status-done {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    color: #146c43;
}

.note-reminder-badge {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: #5c636a;
    gap: 4px;
}

.note-reminder-badge.is-due {
    background: #f8d7da;
    border-color: #f1aeb5;
    color: #b02a37;
}

.note-email-from {
    align-items: center;
    color: #6c757d;
    display: inline-flex;
    font-size: 0.75rem;
    gap: 4px;
    max-width: 220px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.periodic-toolbar {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1fr) 240px;
}

.periodic-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.periodic-legend-item {
    align-items: center;
    color: #5f6872;
    display: inline-flex;
    font-size: 0.82rem;
    gap: 6px;
}

.periodic-dot {
    border-radius: 50%;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.periodic-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
}

.periodic-table {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(18, minmax(58px, 1fr));
    grid-template-rows: 22px repeat(9, 74px);
    min-width: 1180px;
}

.periodic-group-number {
    color: #7a828b;
    font-size: 0.75rem;
    text-align: center;
}

.periodic-element {
    align-items: stretch;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 6px;
    color: #1f2933;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 5px;
    text-align: left;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.periodic-element:hover,
.periodic-element:focus {
    box-shadow: 0 0.45rem 0.9rem rgba(0,0,0,.12);
    outline: 0;
    transform: translateY(-1px);
}

.periodic-element.is-muted {
    opacity: 0.16;
}

.periodic-number,
.periodic-mass {
    font-size: 0.62rem;
    line-height: 1;
}

.periodic-symbol {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.periodic-name {
    font-size: 0.62rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.periodic-detail-symbol {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 3rem;
    font-weight: 700;
    justify-content: center;
    min-height: 96px;
    min-width: 96px;
    padding: 12px;
}

.periodic-alkali { background: #ffd6d6; }
.periodic-alkaline { background: #ffe5b8; }
.periodic-transition { background: #dce9ff; }
.periodic-post-transition { background: #d7f0df; }
.periodic-metalloid { background: #d8efe9; }
.periodic-nonmetal { background: #e7f5c8; }
.periodic-halogen { background: #f6d8ff; }
.periodic-noble-gas { background: #d9ecff; }
.periodic-lanthanide { background: #fff1ba; }
.periodic-actinide { background: #ffd8ee; }

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

.calendar-month-label {
    color: #27313b;
    font-weight: 700;
    min-width: 150px;
    text-align: center;
}

.calendar-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calendar-stat {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    padding: 12px 14px;
}

.calendar-stat strong {
    color: #212529;
    display: block;
    font-size: 1.45rem;
    line-height: 1;
}

.calendar-stat span {
    color: #6c757d;
    font-size: 0.82rem;
}

.calendar-stat.is-alert {
    border-color: #f1aeb5;
    background: #fff5f6;
}

.calendar-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.calendar-panel,
.calendar-side {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 8px;
}

.calendar-panel {
    overflow: hidden;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    background: #f6f8fa;
    border-bottom: 1px solid #e8ecef;
}

.calendar-weekdays span {
    color: #6c757d;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 10px;
    text-transform: uppercase;
}

.calendar-day {
    border-bottom: 1px solid #edf0f2;
    border-right: 1px solid #edf0f2;
    min-height: 132px;
    padding: 8px;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.is-muted {
    background: #fbfcfd;
    color: #adb5bd;
}

.calendar-day.is-today {
    background: #f3f8ff;
}

.calendar-day-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.calendar-day-header span {
    color: #343a40;
    font-weight: 700;
}

.calendar-day-header small {
    background: #eef4ff;
    border-radius: 999px;
    color: #315d9f;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    padding: 4px 6px;
}

.calendar-events {
    display: grid;
    gap: 5px;
}

.calendar-event,
.calendar-upcoming {
    background: #fff;
    border: 1px solid #e8ecef;
    border-left: 4px solid #0d6efd;
    border-radius: 6px;
    color: #27313b;
    display: grid;
    gap: 1px;
    min-width: 0;
    padding: 6px 7px;
    text-decoration: none;
}

.calendar-event:hover,
.calendar-upcoming:hover {
    border-color: #b7c4d5;
    color: #111;
}

.calendar-event span,
.calendar-upcoming span,
.calendar-upcoming small {
    color: #6c757d;
    font-size: 0.72rem;
}

.calendar-event strong,
.calendar-upcoming strong {
    font-size: 0.78rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event.is-due {
    background: #fff5f6;
    border-color: #f1aeb5;
}

.calendar-event.is-done {
    opacity: 0.58;
}

.calendar-more,
.calendar-empty {
    color: #6c757d;
    font-size: 0.78rem;
}

.calendar-side {
    align-self: start;
    padding: 14px;
}

.calendar-side-title {
    color: #495057;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.calendar-upcoming-list {
    display: grid;
    gap: 8px;
}

.calendar-dock {
    --bs-offcanvas-width: min(360px, 92vw);
}

.calendar-dock-header {
    align-items: flex-start;
    border-bottom: 1px solid #edf0f2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
}

.calendar-dock-header h5 {
    color: #27313b;
    font-weight: 700;
}

.calendar-dock-header small {
    color: #6c757d;
}

.calendar-dock-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding: 16px;
}

.calendar-dock-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

.calendar-dock-stat {
    background: #f8f9fa;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    color: #27313b;
    padding: 10px;
    text-decoration: none;
}

.calendar-dock-stat:hover {
    border-color: #b7c4d5;
    color: #111;
}

.calendar-dock-stat strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
}

.calendar-dock-stat span {
    color: #6c757d;
    font-size: 0.74rem;
}

.calendar-dock-stat.is-alert {
    background: #fff5f6;
    border-color: #f1aeb5;
}

.calendar-dock-month-nav {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr) 34px auto;
}

.calendar-dock-month-nav strong {
    color: #27313b;
    font-size: 0.92rem;
    text-align: center;
}

.calendar-dock-month-nav .btn:not(.calendar-dock-today) {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.calendar-dock-today {
    height: 34px;
}

.calendar-dock-weekdays,
.calendar-dock-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-dock-weekdays span {
    color: #7b838b;
    font-size: 0.68rem;
    font-weight: 700;
    padding-bottom: 5px;
    text-align: center;
}

.calendar-dock-grid {
    border: 1px solid #edf0f2;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-dock-day {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #edf0f2;
    border-left: 0;
    border-right: 1px solid #edf0f2;
    border-top: 0;
    color: #495057;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
    justify-content: center;
    padding: 5px 2px;
    text-decoration: none;
    width: 100%;
}

.calendar-dock-day:nth-child(7n) {
    border-right: 0;
}

.calendar-dock-day:nth-last-child(-n + 7) {
    border-bottom: 0;
}

.calendar-dock-day:hover {
    background: #f6f8fa;
    color: #111;
}

.calendar-dock-day.is-muted {
    background: #fbfcfd;
    color: #c0c6cc;
}

.calendar-dock-day.is-today {
    background: #eef5ff;
    color: #0d6efd;
    font-weight: 700;
}

.calendar-dock-day.is-holiday {
    background: #fff7e6;
}

.calendar-dock-day.has-period {
    outline: 2px solid rgba(25, 135, 84, 0.22);
    outline-offset: -3px;
}

.calendar-dock-day.is-holiday > span:first-child {
    color: #8a6200;
    font-weight: 700;
}

.calendar-dock-day em {
    align-items: center;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 999px;
    color: #8a6200;
    display: inline-flex;
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 800;
    height: 14px;
    justify-content: center;
    line-height: 1;
    width: 14px;
}

.calendar-dock-day em.is-carnival {
    background: #f3e8ff;
    border-color: #e9d5ff;
    color: #7e22ce;
}

.calendar-dock-day.has-events small {
    background: #315d9f;
    border-radius: 999px;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    padding: 3px 5px;
    text-align: center;
}

.calendar-dock-day.intensity-low {
    box-shadow: inset 0 -2px 0 rgba(49, 93, 159, 0.18);
}

.calendar-dock-day.intensity-medium {
    background: #f3f7ff;
    box-shadow: inset 0 -3px 0 rgba(49, 93, 159, 0.34);
}

.calendar-dock-day.intensity-high {
    background: #eaf2ff;
    box-shadow: inset 0 -4px 0 rgba(49, 93, 159, 0.55);
}

.calendar-dock-day.intensity-medium small,
.calendar-dock-day.intensity-high small {
    transform: scale(1.06);
}

.calendar-dock-day.has-due small {
    background: #dc3545;
}

.calendar-dock-day.has-due:not(.is-today) > span:first-child {
    color: #b02a37;
    font-weight: 700;
}

.calendar-dock-category-dots {
    display: flex;
    gap: 3px;
    min-height: 5px;
}

.calendar-dock-category-dots i {
    border-radius: 999px;
    display: block;
    height: 5px;
    width: 5px;
}

.calendar-dock-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
}

.calendar-dock-legend span {
    align-items: center;
    color: #6c757d;
    display: inline-flex;
    font-size: 0.68rem;
    gap: 4px;
    max-width: 120px;
    min-width: 0;
}

.calendar-dock-legend i {
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 7px;
    width: 7px;
}

.calendar-dock-section-title {
    color: #495057;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-dock-filters {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-dock-filters button {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 700;
    min-height: 30px;
    padding: 4px 7px;
}

.calendar-dock-filters button:hover,
.calendar-dock-filters button.is-active {
    background: #212529;
    border-color: #212529;
    color: #fff;
}

.calendar-dock-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.calendar-dock-group {
    display: grid;
    gap: 7px;
}

.calendar-dock-group-title {
    color: #495057;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-dock-event {
    background: #fff;
    border: 1px solid #e8ecef;
    border-left: 4px solid #0d6efd;
    border-radius: 7px;
    color: #27313b;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 9px;
    text-decoration: none;
}

.calendar-dock-event:hover {
    border-color: #b7c4d5;
    color: #111;
}

.calendar-dock-event strong {
    font-size: 0.84rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-dock-event span,
.calendar-dock-event small,
.calendar-dock-empty {
    color: #6c757d;
    font-size: 0.76rem;
}

.calendar-day-detail-list {
    display: grid;
    gap: 10px;
}

.calendar-day-detail-modal {
    border: 0;
}

.calendar-day-detail-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #edf0f2;
    gap: 12px;
    padding: 16px 18px;
}

.calendar-day-detail-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.calendar-day-detail-heading h5 {
    color: #27313b;
    font-weight: 700;
    margin: 0;
}

.calendar-day-detail-heading small {
    color: #6c757d;
    display: block;
    font-size: 0.78rem;
    margin-top: 2px;
}

.calendar-day-detail-icon {
    align-items: center;
    background: #eef5ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.calendar-day-detail-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.calendar-day-detail-body {
    background: #fafbfc;
}

.calendar-day-holiday-box {
    align-items: center;
    background: #fff7e6;
    border: 1px solid #ffe0a3;
    border-left: 5px solid #ffc107;
    border-radius: 8px;
    color: #765200;
    display: flex;
    font-size: 0.84rem;
    font-weight: 700;
    gap: 9px;
    margin-bottom: 12px;
    padding: 10px 11px;
}

.calendar-day-detail-event {
    background: #fff;
    border: 1px solid #e8ecef;
    border-left: 5px solid #0d6efd;
    border-radius: 7px;
    color: #27313b;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    text-decoration: none;
}

.calendar-day-detail-event:hover {
    border-color: #b7c4d5;
    color: #111;
}

.calendar-day-detail-event.is-due {
    background: #fff5f6;
    border-top-color: #f1aeb5;
    border-right-color: #f1aeb5;
    border-bottom-color: #f1aeb5;
}

.calendar-day-detail-time {
    align-items: center;
    background: #f1f3f5;
    border-radius: 7px;
    color: #495057;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    width: 52px;
}

.calendar-day-detail-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.calendar-day-detail-event strong {
    font-size: 0.94rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-detail-event small {
    color: #6c757d;
    font-size: 0.78rem;
}

.calendar-day-detail-due {
    align-self: center;
    background: #f8d7da;
    border: 1px solid #f1aeb5;
    border-radius: 999px;
    color: #b02a37;
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    padding: 5px 7px;
}

.calendar-day-detail-empty {
    align-items: center;
    background: #fff;
    border: 1px dashed #d8dee4;
    border-radius: 8px;
    color: #6c757d;
    display: flex;
    gap: 10px;
    justify-content: center;
    min-height: 110px;
}

@media (max-width: 768px) {
    .periodic-toolbar {
        grid-template-columns: 1fr;
    }

    .calendar-stats,
    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .calendar-panel {
        overflow-x: auto;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 760px;
    }
}

.report-rich-editor {
    min-height: 420px;
    overflow-y: auto;
    line-height: 1.55;
}

.report-rich-editor:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
    outline: 0;
}

.report-font-select {
    width: 180px;
}

.automatic-mail-color-select {
    width: 130px;
}

.automatic-mail-editor {
    min-height: 260px;
}

.report-format-select {
    width: 130px;
}

.report-rich-editor h1,
.report-rich-editor h2,
.report-rich-editor h3,
.note-detail-content h1,
.note-detail-content h2,
.note-detail-content h3 {
    margin: 0.65rem 0 0.45rem;
}

.report-rich-editor blockquote,
.note-detail-content blockquote {
    border-left: 4px solid #dee2e6;
    color: #6c757d;
    margin: 0.75rem 0;
    padding-left: 1rem;
}

.report-send-form {
    min-width: min(100%, 360px);
}

.note {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.note-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.note h2 {
    margin: 0 0 10px;
}

.note span {
    background: #e8efff;
    color: #2563eb;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    height: fit-content;
}

.note small {
    color: #777;
}

.actions {
    margin-top: 14px;
}

.actions a {
    margin-right: 12px;
    color: #2563eb;
    text-decoration: none;
    font-weight: bold;
}

.empty {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.note-image-left {
    width: 180px;
    flex-shrink: 0;
}

.note-image-left img {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 140px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .note-detail-layout {
        grid-template-columns: 1fr;
    }

    .note-detail-action-group,
    .note-detail-action-group .btn,
    .note-detail-action-group form {
        width: 100%;
    }

    .note-detail-action-group .btn {
        justify-content: center;
    }

    .report-send-form {
        width: 100%;
    }

    .note-image-left {
        width: 100%;
    }

    .note-image-left img,
    .no-image {
        max-height: 220px;
    }
}

/* Notas em grid no desktop */
@media (min-width: 992px) {
    .notes-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px;
    }
}
