/* ==========================================================================
   UAESA ID VERIFICATION — MATERIAL 3 EXPRESSIVE
   Palette: #00A5A7 (teal) · Grey (neutral) · Orange (accent)
   Version: 2.4.0
   ========================================================================== */

/* ==========================================================================
   1. TOKENS — LIGHT
   ========================================================================== */
#uaesa-idv-app,
.uaesa-idv-card,
#idv-age-overlay {
    --md-sys-color-primary:                     #00A5A7;
    --md-sys-color-on-primary:                  #FFFFFF;
    --md-sys-color-primary-container:           #9DF1F2;
    --md-sys-color-on-primary-container:        #002020;
    --md-sys-color-primary-fixed:               #9DF1F2;
    --md-sys-color-primary-fixed-dim:           #52D6D8;
    --md-sys-color-on-primary-fixed:            #002020;
    --md-sys-color-on-primary-fixed-variant:    #004F50;

    --md-sys-color-secondary:                   #4A6363;
    --md-sys-color-on-secondary:                #FFFFFF;
    --md-sys-color-secondary-container:         #CCE8E8;
    --md-sys-color-on-secondary-container:      #051F20;

    --md-sys-color-tertiary:                    #8A5000;
    --md-sys-color-on-tertiary:                 #FFFFFF;
    --md-sys-color-tertiary-container:          #FFDCBE;
    --md-sys-color-on-tertiary-container:       #2D1600;
    --md-sys-color-tertiary-fixed:              #FFB870;

    --md-sys-color-error:                       #BA1A1A;
    --md-sys-color-on-error:                    #FFFFFF;
    --md-sys-color-error-container:             #FFDAD6;
    --md-sys-color-on-error-container:          #410002;

    --md-sys-color-surface:                     #F4FAFA;
    --md-sys-color-surface-dim:                 #D4DBDB;
    --md-sys-color-surface-bright:              #F4FAFA;
    --md-sys-color-surface-container-lowest:    #FFFFFF;
    --md-sys-color-surface-container-low:       #EEF4F4;
    --md-sys-color-surface-container:           #E8EEEE;
    --md-sys-color-surface-container-high:      #E2E8E8;
    --md-sys-color-surface-container-highest:   #DDE3E3;
    --md-sys-color-surface-variant:             #DAE4E5;
    --md-sys-color-on-surface:                  #161D1E;
    --md-sys-color-on-surface-variant:          #3F494A;
    --md-sys-color-inverse-surface:             #2B3233;
    --md-sys-color-inverse-on-surface:          #ECF2F2;
    --md-sys-color-inverse-primary:             #52D6D8;
    --md-sys-color-outline:                     #6F797A;
    --md-sys-color-outline-variant:             #BEC8C9;
    --md-sys-color-scrim:                       rgba(0, 0, 0, 0.4);

    --md-state-hover:    0.08;
    --md-state-focus:    0.10;
    --md-state-pressed:  0.10;

    --md-sys-shape-corner-extra-small:            4px;
    --md-sys-shape-corner-small:                  8px;
    --md-sys-shape-corner-medium:                 12px;
    --md-sys-shape-corner-large:                  16px;
    --md-sys-shape-corner-large-increased:        20px;
    --md-sys-shape-corner-extra-large:            28px;
    --md-sys-shape-corner-extra-large-increased:  32px;
    --md-sys-shape-corner-extra-extra-large:      48px;
    --md-sys-shape-corner-full:                   999px;

    --md-sys-elevation-level0: none;
    --md-sys-elevation-level1: 0 1px 2px rgba(0,0,0,.30), 0 1px 3px 1px rgba(0,0,0,.15);
    --md-sys-elevation-level2: 0 1px 2px rgba(0,0,0,.30), 0 2px 6px 2px rgba(0,0,0,.15);
    --md-sys-elevation-level3: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.30);

    --md-sys-motion-easing-standard:              cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized:            cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
    --md-sys-motion-easing-expressive:            cubic-bezier(0.4, 1.6, 0.6, 1);
    --md-sys-motion-easing-spring:                cubic-bezier(0.34, 1.56, 0.64, 1);

    --md-sys-motion-duration-short3:        150ms;
    --md-sys-motion-duration-medium2:       300ms;
    --md-sys-motion-duration-long2:         500ms;
    --md-sys-motion-duration-extra-long1:   700ms;

    --md-sys-typescale-font: "Roboto Flex", "Roboto", -apple-system,
                             BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
                             Arial, sans-serif;
    --md-sys-typescale-font-brand: "Roboto Flex", "Roboto", sans-serif;
}

/* ==========================================================================
   2. TOKENS — DARK
   ========================================================================== */
#uaesa-idv-app[data-theme="on"],
.uaesa-idv-card[data-theme="on"],
#idv-age-overlay[data-theme="on"] {
    --md-sys-color-primary:                     #52D6D8;
    --md-sys-color-on-primary:                  #003738;
    --md-sys-color-primary-container:           #004F50;
    --md-sys-color-on-primary-container:        #9DF1F2;
    --md-sys-color-primary-fixed:               #9DF1F2;
    --md-sys-color-primary-fixed-dim:           #52D6D8;
    --md-sys-color-secondary:                   #B0CCCC;
    --md-sys-color-on-secondary:                #1B3535;
    --md-sys-color-secondary-container:         #324B4B;
    --md-sys-color-on-secondary-container:      #CCE8E8;
    --md-sys-color-tertiary:                    #FFB870;
    --md-sys-color-on-tertiary:                 #4A2800;
    --md-sys-color-tertiary-container:          #6B3B00;
    --md-sys-color-on-tertiary-container:       #FFDCBE;
    --md-sys-color-error:                       #FFB4AB;
    --md-sys-color-on-error:                    #690005;
    --md-sys-color-error-container:             #93000A;
    --md-sys-color-on-error-container:          #FFDAD6;
    --md-sys-color-surface:                     #0E1515;
    --md-sys-color-surface-dim:                 #0E1515;
    --md-sys-color-surface-bright:              #343B3B;
    --md-sys-color-surface-container-lowest:    #090F0F;
    --md-sys-color-surface-container-low:       #161D1D;
    --md-sys-color-surface-container:           #1A2121;
    --md-sys-color-surface-container-high:      #252B2B;
    --md-sys-color-surface-container-highest:   #2F3636;
    --md-sys-color-surface-variant:             #3F494A;
    --md-sys-color-on-surface:                  #DEE4E4;
    --md-sys-color-on-surface-variant:          #BEC8C9;
    --md-sys-color-inverse-surface:             #DEE4E4;
    --md-sys-color-inverse-on-surface:          #2B3233;
    --md-sys-color-outline:                     #899394;
    --md-sys-color-outline-variant:             #3F494A;
    --md-sys-color-scrim:                       rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
    #uaesa-idv-app[data-theme="auto"],
    .uaesa-idv-card[data-theme="auto"],
    #idv-age-overlay[data-theme="auto"] {
        --md-sys-color-primary:                     #52D6D8;
        --md-sys-color-on-primary:                  #003738;
        --md-sys-color-primary-container:           #004F50;
        --md-sys-color-on-primary-container:        #9DF1F2;
        --md-sys-color-primary-fixed:               #9DF1F2;
        --md-sys-color-primary-fixed-dim:           #52D6D8;
        --md-sys-color-secondary:                   #B0CCCC;
        --md-sys-color-on-secondary:                #1B3535;
        --md-sys-color-secondary-container:         #324B4B;
        --md-sys-color-on-secondary-container:      #CCE8E8;
        --md-sys-color-tertiary:                    #FFB870;
        --md-sys-color-on-tertiary:                 #4A2800;
        --md-sys-color-tertiary-container:          #6B3B00;
        --md-sys-color-on-tertiary-container:       #FFDCBE;
        --md-sys-color-error:                       #FFB4AB;
        --md-sys-color-on-error:                    #690005;
        --md-sys-color-error-container:             #93000A;
        --md-sys-color-on-error-container:          #FFDAD6;
        --md-sys-color-surface:                     #0E1515;
        --md-sys-color-surface-dim:                 #0E1515;
        --md-sys-color-surface-bright:              #343B3B;
        --md-sys-color-surface-container-lowest:    #090F0F;
        --md-sys-color-surface-container-low:       #161D1D;
        --md-sys-color-surface-container:           #1A2121;
        --md-sys-color-surface-container-high:      #252B2B;
        --md-sys-color-surface-container-highest:   #2F3636;
        --md-sys-color-surface-variant:             #3F494A;
        --md-sys-color-on-surface:                  #DEE4E4;
        --md-sys-color-on-surface-variant:          #BEC8C9;
        --md-sys-color-inverse-surface:             #DEE4E4;
        --md-sys-color-inverse-on-surface:          #2B3233;
        --md-sys-color-outline:                     #899394;
        --md-sys-color-outline-variant:             #3F494A;
        --md-sys-color-scrim:                       rgba(0, 0, 0, 0.6);
    }
}

