.hd-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hd-hero {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #38bdf8 100%);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.hd-hero::before,
.hd-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.hd-hero::before {
    width: 18rem;
    height: 18rem;
    top: -8rem;
    right: -5rem;
}

.hd-hero::after {
    width: 12rem;
    height: 12rem;
    bottom: -5rem;
    left: -3rem;
}

.hd-hero .card-body {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.hd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hd-hero-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.8rem, 2.3vw, 2.75rem);
    line-height: 1.1;
}

.hd-hero-copy {
    margin: 0;
    max-width: 42rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
}

.hd-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
}

.hd-hero-stat {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hd-hero-stat-label {
    display: block;
    margin-bottom: 0.3rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
}

.hd-hero-stat-value {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
}

.hd-grid {
    display: grid;
    gap: 1.5rem;
}

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

.hd-card {
    border: 1px solid #e2e8f0;
    border-radius: 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.hd-card .card-body,
.hd-card .card-header {
    position: relative;
    z-index: 1;
}

.hd-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hd-card-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 700;
}

.hd-card-subtitle {
    margin: 0.35rem 0 0;
    color: #64748b;
}

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

.hd-stat-card {
    padding: 1.2rem;
    border: 1px solid #dbeafe;
    border-radius: 1.1rem;
    background: #ffffff;
}

.hd-stat-card.is-soft {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.hd-stat-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
}

.hd-stat-value {
    margin-top: 0.75rem;
    color: #0f172a;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
}

.hd-stat-note {
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.85rem;
}

.hd-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hd-avatar {
    width: 4.5rem;
    height: 4.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.35rem;
    background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
    color: #1d4ed8;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.1);
}

.hd-profile-name {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}

.hd-profile-meta {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.hd-detail-list {
    display: grid;
    gap: 1rem;
}

.hd-detail-item {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.hd-detail-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hd-detail-value {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
    word-break: break-word;
}

.hd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hd-badge-status-open,
.hd-badge-priority-low,
.hd-badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.hd-badge-status-in_progress,
.hd-badge-priority-medium,
.hd-badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.hd-badge-status-done,
.hd-badge-success {
    background: #dcfce7;
    color: #15803d;
}

.hd-badge-status-closed,
.hd-badge-priority-high,
.hd-badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.hd-note-list {
    display: grid;
    gap: 0.85rem;
}

.hd-note-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.hd-note-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
}

.hd-note-title {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.hd-note-copy {
    margin: 0.2rem 0 0;
    color: #64748b;
}

.hd-filter-panel {
    padding: 1.2rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
    border: 1px solid #dbeafe;
}

.hd-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hd-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
}

.hd-pill strong {
    color: #0f172a;
}

.hd-table-wrap {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

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

.hd-table-wrap .table > :not(caption) > * > * {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.hd-table-wrap .table thead th {
    border-bottom-width: 1px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hd-table-cell-title {
    color: #0f172a;
    font-weight: 700;
}

.hd-table-cell-meta {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.82rem;
}

.hd-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hd-empty {
    padding: 2rem;
    border: 1px dashed #bfdbfe;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
    text-align: center;
}

.hd-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
}

.hd-notification-list {
    display: grid;
    gap: 1rem;
}

.hd-notification-item {
    display: flex;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hd-notification-item.is-unread {
    border-color: #93c5fd;
    box-shadow: 0 16px 30px rgba(59, 130, 246, 0.1);
}

.hd-notification-item:hover {
    transform: translateY(-2px);
}

.hd-notification-icon {
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
}

.hd-notification-title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.hd-notification-body {
    margin: 0.4rem 0 0;
    color: #475569;
}

.hd-notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.8rem;
    color: #64748b;
    font-size: 0.82rem;
}

.hd-progress-list {
    display: grid;
    gap: 1rem;
}

.hd-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.hd-progress-bar {
    height: 0.7rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.hd-progress-value {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
}

.hd-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.hd-shortcut {
    display: block;
    padding: 1.2rem;
    border-radius: 1.15rem;
    border: 1px solid #dbeafe;
    background: #ffffff;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hd-shortcut:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.hd-shortcut-title {
    margin: 0.75rem 0 0.3rem;
    color: #0f172a;
    font-weight: 700;
}

.hd-shortcut-copy {
    margin: 0;
    color: #64748b;
}

.hd-auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #eef6ff 45%, #f8fafc 100%);
}

.hd-auth-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hd-auth-brand {
    text-align: center;
}

.hd-auth-title {
    margin: 0.85rem 0 0.35rem;
    color: #0f172a;
    font-size: 2rem;
    font-weight: 800;
}

.hd-auth-copy {
    margin: 0;
    color: #64748b;
}

.hd-auth-panel {
    border: 1px solid #dbeafe;
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(16px);
}

.hd-auth-footer {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

.hd-ticket-description {
    padding: 1.2rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    line-height: 1.75;
}

.hd-timeline {
    display: grid;
    gap: 1rem;
}

.hd-timeline-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: flex-start;
}

.hd-timeline-dot {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}

.hd-timeline-card {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.hd-timeline-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
}

.hd-timeline-meta {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.82rem;
}

.hd-timeline-copy {
    margin-top: 0.6rem;
    color: #475569;
    line-height: 1.7;
}

.hd-timeline-status {
    margin-top: 0.6rem;
    color: #64748b;
    font-size: 0.82rem;
}

.hd-sticky-card {
    position: sticky;
    top: 1.5rem;
}

.flatpickr-calendar {
    border: 1px solid #dbeafe;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange,
.flatpickr-day.today.inRange,
.flatpickr-day.prevMonthDay.today.inRange,
.flatpickr-day.nextMonthDay.today.inRange,
.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day:focus,
.flatpickr-day.prevMonthDay:focus,
.flatpickr-day.nextMonthDay:focus {
    background: #eff6ff;
    border-color: #eff6ff;
}

[data-bs-theme="dark"] .hd-card {
    border-color: #334155;
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

[data-bs-theme="dark"] .hd-card-title,
[data-bs-theme="dark"] .hd-table-cell-title,
[data-bs-theme="dark"] .hd-detail-value,
[data-bs-theme="dark"] .hd-note-title,
[data-bs-theme="dark"] .hd-notification-title,
[data-bs-theme="dark"] .hd-timeline-title,
[data-bs-theme="dark"] .hd-stat-value,
[data-bs-theme="dark"] .hd-shortcut-title,
[data-bs-theme="dark"] .hd-auth-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .hd-card-subtitle,
[data-bs-theme="dark"] .hd-stat-note,
[data-bs-theme="dark"] .hd-note-copy,
[data-bs-theme="dark"] .hd-section-muted,
[data-bs-theme="dark"] .hd-detail-label,
[data-bs-theme="dark"] .hd-notification-body,
[data-bs-theme="dark"] .hd-notification-meta,
[data-bs-theme="dark"] .hd-timeline-meta,
[data-bs-theme="dark"] .hd-timeline-copy,
[data-bs-theme="dark"] .hd-timeline-status,
[data-bs-theme="dark"] .hd-auth-copy,
[data-bs-theme="dark"] .hd-auth-footer,
[data-bs-theme="dark"] .hd-pill,
[data-bs-theme="dark"] .hd-table-cell-meta {
    color: #94a3b8;
}

[data-bs-theme="dark"] .hd-stat-card,
[data-bs-theme="dark"] .hd-detail-item,
[data-bs-theme="dark"] .hd-notification-item,
[data-bs-theme="dark"] .hd-timeline-card,
[data-bs-theme="dark"] .hd-ticket-description,
[data-bs-theme="dark"] .hd-shortcut,
[data-bs-theme="dark"] .hd-auth-panel {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.82);
}

[data-bs-theme="dark"] .hd-stat-card.is-soft,
[data-bs-theme="dark"] .hd-filter-panel,
[data-bs-theme="dark"] .hd-empty {
    border-color: #1d4ed8;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
}

[data-bs-theme="dark"] .hd-pill {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .hd-pill strong {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .hd-note-icon,
[data-bs-theme="dark"] .hd-empty-icon,
[data-bs-theme="dark"] .hd-timeline-dot {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

[data-bs-theme="dark"] .hd-avatar {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(29, 78, 216, 0.35) 100%);
    color: #bfdbfe;
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

[data-bs-theme="dark"] .hd-table-wrap {
    border-color: #334155;
    background: #0f172a;
}

[data-bs-theme="dark"] .hd-table-wrap .table thead th {
    background: #111827;
    color: #94a3b8;
}

[data-bs-theme="dark"] .hd-table-wrap .table > :not(caption) > * > * {
    border-color: #1e293b;
}

[data-bs-theme="dark"] .hd-auth-shell {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 28%),
        linear-gradient(135deg, #020617 0%, #0f172a 55%, #111827 100%);
}

[data-bs-theme="dark"] .flatpickr-calendar {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
[data-bs-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
[data-bs-theme="dark"] span.flatpickr-weekday,
[data-bs-theme="dark"] .flatpickr-weekdays,
[data-bs-theme="dark"] .flatpickr-day,
[data-bs-theme="dark"] .flatpickr-time input,
[data-bs-theme="dark"] .numInputWrapper span.arrowUp:after,
[data-bs-theme="dark"] .numInputWrapper span.arrowDown:after {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .flatpickr-day,
[data-bs-theme="dark"] .flatpickr-day.prevMonthDay,
[data-bs-theme="dark"] .flatpickr-day.nextMonthDay {
    border-color: transparent;
}

[data-bs-theme="dark"] .flatpickr-day:hover,
[data-bs-theme="dark"] .flatpickr-day:focus,
[data-bs-theme="dark"] .flatpickr-day.prevMonthDay:hover,
[data-bs-theme="dark"] .flatpickr-day.nextMonthDay:hover {
    background: #1e293b;
    border-color: #1e293b;
}

[data-bs-theme="dark"] .flatpickr-day.inRange,
[data-bs-theme="dark"] .flatpickr-day.prevMonthDay.inRange,
[data-bs-theme="dark"] .flatpickr-day.nextMonthDay.inRange {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.18);
}

[data-bs-theme="dark"] .hd-form-shell .form-control,
[data-bs-theme="dark"] .hd-form-shell .form-select,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
    border-color: #334155;
    background: #0f172a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dataTables_wrapper,
[data-bs-theme="dark"] .dataTables_info,
[data-bs-theme="dark"] .dataTables_paginate,
[data-bs-theme="dark"] .fw-semibold.text-gray-900 {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .page-link {
    background-color: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
}

.hd-form-shell .form-control,
.hd-form-shell .form-select,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-color: #cbd5e1;
    border-radius: 0.9rem;
    min-height: 2.9rem;
}

.hd-form-shell .form-control:focus,
.hd-form-shell .form-select:focus,
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.16);
}

.hd-form-shell .form-label {
    color: #334155;
    font-weight: 700;
}

.hd-section-muted {
    color: #64748b;
}

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

    .hd-hero .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hd-hero-title {
        font-size: 1.65rem;
    }

    .hd-card-header,
    .hd-notification-item,
    .hd-profile {
        flex-direction: column;
        align-items: flex-start;
    }

    .hd-action-row,
    .hd-pill-row {
        width: 100%;
    }

    .hd-timeline-item {
        grid-template-columns: 1fr;
    }

    .hd-sticky-card {
        position: static;
    }
}