/* AsetMe custom CSS block 1 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
.hidden { display: none !important; }
.hidden-screen { display: none !important; }
        .nav-active { color: #1e40af; }
        .nav-active .nav-icon-bg { background: #dbeafe; }

        .app-container { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
        .app-header { height: 60px; flex-shrink: 0; }
        .app-main { flex: 1; overflow-y: auto; padding-bottom: 70px; }
        .app-footer { position: fixed; bottom: 0; left: 0; right: 0; height: 70px; background: white; border-top: 1px solid #e2e8f0; z-index: 40; }

        /* MODAL OVERLAY - positioned between header and footer */
        .modal-overlay {
            position: fixed;
            top: 60px;
            left: 0;
            right: 0;
            bottom: 70px;
            background: rgba(0,0,0,0.5);
            z-index: 50;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px;
        }

        /* MODAL CARD - flex column with fixed max height */
        .modal-card {
            background: #f8fafc;
            border-radius: 20px;
            width: 100%;
            max-width: 400px;
            max-height: 100%;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
            overflow: hidden;
        }

        .modal-card-header {
            background: white;
            padding: 16px;
            border-bottom: 1px solid #e2e8f0;
            flex: 0 0 auto;
        }

        /* BODY - scrollable area */
        .modal-card-body {
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 16px;
            -webkit-overflow-scrolling: touch;
            min-height: 0;
        }

        .modal-card-footer {
            background: white;
            padding: 12px 16px;
            border-top: 1px solid #e2e8f0;
            flex: 0 0 auto;
        }

        .modal-card-sm { max-width: 320px; }

/* AsetMe custom CSS block 2 */
/* ============================================ */
/* COMPACT MOBILE-FRIENDLY DESIGN */
/* ============================================ */

/* Base font size smaller */
html { font-size: 14px; }
body { font-size: 12px; }

/* Compact text sizes */
.text-7px { font-size: 7px !important; }
.text-8px { font-size: 8px !important; }
.text-9px { font-size: 9px !important; }
.text-10px { font-size: 10px !important; }
.text-11px { font-size: 11px !important; }

/* Headers smaller */
h1 { font-size: 18px !important; }
h2 { font-size: 16px !important; }
h3 { font-size: 14px !important; }
h4 { font-size: 12px !important; }

/* Form inputs compact */
input, select, textarea {
    font-size: 12px !important;
    padding: 8px 10px !important;
}

/* Buttons compact */
button {
    font-size: 11px !important;
}

/* Modal compact */
.modal-card {
    max-width: 360px !important;
    margin: 0 12px;
}
.modal-card-header {
    padding: 12px 14px !important;
}
.modal-card-body {
    padding: 12px 14px !important;
}
.modal-card-footer {
    padding: 10px 14px !important;
}

/* Cards and containers compact */
.rounded-2xl { border-radius: 12px !important; }
.rounded-xl { border-radius: 10px !important; }
.rounded-lg { border-radius: 8px !important; }

/* Spacing compact */
.p-4 { padding: 12px !important; }
.p-3 { padding: 10px !important; }
.p-2 { padding: 6px !important; }
.px-4 { padding-left: 12px !important; padding-right: 12px !important; }
.py-3 { padding-top: 10px !important; padding-bottom: 10px !important; }
.py-2 { padding-top: 6px !important; padding-bottom: 6px !important; }
.gap-4 { gap: 12px !important; }
.gap-3 { gap: 10px !important; }
.gap-2 { gap: 6px !important; }
.space-y-4 > * + * { margin-top: 12px !important; }
.space-y-3 > * + * { margin-top: 10px !important; }
.space-y-2 > * + * { margin-top: 6px !important; }
.mb-4 { margin-bottom: 12px !important; }
.mb-3 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 6px !important; }

/* Table compact */
table th, table td {
    padding: 6px 8px !important;
    font-size: 10px !important;
}

/* Navigation bar compact */
nav, .nav-mobile {
    padding: 6px 0 !important;
}
.nav-btn-mobile {
    font-size: 9px !important;
}
.nav-icon-bg {
    width: 28px !important;
    height: 28px !important;
}
.nav-icon-bg i, .nav-icon-bg svg {
    width: 14px !important;
    height: 14px !important;
}

/* Header compact */
header, .app-header {
    padding: 10px 12px !important;
}
.app-header h1 {
    font-size: 14px !important;
}
.app-header p {
    font-size: 9px !important;
}
.app-header img {
    width: 36px !important;
    height: 36px !important;
}

/* Stats cards compact */
.stats-card h3 {
    font-size: 18px !important;
}
.stats-card p {
    font-size: 7px !important;
}

