/* Shared application design system. Keep this layer light and Bootstrap-friendly. */

body {
    color: var(--app-text);
}

.object-detail-link {
    border-bottom: 1px dotted currentColor;
}

.object-detail-card {
    color: #263238;
}

.object-detail-type {
    margin: 0 0 4px;
    color: #607d8b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.object-detail-title {
    margin: 0;
    color: #17324d;
    font-size: 24px;
    font-weight: 700;
}

.object-detail-note {
    margin: 6px 0 18px;
    color: #78909c;
}

.object-detail-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.object-detail-field {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #f8fafb;
}

.object-detail-field dt {
    margin: 0 0 4px;
    color: #78909c;
    font-size: 12px;
    font-weight: 600;
}

.object-detail-field dd {
    margin: 0;
    color: #263238;
    overflow-wrap: anywhere;
}

.object-detail-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e1e8ed;
}

.object-detail-section h3 {
    margin: 0 0 10px;
    color: #17324d;
    font-size: 16px;
    font-weight: 700;
}

.object-detail-section ul {
    margin: 0;
    padding: 0;
}

.object-detail-section li {
    padding: 7px 0;
    border-bottom: 1px solid #edf1f3;
}

.object-detail-page {
    max-width: 1000px;
    margin: 24px auto;
    padding: 28px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(25, 50, 70, .09);
}

.object-detail-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e1e8ed;
}

@media (max-width: 767.98px) {
    .object-detail-fields {
        grid-template-columns: 1fr;
    }

    .object-detail-page {
        margin: 12px;
        padding: 20px;
    }
}

.dropdown-profile {
    top: calc(100% + 6px);
    width: 224px !important;
    max-width: calc(100vw - 16px);
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-md);
}

.dropdown-profile-header {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: linear-gradient(135deg, #2d5ca4 0%, #244d8d 100%);
    color: #fff;
}

.dropdown-profile-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.dropdown-profile-identity {
    min-width: 0;
}

.dropdown-profile-name {
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-profile-type {
    overflow: hidden;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-profile .dropdown-content-body {
    padding: 4px 0;
}

.dropdown-profile .dropdown-content-body li,
.dropdown-profile .dropdown-content-body li:last-child {
    padding: 0;
    border-top: 0;
}

.dropdown-profile .dropdown-content-body li + li {
    border-top: 1px solid #f0f2f5;
}

.dropdown-profile .dropdown-content-body li:hover,
.dropdown-profile .dropdown-content-body li:focus,
.dropdown-profile .dropdown-content-body li.active {
    border-top-color: #f0f2f5;
    background: #f3f6f9;
}

.dropdown-profile .dropdown-content-body li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #4f5d68;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-profile .dropdown-content-body li a:hover,
.dropdown-profile .dropdown-content-body li a:focus,
.dropdown-profile .dropdown-content-body li a.active {
    color: var(--app-primary-dark);
}

.dropdown-profile .dropdown-content-body li a .glyphicon {
    width: 16px;
    flex: 0 0 16px;
    color: #61778b;
    font-size: 13px;
    text-align: center;
}

.header .header-icon.for-bell:hover,
.header .header-icon.for-bell:focus,
.header .header-icon.for-bell.active {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(45, 212, 191, 0.16));
}

.header .header-icon.for-bell .note-count {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 3px 8px rgba(127, 29, 29, 0.24);
}

.my-task-list {
    top: calc(100% + 8px);
    width: min(360px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px);
    max-height: min(68vh, 420px);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: var(--app-radius-lg);
    background:
        radial-gradient(circle at 5% 0, rgba(56, 189, 248, 0.14), transparent 42%),
        radial-gradient(circle at 95% 100%, rgba(45, 212, 191, 0.11), transparent 44%),
        linear-gradient(145deg, #fbfdff 0%, #f4faff 56%, #f7fcfa 100%);
    color: var(--app-text);
    box-shadow: 0 18px 45px rgba(30, 64, 175, 0.2);
}

.my-task-list .dropdown-content-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(249, 253, 255, 0.96);
    backdrop-filter: blur(10px);
}

.my-task-list .dropdown-content-heading span {
    color: #174f86;
    font-size: 13px;
    font-weight: 700;
}

.my-task-list .dropdown-content-body {
    padding: 7px;
}

.my-task-list .dropdown-content-body > ul {
    margin: 0;
    padding: 0;
}

.my-task-list .dropdown-content-body li,
.my-task-list .dropdown-content-body li:last-child {
    margin: 4px 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.my-task-list .dropdown-content-body li > a {
    display: block;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--app-radius-md);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 250, 255, 0.82)) padding-box,
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.24),
            rgba(45, 212, 191, 0.2) 58%,
            rgba(250, 204, 21, 0.16)
        ) border-box;
    color: #496274;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.05);
    text-decoration: none;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.my-task-list .dropdown-content-body li > a:hover,
.my-task-list .dropdown-content-body li > a:focus {
    color: #174f86;
    background:
        linear-gradient(135deg, #eef9ff 0%, #eefdf8 62%, #fffbec 100%) padding-box,
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.6),
            rgba(45, 212, 191, 0.52) 58%,
            rgba(250, 204, 21, 0.42)
        ) border-box;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.my-task-list .notification-content {
    overflow: hidden;
}

.my-task-list .notification-heading {
    overflow: hidden;
    padding-right: 64px;
    color: #36536b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-task-list .notification-timestamp {
    float: right;
    color: #71889b;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
}

.my-task-list .notification-text {
    clear: both;
    padding-top: 4px;
    color: #6b7f8e;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-task-list .more-link {
    width: 100% !important;
    margin-top: 2px;
    color: var(--app-primary-dark);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.my-task-list .my-task-actions {
    display: flex;
    gap: 6px;
}

.my-task-list .my-task-actions .more-link {
    flex: 1 1 0;
    width: auto !important;
}

.app-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.app-page--wide {
    max-width: 1440px;
}

.app-page--full {
    max-width: none;
}

.app-page--detail {
    max-width: 1100px;
}

.face-list-page .app-card.row {
    margin-right: 0;
    margin-left: 0;
}

.face-list-page .app-reset-filter {
    padding-right: 4px;
    padding-left: 4px;
    color: var(--app-muted);
    text-decoration: none;
}

.face-list-page .app-reset-filter:hover,
.face-list-page .app-reset-filter:focus {
    color: var(--app-primary);
    text-decoration: underline;
}

.app-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.app-page-heading {
    min-width: 0;
}

.app-page-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 7px;
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.app-page-title {
    margin: 0;
    color: var(--app-text-strong);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
}

.app-page-description {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--app-muted);
    font-size: 14px;
    line-height: 1.7;
}