/* ==========================================================================
   3. RESET + BOX MODEL
   ========================================================================== */
#uaesa-idv-app,
#uaesa-idv-app *,
#uaesa-idv-app *::before,
#uaesa-idv-app *::after,
.uaesa-idv-card,
.uaesa-idv-card *,
.uaesa-idv-card *::before,
.uaesa-idv-card *::after,
#idv-age-overlay,
#idv-age-overlay *,
#idv-age-overlay *::before,
#idv-age-overlay *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    max-width: 100%;
}
#uaesa-idv-app,
.uaesa-idv-card { overflow-x: hidden; }
#uaesa-idv-app *,
.uaesa-idv-card * {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}
#uaesa-idv-app img,
.uaesa-idv-card img {
    max-width: 100%;
    height: auto;
    display: block;
}
#uaesa-idv-app *:focus-visible,
.uaesa-idv-card *:focus-visible,
#idv-age-overlay *:focus-visible {
    outline: 3px solid var(--md-sys-color-primary);
    outline-offset: 2px;
    border-radius: var(--md-sys-shape-corner-small);
}

/* ==========================================================================
   4. ROOT CONTAINER
   ========================================================================== */
#uaesa-idv-app {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin: 0 auto;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    overflow: hidden;
    font-family: var(--md-sys-typescale-font);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.0125em;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
@supports (height: 100svh) { #uaesa-idv-app { height: 100svh; } }
@supports (height: 100dvh) { #uaesa-idv-app { height: 100dvh; } }

@media (min-width: 640px) {
    #uaesa-idv-app {
        max-width: 440px;
        height: 900px;
        max-height: 94vh;
        margin: 24px auto;
        border-radius: var(--md-sys-shape-corner-extra-large-increased);
        box-shadow: var(--md-sys-elevation-level3);
    }
}

/* ==========================================================================
   5. SCREEN MANAGER
   ========================================================================== */
#uaesa-idv-app .idv-screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    overflow: hidden;
}
#uaesa-idv-app .idv-screen.active {
    display: flex;
    animation: md-enter 300ms var(--md-sys-motion-easing-emphasized-decelerate) both;
}
@keyframes md-enter {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes md-spring-pop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   6. PROGRESS BAR
   ========================================================================== */
#uaesa-idv-app .uaesa-idv-progress {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--md-sys-color-surface-container-highest);
    z-index: 200;
    pointer-events: none;
    overflow: hidden;
}
#uaesa-idv-app .uaesa-idv-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,
        var(--md-sys-color-primary) 0%,
        var(--md-sys-color-primary) 55%,
        var(--md-sys-color-tertiary) 100%);
    border-radius: 0 var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full) 0;
    transition: width 500ms var(--md-sys-motion-easing-emphasized);
}

/* ==========================================================================
   7. INTRO SCREEN
   ========================================================================== */
#uaesa-idv-app #screen-intro {
    background: var(--md-sys-color-surface);
    overflow: hidden;
}
#uaesa-idv-app .idv-intro-top {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    min-height: 240px;
    padding:
        calc(env(safe-area-inset-top, 0px) + 44px)
        clamp(20px, 6vw, 32px)
        clamp(36px, 8vw, 56px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background:
        radial-gradient(140% 110% at 0% 0%, var(--md-sys-color-primary-container) 0%, transparent 55%),
        radial-gradient(120% 100% at 100% 100%, var(--md-sys-color-tertiary-container) 0%, transparent 55%),
        var(--md-sys-color-surface-container-low);
    border-radius: 0 0 var(--md-sys-shape-corner-extra-extra-large) var(--md-sys-shape-corner-extra-extra-large);
}
#uaesa-idv-app .idv-intro-badge {
    width: clamp(56px, 18vw, 76px);
    height: clamp(56px, 18vw, 76px);
    border-radius: var(--md-sys-shape-corner-extra-large);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(18px, 4vw, 28px);
    box-shadow: var(--md-sys-elevation-level2);
    position: relative;
    z-index: 1;
    animation: md-spring-pop 700ms var(--md-sys-motion-easing-spring) both;
    flex-shrink: 0;
}
#uaesa-idv-app .idv-intro-badge svg {
    width: clamp(26px, 8.5vw, 36px);
    height: clamp(26px, 8.5vw, 36px);
}
#uaesa-idv-app .idv-intro-top h1 {
    font-family: var(--md-sys-typescale-font-brand);
    font-size: clamp(24px, 6.8vw, 32px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 12px;
    color: var(--md-sys-color-on-surface);
    position: relative;
    z-index: 1;
}
#uaesa-idv-app .idv-intro-top p {
    font-size: clamp(13.5px, 3.6vw, 15px);
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
    opacity: 0.82;
    max-width: 320px;
    position: relative;
    z-index: 1;
    color: var(--md-sys-color-on-surface-variant);
}
#uaesa-idv-app .idv-intro-body {
    flex: 1;
    min-height: 0;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-extra-extra-large) var(--md-sys-shape-corner-extra-extra-large) 0 0;
    margin-top: -28px;
    position: relative;
    z-index: 2;
    padding:
        clamp(24px, 5vw, 32px)
        clamp(18px, 5vw, 24px)
        calc(clamp(20px, 5vw, 24px) + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#uaesa-idv-app .idv-intro-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

/* Doc type grid */
#uaesa-idv-app .idv-doctype-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 2.5vw, 12px);
}
@media (max-width: 340px) {
    #uaesa-idv-app .idv-doctype-grid { grid-template-columns: 1fr; }
}
#uaesa-idv-app .idv-doctype-card {
    appearance: none;
    position: relative;
    overflow: hidden;
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: clamp(16px, 4vw, 22px) clamp(10px, 3vw, 14px) clamp(14px, 3.5vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: center;
    font: inherit;
    min-height: clamp(120px, 30vw, 148px);
    touch-action: manipulation;
    transition:
        background-color 150ms var(--md-sys-motion-easing-standard),
        border-color 150ms var(--md-sys-motion-easing-standard),
        border-radius 300ms var(--md-sys-motion-easing-expressive),
        box-shadow 300ms var(--md-sys-motion-easing-standard),
        transform 150ms var(--md-sys-motion-easing-expressive);
}
#uaesa-idv-app .idv-doctype-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--md-sys-color-on-surface);
    opacity: 0;
    transition: opacity 150ms var(--md-sys-motion-easing-standard);
    pointer-events: none;
}
#uaesa-idv-app .idv-doctype-card:hover::before  { opacity: var(--md-state-hover); }
#uaesa-idv-app .idv-doctype-card:active {
    transform: scale(0.94);
    border-radius: var(--md-sys-shape-corner-large-increased);
}
#uaesa-idv-app .idv-doctype-card:active::before { opacity: var(--md-state-pressed); }
#uaesa-idv-app .idv-doctype-card.selected {
    background: var(--md-sys-color-primary-container);
    border: 2px solid var(--md-sys-color-tertiary);
    border-radius: var(--md-sys-shape-corner-extra-large-increased);
    box-shadow: var(--md-sys-elevation-level1);
}
#uaesa-idv-app .idv-doctype-card.selected::before { display: none; }