/* List items compact */
.list-item, .asset-item {
    padding: 8px 10px !important;
}

/* Badge/Tag compact */
.badge, [class*="rounded-full"] {
    padding: 2px 6px !important;
    font-size: 8px !important;
}

/* Dropdown compact */
.aset-option {
    padding: 8px 10px !important;
}
.aset-option .font-semibold {
    font-size: 11px !important;
}
.aset-option .text-\[11px\] {
    font-size: 9px !important;
}
.aset-option .text-\[10px\] {
    font-size: 8px !important;
}

/* Search input compact */
#aset-search, #asset-search, [id*="-search"] {
    font-size: 11px !important;
    padding: 6px 10px !important;
}

/* Icons smaller */
[data-lucide] {
    width: 14px !important;
    height: 14px !important;
}
.w-3 { width: 10px !important; }
.h-3 { height: 10px !important; }
.w-4 { width: 12px !important; }
.h-4 { height: 12px !important; }
.w-5 { width: 14px !important; }
.h-5 { height: 14px !important; }

/* View Asset Modal compact */
#modal-view-asset .modal-card-body p {
    font-size: 9px !important;
}
#modal-view-asset h3 {
    font-size: 11px !important;
}
#modal-view-asset h4 {
    font-size: 8px !important;
}

/* Pagination compact */
[id*="pagination"] {
    padding: 8px 10px !important;
    font-size: 10px !important;
}
[id*="pagination"] button {
    width: 26px !important;
    height: 26px !important;
}
[id*="pagination"] span {
    font-size: 9px !important;
    padding: 4px 8px !important;
}

.pagination-bar {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pagination-btn {
    display: inline-flex;
    width: auto !important;
    min-width: 82px;
    height: 32px !important;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--aset-line, #d8e0ec);
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    font-size: 10px !important;
    font-weight: 800;
    white-space: nowrap;
}

.pagination-label {
    flex: 1;
    min-width: 0;
    border-radius: 999px;
    background: #eef5fd;
    color: #475569;
    font-size: 10px !important;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

/* Selected asset info card compact */
#selected-asset-info {
    padding: 8px 10px !important;
}
#selected-asset-info .font-bold {
    font-size: 11px !important;
}
#selected-asset-info .text-\[11px\] {
    font-size: 9px !important;
}

/* Toast compact */
#toast-container > div {
    font-size: 11px !important;
    padding: 8px 12px !important;
}

/* Admin panel compact */
#screen-admin h2 {
    font-size: 14px !important;
}
.admin-tab-btn {
    font-size: 9px !important;
    padding: 6px 8px !important;
}

/* Complaint modal compact */
#modal-complaint label {
    font-size: 9px !important;
}
#modal-complaint h3 {
    font-size: 14px !important;
}

/* Fix overflow */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Smooth scrolling */
.overflow-y-auto {
    -webkit-overflow-scrolling: touch;
}

/* AsetMe custom CSS block 3 */
:root {
    --aset-blue: #174ea6;
    --aset-blue-dark: #0f3471;
    --aset-ink: #172033;
    --aset-muted: #667085;
    --aset-line: #d8e0ec;
    --aset-soft: #f5f8fc;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

html,
body {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(23, 78, 166, 0.12), transparent 34rem),
        linear-gradient(180deg, #f6f9fd 0%, #edf3f9 100%);
}

body {
    color: var(--aset-ink);
    font-size: 14px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

button:not(:disabled):active {
    transform: translateY(1px) scale(0.99);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(23, 78, 166, 0.24);
    outline-offset: 2px;
}

.app-container {
    background: transparent;
}

.app-header {
    height: 64px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
}

.app-header > div {
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
}

.app-main {
    padding-bottom: calc(78px + var(--safe-bottom));
}

.screen > .p-4 {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 14px !important;
}

.screen h2 {
    text-wrap: balance;
}

#screen-home .bg-gradient-to-br {
    background:
        linear-gradient(135deg, rgba(23, 78, 166, 0.96), rgba(14, 52, 113, 0.98)),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.24), transparent 14rem);
    box-shadow: 0 18px 38px rgba(15, 52, 113, 0.22);
}

.app-footer {
    height: calc(72px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
}

.app-footer > div {
    max-width: 760px;
    margin: 0 auto;
}

.nav-btn-mobile {
    min-height: 56px;
    border-radius: 14px;
}

.nav-btn-mobile:hover {
    background: #f3f7fd;
}

.nav-icon-bg {
    display: grid;
    place-items: center;
}

.nav-active {
    color: var(--aset-blue);
}

.nav-active .nav-icon-bg {
    background: #dceafe !important;
    color: var(--aset-blue);
}

[id$="-list"] > button,
#admin-assets-table > div,
#admin-users-table > div,
#admin-complaints-table > div,
#complaints-list > button {
    min-height: 58px;
}

