body {
    background: #f8f9fa;
}

.app-shell {
    max-width: 1200px;
}

.app-footer {
    align-items: center;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    display: flex;
    font-size: 0.875rem;
    justify-content: space-between;
    margin: 2rem auto 0;
    max-width: 1200px;
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.app-version-badge {
    text-decoration: none;
}

.app-navbar {
    box-shadow: 0 1px 3px rgba(33, 37, 41, 0.06);
    min-height: 64px;
}

.app-navbar-inner {
    padding-left: clamp(1.25rem, 3vw, 3rem);
    padding-right: clamp(1.25rem, 3vw, 3rem);
}

.app-navbar-brand {
    align-items: center;
    display: inline-flex;
}

.app-nav {
    gap: 0.15rem;
}

.app-nav-link {
    border-radius: 0.375rem;
    color: #495057;
    font-weight: 600;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.app-nav-link:hover,
.app-nav-link:focus {
    background: transparent;
    color: #1f6f5c;
}

.app-nav-dropdown,
.app-profile-menu,
.notification-menu {
    border-color: #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 10px 28px rgba(33, 37, 41, 0.12);
}

.app-navbar-actions {
    flex-wrap: wrap;
}

.auth-wrap {
    max-width: 460px;
    margin: 2rem auto;
}

.code-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #212529;
    overflow: auto;
    padding: 0.75rem;
    white-space: pre-wrap;
}

.profile-preview {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    height: 96px;
    object-fit: cover;
    width: 96px;
}

.profile-image-panel {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.profile-image-actions {
    flex: 1;
    min-width: 0;
}

.profile-image-preview {
    flex: 0 0 auto;
}

.profile-preview-fallback {
    align-items: center;
    background: #e9ecef;
    color: #495057;
    display: inline-flex;
    font-size: 2rem;
    font-weight: 700;
    justify-content: center;
    text-transform: uppercase;
}

@media (max-width: 575.98px) {
    .profile-image-panel {
        align-items: stretch;
        flex-direction: column;
    }
}

.nav-avatar {
    border: 1px solid #dee2e6;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 34px;
    object-fit: cover;
    width: 34px;
}

.nav-avatar-fallback {
    align-items: center;
    background: #e9ecef;
    color: #495057;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    text-transform: uppercase;
}

.nav-profile-btn {
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    display: inline-flex;
    gap: 0.5rem;
    max-width: 240px;
    padding: 0.2rem 0.45rem 0.2rem 0.2rem;
}

.nav-profile-btn:hover,
.nav-profile-btn:focus {
    border-color: #c3cad0;
    box-shadow: 0 0 0 0.2rem rgba(31, 111, 92, 0.08);
}

.nav-profile-name {
    color: #343a40;
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile-btn::after {
    border-top-color: #6c757d;
    margin-left: 0;
}

.app-profile-menu {
    min-width: 220px;
}

.app-profile-header {
    color: #212529;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-signout-item {
    border-radius: 0.375rem;
    color: #b02a37;
    width: 100%;
}

.app-signout-all-item {
    border-radius: 0.375rem;
    color: #842029;
    font-weight: 600;
    width: 100%;
}

.app-signout-all-item:hover,
.app-signout-all-item:focus {
    background: #f8d7da;
    color: #842029;
}

.app-signout-item:hover,
.app-signout-item:focus {
    background: #f8d7da;
    color: #842029;
}

.nav-notification-btn {
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.nav-notification-btn:hover,
.nav-notification-btn:focus {
    border-color: #c3cad0;
    box-shadow: 0 0 0 0.2rem rgba(31, 111, 92, 0.08);
}

.nav-bell-icon {
    fill: none;
    height: 18px;
    stroke: #495057;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.notification-menu {
    min-width: 320px;
    padding-bottom: 0.5rem;
}

.notification-menu-item {
    border-top: 1px solid #f1f3f5;
    white-space: normal;
}

.notification-menu-title,
.notification-menu-message,
.notification-menu-meta {
    display: block;
}

.notification-menu-title {
    font-weight: 600;
}

.notification-menu-message {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.3;
}

.notification-menu-meta {
    color: #868e96;
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.notification-unread {
    background: #eef5ff;
}

.pushover-channel-list {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pushover-channel-option {
    align-items: flex-start;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    display: flex;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.65rem 0.75rem;
}

.pushover-channel-option .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

@media (min-width: 992px) {

    .app-nav-hover:hover>.dropdown-menu,
    .app-nav-hover:focus-within>.dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    .app-navbar {
        min-height: auto;
    }

    .app-nav {
        gap: 0.25rem;
        padding-top: 0.75rem;
    }

    .app-nav-dropdown {
        border: 0;
        box-shadow: none;
        display: block;
        margin: 0 0 0.35rem 0.75rem;
        padding: 0;
        position: static;
    }

    .app-navbar-actions {
        align-items: stretch !important;
        border-top: 1px solid #eef0f2;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .nav-profile-btn {
        justify-content: flex-start;
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .notification-menu {
        min-width: min(320px, calc(100vw - 2rem));
    }

    .nav-profile-name {
        max-width: 58vw;
    }
}

.notification-detail-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.notification-detail-item,
.notification-detail-row {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 0.75rem;
}

.notification-detail-list {
    display: grid;
    gap: 0.5rem;
}

.notification-detail-row {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(120px, 180px) 1fr;
}

.notification-detail-label {
    color: #6c757d;
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.notification-detail-value {
    overflow-wrap: anywhere;
}

.migration-card {
    max-width: 720px;
}

.migration-note {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    height: 100%;
    padding: 1rem;
}

.service-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
}

.service-sections {
    display: grid;
    gap: 2.5rem;
}

.service-section-title {
    align-items: center;
    color: #212529;
    display: flex;
    font-size: 0.95rem;
    font-weight: 700;
    gap: 0.5rem;
    margin: 0 0 0.9rem;
}

.service-chicklet {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    box-shadow: 0 2px 6px rgba(33, 37, 41, 0.12);
    color: #212529;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    min-height: 142px;
    padding: 1rem 0.8rem;
    position: relative;
    text-align: center;
    text-decoration: none;
}

.service-chicklet:hover,
.service-chicklet:focus {
    border-color: #cbd3da;
    box-shadow: 0 4px 10px rgba(33, 37, 41, 0.16);
    color: #212529;
}

.service-chicklet-disabled {
    background: #f1f3f5;
    border-color: #d8dde2;
    box-shadow: none;
    color: #6c757d;
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: 0.72;
    width: 100%;
}

.service-chicklet-disabled:hover,
.service-chicklet-disabled:focus {
    border-color: #adb5bd;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.16);
    color: #495057;
}

.service-chicklet-menu {
    color: #6c757d;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
    position: absolute;
    right: 0.65rem;
    top: 0.45rem;
}

.service-chicklet-icon {
    align-items: center;
    background: #e9ecef;
    border-radius: 0.5rem;
    color: #495057;
    display: inline-flex;
    flex: 0 0 54px;
    font-weight: 700;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.service-chicklet-img {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    flex: 0 0 54px;
    height: 54px;
    object-fit: cover;
    width: 54px;
}

.service-chicklet-body {
    display: block;
    min-width: 0;
}

.service-chicklet-name {
    display: block;
    font-weight: 600;
}

.service-chicklet-description {
    color: #6c757d;
    display: block;
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.service-chicklet-slug {
    color: #6c757d;
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.bulk-table-wrap {
    max-height: 70vh;
}

.bulk-table th,
.bulk-table td {
    min-width: 140px;
}

.bulk-table th:first-child,
.bulk-table td:first-child {
    left: 0;
    min-width: 180px;
    position: sticky;
    z-index: 2;
}

.bulk-table td:first-child {
    background: #fff;
}

.bulk-table th:first-child {
    background: #f8f9fa;
}

.bulk-permission-row {
    align-items: center;
    border-top: 1px solid #eef0f2;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.4rem 0;
}

.bulk-permission-system {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.6rem 0.75rem;
}

.bulk-permission-key {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.45rem 0.6rem;
}

.bulk-permission-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.bulk-permission-table td {
    border-color: #eef0f2;
    padding: 0.35rem 0;
}

.bulk-permission-toggle {
    font-weight: 700;
    line-height: 1;
    min-width: 2.25rem;
    width: 2.25rem;
}

.bulk-permission-subrow {
    color: #495057;
    font-size: 0.9rem;
}

.bulk-permission-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
}

.bulk-permission-options .btn {
    min-width: 74px;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.audit-log-table {
    font-size: 0.9rem;
}

.audit-client,
.audit-extra {
    max-width: 280px;
    overflow-wrap: anywhere;
}

.session-date {
    white-space: pre-line;
}

@media (max-width: 575.98px) {
    .bulk-permission-row {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-permission-options {
        justify-content: flex-start;
    }
}