#uaesa-idv-app .idv-doctype-icon {
    width: clamp(44px, 13vw, 56px);
    height: clamp(44px, 13vw, 56px);
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition:
        background-color 300ms var(--md-sys-motion-easing-standard),
        color 300ms var(--md-sys-motion-easing-standard),
        border-radius 300ms var(--md-sys-motion-easing-expressive),
        transform 300ms var(--md-sys-motion-easing-spring);
}
#uaesa-idv-app .idv-doctype-card.selected .idv-doctype-icon {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-radius: var(--md-sys-shape-corner-large-increased);
    transform: scale(1.05);
}
#uaesa-idv-app .idv-doctype-icon svg {
    width: clamp(20px, 6vw, 26px);
    height: clamp(20px, 6vw, 26px);
}
#uaesa-idv-app .idv-doctype-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    width: 100%;
}
#uaesa-idv-app .idv-doctype-title {
    display: block;
    font-size: clamp(13px, 3.4vw, 14px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: var(--md-sys-color-on-surface);
}
#uaesa-idv-app .idv-doctype-card.selected .idv-doctype-title {
    color: var(--md-sys-color-on-primary-container);
}
#uaesa-idv-app .idv-doctype-desc {
    display: block;
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.03em;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}
#uaesa-idv-app .idv-doctype-card.selected .idv-doctype-desc {
    color: var(--md-sys-color-on-primary-container);
    opacity: 0.75;
}
#uaesa-idv-app .idv-radio { display: none !important; }

#uaesa-idv-app .idv-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    border-radius: var(--md-sys-shape-corner-large);
    font-size: clamp(12.5px, 3.4vw, 13.5px);
    line-height: 1.45;
    animation: md-spring-pop 300ms var(--md-sys-motion-easing-spring);
}
#uaesa-idv-app .idv-warning svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

#uaesa-idv-app .idv-intro-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#uaesa-idv-app .idv-intro-bullets li {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 14px);
    padding: 12px 16px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-large);
    font-size: clamp(12.5px, 3.4vw, 13.5px);
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.4;
}
#uaesa-idv-app .idv-intro-bullets svg {
    width: 20px;
    height: 20px;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}
#uaesa-idv-app #btn-start { margin-top: auto; margin-bottom: 4px; }

/* ==========================================================================
   8. ID SCAN SCREEN
   ========================================================================== */
#uaesa-idv-app .idv-top-half {
    flex-shrink: 0;
    height: auto;
    min-height: 200px;
    max-height: 40vh;
    aspect-ratio: 340 / 260;
    background: var(--md-sys-color-surface-container-highest);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 5vw, 28px) clamp(16px, 4vw, 22px);
    overflow: hidden;
}
#uaesa-idv-app .idv-id-card {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1.586 / 1;
    max-height: 100%;
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-large);
    display: flex;
    padding: clamp(10px, 3vw, 14px);
    gap: clamp(10px, 3vw, 14px);
    position: relative;
    z-index: 2;
    box-shadow: var(--md-sys-elevation-level2);
}
#uaesa-idv-app .idv-id-photo {
    width: 22%;
    max-width: 68px;
    aspect-ratio: 3 / 4;
    background: var(--md-sys-color-surface-variant);
    border-radius: var(--md-sys-shape-corner-small);
    flex-shrink: 0;
}
#uaesa-idv-app .idv-id-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
    justify-content: center;
    min-width: 0;
}
#uaesa-idv-app .idv-id-line {
    height: 8px;
    background: var(--md-sys-color-surface-variant);
    border-radius: var(--md-sys-shape-corner-extra-small);
    width: 100%;
}
#uaesa-idv-app .idv-id-line.short { width: 55%; }

#uaesa-idv-app .idv-bracket {
    position: absolute;
    width: clamp(24px, 8vw, 36px);
    height: clamp(24px, 8vw, 36px);
    border: 4px solid var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-large);
    z-index: 3;
    pointer-events: none;
}
#uaesa-idv-app .idv-tl { top: 18px;    left: 18px;   border-right: none; border-bottom: none; }
#uaesa-idv-app .idv-tr { top: 18px;    right: 18px;  border-left: none;  border-bottom: none; }
#uaesa-idv-app .idv-bl { bottom: 18px; left: 18px;   border-right: none; border-top: none; }
#uaesa-idv-app .idv-br { bottom: 18px; right: 18px;  border-left: none;  border-top: none; }

#uaesa-idv-app #idv-preview-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
}

#uaesa-idv-app .idv-bottom-half {
    flex: 1;
    min-height: 0;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-extra-extra-large) var(--md-sys-shape-corner-extra-extra-large) 0 0;
    margin-top: -32px;
    position: relative;
    z-index: 4;
    padding:
        clamp(20px, 5vw, 24px)
        clamp(18px, 5vw, 22px)
        calc(clamp(18px, 5vw, 22px) + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#uaesa-idv-app .idv-step-indicator {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
    border-radius: var(--md-sys-shape-corner-small);
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}
#uaesa-idv-app .idv-step-indicator::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--md-sys-color-tertiary);
    animation: md-dot-pulse 1.6s var(--md-sys-motion-easing-standard) infinite;
    flex-shrink: 0;
}
@keyframes md-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.4); }
}
#uaesa-idv-app .idv-bottom-half h2 {
    color: var(--md-sys-color-on-surface);
    font-size: clamp(20px, 5.6vw, 26px);
    font-weight: 400;
    line-height: 1.2;
    margin: 8px 0 0;
}
#uaesa-idv-app .idv-bottom-half p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: clamp(13px, 3.5vw, 14px);
    line-height: 1.45;
    margin: 4px 0 0;
    max-width: 320px;
}
#uaesa-idv-app .idv-action-group {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
}
#uaesa-idv-app .idv-action-group button { margin: 0; }

/* ==========================================================================
   9. FACE SCREEN
   ========================================================================== */