.app-page-actions,
.app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.app-page-actions {
    justify-content: flex-end;
}

.app-card {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-card-header,
.app-card-footer {
    padding: 14px 18px;
    background: var(--app-surface-muted);
}

.app-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--app-border);
}

.app-card-header h2,
.app-card-header h3,
.app-card-header h4 {
    margin: 0;
    color: var(--app-text-strong);
    font-weight: 700;
}

.app-card-body {
    padding: 18px;
}

.app-card-footer {
    border-top: 1px solid var(--app-border);
}

.app-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.app-grid {
    display: grid;
    gap: 20px;
}

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

.app-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.app-form-group {
    min-width: 0;
    margin-bottom: 16px;
}

.app-form-group label {
    margin-bottom: 6px;
    color: var(--app-text);
    font-weight: 600;
}

.profile-messages {
    margin-bottom: 16px;
}

.profile-messages .alert {
    margin-bottom: 10px;
}

.profile-card .app-card-header p {
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.6;
}

.profile-account-divider {
    padding: 0 5px;
    color: var(--app-border-strong);
}

.profile-form-field--wide {
    grid-column: 1 / -1;
}

.profile-id-social-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 12px;
    align-items: start;
}

.profile-id-social-type #id_id_social_type {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    min-height: 34px;
    align-items: center;
}

.profile-id-social-type label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    margin: 0;
    font-weight: 400;
}

.profile-id-social-number {
    min-width: 0;
}

.profile-avatar-controls {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.profile-avatar-preview {
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
    border: 4px solid var(--app-surface);
    border-radius: 50%;
    background: var(--app-surface-muted);
    box-shadow: 0 0 0 1px var(--app-border);
    object-fit: cover;
}

.profile-avatar-upload {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-avatar-upload input[type="file"] {
    height: auto;
    padding: 7px 10px;
}

.profile-avatar-edit {
    margin-top: 10px;
}

.profile-avatar-error {
    margin-top: 10px;
    color: var(--app-danger);
    font-size: 12px;
    line-height: 1.55;
}

.profile-avatar-editor-open {
    overflow: hidden;
}

.profile-avatar-modal[hidden] {
    display: none;
}

.profile-avatar-modal {
    position: fixed;
    z-index: 2500;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.profile-avatar-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.profile-avatar-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.profile-avatar-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--app-border);
}

.profile-avatar-dialog-header h2 {
    margin: 0;
    color: var(--app-text-strong);
    font-size: 19px;
}

.profile-avatar-dialog-header p {
    margin: 5px 0 0;
    color: var(--app-muted);
    font-size: 13px;
}

.profile-avatar-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 22px;
    line-height: 1;
}

.profile-avatar-dialog-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 22px;
}

.profile-avatar-stage {
    position: relative;
    width: min(440px, calc(100vw - 72px));
    height: min(440px, calc(100vw - 72px));
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background:
        linear-gradient(45deg, #e9edf2 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(45deg, transparent 75%, #e9edf2 75%) 0 0 / 20px 20px,
        linear-gradient(45deg, transparent 75%, #e9edf2 75%) 10px -10px / 20px 20px,
        linear-gradient(45deg, #e9edf2 25%, #fff 25%) 10px -10px / 20px 20px;
    box-shadow: inset 0 0 0 1px var(--app-border-strong);
    cursor: grab;
    touch-action: none;
}

.profile-avatar-stage.is-dragging {
    cursor: grabbing;
}

.profile-avatar-stage::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background:
        linear-gradient(to right, transparent 33.2%, rgba(255, 255, 255, 0.38) 33.3%,
        rgba(255, 255, 255, 0.38) 33.6%, transparent 33.7%, transparent 66.2%,
        rgba(255, 255, 255, 0.38) 66.3%, rgba(255, 255, 255, 0.38) 66.6%, transparent 66.7%),
        linear-gradient(to bottom, transparent 33.2%, rgba(255, 255, 255, 0.38) 33.3%,
        rgba(255, 255, 255, 0.38) 33.6%, transparent 33.7%, transparent 66.2%,
        rgba(255, 255, 255, 0.38) 66.3%, rgba(255, 255, 255, 0.38) 66.6%, transparent 66.7%);
    content: "";
    pointer-events: none;
}

.profile-avatar-stage img {
    position: absolute;
    z-index: 1;
    max-width: none;
    pointer-events: none;
    user-select: none;
}

.profile-avatar-zoom {
    display: grid;
    grid-template-columns: 36px minmax(150px, 1fr) 36px 48px;
    align-items: center;
    gap: 10px;
    width: min(440px, 100%);
    margin-top: 16px;
}

.profile-avatar-zoom .btn {
    padding: 5px 8px;
}

.profile-avatar-zoom output {
    color: var(--app-muted);
    font-size: 12px;
    text-align: right;
}

.profile-avatar-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 20px;
}

.profile-required {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 11px;
    font-weight: 600;
    vertical-align: 1px;
}

.profile-field-errors {
    margin-top: 6px;
    color: var(--app-danger);
    font-size: 12px;
    line-height: 1.55;
}

.profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.profile-empty-card .app-card-body {
    padding: 46px 24px;
    text-align: center;
}

.profile-empty-card .glyphicon {
    color: var(--app-primary);
    font-size: 34px;
}

.profile-empty-card h2 {
    margin: 16px 0 8px;
    color: var(--app-text-strong);
    font-size: 20px;
    font-weight: 700;
}

.profile-empty-card p {
    margin: 0 auto 20px;
    color: var(--app-muted);
    line-height: 1.7;
}

@media (max-width: 640px) {
    .profile-avatar-controls {
        align-items: flex-start;
        gap: 16px;
    }

    .profile-avatar-preview {
        width: 92px;
        height: 92px;
    }

    .profile-avatar-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .profile-avatar-dialog {
        max-height: calc(100vh - 24px);
    }

    .profile-avatar-zoom {
        grid-template-columns: 34px minmax(90px, 1fr) 34px 44px;
        gap: 7px;
    }
}

.app-help-text {
    margin-top: 5px;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.55;
}

.app-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 4px;
}

.app-choice-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.app-help-list {
    margin: 0 0 16px;
    padding-left: 22px;
    color: var(--app-text);
    line-height: 1.8;
}

