:root {
    --death-blue: #123f82;
    --death-blue-dark: #062754;
    --death-blue-soft: #eef5ff;
    --death-line: #dce7f7;
    --death-text: #102344;
    --death-muted: #61708a;
    --death-shadow: 0 22px 55px rgba(12, 41, 87, 0.13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--death-text);
    font-family: Quicksand, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(35, 102, 190, 0.12), transparent 26%),
        linear-gradient(180deg, #f4f8ff 0%, #edf4fd 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.deceased-container {
    width: 100%;
    margin: 0 auto;
}

.deceased-page {
    font-family: Quicksand, sans-serif;
    background: #eef3f9;
}

.deceased-page *:not(i),
.deceased-page button,
.deceased-page input,
.deceased-page select {
    font-family: Quicksand, sans-serif;
}

.deceased-site-header .logo-text,
.deceased-site-header .logo-text * {
    font-family: Cinzel, serif;
}

.deceased-site-header.events-header-wrapper {
    min-height: 294px;
}

.deceased-page-container {
    padding: 30px 0 70px;
    background: #eef3f9;
}

.deceased-page .inner-page__wrapper {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.deceased-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px 28px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(16, 56, 111, 0.08);
}

.deceased-page-heading h1 {
    margin: 0 0 5px;
    color: #102f66;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.1;
}

.deceased-page-heading p {
    margin: 0;
    color: #516383;
    font-size: 16px;
    font-weight: 700;
}

.deceased-page .bread-links {
    width: auto !important;
    min-width: 0;
    flex: 1 1 auto;
}

.deceased-page .bread-links li,
.deceased-page .bread-links a {
    width: auto !important;
    height: auto !important;
    min-width: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

.deceased-page .bread-links li {
    display: inline-flex !important;
    align-items: center;
}

.deceased-hero {
    position: relative;
    min-height: 306px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(4, 34, 75, 0.95) 0%, rgba(8, 52, 107, 0.78) 42%, rgba(8, 37, 80, 0.38) 70%, rgba(5, 24, 52, 0.82) 100%),
        url("/assets/images/deceased-hero.png") center / cover no-repeat;
}

.deceased-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 96px;
    background: linear-gradient(180deg, transparent, rgba(3, 23, 52, 0.32));
}

.deceased-hero__inner {
    position: relative;
    z-index: 1;
    padding: 38px 0 96px;
}

.deceased-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.82);
    font-family: Poppins, sans-serif;
    font-size: 21px;
    font-weight: 600;
}

.deceased-breadcrumb span {
    color: #fff;
    font-weight: 800;
}

.deceased-hero__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
}

.deceased-hero h1 {
    margin: 0 0 6px;
    color: #fff;
    font-family: Poppins, sans-serif;
    font-size: 58px;
    font-weight: 900;
    line-height: 1.1;
}

.deceased-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 22px;
    font-weight: 700;
}

.today-card {
    display: grid;
    place-items: center;
    min-width: 176px;
    min-height: 120px;
    padding: 16px 24px;
    border-radius: 16px;
    color: #fff;
    background: #071b3f;
    box-shadow: 0 18px 36px rgba(7, 27, 63, 0.18);
    text-align: center;
}

.today-card i {
    font-size: 28px;
}

.today-card span,
.today-card em {
    font-size: 15px;
    font-style: normal;
    font-weight: 800;
}

.today-card strong {
    margin-top: 4px;
    font-size: 38px;
    font-weight: 900;
    line-height: 0.95;
}

.deceased-shell {
    position: relative;
    margin-top: 0;
    padding-bottom: 56px;
}

.deceased-filter {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(300px, 1.35fr) minmax(210px, 0.85fr) minmax(210px, 0.85fr) minmax(250px, 0.95fr) minmax(250px, 0.95fr);
    gap: 24px;
    align-items: end;
    padding: 30px 32px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--death-shadow);
    backdrop-filter: blur(14px);
}

