body {
    min-height: 100vh;
}

#sidebar-wrapper {
    background:
        linear-gradient(180deg, #f8fbff 0%, #f6f8fc 55%, #f3f5f9 100%);
    box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.06);
    min-width: 240px;
    max-width: 240px;
    padding: 0.85rem 0.75rem;
}

.app-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}

.app-content {
    flex: 1;
    padding: 1.5rem;
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
    }

    #sidebar-wrapper {
        min-width: 100%;
        max-width: 100%;
    }
}

.navbar-brand img {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

.list-group-item.bg-light {
    border-left: 4px solid #0d6efd;
}

#calendar {
    max-width: 100%;
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.fc .fc-button {
    text-transform: none;
}

.fc-event {
    cursor: pointer;
}

#sidebar-wrapper .text-uppercase {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

#sidebar-wrapper .list-group {
    background: transparent;
    gap: 0.25rem;
}

#sidebar-wrapper .collapse {
    margin-bottom: 0.25rem;
}

.sidebar-section-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-left: 4px solid transparent;
    border-radius: 0 !important;
    color: #475467;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    padding-bottom: 0.7rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 0.7rem !important;
    text-align: left;
    transition: background-color 0.18s ease, color 0.18s ease;
    width: 100%;
}

.sidebar-section-toggle__label,
.sidebar-link__content {
    align-items: center;
    display: inline-flex;
    gap: 0.75rem;
}

.sidebar-section-toggle__leading-icon,
.sidebar-link__icon {
    color: #667085;
    font-size: 0.95rem;
    text-align: center;
    width: 1rem;
}

.sidebar-section-toggle:hover {
    background: rgba(255, 255, 255, 0.72);
    color: #182230 !important;
}

.sidebar-section-toggle:hover .sidebar-section-toggle__leading-icon,
.sidebar-link:hover .sidebar-link__icon,
.sidebar-link:focus .sidebar-link__icon {
    color: #0f172a;
}

.sidebar-section-toggle__icon {
    display: inline-block;
    line-height: 1;
    margin-left: 0.5rem;
    font-size: 0.95rem;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
    transform-origin: center;
    width: 0.85rem;
}

.sidebar-section-toggle.collapsed .sidebar-section-toggle__icon {
    transform: rotate(-90deg);
}

.sidebar-link {
    background: transparent;
    border-left: 4px solid transparent;
    border-radius: 0 !important;
    color: #475467;
    font-weight: 500;
    margin: 0;
    padding-bottom: 0.7rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.7rem;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255, 255, 255, 0.72);
    color: #182230;
    transform: none;
}

.sidebar-link.active,
.sidebar-link.active:hover,
.sidebar-link.active:focus {
    background: rgba(255, 255, 255, 0.92);
    border-left-color: #0d6efd;
    color: #0f172a;
    font-weight: 600;
    transform: none;
}

.sidebar-link.active .sidebar-link__icon {
    color: #0d6efd;
}

.search-select {
    position: relative;
}

.search-select__menu {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.9rem;
    box-shadow:
        0 18px 34px rgba(15, 23, 42, 0.12),
        0 3px 10px rgba(15, 23, 42, 0.06);
    left: 0;
    margin-top: 0.35rem;
    max-height: 280px;
    padding: 0.35rem;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1050;
}

.search-select__option,
.search-select__empty {
    color: #182230;
    display: block;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.7rem 0.85rem;
    text-align: left;
    width: 100%;
}

.search-select__option {
    background: transparent;
    border: 0;
    border-radius: 0.7rem;
    font-weight: 500;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.search-select__option + .search-select__option {
    margin-top: 0.15rem;
}

.search-select__option:hover,
.search-select__option:focus {
    background: linear-gradient(135deg, #eef4ff 0%, #f6f9ff 100%);
    color: #0f172a;
    outline: none;
    transform: translateX(2px);
}

.search-select__empty {
    color: #667085;
    padding: 0.85rem 0.9rem;
}

/* DataTables Improvements */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length,
.dataTables_filter {
    margin-bottom: 1.5rem;
}

.dataTables_length label,
.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    font-weight: 500;
}

.dataTables_length select,
.dataTables_filter input {
    margin-left: 0.5rem;
}

.dt-buttons {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dt-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.dataTables_info {
    font-size: 0.875rem;
    color: #6c757d;
    padding: 1rem 0 0.5rem 0;
}

.dataTables_paginate {
    margin-top: 1rem;
}

.dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* DataTables button layout (no custom color styling, using Bootstrap defaults) */
.dt-buttons {
    margin-bottom: 0.75rem;
}

.dt-buttons .btn {
    font-weight: 600;
}

.dashboard-page {
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(25, 135, 84, 0.08), transparent 28%);
}

.dashboard-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 52%, #eef8f3 100%);
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    padding: 1.5rem 1.75rem;
    position: relative;
}

.dashboard-hero::after {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.14), rgba(25, 135, 84, 0.08));
    border-radius: 999px;
    content: "";
    height: 220px;
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
}

.dashboard-hero__content {
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.dashboard-eyebrow,
.dashboard-section__kicker {
    color: #0d6efd;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.dashboard-hero__title {
    color: #122033;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.dashboard-hero__text,
.dashboard-section__text {
    color: #5f6b7a;
    font-size: 0.98rem;
    max-width: 62ch;
}

.dashboard-section {
    margin-top: 2rem;
}

.dashboard-section__header {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-section__title {
    color: #122033;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-section__action {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(18, 32, 51, 0.12);
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-stat {
    color: inherit;
    display: block;
}

.dashboard-stat__card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(18, 32, 51, 0.08);
    border-radius: 0.9rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-stat__card::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.dashboard-stat:hover .dashboard-stat__card,
.dashboard-stat:focus .dashboard-stat__card {
    border-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

.dashboard-stat__card .card-body {
    padding: 1.1rem 1.25rem;
    position: relative;
    z-index: 1;
}

.dashboard-stat__label {
    color: #526170;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.dashboard-stat__value {
    color: #122033;
    font-size: clamp(2.3rem, 4vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.dashboard-stat__card--tasks {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
}

.dashboard-stat__card--events {
    background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 100%);
}

.dashboard-stat__card--pricing {
    background: linear-gradient(135deg, #ffffff 0%, #fff8ef 100%);
}

.dashboard-stat__card--warning {
    background: linear-gradient(135deg, #ffffff 0%, #fff5ef 100%);
}

.dashboard-stat__card--neutral {
    background: linear-gradient(135deg, #ffffff 0%, #f7f8fb 100%);
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        padding: 1.5rem;
    }

    .dashboard-section__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-section__action {
        width: 100%;
    }
}