.modal-overlay {
    top: 64px;
    bottom: calc(72px + var(--safe-bottom));
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
}

.modal-card {
    border-radius: 18px !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.modal-card-wide {
    max-width: 520px !important;
    max-height: calc(100dvh - 160px);
    overflow: hidden;
}

.modal-card-header,
.modal-card-footer {
    background: rgba(255, 255, 255, 0.96);
}

.modal-card-body {
    scrollbar-width: thin;
}

input,
select,
textarea {
    min-height: 42px;
    border-color: var(--aset-line) !important;
    background: #ffffff;
    font-size: 16px !important;
    padding: 10px 12px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--aset-blue) !important;
    box-shadow: 0 0 0 3px rgba(23, 78, 166, 0.12);
}

.scan-layout {
    display: grid;
    gap: 14px;
}

.scan-copy {
    background: #ffffff;
    border: 1px solid var(--aset-line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(20, 39, 73, 0.08);
}

.scan-kicker {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--aset-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scan-panel {
    background: #ffffff;
    border: 1px solid var(--aset-line);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 16px 34px rgba(20, 39, 73, 0.11);
}

.scan-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background:
        radial-gradient(circle at center, rgba(23, 78, 166, 0.18), transparent 34%),
        #030712;
}

.scan-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-frame-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scan-box {
    position: absolute;
    inset: 13%;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
}

.scan-corner {
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: #7dd3fc;
    border-style: solid;
}

.scan-corner-tl {
    top: 13%;
    left: 13%;
    border-width: 4px 0 0 4px;
    border-top-left-radius: 14px;
}

.scan-corner-tr {
    top: 13%;
    right: 13%;
    border-width: 4px 4px 0 0;
    border-top-right-radius: 14px;
}

.scan-corner-bl {
    bottom: 13%;
    left: 13%;
    border-width: 0 0 4px 4px;
    border-bottom-left-radius: 14px;
}

.scan-corner-br {
    right: 13%;
    bottom: 13%;
    border-width: 0 4px 4px 0;
    border-bottom-right-radius: 14px;
}

.scan-status {
    margin-top: 12px;
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    background: #f6f9fd;
    padding: 10px 12px;
    color: var(--aset-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.scan-status p {
    margin: 0;
}

.scan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.scan-action-primary,
.scan-action-secondary,
.scan-manual button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
    font-weight: 800;
}

.scan-action-primary {
    background: var(--aset-blue);
    color: #ffffff;
}

.scan-action-primary:hover {
    background: var(--aset-blue-dark);
}

.scan-action-secondary {
    border: 1px solid var(--aset-line);
    background: #f8fbff;
    color: #2f4669;
}

.scan-action-secondary:hover {
    border-color: #b9c9dd;
    background: #eef5fd;
}

.scan-manual {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 10px;
}

.scan-manual input {
    min-width: 0;
    border-radius: 13px;
    padding: 10px 12px !important;
    font-size: 16px !important;
}

.scan-manual button {
    padding: 0 16px;
    background: #172033;
    color: #ffffff;
}

.toast-item {
    width: min(340px, calc(100vw - 24px));
    margin-bottom: 8px;
    border: 1px solid #d8e0ec;
    border-left-width: 4px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
    padding: 10px 12px;
    color: var(--aset-ink);
}

.toast-item strong {
    display: block;
    font-size: 12px;
}

.toast-item span {
    display: block;
    margin-top: 2px;
    color: var(--aset-muted);
    font-size: 11px;
    line-height: 1.35;
}

.toast-success {
    border-left-color: #059669;
}

.toast-error {
    border-left-color: #dc2626;
}

.toast-info {
    border-left-color: var(--aset-blue);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .screen > .p-4 {
        padding: 24px !important;
    }

    input,
    select,
    textarea {
        font-size: 14px !important;
    }

    #screen-home > .p-4 {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
        align-items: start;
        gap: 18px;
    }

    #home-stats-container {
        grid-column: 1 / -1;
    }

    .scan-layout {
        grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1fr);
        align-items: start;
        gap: 18px;
        max-width: 920px;
    }

    .scan-copy {
        position: sticky;
        top: 18px;
        padding: 20px;
    }

    .scan-copy h2 {
        font-size: 28px !important;
        line-height: 1.05;
    }

    .scan-panel {
        padding: 16px;
    }

    .modal-card-wide {
        max-width: 720px !important;
    }

    #form-asset .grid {
        gap: 12px !important;
    }
}