.deceased-filter label {
    display: grid;
    gap: 10px;
    color: #152b54;
    font-size: 16px;
    font-weight: 800;
}

.field-with-icon,
.select-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    overflow: hidden;
    border: 1px solid #d7e3f4;
    border-radius: 9px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 9px 20px rgba(21, 55, 105, 0.08);
}

.field-with-icon > i,
.select-with-icon > i {
    width: 58px;
    flex: 0 0 58px;
    color: var(--death-blue);
    text-align: center;
    font-size: 21px;
}

.field-with-icon input,
.select-with-icon select {
    width: 100%;
    height: 58px;
    border: 0;
    outline: 0;
    color: #1c2a42;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
}

.field-with-icon input::placeholder {
    color: #8e9ab0;
}

.field-with-icon button {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border: 0;
    color: var(--death-blue);
    background: transparent;
    cursor: pointer;
    font-size: 22px;
}

.filter-actions,
.print-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.filter-actions a,
.filter-actions button,
.print-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 22px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #1f2634;
    box-shadow: 0 10px 24px rgba(20, 54, 104, 0.12);
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.filter-actions .search-btn {
    color: #fff;
    background: linear-gradient(135deg, #164d9d, #0e3977);
}

.print-actions button:first-child {
    color: #a9151c;
}

.deceased-summary {
    display: grid;
    grid-template-columns: minmax(660px, 2fr) repeat(4, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    margin: 8px 0 6px;
}

.period-tabs {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 15px 36px rgba(18, 60, 119, 0.11);
}

.period-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 52px;
    padding: 0 24px;
    border: 1px solid #dbe6f6;
    border-radius: 9px;
    color: #17243d;
    background: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(13, 52, 104, 0.08);
}

.period-tabs a.active {
    color: #fff;
    border-color: #164d9d;
    background: linear-gradient(135deg, #1d63c0, #0d3c7d);
}

.metric-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px 16px;
    min-height: 86px;
    padding: 6px 10px;
    border: 1px solid rgba(22, 77, 157, 0.08);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(16, 56, 111, 0.09);
}

.metric-card i {
    /* grid-row: span 3; */
    font-size: 34px;
}

.metric-card span,
.metric-card em {
    color: #152b54;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.metric-card strong {
    color: #050b17;
    font-size: 31px;
    font-weight: 900;
    line-height: 0.9;
}

.metric-card.blue {
    background: #eaf3ff;
}

.metric-card.blue i {
    color: #185bbe;
}

.metric-card.green {
    background: #dff8ed;
}

.metric-card.green i {
    color: #14aa67;
}

.metric-card.orange {
    background: #ffe7d1;
}

.metric-card.orange i {
    color: #ef8812;
}

.metric-card.purple {
    background: #efe2ff;
}

.metric-card.purple i {
    color: #7a33cc;
}

.deceased-table-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--death-shadow);
}

.deceased-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.deceased-table th {
    height: 50px;
    padding: 0 22px;
    color: #fff;
    background: #082b61;
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.deceased-table th i {
    margin-left: 4px;
    opacity: 0.62;
}

.deceased-table td {
    min-height: 64px;
    padding: 12px 22px;
    border-right: 1px solid #dfe8f7;
    border-bottom: 1px solid #dfe8f7;
    color: #121b2c;
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}

.deceased-table tbody tr:nth-child(odd) td {
    background: #f3f7ff;
}

.deceased-table tbody tr:nth-child(even) td {
    background: #fff;
}

.deceased-table td:last-child,
.deceased-table th:last-child {
    border-right: 0;
}

.ribbon-col {
    width: 58px;
    text-align: center;
}

.ribbon-col i {
    color: #05070a;
    font-size: 27px;
}

.deceased-table td span {
    display: block;
    margin-top: 2px;
    color: #40506f;
    font-size: 13px;
    font-weight: 700;
}

.person-cell {
    display: flex;
    align-items: center;
    gap: 18px;
}

.avatar {
    display: grid !important;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 2px solid #d5dfef;
    border-radius: 50%;
    color: #7e8ca3;
    background: #f1f5fb;
    box-shadow: inset 0 -6px 14px rgba(14, 39, 76, 0.08);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mosque-icon {
    margin-right: 12px;
    color: #134b9a;
    font-size: 22px;
}

.time-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 96px;
    min-height: 35px;
    margin: 0 !important;
    border-radius: 999px;
    font-size: 15px !important;
    font-weight: 800 !important;
}

.time-pill.green {
    color: #10995d !important;
    background: #e6faee;
    border: 1px solid #c7f0d8;
}

.time-pill.orange {
    color: #f08212 !important;
    background: #fff0df;
    border: 1px solid #ffd6ad;
}

.detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #0f4da1;
    background: #fff;
    box-shadow: 0 8px 18px rgba(14, 54, 111, 0.16);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.empty-row {
    height: 86px;
    text-align: center;
}

.deceased-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    padding: 20px 28px;
    background: #fff;
}