.app-help-image {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.app-help-pre {
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--app-text);
    font-family: inherit;
    line-height: 1.85;
    white-space: pre-wrap;
}

.app-help-frame iframe {
    display: block;
    width: 100%;
    height: 78vh;
    min-height: 620px;
    border: 0;
}

.app-detail-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 15px 26px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background:
        radial-gradient(circle at 92% 0%, rgba(122, 168, 156, 0.2), transparent 35%),
        linear-gradient(135deg, var(--app-bg), var(--app-surface-muted));
    box-shadow: var(--app-shadow-md);
}

.app-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, var(--app-primary), var(--app-accent-light));
}

.app-detail-avatar {
    width: 104px;
    height: 104px;
    flex: 0 0 104px;
    border: 4px solid var(--app-bg);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(24, 50, 74, 0.18);
}

.app-detail-avatar {
    object-fit: cover;
    background: var(--ddd);
}

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

.app-detail-type {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.app-detail-title {
    margin: 0;
    color: var(--app-text-strong);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
}

.app-page-hero .app-page-heading {
    flex: 1 1 auto;
}

.app-detail-subtitle {
    margin: 8px 0 0;
    color: var(--app-muted);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.app-detail-readonly {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    color: var(--app-accent);
    font-size: 13px;
    font-weight: 600;
}

.app-detail-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.app-detail-section {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-detail-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 15px 19px;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text-strong);
    font-size: 16px;
    font-weight: 700;
}

.app-detail-section-title .glyphicon {
    color: var(--app-primary);
}

.app-detail-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.app-detail-field {
    min-width: 0;
    padding: 14px 19px;
    border-right: 1px solid var(--app-border);
    border-bottom: 1px solid var(--app-border);
}

.app-detail-field:nth-child(2n) {
    border-right: 0;
}

.app-detail-field:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.app-detail-field dt {
    margin: 0 0 5px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 600;
}

.app-detail-field dd {
    margin: 0;
    color: var(--app-text);
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.app-detail-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.app-detail-footer .btn {
    min-width: 116px;
    padding: 9px 20px;
}

.app-error-shell {
    display: flex;
    min-height: calc(100vh - 180px);
    align-items: center;
    justify-content: center;
    padding: 36px 16px 56px;
}

.app-error-card {
    position: relative;
    width: 100%;
    max-width: 760px;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-md);
}

.app-error-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--app-primary), var(--app-accent), var(--app-accent-light));
}

.app-error-content {
    padding: 52px 52px 44px;
}

.app-error-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.app-error-code-number {
    display: inline-flex;
    min-width: 62px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--app-primary-soft);
    letter-spacing: 0.08em;
}

.app-error-title {
    margin: 0 0 14px;
    color: var(--app-text-strong);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

.app-error-message {
    max-width: 600px;
    margin: 0;
    color: var(--app-muted);
    font-size: 16px;
    line-height: 1.8;
}

.app-error-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 8px 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-muted);
    color: var(--app-muted);
    font-size: 13px;
}

.app-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.app-error-actions .btn {
    min-width: 116px;
    padding: 9px 20px;
}

.app-empty-state {
    padding: 34px 20px;
    border: 1px dashed var(--app-border-strong);
    border-radius: var(--app-radius-md);
    background: var(--app-surface-muted);
    color: var(--app-muted);
    text-align: center;
}

.app-filter-card {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-filter-grid .app-filter-field select {
    max-width: none;
    margin-right: 0;
}

.report-filter-grid .app-filter-field label:not(:first-child) {
    margin-top: 14px;
}

.app-filter-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.app-filter-field--wide {
    grid-column: span 2;
}

.app-filter-field > form {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
}

.app-filter-field label {
    flex: 0 0 auto;
    margin: 0;
    color: var(--app-text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.app-filter-field > input,
.app-filter-field > select,
.app-filter-field > form input,
.app-filter-field > form select,
.app-filter-field > .app-toolbar {
    flex: 1 1 160px;
    width: auto;
    min-width: 0;
    max-width: none;
}

.app-filter-card input.vDateField,
.selectors2 input.vDateField {
    flex: 0 0 128px;
    width: 128px;
    min-width: 0;
    max-width: 128px;
}

.app-filter-field .select2-container {
    flex: 1 1 160px;
    width: 100% !important;
    min-width: 0;
}

.app-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.app-filter-actions .btn {
    min-height: 36px;
}

.app-table-card {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-table-card .table {
    margin-bottom: 0;
}

.app-table-card .table > thead > tr > th {
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
}

.app-table-card .table > tbody > tr > td {
    padding-top: 11px;
    padding-bottom: 11px;
    border-top-color: var(--app-border);
}

.app-table-card .table-hover > tbody > tr:hover {
    background: var(--app-primary-soft);
}

.app-count-column {
    text-align: right;
}

.app-action-column {
    text-align: center;
}

.app-actions-nowrap {
    white-space: nowrap;
}

.app-actions-nowrap .btn,
.app-actions-nowrap form {
    display: inline-flex;
    margin: 0 3px;
}

.app-table-card .dataTables_wrapper {
    padding: 0 18px 16px;
}

.app-table-card .dataTables_filter,
.app-table-card .dataTables_length {
    margin-top: 14px;
}

.app-table-card .dataTables_info,
.app-table-card .dataTables_paginate {
    margin-top: 14px;
}

.app-table-card .pagination > li > a,
.app-table-card .pagination > li > span {
    border-color: var(--app-border);
    color: var(--app-primary);
}

.app-table-card .pagination > .active > a,
.app-table-card .pagination > .active > a:focus,
.app-table-card .pagination > .active > a:hover {
    border-color: var(--app-primary);
    background: var(--app-primary);
    color: #fff;
}

.teaching-fee-results {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.teaching-fee-results .alert {
    margin: 18px;
}

.teaching-fee-results .dataTables_wrapper {
    min-width: 900px;
    padding: 0 16px 16px;
}

.teaching-fee-results table {
    margin-bottom: 0;
}

.pair-overview .panel-group {
    overflow: hidden;
    margin-bottom: 20px;
}

.pair-overview .panel-group > .panel {
    margin: 0;
    border-width: 0 0 1px;
    border-color: var(--app-border);
    border-radius: 0;
    box-shadow: none;
}

.pair-overview .panel-group > .panel:last-child {
    border-bottom: 0;
}

.pair-overview .header-bar .panel-heading,
.pair-overview .footer-bar .panel-heading {
    background: var(--app-surface-muted);
    font-weight: 700;
}

.pair-overview .panel-title {
    margin: 0;
}

.pair-overview .panel-body {
    padding: 14px;
    background: var(--app-surface);
}

.app-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
}

.app-table-wrap .table {
    margin-bottom: 0;
}

.table > thead > tr > th {
    border-bottom-color: var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-weight: 600;
}

.table > tbody > tr > td,
.table > tbody > tr > th {
    border-top-color: var(--app-border);
    vertical-align: middle;
}

.btn {
    border-radius: var(--app-radius-sm);
    font-weight: 600;
}

.btn-primary {
    border-color: var(--app-primary);
    background: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border-color: var(--app-primary-dark);
    background: var(--app-primary-dark);
}

.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    border-color: var(--app-border-strong);
    border-radius: var(--app-radius-sm);
}

.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(75, 127, 149, 0.14);
}

.nav-tabs {
    border-bottom-color: var(--app-border);
}

.nav-tabs > li > a {
    color: var(--app-muted);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    border-color: var(--app-border) var(--app-border) transparent;
    color: var(--app-primary);
    font-weight: 600;
}

.alert {
    border-radius: var(--app-radius-sm);
}

.alert-success {
    border-color: #b9dfc9;
    background: var(--app-success-soft);
    color: var(--app-success);
}

.alert-warning {
    border-color: #efd692;
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.alert-danger {
    border-color: #efc1bb;
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.import-workspace {
    overflow: visible;
}

.import-tabs {
    padding: 12px 18px 0;
    background: var(--app-surface-muted);
}

.import-tabs > li > a {
    padding: 9px 16px;
}

.import-tab-content {
    padding: 22px;
}

.import-notice {
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface-muted);
}

.import-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--app-text-strong);
    font-size: 16px;
    font-weight: 700;
}

.import-section-title .glyphicon {
    color: var(--app-primary);
}

.import-notice ol {
    margin: 0;
    padding-left: 22px;
    color: var(--app-text);
    font-size: 14px;
    line-height: 1.8;
}

.import-notice li {
    list-style: decimal;
}

.import-alert {
    margin: 14px 0;
}

.import-alert p:last-child {
    margin-bottom: 0;
}

.import-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.import-selector {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface-muted);
}