#uaesa-idv-app #screen-face {
    background:
        radial-gradient(120% 90% at 50% 10%, var(--md-sys-color-primary-container) 0%, transparent 60%),
        var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    padding:
        calc(env(safe-area-inset-top, 0px) + clamp(16px, 4vw, 24px))
        clamp(18px, 5vw, 22px)
        calc(clamp(18px, 5vw, 22px) + env(safe-area-inset-bottom, 0px));
    align-items: center;
    text-align: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#uaesa-idv-app #screen-face h2 {
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 400;
    line-height: 1.15;
    margin: 24px 0 10px;
    color: var(--md-sys-color-on-surface);
}
#uaesa-idv-app #screen-face p {
    font-size: clamp(13px, 3.5vw, 14px);
    line-height: 1.5;
    margin: 0 0 28px;
    color: var(--md-sys-color-on-surface-variant);
    max-width: 340px;
}
#uaesa-idv-app .idv-face-circle {
    width: min(64vw, 260px, 34vh);
    height: min(64vw, 260px, 34vh);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 4px solid var(--md-sys-color-primary);
    background: var(--md-sys-color-surface-container-high);
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    flex-shrink: 0;
    transition:
        border-color 300ms var(--md-sys-motion-easing-standard),
        box-shadow 300ms var(--md-sys-motion-easing-standard),
        transform 300ms var(--md-sys-motion-easing-spring);
    box-shadow: var(--md-sys-elevation-level3);
}
#uaesa-idv-app .idv-face-circle.captured {
    border-color: var(--md-sys-color-tertiary);
    box-shadow: 0 0 0 6px var(--md-sys-color-tertiary-container), var(--md-sys-elevation-level3);
    transform: scale(1.02);
}
#uaesa-idv-app .idv-fake-face {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(64px, 22vw, 92px);
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1;
    opacity: 0.5;
}
#uaesa-idv-app #idv-face-preview {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
    z-index: 2;
}
#uaesa-idv-app .idv-line-h,
#uaesa-idv-app .idv-line-v {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    opacity: 0.4;
}
#uaesa-idv-app .idv-line-h {
    width: 100%; height: 1px; top: 50%; left: 0;
    border-top: 1px dashed var(--md-sys-color-primary);
}
#uaesa-idv-app .idv-line-v {
    width: 1px; height: 100%; left: 50%; top: 0;
    border-left: 1px dashed var(--md-sys-color-primary);
}
#uaesa-idv-app .idv-face-hint-overlay {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 11.5px;
    font-weight: 600;
    z-index: 4;
    white-space: nowrap;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#uaesa-idv-app .idv-face-hint-overlay svg { width: 14px; height: 14px; flex-shrink: 0; }
#uaesa-idv-app .idv-face-hint-overlay span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#uaesa-idv-app .idv-consent {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-large);
    padding: clamp(12px, 3.5vw, 16px) clamp(14px, 4vw, 18px);
    font-size: clamp(12.5px, 3.3vw, 13.5px);
    line-height: 1.45;
    color: var(--md-sys-color-on-surface);
    text-align: left;
    width: 100%;
    max-width: 380px;
    cursor: pointer;
    margin-bottom: 20px;
    touch-action: manipulation;
}
#uaesa-idv-app .idv-consent input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    margin: 1px 0 0;
    flex-shrink: 0;
    border-radius: var(--md-sys-shape-corner-extra-small);
    border: 2px solid var(--md-sys-color-on-surface-variant);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition:
        background-color 100ms var(--md-sys-motion-easing-standard),
        border-color 100ms var(--md-sys-motion-easing-standard),
        transform 150ms var(--md-sys-motion-easing-spring);
}
#uaesa-idv-app .idv-consent input:checked {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    transform: scale(1.08);
}
#uaesa-idv-app .idv-consent input:checked::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 5px; height: 10px;
    border: solid var(--md-sys-color-on-primary);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
#uaesa-idv-app .idv-face-actions {
    width: 100%;
    max-width: 380px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   10. BUTTONS
   ========================================================================== */
#uaesa-idv-app button,
.uaesa-idv-card .uaesa-idv-btn-primary {
    position: relative;
    overflow: hidden;
    font-family: inherit;
    width: 100%;
    min-height: 56px;
    padding: 0 clamp(20px, 6vw, 28px);
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    font-size: clamp(14px, 3.6vw, 15px);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    touch-action: manipulation;
    transition:
        background-color 300ms var(--md-sys-motion-easing-standard),
        color 300ms var(--md-sys-motion-easing-standard),
        border-radius 300ms var(--md-sys-motion-easing-expressive),
        box-shadow 300ms var(--md-sys-motion-easing-standard),
        transform 150ms var(--md-sys-motion-easing-expressive);
}
#uaesa-idv-app button::before,
.uaesa-idv-card .uaesa-idv-btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 150ms var(--md-sys-motion-easing-standard);
    pointer-events: none;
    border-radius: inherit;
}
#uaesa-idv-app button:hover::before  { opacity: var(--md-state-hover); }
#uaesa-idv-app button:active {
    transform: scale(0.95);
    border-radius: var(--md-sys-shape-corner-large-increased);
}
#uaesa-idv-app button:active::before { opacity: var(--md-state-pressed); }
#uaesa-idv-app button svg { width: 20px; height: 20px; flex-shrink: 0; }
#uaesa-idv-app button[disabled] { opacity: 0.38; pointer-events: none; }

#uaesa-idv-app .idv-btn-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-sys-elevation-level0);
}
#uaesa-idv-app .idv-btn-primary:hover { box-shadow: var(--md-sys-elevation-level1); }

#uaesa-idv-app .idv-btn-ghost {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}
#uaesa-idv-app .idv-btn-ghost:hover { box-shadow: var(--md-sys-elevation-level1); }

#uaesa-idv-app .idv-btn-white {
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-primary);
    box-shadow: var(--md-sys-elevation-level1);
}
#uaesa-idv-app .idv-btn-white:hover { box-shadow: var(--md-sys-elevation-level2); }

#uaesa-idv-app .idv-btn-dark {
    background: var(--md-sys-color-on-surface);
    color: var(--md-sys-color-surface);
    opacity: 0.38;
    pointer-events: none;
}
#uaesa-idv-app .idv-btn-dark.ready {
    background: var(--md-sys-color-tertiary);
    color: var(--md-sys-color-on-tertiary);
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--md-sys-elevation-level1);
}
#uaesa-idv-app .idv-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}
#uaesa-idv-app .idv-divider::before,
#uaesa-idv-app .idv-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--md-sys-color-outline-variant);
}

/* ==========================================================================
   11. NAV BAR
   ========================================================================== */
#uaesa-idv-app .idv-nav-bar {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none;
    gap: 12px;
}
#uaesa-idv-app .idv-nav-bar > * { pointer-events: auto; }
#uaesa-idv-app .idv-nav-btn {
    appearance: none;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--md-sys-elevation-level1);
    touch-action: manipulation;
    flex-shrink: 0;
    transition:
        box-shadow 300ms var(--md-sys-motion-easing-standard),
        border-radius 300ms var(--md-sys-motion-easing-expressive),
        transform 150ms var(--md-sys-motion-easing-expressive);
}
#uaesa-idv-app .idv-nav-btn:active {
    transform: scale(0.9);
    border-radius: var(--md-sys-shape-corner-large);
}

/* ==========================================================================
   12. WEBCAM OVERLAY
   ========================================================================== */
#uaesa-idv-app #idv-webcam-overlay,
#uaesa-idv-app #idv-confirm-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: #000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#uaesa-idv-app #idv-webcam-overlay.active,
#uaesa-idv-app #idv-confirm-overlay.active { display: flex; }

#uaesa-idv-app #idv-webcam-video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    background: #000;
    transition: transform 300ms var(--md-sys-motion-easing-standard);
}
#uaesa-idv-app .idv-webcam-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding:
        calc(env(safe-area-inset-top, 0px) + 14px)
        calc(env(safe-area-inset-right, 0px) + 18px)
        32px
        calc(env(safe-area-inset-left, 0px) + 18px);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}