.page-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.page-links a,
.page-links span {
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    border: 1px solid #d9e5f5;
    border-radius: 7px;
    color: #183766;
    background: #fff;
    font-family: Poppins, sans-serif;
    font-weight: 800;
}

.page-links a.active {
    color: #fff;
    border-color: #0e438c;
    background: #124a99;
}

.record-count,
.deceased-pagination form {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #425477;
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 800;
}

.deceased-pagination select {
    width: 88px;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #d9e5f5;
    border-radius: 8px;
    color: #183766;
    background: #fff;
    font-weight: 800;
}

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

.deceased-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(4, 18, 40, 0.58);
    backdrop-filter: blur(5px);
}

.deceased-modal__panel {
    position: relative;
    width: min(560px, 100%);
    padding: 34px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.22);
}

.deceased-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: #163d78;
    background: #eef4fc;
    cursor: pointer;
}

.deceased-modal__ribbon {
    color: #06080d;
    font-size: 36px;
}

.deceased-modal h2 {
    margin: 12px 0 20px;
    color: #11274d;
    font-family: Poppins, sans-serif;
    font-size: 27px;
    font-weight: 900;
}

.deceased-modal dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px 18px;
    margin: 0 0 20px;
}

.deceased-modal dt,
.deceased-modal dd {
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: 14px;
}

.deceased-modal dt {
    color: #62718c;
    font-weight: 700;
}

.deceased-modal dd {
    color: #17243d;
    font-weight: 800;
}

.deceased-modal p {
    margin: 0;
    color: #465774;
    line-height: 1.7;
}

.deceased-page *:not(i) {
    font-family: Quicksand, sans-serif !important;
}

.deceased-site-header .logo-text,
.deceased-site-header .logo-text * {
    font-family: Cinzel, serif !important;
}

@media (max-width: 1500px) {
    .deceased-container {
        width: 100%;
    }

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

    .period-tabs,
    .print-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .deceased-container {
        width: 100%;
    }

    .deceased-hero {
        min-height: 360px;
    }

    .deceased-hero__content {
        align-items: flex-start;
        flex-direction: column;
    }

    .deceased-hero h1 {
        font-size: 42px;
    }

    .deceased-hero p {
        font-size: 18px;
    }

    .deceased-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .deceased-filter,
    .deceased-summary {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .period-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .deceased-table-card {
        overflow-x: auto;
    }

    .deceased-table {
        min-width: 1120px;
    }

    .deceased-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .deceased-breadcrumb {
        font-size: 16px;
    }

    .deceased-filter {
        padding: 20px;
    }

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

    .today-card {
        min-width: 190px;
    }

    .deceased-modal dl {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: #fff;
    }

    .deceased-filter,
    .period-tabs,
    .print-actions,
    .detail-btn,
    .deceased-modal {
        display: none !important;
    }

    .deceased-shell {
        margin-top: 0;
    }

    .deceased-table-card {
        box-shadow: none;
    }
}