.import-selector label,
.import-file > label,
.import-log label {
    display: block;
    margin-bottom: 7px;
    color: var(--app-text);
    font-weight: 600;
}

.import-selector-control {
    min-width: 0;
    border: 1px solid transparent;
    border-radius: var(--app-radius-sm);
}

.import-selector-control.is-invalid,
.import-file.is-invalid {
    border-color: var(--app-danger);
    box-shadow: 0 0 0 3px var(--app-danger-soft);
}

.import-selector select {
    width: 100%;
    max-width: none;
}

.import-selector .select2-container {
    width: 100% !important;
    max-width: none;
}

.import-selector .select2-selection {
    min-height: 34px;
    border-color: var(--app-border-strong);
    border-radius: var(--app-radius-sm);
}

.import-selector .add-related {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    font-size: 13px;
}

.import-file {
    padding: 18px;
    border: 1px dashed var(--app-border-strong);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
}

.import-file input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
}

.import-submit {
    margin-top: 18px;
}

.import-waiting {
    display: none;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    color: var(--app-muted);
    text-align: center;
}

.import-waiting.is-visible {
    display: flex;
}

.import-waiting img {
    height: 18px;
}

.import-alert {
    margin-top: 14px;
    color: var(--app-danger);
}

.import-hr-sync {
    max-width: 900px;
}

.import-hr-sync code {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    overflow-wrap: anywhere;
}

.import-progress-box {
    display: none;
    margin-top: 16px;
}

#hr_sync_progress_text {
    margin-bottom: 7px;
    color: var(--app-muted);
}

#hr_sync_progress {
    height: 20px;
    margin-bottom: 9px;
}

#hr_sync_status {
    min-height: 22px;
}

.import-status.error,
#error_alert,
.import-hr-sync .error {
    color: var(--app-danger);
}

.import-log {
    margin-top: 18px;
}

#hr_sync_log {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 10px;
    border-color: var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    font-family: Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.import-result-modal .modal-dialog {
    width: calc(100% - 32px);
    max-width: 1180px;
}

.import-result-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-md);
}

.import-result-modal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom-color: var(--app-border);
    background: var(--app-surface-muted);
}

.import-result-heading {
    min-width: 0;
}

.import-result-modal .modal-title {
    color: var(--app-text-strong);
    font-size: 19px;
    font-weight: 700;
}

.import-result-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-height: 22px;
    margin-top: 8px;
    color: var(--app-muted);
    font-size: 13px;
}

.import-result-total,
.import-result-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.import-result-total {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-muted);
}

.import-result-count--success {
    background: var(--app-success-soft);
    color: var(--app-success);
}

.import-result-count--info {
    background: var(--app-primary-soft);
    color: var(--app-primary-dark);
}