#uaesa-idv-app #idv-webcam-hint {
    flex: 1;
    color: #fff;
    font-size: clamp(12.5px, 3.4vw, 14px);
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    line-height: 1.35;
    margin: 0;
    min-width: 0;
}
#uaesa-idv-app .idv-webcam-guide {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}
#uaesa-idv-app .idv-webcam-guide-id {
    width: min(88%, 420px, calc(62vh * 1.586));
    aspect-ratio: 1.586 / 1;
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
}
#uaesa-idv-app .idv-webcam-corner {
    position: absolute;
    width: clamp(28px, 8vw, 38px);
    height: clamp(28px, 8vw, 38px);
    border: 5px solid var(--md-sys-color-tertiary);
    border-radius: var(--md-sys-shape-corner-large);
}
#uaesa-idv-app .idv-webcam-corner.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
#uaesa-idv-app .idv-webcam-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
#uaesa-idv-app .idv-webcam-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
#uaesa-idv-app .idv-webcam-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

#uaesa-idv-app .idv-webcam-guide-face {
    width: min(78vw, 300px, 48vh);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 5px solid var(--md-sys-color-tertiary);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
}
#uaesa-idv-app .idv-webcam-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding:
        32px
        calc(env(safe-area-inset-right, 0px) + 26px)
        calc(env(safe-area-inset-bottom, 0px) + 32px)
        calc(env(safe-area-inset-left, 0px) + 26px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}
#uaesa-idv-app #idv-webcam-overlay button {
    width: auto;
    min-height: 0;
    padding: 0;
    border-radius: var(--md-sys-shape-corner-full);
    flex: 0 0 auto;
}
#uaesa-idv-app .idv-webcam-icon-btn {
    width: 48px; height: 48px;
    min-width: 48px; min-height: 48px;
    background: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--md-sys-elevation-level1);
    touch-action: manipulation;
}
#uaesa-idv-app .idv-webcam-icon-btn svg { width: 24px; height: 24px; }
#uaesa-idv-app .idv-shoot-btn {
    width: clamp(64px, 18vw, 84px);
    height: clamp(64px, 18vw, 84px);
    background: var(--md-sys-color-surface-container-lowest);
    border: 5px solid var(--md-sys-color-surface-container-lowest);
    box-shadow: var(--md-sys-elevation-level2);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    touch-action: manipulation;
}
#uaesa-idv-app .idv-shoot-btn::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
    border: 3px solid var(--md-sys-color-tertiary);
    box-shadow: inset 0 0 0 2px var(--md-sys-color-surface-container-lowest);
}
#uaesa-idv-app .idv-shoot-btn:active { transform: scale(0.88); }

#uaesa-idv-app .idv-webcam-countdown {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: var(--md-sys-typescale-font-brand);
    font-size: clamp(80px, 24vw, 180px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 40px rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}
#uaesa-idv-app .idv-webcam-countdown.show {
    opacity: 1;
    animation: md-count 0.9s var(--md-sys-motion-easing-spring) both;
}
@keyframes md-count {
    0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50%  { transform: translate(-50%, -50%) scale(1.1);  opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
}
#uaesa-idv-app .idv-webcam-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
}
#uaesa-idv-app .idv-webcam-flash.fire {
    animation: md-flash 420ms var(--md-sys-motion-easing-standard);
}
@keyframes md-flash {
    0%   { opacity: 0.95; }
    100% { opacity: 0; }
}
#uaesa-idv-app #idv-confirm-overlay { background: #000; }
#uaesa-idv-app #idv-confirm-img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: contain;
    background: #000;
}
#uaesa-idv-app .idv-confirm-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding:
        22px
        calc(env(safe-area-inset-right, 0px) + 22px)
        calc(env(safe-area-inset-bottom, 0px) + 22px)
        calc(env(safe-area-inset-left, 0px) + 22px);
    background: rgba(0,0,0,0.7);
}
#uaesa-idv-app .idv-confirm-controls button { margin: 0; }
#uaesa-idv-app #idv-confirm-overlay .idv-btn-ghost {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
}
#uaesa-idv-app #idv-confirm-overlay .idv-btn-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}
@media (max-width: 340px) {
    #uaesa-idv-app .idv-confirm-controls { grid-template-columns: 1fr; }
}

/* ==========================================================================
   13. HIDDEN INPUTS + SNACKBAR
   ========================================================================== */
#uaesa-idv-app .idv-hidden-input {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}
#uaesa-idv-app #idv-webcam-canvas { display: none; }
#uaesa-idv-app #idv-toast {
    position: absolute;
    left: calc(env(safe-area-inset-left, 0px) + 16px);
    right: calc(env(safe-area-inset-right, 0px) + 16px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    transform: translateY(120px);
    max-width: 420px;
    margin: 0 auto;
    padding: 16px 20px;
    border-radius: var(--md-sys-shape-corner-extra-small);
    background: var(--md-sys-color-inverse-surface);
    color: var(--md-sys-color-inverse-on-surface);
    font-size: clamp(13px, 3.5vw, 14px);
    line-height: 1.4;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--md-sys-elevation-level3);
    transition: opacity 300ms var(--md-sys-motion-easing-emphasized),
                transform 300ms var(--md-sys-motion-easing-emphasized);
}
#uaesa-idv-app #idv-toast.show { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   14. AGE GATE OVERLAY
   ========================================================================== */
#idv-age-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    background: var(--md-sys-color-scrim);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--md-sys-typescale-font);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#idv-age-overlay[style*="display: flex"],
#idv-age-overlay[style*="display:flex"] { display: flex !important; }
#idv-age-overlay .idv-age-modal {
    width: 100%;
    max-width: 420px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: clamp(24px, 5vw, 32px) clamp(20px, 5vw, 28px);
    box-shadow: var(--md-sys-elevation-level3);
    animation: md-spring-pop 300ms var(--md-sys-motion-easing-spring) both;
}
#idv-age-overlay .idv-age-modal h3 {
    font-size: clamp(20px, 5vw, 22px);
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 8px;
    color: var(--md-sys-color-on-surface);
}
#idv-age-overlay .idv-age-modal p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0 0 20px;
}
#idv-age-overlay .idv-age-modal label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 8px;
}
#idv-age-overlay .idv-age-modal input[type="date"] {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 16px;
    font-family: inherit;
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface-container-lowest);
    margin-bottom: 14px;
}
#idv-age-overlay .idv-age-modal input[type="date"]:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px var(--md-sys-color-primary-container);
}
#idv-age-overlay .idv-age-error {
    color: var(--md-sys-color-error);
    background: var(--md-sys-color-error-container);
    border-radius: var(--md-sys-shape-corner-small);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 14px;
}
#idv-age-overlay .idv-age-modal button {
    width: 100%;
    min-height: 56px;
    padding: 0 24px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
#idv-age-overlay .idv-age-modal button[disabled] { opacity: 0.5; pointer-events: none; }

/* ==========================================================================
   15. LIVE CAPTURE GUIDE
   ========================================================================== */