@media (max-width: 420px) {
    .app-header {
        height: 60px;
    }

    .modal-overlay {
        top: 60px;
    }

    .scan-actions {
        grid-template-columns: 1fr;
    }

    .scan-manual {
        grid-template-columns: 1fr;
    }

    .screen > .p-4 {
        padding: 12px !important;
    }
}

/* Production responsive polish - preserves the existing AsetMe look. */
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 120;
    transform: translateY(-150%);
    border-radius: 12px;
    background: var(--aset-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 14px;
    box-shadow: 0 14px 30px rgba(15, 52, 113, 0.24);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

#main-content:focus {
    outline: none;
}

.app-header,
.app-footer,
.modal-card,
.scan-copy,
.scan-panel,
.toast-item {
    border-color: rgba(174, 190, 212, 0.72);
}

.asset-card,
.admin-row,
#complaints-list > button {
    background: #ffffff;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.asset-card:hover,
.admin-row:hover,
#complaints-list > button:hover {
    background: #f8fbff;
}

.asset-card:active,
#complaints-list > button:active {
    transform: translateY(1px);
}

.stats-card {
    min-height: 74px;
    display: grid;
    align-content: center;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 124px;
    padding: 22px 16px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(241, 246, 253, 0.88));
}

.empty-state p {
    margin: 0;
}

.empty-state-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #dbe7f6;
    border-radius: 12px;
    background: #ffffff;
    color: var(--aset-blue);
}

.admin-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(94px, auto) 42px;
    align-items: center;
    gap: 8px !important;
}

#admin-tab-complaints .admin-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
}

.admin-toolbar .relative,
.admin-toolbar input,
.admin-toolbar select {
    min-width: 0;
}

.admin-toolbar button,
.admin-toolbar select {
    min-height: 44px;
}

.admin-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px !important;
}

.admin-actions {
    align-items: center;
    flex-wrap: nowrap;
}

.admin-action-btn {
    display: inline-flex;
    width: auto !important;
    min-width: 48px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(23, 78, 166, 0.08);
    font-size: 10px !important;
    line-height: 1;
    white-space: nowrap;
}

.admin-action-danger {
    border-color: rgba(220, 38, 38, 0.08);
}

.admin-action-success {
    border-color: rgba(5, 150, 105, 0.1);
}

.admin-tab-btn {
    min-height: 38px;
}

#toast-container {
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
}

body:has(.modal-overlay:not(.hidden)) #toast-container {
    top: auto !important;
    bottom: calc(14px + var(--safe-bottom)) !important;
}