.import-result-count--warning {
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.import-result-count--error {
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.import-result-modal .modal-body {
    padding: 0;
}

.import-result-table-wrap {
    max-height: calc(100vh - 250px);
    overflow: auto;
}

.import-result-table {
    min-width: 680px;
    margin: 0;
}

.import-result-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-top: 0;
    background: var(--app-surface-muted);
    color: var(--app-text-strong);
    white-space: nowrap;
}

.import-result-table tbody td {
    color: var(--app-text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.import-result-table tbody td:first-child {
    width: 74px;
    white-space: nowrap;
}

.import-result-table tbody tr.success td {
    background: var(--app-success-soft);
}

.import-result-table tbody tr.info td {
    background: var(--app-primary-soft);
}

.import-result-table tbody tr.warning td {
    background: var(--app-warning-soft);
}

.import-result-table tbody tr.error td,
.import-result-table tbody tr.danger td {
    background: var(--app-danger-soft);
}

.import-result-filtered-empty td {
    padding: 28px 18px !important;
    color: var(--app-muted) !important;
    text-align: center;
}

.import-result-toggle {
    min-width: 112px;
}

.import-result-step-form {
    padding: 18px;
}

.import-result-step-notice {
    padding: 16px 18px 0;
}

.import-result-step-notice .thumbnail {
    margin-bottom: 0;
}

/* Normalize legacy wrappers without imposing a new width or breaking wide tables. */
.containerx,
.containerxx {
    border-color: var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.thumbnail {
    border-color: var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface-muted);
}

.panel {
    border-color: var(--app-border);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-sm);
}

.panel-default > .panel-heading {
    border-color: var(--app-border);
    background: var(--app-surface-muted);
}

.report-page .app-page-header {
    margin-bottom: 16px;
}

.app-report-context {
    padding-top: 14px;
    padding-bottom: 14px;
}

.app-report-browser {
    margin-bottom: 20px;
}

.app-report-browser-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 12px 18px;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
}

.app-report-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.app-report-filter {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 9px 7px 14px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
    color: var(--app-text);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.app-report-filter strong {
    display: inline-flex;
    min-width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(45, 92, 164, 0.1);
    color: var(--app-primary);
    font-size: 12px;
}

.app-report-filter:hover,
.app-report-filter:focus {
    border-color: rgba(45, 92, 164, 0.42);
    box-shadow: 0 5px 14px rgba(30, 64, 175, 0.1);
    color: var(--app-primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.app-report-filter:focus-visible {
    outline: 2px solid rgba(45, 92, 164, 0.38);
    outline-offset: 2px;
}

.app-report-filter.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--app-primary-dark), #3478b8);
    color: #fff;
    box-shadow: 0 7px 18px rgba(30, 64, 175, 0.2);
}

.app-report-filter.is-active strong {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.app-report-filter--pending.is-active {
    background: linear-gradient(135deg, #a66706, #e0a11f);
    box-shadow: 0 7px 18px rgba(180, 112, 8, 0.2);
}

.app-report-filter--progress.is-active {
    background: linear-gradient(135deg, #176e8c, #3c9ab8);
    box-shadow: 0 7px 18px rgba(23, 110, 140, 0.2);
}

.app-report-filter--completed.is-active {
    background: linear-gradient(135deg, #21744a, #43a86e);
    box-shadow: 0 7px 18px rgba(33, 116, 74, 0.2);
}

.app-report-search {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    color: var(--app-muted);
}

.app-report-search:focus-within {
    border-color: rgba(45, 92, 164, 0.58);
    box-shadow: 0 0 0 3px rgba(45, 92, 164, 0.1);
}

.app-report-search input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--app-text);
    font-size: 14px;
}

.app-report-search input::placeholder {
    color: #8a96a1;
}

.app-report-view-meta {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    min-height: 24px;
    color: var(--app-muted);
    font-size: 13px;
}

.app-report-reset {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 700;
}

.app-report-reset:hover,
.app-report-reset:focus {
    color: var(--app-primary-dark);
    text-decoration: underline;
}

.app-report-card-list {
    display: grid;
    gap: 14px;
}

.app-report-entity {
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: var(--app-radius-md);
    background:
        radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.09), transparent 31%) padding-box,
        radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.07), transparent 29%) padding-box,
        linear-gradient(135deg, #ffffff 0%, #f9fcff 56%, #fffdf8 100%) padding-box,
        linear-gradient(
            125deg,
            rgba(56, 189, 248, 0.42),
            rgba(45, 212, 191, 0.32) 38%,
            rgba(250, 204, 21, 0.3) 70%,
            rgba(251, 113, 133, 0.28)
        ) border-box;
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.app-report-entity-header {
    padding: 15px 17px 5px;
    background: transparent;
}

.app-report-entity-heading {
    min-width: 0;
}

.app-report-title-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 7px 10px;
}

.app-report-entity-heading h2 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--app-text-strong);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.app-report-entity-heading p {
    margin: 3px 0 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.app-report-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 12px;
    font-weight: 700;
}

.app-report-status--pending {
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

.app-report-status--progress {
    background: rgba(23, 110, 140, 0.1);
    color: #176e8c;
}

.app-report-status--completed {
    background: var(--app-success-soft);
    color: var(--app-success);
}

.app-report-entity .app-report-steps-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 7px 13px 13px;
    background: transparent;
}

.app-report-entity .app-report-steps-group .step {
    float: none;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 320px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.app-report-entity .app-report-steps-group .step:hover {
    border-color: rgba(45, 92, 164, 0.4);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.08);
    transform: translateY(-1px);
}

.app-report-entity .app-report-steps-group .step_order {
    padding: 6px 9px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.56);
    color: var(--app-muted);
    font-size: 12px;
    text-align: left;
}

.app-report-entity .app-report-steps-group .step_order a {
    color: var(--app-primary);
    font-weight: 600;
}

.app-report-entity .app-report-steps-group .step_detail {
    min-height: 76px;
    margin: 0;
    padding: 8px 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-text);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.app-report-entity .app-report-steps-group .step_detail.completed {
    border: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(234, 246, 239, 0.84));
}

.app-report-entity .app-report-steps-group .task_submission {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-top: 5px;
}

.app-report-entity .app-report-steps-group .task_submission > small {
    color: var(--app-muted);
    font-size: 11px;
}

.app-report-filter-empty {
    margin-top: 14px;
}

[hidden] {
    display: none !important;
}

@media (hover: hover) {
    .app-report-entity:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 34px rgba(30, 64, 175, 0.11), 0 4px 10px rgba(15, 23, 42, 0.05);
    }
}

.app-report-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.app-report-table-wrap .dataTables_wrapper {
    min-width: 880px;
    padding: 12px 16px 16px;
}

.app-report-table-wrap > .table {
    min-width: 880px;
    margin-bottom: 0;
}

.app-report-results {
    min-height: 360px;
    overflow-x: auto;
}

.app-report-paper {
    margin: 0 auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
    padding: 0 15px;
}

.app-report-step-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.app-report-step-list .step {
    float: none;
    flex: 1 1 180px;
    max-width: 240px;
}

.app-report-step-list .step_detail.completed {
    border-color: var(--app-success);
}

.report-config-page {
    padding-bottom: 96px;
}

