@font-face {
    font-family: "Inter";
    src: url("../asset/fonts/inter-latin-variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --color-primary: 68 138 179;
    --icon-primary: #065384;
    --icon-secondary: #448Ab3;
    --icon-detail: #ffffff;
}

html {
    margin: 0;
    min-height: 100%;
    background: #334155;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Base PWA and iOS interaction tweaks */
body {
    margin: 0;
    min-height: 100%;
    font-family: "Inter", sans-serif;
    -webkit-tap-highlight-color: transparent;
    background: #334155;
}

.pwa-update-notice {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: #fff;
    background: #0f172a;
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
}

.pwa-update-notice button {
    flex: 0 0 auto;
    padding: 0.5rem 0.75rem;
    color: #0f172a;
    font: inherit;
    font-weight: 700;
    background: #fff;
    border: 0;
    border-radius: 0.5rem;
}

.contract-signature-canvas {
    min-height: 160px;
    height: 160px;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.contract-pdf-page {
    width: 100%;
    height: auto;
}

.contract-progress {
    display: block;
    width: 100%;
    height: 1rem;
    border: 0;
    border-radius: 9999px;
    background: #e0f2fe;
    accent-color: #06b6d4;
}

.assets-sheet-scroll,
.incidencias-sheet-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.assets-sheet-scroll::-webkit-scrollbar,
.incidencias-sheet-scroll::-webkit-scrollbar {
    display: none;
}

.ios-status-bar-fill {
    position: sticky;
    top: 0;
    z-index: 50;
    height: env(safe-area-inset-top, 0px);
    background: #334155;
    pointer-events: none;
}

.ios-safe-header {
    top: env(safe-area-inset-top, 0px);
}

/* Loading screen */
body.loading-screen {
    margin: 0;
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #164e63 60%, #d97706);
    font-family: "Inter", sans-serif;
}

.loader {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 999px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pwa-bottom-search {
    animation: pwaBottomSearchIn 180ms ease-out;
}

@keyframes pwaBottomSearchIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon {
    display: inline-block;
    vertical-align: middle;
}

.icon .icon-main {
    fill: var(--icon-primary, currentColor);
}

.icon .icon-secondary {
    fill: var(--icon-secondary, currentColor);
}

.icon .icon-detail {
    fill: var(--icon-detail, currentColor);
}

/* Dashboard notices need a lighter supporting tone over their dark gradients. */
.dark .dashboard-alert-description {
    color: #b7e4c7;
}

.dark .dashboard-welcome-text {
    color: #dbeafe;
}

/* Mantiene el desplazamiento táctil/rueda sin mostrar la barra en compositores PWA. */
.messages-scroll-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.messages-scroll-hidden::-webkit-scrollbar {
    display: none;
}