#uaesa-idv-app .idv-guide-scanline {
    position: absolute;
    left: 4px;
    right: 4px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--md-sys-color-primary-fixed) 20%,
        var(--md-sys-color-primary-fixed) 80%,
        transparent 100%);
    border-radius: var(--md-sys-shape-corner-full);
    box-shadow: 0 0 12px var(--md-sys-color-primary-fixed),
                0 0 4px var(--md-sys-color-primary-fixed);
    animation: uaesa-scanline 3s var(--md-sys-motion-easing-standard) infinite;
    pointer-events: none;
    z-index: 6;
    opacity: 0.85;
}
@keyframes uaesa-scanline {
    0%   { top: 6%;  opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.9; }
    100% { top: 94%; opacity: 0; }
}
#uaesa-idv-app .idv-guide-scanline-round {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    pointer-events: none;
    overflow: hidden;
}
#uaesa-idv-app .idv-guide-scanline-round::before {
    content: "";
    position: absolute;
    left: 8%; right: 8%;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--md-sys-color-tertiary-fixed) 20%,
        var(--md-sys-color-tertiary-fixed) 80%,
        transparent 100%);
    border-radius: var(--md-sys-shape-corner-full);
    box-shadow: 0 0 12px var(--md-sys-color-tertiary),
                0 0 4px var(--md-sys-color-tertiary);
    animation: uaesa-scanline-face 3s var(--md-sys-motion-easing-standard) infinite;
}
@keyframes uaesa-scanline-face {
    0%   { top: 8%;  opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.9; }
    100% { top: 92%; opacity: 0; }
}
#uaesa-idv-app .idv-guide-status {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 8;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms var(--md-sys-motion-easing-standard),
                transform 300ms var(--md-sys-motion-easing-spring),
                background-color 300ms var(--md-sys-motion-easing-standard);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
}
#uaesa-idv-app .idv-guide-status[data-state] {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#uaesa-idv-app .idv-guide-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #BEC8C9;
    flex-shrink: 0;
    animation: uaesa-status-pulse 1.4s var(--md-sys-motion-easing-standard) infinite;
}
@keyframes uaesa-status-pulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%      { transform: scale(1.35); opacity: 0.6; }
}
#uaesa-idv-app .idv-guide-status[data-state="searching"] .idv-guide-status-dot { background: #FF6B6B; }
#uaesa-idv-app .idv-guide-status[data-state="aligning"]  .idv-guide-status-dot { background: #FFB870; }
#uaesa-idv-app .idv-guide-status[data-state="ready"]     .idv-guide-status-dot {
    background: #52D6D8;
    animation: uaesa-status-ready 0.6s var(--md-sys-motion-easing-spring) infinite;
}
@keyframes uaesa-status-ready {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.4); }
}
#uaesa-idv-app .idv-guide-status[data-state="ready"] {
    background: rgba(0, 165, 167, 0.95);
    box-shadow: 0 0 20px rgba(0, 165, 167, 0.6);
}
#uaesa-idv-app .idv-webcam-guide-id[data-live-state="searching"] .idv-webcam-corner { border-color: #FF6B6B; }
#uaesa-idv-app .idv-webcam-guide-id[data-live-state="aligning"]  .idv-webcam-corner { border-color: #FFB870; }
#uaesa-idv-app .idv-webcam-guide-id[data-live-state="ready"]     .idv-webcam-corner {
    border-color: #52D6D8;
    box-shadow: 0 0 16px rgba(82, 214, 216, 0.7);
}
#uaesa-idv-app .idv-guide-auto-ring {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    z-index: 8;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms var(--md-sys-motion-easing-standard);
    transform: rotate(-90deg);
}
#uaesa-idv-app .idv-guide-auto-ring.active { opacity: 1; }
#uaesa-idv-app .idv-guide-auto-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 3;
}
#uaesa-idv-app .idv-guide-auto-ring-fill {
    fill: none;
    stroke: #52D6D8;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 200ms linear;
    filter: drop-shadow(0 0 6px rgba(82, 214, 216, 0.8));
}

/* ==========================================================================
   16. STATUS CARD
   ========================================================================== */