.report-config-page .editor-card {
    border-color: var(--app-border);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.report-config-page .editor-card-header {
    border-color: var(--app-border);
    background: var(--app-surface-muted);
}

.report-config-page .editor-help,
.report-config-page .field-help {
    color: var(--app-muted);
}

.report-config-detail .report-description {
    margin-bottom: 20px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
}

.report-config-detail .step-panel {
    border-color: var(--app-border);
}

.report-config-detail .step-header {
    border-color: var(--app-border);
    background: var(--app-surface-muted);
}

.timetable-editor-page {
    max-width: 1560px;
}

.timetable-editor-viewport {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    contain: layout paint;
    padding-bottom: 8px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.timetable-editor-viewport > .curriculum {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.timetable-editor-page .app-page-actions {
    flex-wrap: nowrap;
}

.schedule-summary-card p:last-child {
    margin-bottom: 0;
}

.schedule-editor-table-card {
    margin-bottom: 16px;
}

.schedule-editor-toolbar {
    margin-bottom: 24px;
}

.teaching-progress-viewport {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    contain: layout paint;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.teaching-progress-viewport > .curriculum {
    border: 0;
    border-radius: 0;
}

.mode-choice-grid {
    max-width: 980px;
    margin: 0 auto;
}

.mode-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 190px;
    padding: 24px;
    color: var(--app-text);
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mode-choice-card:hover,
.mode-choice-card:focus {
    border-color: var(--app-primary);
    color: var(--app-text);
    text-decoration: none;
    box-shadow: var(--app-shadow-md);
    transform: translateY(-2px);
}

.mode-choice-number {
    flex: 0 0 auto;
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.mode-choice-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
}

.mode-choice-copy strong {
    color: var(--app-text-strong);
    font-size: 20px;
}

.mode-choice-copy span {
    color: var(--app-muted);
    font-size: 14px;
    line-height: 1.75;
}

.mode-choice-card > .glyphicon {
    margin-top: 4px;
    color: var(--app-primary);
}

.clinical-report-actions {
    margin-top: 18px;
}

.clinical-report-steps {
    margin-top: 20px;
}

.clinical-report-steps .import-section-title {
    margin-bottom: 10px;
}

.app-admin-page {
    width: 100%;
    max-width: none;
}

.app-admin-page #container {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.app-admin-page .app-admin-breadcrumbs {
    margin-bottom: 12px;
}

.app-admin-page .app-admin-breadcrumbs .breadcrumbs {
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-muted);
    color: var(--app-muted);
    font-size: 13px;
}

.app-admin-page .app-admin-breadcrumbs a {
    color: var(--app-primary);
    font-weight: 600;
}

.app-admin-page .app-admin-header {
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.app-admin-page .app-page-title {
    font-size: 20px;
    line-height: 1.35;
}

.app-admin-page #content {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.app-admin-page #content-main {
    min-width: 0;
}

.app-admin-page .object-tools {
    display: flex;
    float: none;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.app-admin-page .app-admin-header .object-tools {
    flex: 0 0 auto;
    align-items: center;
    min-height: 34px;
    margin-left: auto;
}

.app-admin-page .object-tools li {
    display: flex;
    align-items: center;
    float: none;
    margin: 0;
}

.app-admin-page .object-tools a,
.app-admin-page .object-tools a:link,
.app-admin-page .object-tools a:visited {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0;
    padding: 7px 13px;
    border: 1px solid var(--app-primary);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 600;
}

.app-admin-page .object-tools a:hover {
    background: var(--app-primary);
    color: #fff;
}

.app-admin-page .object-tools a.addlink {
    background: var(--app-primary);
    color: #fff;
}

.app-admin-page .module {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.app-admin-page .module > caption,
.app-admin-page .module > h2,
.app-admin-page .module > .caption {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text-strong);
    font-weight: 700;
}

.app-admin-page .module > .caption a.section,
.app-admin-page .module > .caption a.section:link,
.app-admin-page .module > .caption a.section:visited {
    color: var(--app-text-strong);
    text-decoration: none;
}

.app-admin-page .module > .caption a.section:hover,
.app-admin-page .module > .caption a.section:focus {
    color: var(--app-primary);
    text-decoration: underline;
}

.app-admin-page #changelist {
    overflow: hidden;
}

.app-admin-page #changelist-search > div {
    display: flex;
    align-items: center;
}

.app-admin-page #changelist-search label {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin: 0 6px 0 0;
    line-height: normal;
}

.app-admin-page #changelist-search img {
    display: block;
}

.app-admin-page #toolbar #searchbar {
    height: 28px;
    margin: 0 10px 0 0;
    padding: 5px 8px;
    line-height: 20px;
    vertical-align: middle;
}

.app-admin-page #toolbar form input[type="submit"] {
    height: 28px;
    padding: 0 12px;
    line-height: normal;
    vertical-align: middle;
}

.app-admin-page #changelist .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.app-admin-page #changelist .actions label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.app-admin-page #changelist .actions select,
.app-admin-page #changelist .actions .button {
    margin: 0;
}

.app-admin-page #changelist .results {
    overflow-x: auto;
}

.app-admin-page #changelist .results table {
    min-width: 760px;
}

.app-admin-page fieldset.module {
    padding: 0 18px 18px;
}

.app-admin-page fieldset.module > h2 {
    margin: 0 -18px 18px;
}

.app-admin-page .submit-row {
    padding: 14px 18px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface-muted);
}

.app-admin-page .related-widget-wrapper-link.related-widget-action,
.app-admin-page .related-widget-wrapper-link.related-widget-action:link,
.app-admin-page .related-widget-wrapper-link.related-widget-action:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--app-muted);
    font-size: 14px;
    line-height: 22px;
    text-decoration: none;
    vertical-align: middle;
    opacity: 1;
}

.app-admin-page .related-widget-wrapper-link.related-widget-action:hover,
.app-admin-page .related-widget-wrapper-link.related-widget-action:focus {
    background: var(--app-surface-muted);
    color: var(--app-primary);
    opacity: 1;
}

.app-admin-page .related-widget-wrapper-link.related-widget-action[hidden] {
    display: none !important;
}

.app-admin-page .app-admin-messages {
    margin: 0 0 16px;
    padding: 0;
}

.app-admin-page .app-admin-messages li {
    margin: 0 0 8px;
    padding: 10px 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

/* Admin login keeps Django's compact, original-width login panel. */
.login .app-admin-breadcrumbs,
.login .app-admin-header {
    display: none;
}

.login .app-admin-page #container {
    width: 28em;
    min-width: 300px;
    max-width: calc(100% - 32px);
    margin: 100px auto;
    padding: 0;
}

.login .app-admin-page #content {
    padding: 20px 20px 0;
}

.login .app-admin-page .submit-row {
    margin: 0;
    padding: 1em 0 0;
    border: 0;
    background: transparent;
    text-align: center;
}

.page-heading,
.editor-heading,
.submission-heading {
    gap: 18px;
}

.page-heading h3,
.editor-heading h3,
.submission-heading h3 {
    color: var(--app-text-strong);
    font-weight: 700;
}

.editor-card,
.step-editor,
.submission-table-wrap {
    border-color: var(--app-border);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-sm);
}