@media (prefers-reduced-motion: no-preference) {
    .screen:not(.hidden-screen) {
        animation: screen-in 180ms ease-out both;
    }

    @keyframes screen-in {
        from {
            opacity: 0.96;
            transform: translateY(4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (min-width: 1024px) {
    .app-main {
        margin-left: 244px;
        padding-bottom: 0;
    }

    .screen > .p-4 {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    .app-footer {
        top: 64px;
        right: auto;
        bottom: 0;
        left: 0;
        width: 244px;
        height: auto;
        padding: 14px 12px 18px !important;
        border-top: 0;
        border-right: 1px solid rgba(174, 190, 212, 0.72);
        box-shadow: 18px 0 38px rgba(20, 39, 73, 0.06);
    }

    .app-footer > div {
        max-width: none;
        height: auto !important;
        flex-direction: column;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px;
        padding: 0 !important;
    }

    .app-footer .nav-btn-mobile {
        min-height: 48px;
        width: 100%;
        flex: 0 0 auto !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px;
        padding: 7px 10px !important;
        color: #52657d;
        text-align: left;
    }

    .app-footer .nav-btn-mobile span {
        font-size: 12px !important;
        font-weight: 800;
    }

    .app-footer .nav-icon-bg {
        width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        border-radius: 12px;
        background: #f1f6fc;
    }

    .app-footer .nav-icon-bg svg {
        width: 16px !important;
        height: 16px !important;
    }

    .app-footer .nav-active {
        background: #eaf2ff;
        color: var(--aset-blue);
        box-shadow: inset 0 0 0 1px rgba(23, 78, 166, 0.08);
    }

    .app-footer .nav-active .nav-icon-bg {
        background: var(--aset-blue);
        color: #ffffff;
    }

    .modal-overlay {
        left: 244px;
        bottom: 0;
    }
}

@media (max-width: 640px) {
    #toast-container {
        left: 12px !important;
        right: 12px !important;
        align-items: stretch !important;
    }

    .toast-item {
        width: 100%;
    }

    #form-asset .grid {
        grid-template-columns: 1fr !important;
    }

    .modal-card-wide {
        max-height: calc(100dvh - 142px);
    }

}

@media (min-width: 1024px) {
    body:has(.modal-overlay:not(.hidden)) #toast-container {
        top: 76px !important;
        right: 16px !important;
        bottom: auto !important;
        left: auto !important;
        align-items: flex-end !important;
    }

    body:has(.modal-overlay:not(.hidden)) .toast-item {
        width: min(280px, calc(100vw - 24px));
    }
}

@media (max-width: 380px) {
    #home-stats-container .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .admin-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(88px, auto) 42px;
    }

    #admin-tab-complaints .admin-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(104px, auto);
    }

    .pagination-btn {
        min-width: 76px;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .app-header,
    .app-footer,
    .modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .app-header,
    .app-footer,
    .modal-card-header,
    .modal-card-footer {
        background: #ffffff;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Desktop dashboard fill: removes unused whitespace while preserving mobile layout. */
.home-hero-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 148px;
    display: grid;
    align-content: center;
    justify-items: start;
}

.home-hero-card span {
    width: fit-content;
}

.home-hero-card p {
    max-width: 64ch;
}

.home-hero-card::after {
    content: "ICT";
    position: absolute;
    right: clamp(18px, 5vw, 72px);
    bottom: -0.18em;
    z-index: -1;
    color: rgba(255, 255, 255, 0.1);
    font-size: clamp(72px, 14vw, 180px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0;
}

.home-sidebar-stack {
    display: grid;
    gap: 14px;
}

.home-side-card {
    border: 1px solid rgba(174, 190, 212, 0.72);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(20, 39, 73, 0.08);
    padding: 16px;
}

.home-side-card h3 {
    margin: 0;
    color: var(--aset-ink);
    font-size: 14px !important;
    font-weight: 900;
    line-height: 1.2;
}

.home-side-kicker {
    margin: 0 0 4px;
    color: var(--aset-blue);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.home-side-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #e8f1ff;
    color: var(--aset-blue);
}

.home-side-card-primary {
    background:
        radial-gradient(circle at 100% 0%, rgba(23, 78, 166, 0.12), transparent 11rem),
        #ffffff;
}

.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.home-quick-grid button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #dbe7f6;
    border-radius: 13px;
    background: #f8fbff;
    color: #244368;
    font-size: 11px !important;
    font-weight: 900;
}

.home-quick-grid button:first-child {
    border-color: var(--aset-blue);
    background: var(--aset-blue);
    color: #ffffff;
}

.home-quick-grid button:hover {
    border-color: #b9c9dd;
    background: #eef5fd;
    color: var(--aset-blue-dark);
}

.home-quick-grid button:first-child:hover {
    background: var(--aset-blue-dark);
    color: #ffffff;
}

.home-health-pill {
    display: inline-flex;
    min-width: 72px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.home-health-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.home-health-list div {
    border-radius: 13px;
    background: #f6f9fd;
    padding: 12px;
}

.home-health-list span,
.home-health-list strong {
    display: block;
}

.home-health-list span {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}

.home-health-list strong {
    margin-top: 4px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.home-side-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    background: #172033;
    color: #ffffff;
}

.home-side-note strong,
.home-side-note span {
    display: block;
}

.home-side-note strong {
    font-size: 12px;
    font-weight: 900;
}

.home-side-note span {
    margin-top: 3px;
    color: #dbe7f6;
    font-size: 11px;
    line-height: 1.45;
}

@media (min-width: 768px) {
    .app-header > div {
        max-width: 1360px;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .screen > .p-4 {
        width: min(100%, 1360px);
    }

    #screen-home > .p-4 {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }

    .home-hero-card,
    #home-stats-container {
        grid-column: 1 / -1 !important;
    }

    .home-recent-card {
        grid-column: span 7;
    }

    #home-sidebar {
        display: block;
        grid-column: span 5;
    }

    .home-recent-card,
    #home-sidebar {
        align-self: start;
    }
}

@media (min-width: 1180px) {
    #screen-home > .p-4 {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }

    .home-recent-card {
        grid-column: span 7;
    }

    #home-sidebar {
        grid-column: span 5;
    }

    .home-hero-card {
        min-height: 176px;
        padding: 28px !important;
    }

    .home-hero-card h2 {
        font-size: 26px !important;
        line-height: 1.12;
    }
}

@media (max-width: 767px) {
    .home-hero-card::after {
        right: 12px;
        font-size: 72px;
    }

    .home-recent-extra {
        display: none;
    }

    #home-sidebar {
        display: none;
    }
}