.uaesa-idv-card {
    width: 100%;
    max-width: 640px;
    margin: clamp(12px, 3vw, 20px) auto;
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    border: none;
    border-radius: var(--md-sys-shape-corner-extra-large);
    overflow: hidden;
    font-family: var(--md-sys-typescale-font);
    font-size: clamp(14px, 3.6vw, 15px);
    line-height: 1.5;
    box-shadow: var(--md-sys-elevation-level1);
}
.uaesa-idv-card-header {
    display: flex;
    align-items: flex-start;
    gap: clamp(12px, 4vw, 18px);
    padding:
        clamp(20px, 5vw, 28px)
        clamp(16px, 4.5vw, 24px)
        clamp(18px, 5vw, 26px);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
}
.uaesa-idv-card-header-verified   { background: var(--md-sys-color-primary-container);   color: var(--md-sys-color-on-primary-container); }
.uaesa-idv-card-header-pending    { background: var(--md-sys-color-tertiary-container);  color: var(--md-sys-color-on-tertiary-container); }
.uaesa-idv-card-header-rejected   { background: var(--md-sys-color-error-container);     color: var(--md-sys-color-on-error-container); }
.uaesa-idv-card-header-unverified {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
}
.uaesa-idv-card-badge {
    flex: 0 0 auto;
    width: clamp(48px, 13vw, 60px);
    height: clamp(48px, 13vw, 60px);
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-surface-container-lowest);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-primary);
    box-shadow: var(--md-sys-elevation-level1);
}
.uaesa-idv-card-header-verified .uaesa-idv-card-badge   { color: var(--md-sys-color-primary); }
.uaesa-idv-card-header-pending  .uaesa-idv-card-badge   { color: var(--md-sys-color-tertiary); }
.uaesa-idv-card-header-rejected .uaesa-idv-card-badge   { color: var(--md-sys-color-error); }
.uaesa-idv-card-header-unverified .uaesa-idv-card-badge { color: var(--md-sys-color-on-surface-variant); }
.uaesa-idv-card-badge-icon { display: flex; }
.uaesa-idv-card-badge-icon svg { width: clamp(22px, 6vw, 28px); height: clamp(22px, 6vw, 28px); }
.uaesa-idv-card-header-text { flex: 1; min-width: 0; }
.uaesa-idv-card-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 8px;
}
.uaesa-idv-card-title {
    font-size: clamp(20px, 5.6vw, 26px);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 6px;
    color: inherit;
}
.uaesa-idv-card-subtitle {
    font-size: clamp(13px, 3.5vw, 14px);
    line-height: 1.45;
    margin: 0;
    opacity: 0.85;
}
.uaesa-idv-card-progress { padding: clamp(16px, 4vw, 20px) clamp(16px, 4.5vw, 24px) 0; }
.uaesa-idv-card-progress-track {
    height: 6px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-surface-container-highest);
    overflow: hidden;
}
.uaesa-idv-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg,
        var(--md-sys-color-primary) 0%,
        var(--md-sys-color-primary) 55%,
        var(--md-sys-color-tertiary) 100%);
    border-radius: inherit;
    transition: width 500ms var(--md-sys-motion-easing-emphasized);
}
.uaesa-idv-card-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    flex-wrap: wrap;
}
.uaesa-idv-card-body { padding: clamp(18px, 4.5vw, 22px) clamp(16px, 4.5vw, 24px) clamp(20px, 5vw, 26px); }
.uaesa-idv-card-compact .uaesa-idv-card-body { padding: clamp(14px, 4vw, 18px) clamp(14px, 4vw, 20px) clamp(18px, 4.5vw, 22px); }
.uaesa-idv-card-empty {
    margin: 0;
    padding: 14px 0;
    font-size: clamp(13px, 3.5vw, 14px);
    color: var(--md-sys-color-on-surface-variant);
}
.uaesa-idv-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(13px, 3.5vw, 14px);
    table-layout: fixed;
}
.uaesa-idv-detail-table th,
.uaesa-idv-detail-table td {
    padding: 14px 0;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.uaesa-idv-detail-table tr:last-child th,
.uaesa-idv-detail-table tr:last-child td { border-bottom: none; }
.uaesa-idv-detail-table th {
    width: 44%;
    color: var(--md-sys-color-on-surface-variant);
    font-size: clamp(12px, 3.2vw, 13px);
    font-weight: 500;
}
.uaesa-idv-detail-table th .uaesa-idv-detail-icon {
    display: inline-flex;
    margin-right: 8px;
    vertical-align: middle;
}
.uaesa-idv-detail-table td { color: var(--md-sys-color-on-surface); }
.uaesa-idv-detail-icon {
    width: clamp(26px, 7vw, 30px);
    height: clamp(26px, 7vw, 30px);
    border-radius: var(--md-sys-shape-corner-small);
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.uaesa-idv-detail-icon svg { width: 16px; height: 16px; }
.uaesa-idv-muted { color: var(--md-sys-color-on-surface-variant); }
.uaesa-idv-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 2.5vw, 12px);
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}
.uaesa-idv-thumb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.uaesa-idv-thumb-frame {
    width: 100%;
    aspect-ratio: 1.4 / 1;
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-surface-container);
    border: 1.5px dashed var(--md-sys-color-outline-variant);
    display: flex;
    align-items: center;
    justify-content: center;
}
.uaesa-idv-thumb-item.is-filled .uaesa-idv-thumb-frame {
    border-style: solid;
    border-color: transparent;
    background: var(--md-sys-color-primary-container);
}
.uaesa-idv-thumb-check,
.uaesa-idv-thumb-x {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.uaesa-idv-thumb-check { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.uaesa-idv-thumb-x {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface-variant);
}
.uaesa-idv-thumb-check svg { width: 18px; height: 18px; }
.uaesa-idv-thumb-x svg { width: 15px; height: 15px; }
.uaesa-idv-thumb-label {
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    line-height: 1.2;
}
.uaesa-idv-thumb-item.is-filled .uaesa-idv-thumb-label { color: var(--md-sys-color-on-surface); }
.uaesa-idv-card-note {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    font-size: clamp(12.5px, 3.4vw, 13.5px);
    line-height: 1.45;
}
.uaesa-idv-note-icon { display: flex; flex-shrink: 0; margin-top: 2px; }
.uaesa-idv-note-icon svg { width: 20px; height: 20px; }
.uaesa-idv-card-note strong {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.uaesa-idv-card-note p { margin: 0; color: inherit; }
.uaesa-idv-timeline {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}
.uaesa-idv-timeline-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 18px;
}
.uaesa-idv-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.uaesa-idv-timeline-item {
    position: relative;
    padding: 0 0 22px 34px;
}
.uaesa-idv-timeline-item:last-child { padding-bottom: 0; }
.uaesa-idv-timeline-item::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 18px;
    bottom: -4px;
    width: 2px;
    background: var(--md-sys-color-outline-variant);
    border-radius: 1px;
}
.uaesa-idv-timeline-item:last-child::before { display: none; }
.uaesa-idv-timeline-dot {
    position: absolute;
    left: 0; top: 4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--md-sys-color-surface-container-low);
    border: 3px solid var(--md-sys-color-on-surface-variant);
    box-shadow: 0 0 0 3px var(--md-sys-color-surface-container-low);
}
.uaesa-idv-timeline-success .uaesa-idv-timeline-dot { border-color: var(--md-sys-color-primary); }
.uaesa-idv-timeline-danger  .uaesa-idv-timeline-dot { border-color: var(--md-sys-color-error); }
.uaesa-idv-timeline-info    .uaesa-idv-timeline-dot { border-color: var(--md-sys-color-tertiary); }
.uaesa-idv-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.uaesa-idv-timeline-label {
    font-size: clamp(13px, 3.5vw, 14px);
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}
.uaesa-idv-timeline-time {
    font-size: clamp(11px, 3vw, 12px);
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
}
.uaesa-idv-timeline-desc {
    font-size: clamp(12px, 3.3vw, 13px);
    line-height: 1.45;
    color: var(--md-sys-color-on-surface-variant);
}
.uaesa-idv-card-footer { padding: 0 clamp(16px, 4.5vw, 24px) clamp(20px, 5vw, 26px); }
.uaesa-idv-card-compact .uaesa-idv-card-footer { padding: 0 clamp(14px, 4vw, 20px) clamp(18px, 4.5vw, 22px); }
.uaesa-idv-card-hint {
    font-size: clamp(12px, 3.3vw, 13px);
    line-height: 1.45;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    padding: 16px 18px;
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-surface-container);
}
.uaesa-idv-card-hint-success {
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    width: 100%;
}
.uaesa-idv-card-hint-success svg { width: 18px; height: 18px; flex-shrink: 0; }
.uaesa-idv-card .uaesa-idv-btn-primary {
    display: inline-flex;
    width: 100%;
    min-height: 56px;
    padding: 0 clamp(20px, 6vw, 28px);
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-weight: 500;
    font-size: clamp(14px, 3.6vw, 15px);
    text-decoration: none;
}
.uaesa-idv-card .uaesa-idv-badge,
.uaesa-idv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: var(--md-sys-shape-corner-small);
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 500;
    line-height: 1;
}
.uaesa-idv-card .uaesa-idv-badge-verified,
.uaesa-idv-badge-verified   { background: var(--md-sys-color-primary-container);   color: var(--md-sys-color-on-primary-container); }
.uaesa-idv-card .uaesa-idv-badge-pending,
.uaesa-idv-badge-pending    { background: var(--md-sys-color-tertiary-container);  color: var(--md-sys-color-on-tertiary-container); }
.uaesa-idv-card .uaesa-idv-badge-rejected,
.uaesa-idv-badge-rejected   { background: var(--md-sys-color-error-container);     color: var(--md-sys-color-on-error-container); }
.uaesa-idv-card .uaesa-idv-badge-unverified,
.uaesa-idv-badge-unverified { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.uaesa-idv-status-inline { display: inline-flex; }

/* ==========================================================================
   17. ADMIN
   ========================================================================== */
.uaesa-idv-admin .uaesa-idv-admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.uaesa-idv-admin .uaesa-idv-admin-header h1 { margin: 0; }
.uaesa-idv-admin .uaesa-idv-admin-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.uaesa-idv-admin .uaesa-idv-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
}
.uaesa-idv-admin .uaesa-idv-filters input[type="search"] {
    min-width: 220px;
    flex: 1 1 240px;
    max-width: 360px;
}
.uaesa-idv-admin .uaesa-idv-thumbs { display: inline-flex; gap: 6px; margin: 0; padding: 0; border: none; grid-template-columns: none; }
.uaesa-idv-admin .uaesa-idv-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: var(--md-sys-shape-corner-small);
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}
.uaesa-idv-admin .uaesa-idv-thumb-empty {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface-variant);
}
.uaesa-idv-admin .uaesa-idv-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.uaesa-idv-admin .uaesa-idv-danger { color: var(--md-sys-color-error); border-color: var(--md-sys-color-error-container); }
.uaesa-idv-status {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: var(--md-sys-shape-corner-small);
    font-size: 11px;
    font-weight: 500;
}
.uaesa-idv-status-pending  { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.uaesa-idv-status-verified { background: var(--md-sys-color-primary-container);  color: var(--md-sys-color-on-primary-container); }
.uaesa-idv-status-rejected { background: var(--md-sys-color-error-container);    color: var(--md-sys-color-on-error-container); }

/* ==========================================================================
   18. MOBILE FULLSCREEN TAKEOVER
   ========================================================================== */
@media (max-width: 639px) {
    body.uaesa-idv-active {
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important; height: 100% !important;
        overscroll-behavior: none;
    }
    body.uaesa-idv-active #uaesa-idv-app {
        position: fixed !important;
        top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 999999 !important;
    }
    body.uaesa-idv-active #uaesa-idv-app .uaesa-idv-progress { top: env(safe-area-inset-top, 0px); }
    body.uaesa-idv-active #uaesa-idv-app .idv-nav-bar {
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        left: calc(env(safe-area-inset-left, 0px) + 12px);
        right: calc(env(safe-area-inset-right, 0px) + 12px);
    }
    body.uaesa-idv-active #uaesa-idv-app #idv-webcam-overlay,
    body.uaesa-idv-active #uaesa-idv-app #idv-confirm-overlay {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999999 !important;
    }
    body.uaesa-idv-active #uaesa-idv-app #idv-toast {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        left: calc(env(safe-area-inset-left, 0px) + 16px);
        right: calc(env(safe-area-inset-right, 0px) + 16px);
    }
    body.uaesa-idv-active #uaesa-idv-app .idv-webcam-topbar {
        padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
        padding-left: calc(env(safe-area-inset-left, 0px) + 18px);
        padding-right: calc(env(safe-area-inset-right, 0px) + 18px);
    }
    body.uaesa-idv-active #uaesa-idv-app .idv-webcam-controls {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
        padding-left: calc(env(safe-area-inset-left, 0px) + 26px);
        padding-right: calc(env(safe-area-inset-right, 0px) + 26px);
    }
    body.uaesa-idv-active #uaesa-idv-app .idv-confirm-controls {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
        padding-left: calc(env(safe-area-inset-left, 0px) + 22px);
        padding-right: calc(env(safe-area-inset-right, 0px) + 22px);
    }
}