.editor-card-header,
.step-editor > summary {
    border-color: var(--app-border);
    background: var(--app-surface-muted);
}

@media (max-width: 1024px) {
    .login .app-admin-page #container {
        width: auto;
        min-width: 0;
        max-width: 480px;
        margin: 50px auto;
    }
}

@media (max-width: 991.98px) {
    .app-grid--2,
    .app-detail-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .app-page {
        padding: 16px 4px 34px;
    }

    .content-wrap > .main > .container-fluid {
        padding-right: 4px;
        padding-left: 4px;
    }

    .app-page-header {
        flex-direction: column;
    }

    .app-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .app-page-actions .btn {
        flex: 1 1 140px;
    }

    .app-page-title {
        font-size: 22px;
    }

    .app-form-grid {
        grid-template-columns: 1fr;
    }

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

    .app-filter-field--wide {
        grid-column: auto;
    }

    .app-filter-actions .btn {
        flex: 1 1 140px;
    }

    .app-table-card .dataTables_wrapper {
        padding-right: 10px;
        padding-left: 10px;
    }

    .import-tabs {
        padding: 10px 12px 0;
    }

    .import-tab-content {
        padding: 16px 12px;
    }

    .import-selector-grid {
        grid-template-columns: 1fr;
    }

    .import-selector,
    .import-file {
        padding: 12px;
    }

    .import-result-modal .modal-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
    }

    .import-result-table-wrap {
        max-height: calc(100vh - 220px);
    }

    .app-detail-hero {
        align-items: flex-start;
        gap: 16px;
        padding: 28px 20px 24px;
    }

    .app-page-hero {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .app-detail-avatar {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
        border-radius: 17px;
    }

    .app-detail-title {
        font-size: 22px;
    }

    .app-detail-fields {
        grid-template-columns: 1fr;
    }

    .app-detail-field {
        border-right: 0;
    }

    .app-detail-field:nth-last-child(2) {
        border-bottom: 1px solid var(--app-border);
    }

    .app-error-shell {
        min-height: calc(100vh - 130px);
        padding: 20px 8px 36px;
    }

    .app-error-content {
        padding: 40px 24px 30px;
    }

    .app-error-title {
        font-size: 25px;
    }

    .app-error-message {
        font-size: 15px;
    }

    .app-error-actions .btn {
        flex: 1 1 140px;
    }

    .app-report-browser-toolbar {
        grid-template-columns: 1fr;
        gap: 11px;
        padding: 13px;
    }

    .app-report-filter-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-report-filter {
        width: 100%;
    }

    .app-report-view-meta {
        grid-column: auto;
    }

    .app-report-entity-header {
        padding: 13px 14px 4px;
    }

    .report-all-page > .app-page-header {
        display: none;
    }

    .app-report-entity .app-report-steps-group {
        gap: 7px;
        padding: 7px 9px 9px;
    }

    .app-report-entity .app-report-steps-group .step {
        flex: 1 1 calc(33.333% - 5px);
        max-width: none;
    }

    .app-report-table-wrap .dataTables_wrapper,
    .app-report-table-wrap > .table {
        min-width: 760px;
    }

    .app-admin-page .app-admin-breadcrumbs .breadcrumbs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .app-admin-page .object-tools a {
        width: 100%;
        justify-content: center;
    }

    .app-admin-page .app-admin-header .object-tools {
        width: 100%;
        margin-left: 0;
    }

    .app-admin-page .app-admin-header .object-tools li {
        flex: 1 1 auto;
    }

    .app-admin-page #changelist .results table {
        min-width: 700px;
    }

    .report-config-page {
        padding-bottom: 120px;
    }

    .report-config-detail .report-meta dt {
        float: none;
        width: auto;
    }

    .report-config-detail .report-meta dd {
        margin-left: 0;
    }

    .timetable-editor-page .app-page-actions {
        flex-wrap: wrap;
    }

    .mode-choice-grid {
        grid-template-columns: 1fr;
    }

    .mode-choice-card {
        min-height: 0;
        padding: 20px;
    }

    .schedule-editor-toolbar .btn {
        flex: 1 1 150px;
    }

    .containerx,
    .containerxx {
        width: auto;
        margin-right: 10px;
        margin-left: 10px;
        padding-right: 16px;
        padding-left: 16px;
    }
}

/* Glossy application surfaces shared by regular, filter, table and admin pages. */
.app-card:not(.alert),
.app-filter-card,
.app-table-card:not(.alert),
.object-detail-page,
.app-admin-page .module {
    border: 1px solid transparent;
    background:
        radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.10), transparent 34%) padding-box,
        radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.08), transparent 32%) padding-box,
        linear-gradient(135deg, #ffffff 0%, #f9fcff 52%, #fffdf8 100%) padding-box,
        linear-gradient(
            125deg,
            rgba(56, 189, 248, 0.55),
            rgba(45, 212, 191, 0.48) 38%,
            rgba(250, 204, 21, 0.45) 70%,
            rgba(251, 113, 133, 0.42)
        ) border-box;
    box-shadow: var(--app-card-shadow);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.app-card:not(.alert) > .app-card-header,
.app-card:not(.alert) > .app-card-footer,
.app-admin-page .module > caption,
.app-admin-page .module > h2,
.app-admin-page .module > .caption {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.48);
}

.app-table-card .table > thead > tr > th {
    border-bottom-color: rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.54);
}

.app-table-card .table-hover > tbody > tr:hover,
.app-table-card .table-hover > tbody > tr:hover > td {
    background: rgba(255, 255, 255, 0.68);
}

@media (hover: hover) {
    .app-card:not(.alert):hover,
    .app-filter-card:hover,
    .app-table-card:not(.alert):hover,
    .object-detail-page:hover,
    .app-admin-page .module:hover {
        transform: translateY(-2px);
        box-shadow: var(--app-card-shadow-hover);
    }
}

/* Keep the page title centered while preserving the solid dark-blue header. */
.header {
    background: linear-gradient(135deg, #0b2f6b 0%, #701291 55%, #1a4d99 100%);
}

.header .logo {
    background: transparent;
}

.header .system_name {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 50%;
    max-width: 720px;
    margin: 0;
    padding: 0 16px;
    line-height: 50px;
    text-align: center;
    transform: translate(-50%, -50%);
}

.header .pull-left,
.header .pull-right {
    position: relative;
    z-index: 2;
}

.zhixu-footer {
    display: none;
}

/* Sidebar navigation: pastel capsules, animated hover and clear active states. */
.sidebar {
    height: calc(100vh - 50px);
    min-height: 0;
    border-right-color: rgba(56, 189, 248, 0.24) !important;
    background:
        radial-gradient(circle at 15% 0, rgba(56, 189, 248, 0.18), transparent 38%),
        radial-gradient(circle at 90% 100%, rgba(45, 212, 191, 0.14), transparent 36%),
        linear-gradient(180deg, #f9fcff 0%, #f2f8fd 54%, #f5fbf8 100%);
    box-shadow: 8px 0 28px rgba(30, 64, 175, 0.07);
}

.sidebar .nano-content > ul {
    padding: 10px 6px 18px;
}

.sidebar .nano-content > ul > li > ul {
    padding: 4px 0 8px;
    background: transparent;
}

.sidebar .nano-content > ul li > a {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 10px;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        color 160ms ease,
        background 160ms ease;
}

.sidebar .nano-content > ul > li > a {
    margin: 4px 0;
    padding: 9px 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(239, 249, 255, 0.68)) padding-box,
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.28),
            rgba(45, 212, 191, 0.24) 55%,
            rgba(250, 204, 21, 0.20)
        ) border-box;
    color: #4d6374;
    font-weight: 700;
    box-shadow: 0 2px 7px rgba(30, 64, 175, 0.05);
}

.sidebar .nano-content > ul > li > ul > li > a {
    margin: 3px 0;
    padding: 7px 10px;
    background:
        linear-gradient(135deg, rgba(245, 251, 255, 0.84), rgba(245, 253, 250, 0.72)) padding-box,
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.20),
            rgba(45, 212, 191, 0.18) 55%,
            rgba(250, 204, 21, 0.14)
        ) border-box;
    color: #627687;
    font-weight: 400;
    box-shadow: 0 1px 5px rgba(30, 64, 175, 0.035);
}

.sidebar .nano-content > ul li > a::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        110deg,
        transparent 16%,
        rgba(255, 255, 255, 0.58) 46%,
        transparent 76%
    );
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(-120%);
    transition:
        transform 280ms ease,
        opacity 180ms ease;
}

.sidebar .nano-content > ul li > ul li.active > a,
.sidebar .nano-content > ul li > ul li.open > a,
.sidebar .nano-content > ul > li.active > a,
.sidebar .nano-content > ul > li.open > a {
    background:
        linear-gradient(135deg, #eaf7ff 0%, #e8fbf6 58%, #fff9e8 100%) padding-box,
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.72),
            rgba(45, 212, 191, 0.64) 52%,
            rgba(250, 204, 21, 0.58)
        ) border-box;
    color: #174f86;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.12);
}

.sidebar .nano-content > ul li > a:hover,
.sidebar .nano-content > ul li > a:focus-visible {
    color: #164f84;
    background:
        linear-gradient(135deg, #eaf8ff 0%, #e8fbf7 60%, #fff9e9 100%) padding-box,
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.68),
            rgba(45, 212, 191, 0.60) 52%,
            rgba(250, 204, 21, 0.55)
        ) border-box;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
    transform: translateX(3px);
}

.sidebar .nano-content > ul li > a:hover::after,
.sidebar .nano-content > ul li > a:focus-visible::after {
    opacity: 1;
    transform: translateX(120%);
}

.sidebar .nano-content > ul li > a:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.52);
    outline-offset: 2px;
}

.sidebar .nano-content > ul li.active > a::before {
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #38bdf8, #2dd4bf 58%, #facc15);
}

.sidebar .nano-content > ul li > a > .sidebar-collapse-icon {
    color: #6d8496;
}

.sidebar > .nano {
    height: calc(100% - 48px);
}

.sidebar-toggle-bottom {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-top: 1px solid rgba(56, 189, 248, 0.22);
    background: linear-gradient(180deg, rgba(239, 248, 255, 0.92), rgba(226, 243, 250, 0.96));
    color: #174f86;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    touch-action: manipulation;
    white-space: nowrap;
    user-select: none;
}

.sidebar-toggle-icon {
    font-size: 18px;
}

.sidebar-toggle-icon-expand {
    display: none;
}

body.sidebar-hide .sidebar-toggle-icon-collapse {
    display: none;
}

body.sidebar-hide .sidebar-toggle-icon-expand {
    display: inline-block;
}

.sidebar-toggle-bottom:hover,
.sidebar-toggle-bottom:focus-visible {
    background: linear-gradient(180deg, rgba(226, 244, 255, 0.98), rgba(216, 241, 247, 1));
    color: #0f3f73;
    outline: none;
}

.sidebar-hide .sidebar,
.open-sidebar.sidebar-hide .sidebar {
    width: 9px;
    overflow: visible;
}

.sidebar-hide .sidebar.sidebar-shrink ~ .content-wrap {
    margin-left: 9px;
}

.sidebar-hide .sidebar-toggle-bottom {
    right: auto;
    width: 36px;
    border-radius: 0 10px 10px 0;
    box-shadow: 4px 0 12px rgba(30, 64, 175, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    body.sidebar-hide .sidebar:hover {
        width: 170px;
        z-index: 110;
        overflow: visible;
        box-shadow: 10px 0 30px rgba(30, 64, 175, 0.16);
    }

    body.sidebar-hide .sidebar:hover .nano-content > ul > li.open > ul {
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 767.98px) {
    .header .pull-left,
    .sidebar {
        display: none !important;
    }

    .header .system_name {
        position: relative;
        top: auto;
        left: auto;
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
        margin: 0;
        padding: 0 8px 0 12px;
        line-height: 50px;
        text-align: left;
        transform: none;
    }

    .header .system_name a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header .pull-right {
        flex: 0 0 auto;
        margin-left: auto !important;
    }

    .my-task-list {
        position: fixed;
        top: 58px;
        right: 8px;
        left: 8px;
        width: auto !important;
        max-width: none;
        max-height: calc(100vh - 68px);
    }

    .sidebar.sidebar-shrink ~ .content-wrap,
    .sidebar-hide .sidebar.sidebar-shrink ~ .content-wrap {
        margin-left: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-card:not(.alert),
    .app-filter-card,
    .app-table-card:not(.alert),
    .object-detail-page,
    .app-admin-page .module,
    .sidebar .nano-content > ul li > a,
    .sidebar .nano-content > ul li > a::after {
        transition: none;
    }

    .app-report-filter,
    .app-report-entity,
    .app-report-entity .app-report-steps-group .step {
        transition: none;
    }
}