/* ==========================================================================
   19. RESPONSIVE
   ========================================================================== */
@media (max-width: 375px) {
    #uaesa-idv-app .idv-intro-body { padding-left: 18px; padding-right: 18px; }
    #uaesa-idv-app .idv-bottom-half { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 360px) {
    #uaesa-idv-app .idv-intro-top { padding: calc(env(safe-area-inset-top, 0px) + 32px) 18px 36px; min-height: 200px; }
    #uaesa-idv-app .idv-intro-top h1 { font-size: 22px; }
    #uaesa-idv-app .idv-intro-top p  { font-size: 13px; }
    #uaesa-idv-app .idv-intro-body { padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px)); gap: 16px; }
    #uaesa-idv-app .idv-doctype-card { padding: 14px 8px 12px; min-height: 108px; }
    #uaesa-idv-app .idv-doctype-icon { width: 40px; height: 40px; }
    #uaesa-idv-app .idv-doctype-icon svg { width: 20px; height: 20px; }
    #uaesa-idv-app button { min-height: 52px; font-size: 14px; }
    #uaesa-idv-app .idv-bottom-half { padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    #uaesa-idv-app .idv-face-circle { width: min(70vw, 200px, 30vh); height: min(70vw, 200px, 30vh); margin-bottom: 20px; }
}
@media (max-height: 720px) {
    #uaesa-idv-app .idv-intro-top { min-height: 190px; padding: calc(env(safe-area-inset-top, 0px) + 26px) 22px 30px; }
    #uaesa-idv-app .idv-intro-badge { width: 52px; height: 52px; margin-bottom: 14px; }
    #uaesa-idv-app .idv-intro-badge svg { width: 24px; height: 24px; }
    #uaesa-idv-app .idv-intro-top h1 { font-size: 26px; }
    #uaesa-idv-app .idv-top-half { min-height: 180px; max-height: 34vh; }
    #uaesa-idv-app .idv-bottom-half { padding-top: 18px; }
    #uaesa-idv-app .idv-face-circle { width: min(56vw, 200px, 30vh); height: min(56vw, 200px, 30vh); margin-bottom: 18px; }
}
@media (max-height: 640px) {
    #uaesa-idv-app .idv-intro-top { min-height: 160px; padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 24px; }
    #uaesa-idv-app .idv-intro-badge { width: 48px; height: 48px; margin-bottom: 10px; border-radius: var(--md-sys-shape-corner-large-increased); }
    #uaesa-idv-app .idv-intro-badge svg { width: 22px; height: 22px; }
    #uaesa-idv-app .idv-intro-top h1 { font-size: 22px; margin-bottom: 6px; }
    #uaesa-idv-app .idv-intro-top p  { font-size: 12.5px; }
    #uaesa-idv-app .idv-doctype-card { min-height: 96px; padding: 12px 10px; }
    #uaesa-idv-app .idv-doctype-icon { width: 36px; height: 36px; }
    #uaesa-idv-app .idv-doctype-icon svg { width: 18px; height: 18px; }
    #uaesa-idv-app .idv-top-half { min-height: 140px; max-height: 30vh; }
    #uaesa-idv-app .idv-face-circle { width: min(48vw, 160px, 26vh); height: min(48vw, 160px, 26vh); margin-bottom: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
    #uaesa-idv-app { max-width: 520px; margin: 0 auto; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
    #uaesa-idv-app .idv-intro-top { min-height: 140px; padding: calc(env(safe-area-inset-top, 0px) + 16px) 24px 20px; }
    #uaesa-idv-app .idv-intro-badge { width: 40px; height: 40px; margin-bottom: 10px; }
    #uaesa-idv-app .idv-intro-badge svg { width: 18px; height: 18px; }
    #uaesa-idv-app .idv-intro-top h1 { font-size: 20px; }
    #uaesa-idv-app .idv-top-half { height: 58%; min-height: 140px; }
    #uaesa-idv-app .idv-bottom-half { padding: 14px; }
    #uaesa-idv-app .idv-face-circle { width: min(38vh, 150px); height: min(38vh, 150px); margin-bottom: 10px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    #uaesa-idv-app .idv-doctype-card { min-height: 160px; }
    #uaesa-idv-app .idv-doctype-icon { width: 60px; height: 60px; }
    #uaesa-idv-app .idv-doctype-icon svg { width: 28px; height: 28px; }
    #uaesa-idv-app .idv-face-circle { width: min(56vw, 280px, 40vh); height: min(56vw, 280px, 40vh); }
}

/* ==========================================================================
   20. ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    #uaesa-idv-app *, .uaesa-idv-card *, #idv-age-overlay * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #uaesa-idv-app .idv-guide-scanline,
    #uaesa-idv-app .idv-guide-scanline-round::before,
    #uaesa-idv-app .idv-guide-status-dot { animation: none !important; }
}
@media (prefers-contrast: more) {
    #uaesa-idv-app, .uaesa-idv-card, #idv-age-overlay {
        --md-sys-color-outline-variant: var(--md-sys-color-outline);
    }
}
@media screen and (max-width: 767px) {
    #uaesa-idv-app input, #uaesa-idv-app select, #uaesa-idv-app textarea,
    .uaesa-idv-card input, .uaesa-idv-card select, .uaesa-idv-card textarea,
    #idv-age-overlay input { font-size: 16px; }
}
@media print {
    #uaesa-idv-app { display: none; }
    #idv-age-overlay { display: none; }
    .uaesa-idv-card { box-shadow: none; border: 1px solid #ccc; }
    .uaesa-idv-card-footer { display: none; }
}