/* =========================================
   MONETIX - RESPONSIVE OVERRIDES
   Ensures the app looks great on all devices
   ========================================= */

/* ===== BASE MOBILE-FIRST FIXES ===== */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

/* Fix Chrome mobile URL bar cutting content */
:root {
    --app-height: 100vh;
}

html {
    height: -webkit-fill-available;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

/* Screens should use dvh to avoid Chrome bar cutoff */
.screen {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

/* Modal overlays also need dvh */
.modal-overlay {
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
}

/* =========================================
   CRITICAL FIX: DASHBOARD BREAKOUT
   The #screen-client-dash needs to escape the
   450px max-width of .app-container to give the
   two-column layout (sidebar + content) enough room.
   ========================================= */
#screen-client-dash {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    height: 100dvh;
    padding: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    /* Controlled by app.js */
    align-items: center;
    justify-content: flex-start;
    z-index: 50;
    background-color: var(--soft-blue-bg, #F0F4F8);
}

#screen-client-dash .db-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 1.5rem;
    min-height: auto;
}

/* On screens wide enough for two columns */
@media (min-width: 769px) {
    #screen-client-dash .db-container {
        margin: 2rem auto;
        border-radius: 1.5rem;
        min-height: auto;
        overflow: hidden !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    #screen-client-dash .db-sidebar {
        border-radius: 1.5rem 0 0 1.5rem;
    }

    #screen-client-dash .db-content {
        border-radius: 0 1.5rem 1.5rem 0;
    }
}

/* On mobile, stack sidebar and content vertically with full width */
@media (max-width: 768px) {
    #screen-client-dash .db-container {
        flex-direction: column !important;
        border-radius: 0 !important;
        overflow: visible !important;
        min-height: auto !important;
    }

    #screen-client-dash .db-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-radius: 0 !important;
        padding: 1.5rem !important;
    }

    #screen-client-dash .db-content {
        width: 100% !important;
        padding: 1.5rem !important;
    }

    #screen-client-dash .db-greeting {
        font-size: 1.5rem !important;
    }

    #screen-client-dash .db-amount-xxl {
        font-size: 2.5rem !important;
    }

    #screen-client-dash .db-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }

    #screen-client-dash .db-grid-item {
        padding: 1rem 0.75rem !important;
        min-height: 90px !important;
    }

    #screen-client-dash .db-grid-label {
        font-size: 0.6rem !important;
    }

    #screen-client-dash .db-grid-val {
        font-size: 0.875rem !important;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    #screen-client-dash .db-sidebar {
        padding: 1.25rem 1rem !important;
    }

    #screen-client-dash .db-content {
        padding: 1.25rem 1rem !important;
    }

    #screen-client-dash .db-greeting {
        font-size: 1.25rem !important;
    }

    #screen-client-dash .db-amount-xxl {
        font-size: 2rem !important;
    }

    #screen-client-dash .db-grid-item {
        padding: 0.75rem 0.5rem !important;
        min-height: 80px !important;
    }

    #screen-client-dash .db-grid-label {
        font-size: 0.55rem !important;
    }

    #screen-client-dash .db-grid-val {
        font-size: 0.8rem !important;
    }

    #screen-client-dash .db-cta-btn {
        padding: 1rem !important;
    }

    #screen-client-dash .db-cta-main {
        font-size: 0.85rem !important;
    }

    #screen-client-dash .db-cta-label {
        font-size: 0.55rem !important;
    }
}

/* Gallery grid responsive fix for modals */
@media (max-width: 480px) {
    .gallery-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 10px !important;
        padding-bottom: 15px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-item {
        flex: 0 0 140px !important;
        scroll-snap-align: start;
    }

    #modal-view-voucher .modal-content {
        padding: 15px !important;
    }
}

/* ===== MOBILE: 0 - 480px ===== */
@media (max-width: 480px) {

    /* Login / Welcome Card */
    .card-container {
        margin: 10px !important;
        padding: 25px 18px !important;
        border-radius: 20px !important;
    }

    .logo-text {
        font-size: 24px !important;
    }

    .subtitle {
        font-size: 12px !important;
    }

    .custom-input {
        font-size: 14px !important;
        padding: 12px 15px !important;
    }

    .btn-main,
    .btn-secondary,
    .btn-pay {
        padding: 14px !important;
        font-size: 15px !important;
    }

    /* Dashboard Sidebar */
    .db-sidebar {
        padding: 1.5rem 1rem !important;
    }

    .db-greeting {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .db-nav-item {
        padding: 12px !important;
        font-size: 0.8rem !important;
    }

    /* Dashboard Content */
    .db-content {
        padding: 1.25rem !important;
    }

    .db-amount-xxl {
        font-size: 2rem !important;
    }

    .db-stat-title {
        font-size: 0.65rem !important;
    }

    /* Stats Grid */
    .db-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .db-grid-item {
        padding: 12px 8px !important;
        min-height: 85px !important;
    }

    .db-grid-value {
        font-size: 0.8rem !important;
    }

    .db-grid-label {
        font-size: 0.55rem !important;
    }

    /* CTA Button */
    .db-cta-btn {
        padding: 14px 16px !important;
        border-radius: 14px !important;
    }

    .db-cta-main {
        font-size: 0.9rem !important;
    }

    .db-cta-label {
        font-size: 0.55rem !important;
    }

    /* Modals */
    .modal-container {
        margin: 10px !important;
        max-width: calc(100vw - 20px) !important;
        padding: 20px 15px !important;
        border-radius: 18px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    .modal-full {
        min-height: auto !important;
        max-height: 90vh !important;
    }

    /* Payment Modal */
    #modal-payment .modal-container {
        padding: 20px 15px !important;
    }

    .pm-btn-primary {
        padding: 14px !important;
        font-size: 14px !important;
    }

    /* Admin Panel */
    .admin-option {
        padding: 14px !important;
        font-size: 13px !important;
    }

    .admin-option i {
        font-size: 20px !important;
    }

    /* Admin Dashboard Stats */
    .stats-vertical {
        padding: 10px !important;
    }

    .stat-card {
        padding: 15px !important;
    }

    .stat-value {
        font-size: 22px !important;
    }

    /* Tables */
    .custom-table {
        font-size: 12px !important;
    }

    .custom-table th,
    .custom-table td {
        padding: 8px 6px !important;
    }

    .custom-table .sticky-col {
        width: 90px !important;
    }

    /* Admin Dash Header */
    .dash-header {
        padding: 20px 15px !important;
    }

    .dash-header h2 {
        font-size: 18px !important;
    }

    /* Renewal Request Cards */
    .renewal-req-card {
        padding: 15px !important;
    }

    /* Renewal Modal */
    .renewal-body {
        padding: 20px 15px !important;
        gap: 20px !important;
    }

    .renewal-interest-box {
        padding: 16px !important;
    }

    .renewal-interest-value {
        font-size: 28px !important;
    }

    /* Product/State sidebar blocks */
    .db-product-block,
    .db-status-block {
        padding: 12px !important;
    }

    /* Paid Loan Screen */
    #screen-loan-paid>div>div {
        margin: 10px !important;
        border-radius: 18px !important;
    }

    #screen-loan-paid h1 {
        font-size: 18px !important;
    }

    /* Flujo de Caja modal */
    .flow-modal-container {
        width: 95vw !important;
        max-width: 95vw !important;
        padding: 15px !important;
    }

    .flow-kpi-grid {
        grid-template-columns: 1fr !important;
    }

    /* ===== MODAL PRÉSTAMOS / EMPEÑOS (modal-impulsar) ===== */
    #modal-impulsar>div {
        max-width: 100% !important;
        width: calc(100% - 20px) !important;
        margin: 10px !important;
        padding: 24px 16px !important;
        border-radius: 18px !important;
    }

    #modal-impulsar>div>div:first-of-type+div {
        /* Title section */
        margin-bottom: 20px !important;
    }

    #modal-impulsar>div>div:first-of-type+div h1 {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }

    /* Option cards inside modal-impulsar */
    #modal-impulsar button[style*="padding: 22px 24px"] {
        padding: 14px 12px !important;
        border-radius: 14px !important;
    }

    #modal-impulsar button[style*="padding: 22px 24px"] div[style*="width: 56px"] {
        width: 42px !important;
        height: 42px !important;
    }

    #modal-impulsar button[style*="padding: 22px 24px"] div[style*="font-size: 17px"] {
        font-size: 15px !important;
    }

    #modal-impulsar button[style*="padding: 22px 24px"] div[style*="font-size: 13px"] {
        font-size: 12px !important;
    }

    #modal-impulsar button[style*="padding: 22px 24px"] div[style*="gap: 18px"] {
        gap: 12px !important;
    }

    /* ===== SCREEN LOAN PAID ===== */
    #screen-loan-paid>div>div {
        margin: 10px !important;
        border-radius: 18px !important;
    }

    #screen-loan-paid>div>div>div:last-child {
        padding: 25px 18px !important;
    }

    #screen-loan-paid h1 {
        font-size: 18px !important;
    }

    #screen-loan-paid p {
        font-size: 13px !important;
    }

    #screen-loan-paid div[style*="max-width: 440px"] {
        max-width: 100% !important;
    }

    /* Info card inside loan paid */
    #screen-loan-paid div[style*="padding: 20px"][style*="border-radius: 16px"] {
        padding: 14px !important;
    }

    #screen-loan-paid span[style*="font-size: 20px"] {
        font-size: 16px !important;
    }

    /* ===== SCREEN INVESTOR PENDING ===== */
    #screen-investor-pending>div[style*="max-width: 320px"] {
        max-width: calc(100% - 40px) !important;
        width: 100% !important;
    }

    #screen-investor-pending div[style*="font-size: 24px"] {
        font-size: 18px !important;
    }

    #screen-investor-pending button[style*="max-width: 320px"] {
        max-width: calc(100% - 40px) !important;
    }

    /* ===== MODAL NEW LOAN ===== */
    #modal-new-loan .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 14px !important;
        max-height: 90vh !important;
    }

    #modal-new-loan h3 {
        font-size: 18px !important;
    }

    /* ===== SCREEN LOAN MANAGER TOOLBAR ===== */
    #screen-loan-manager .loans-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #screen-loan-manager .loans-toolbar .input-icon-wrap {
        min-width: unset !important;
        width: 100% !important;
    }

    #screen-loan-manager .loans-toolbar>.loans-toolbar {
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    #screen-loan-manager .loans-toolbar input[type="date"] {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 !important;
    }

    /* ===== SCREEN CLIENTS SEARCH ===== */
    #screen-clients>div>div>div[style*="display: flex"][style*="gap: 10px"] {
        flex-direction: column !important;
    }

    #screen-clients .input-icon-wrap {
        width: 100% !important;
    }

    #screen-clients button[onclick*="exportar"] {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px !important;
    }

    /* ===== MODAL SUCCESS LOAN ===== */
    #modal-success-loan .glass-modal {
        max-width: calc(100% - 20px) !important;
        padding: 25px 18px !important;
    }

    #modal-success-loan #success-loan-id {
        font-size: 22px !important;
    }

    #modal-success-loan h2 {
        font-size: 20px !important;
    }

    /* ===== MODAL ADMIN LOAN DETAIL ===== */
    #modal-admin-loan-detail .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 18px 14px !important;
        max-height: 90vh !important;
    }

    #modal-admin-loan-detail #detail-financial-box {
        padding: 12px !important;
    }

    #modal-admin-loan-detail #detail-financial-box div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        font-size: 12px !important;
    }

    #modal-admin-loan-detail .info-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    /* ===== MODAL SECURITY PIN ===== */
    #modal-security-pin .pin-input {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
    }

    #modal-security-pin .modal-content {
        max-width: calc(100vw - 30px) !important;
        padding: 20px 15px !important;
    }

    /* ===== MODAL COMING SOON ===== */
    #modal-coming-soon .modal-container {
        max-width: calc(100vw - 20px) !important;
        padding: 25px 18px !important;
    }

    /* ===== ADMIN INVESTMENTS TABLE ===== */
    #screen-admin-investments .dash-header {
        padding: 15px 50px 15px 15px !important;
    }

    /* ===== MODAL NEW CLIENT ===== */
    #modal-new-client .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 15px !important;
    }

    /* ===== MODAL EDIT CLIENT ===== */
    #modal-edit-client .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 15px !important;
    }

    /* ===== MODAL HOW IT WORKS ===== */
    #modal-how-it-works .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 14px !important;
    }

    /* ===== MODAL INVEST FORM ===== */
    #modal-invest-form .modal-content,
    #modal-invest-payment .modal-content,
    #modal-invest-kyc .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 15px !important;
    }

    /* ===== MODAL TERMS ===== */
    #modal-terms .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 14px !important;
    }

    /* ===== MODAL VIEW VOUCHER ===== */
    #modal-view-voucher .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 14px !important;
    }

    #modal-view-voucher .modal-content div[style*="display:flex"] {
        flex-direction: column !important;
    }

    /* ===== RENEWAL MODAL ===== */
    .renewal-card {
        max-width: calc(100vw - 20px) !important;
    }

    .renewal-body {
        padding: 20px 16px !important;
    }

    .renewal-amount-display {
        font-size: 32px !important;
    }

    .renewal-header {
        padding: 16px 20px !important;
    }

    /* ===== MODAL SUCCESS RENEWAL ===== */
    #modal-success-renewal .modal-container {
        max-width: calc(100vw - 20px) !important;
        padding: 25px 16px !important;
    }

    /* ===== SCREEN ADMIN-DASH HEADER ===== */
    #screen-admin-dash .dash-header {
        padding: 20px 15px 30px 15px !important;
    }

    /* ===== ADMIN SCREENS BACK BUTTON FIX ===== */
    #screen-loan-manager .dash-header,
    #screen-client-list .dash-header,
    #screen-admin-investments .dash-header {
        padding-right: 55px !important;
    }

    /* ===== SCREEN INVESTOR DASH ===== */
    #screen-investor-dash .glass-card {
        width: 92% !important;
        padding: 18px !important;
    }

    #screen-investor-dash .monto-valor {
        font-size: 28px !important;
    }

    /* ===== SCREEN INVESTOR LIST ===== */
    #screen-investor-list .glass-card {
        width: 92% !important;
        padding: 18px !important;
    }

    #screen-investor-list .monto-valor {
        font-size: 26px !important;
    }

    /* ===== MODAL ATTACH SIGNATURE ===== */
    #modal-attach-signature .modal-content {
        max-width: calc(100vw - 20px) !important;
        padding: 20px 15px !important;
    }

    /* ===== PROMO CARDS LOGIN ===== */
    .promo-container {
        gap: 12px !important;
    }

    .promo-card {
        padding: 14px !important;
    }

    .promo-card h5 {
        font-size: 13px !important;
    }

    .promo-card p {
        font-size: 11px !important;
    }
}

/* ===== SMALL TABLETS: 481px - 768px ===== */
@media (max-width: 768px) {

    /* Card container */
    .card-container {
        max-width: 100% !important;
        margin: 15px !important;
    }

    /* Dashboard layout: stack vertically */
    .db-container {
        flex-direction: column !important;
        max-width: 100% !important;
        border-radius: 1rem !important;
    }

    .db-sidebar {
        width: 100% !important;
        border-radius: 1rem 1rem 0 0 !important;
    }

    .db-content {
        width: 100% !important;
    }

    /* Modal sizing */
    .modal-container {
        max-width: calc(100vw - 30px) !important;
        margin: 15px !important;
    }

    /* Renewal options grid */
    .renewal-options-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin options grid */
    .admin-option {
        min-height: auto !important;
    }

    /* Flow modal */
    .flow-modal-container {
        width: 95vw !important;
        max-width: 650px !important;
    }

    .flow-kpi-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Tables horizontal scroll */
    .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Renewal request card - voucher grid */
    .renewal-req-card div[style*="grid-template-columns: 100px"] {
        grid-template-columns: 80px 1fr !important;
        gap: 10px !important;
    }

    .renewal-req-card div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Screen admin renewals header */
    #screen-renewals .dash-header h3 {
        font-size: 16px !important;
    }

    /* Dates grid inside dashboard */
    .db-stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Info grid for old-style screens */
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    .info-grid .divider {
        display: none !important;
    }

    /* Payment modal banks */
    .bank-account-card {
        padding: 12px !important;
    }

    /* ===== MODAL IMPULSAR (TABLET) ===== */
    #modal-impulsar>div {
        max-width: 95% !important;
        padding: 30px 24px !important;
        margin: 15px !important;
    }

    /* ===== SCREEN LOAN PAID (TABLET) ===== */
    #screen-loan-paid div[style*="max-width: 440px"] {
        max-width: 100% !important;
    }

    /* ===== LOAN MANAGER TOOLBAR (TABLET) ===== */
    #screen-loan-manager .loans-toolbar {
        flex-wrap: wrap !important;
    }

    #screen-loan-manager .loans-toolbar>.loans-toolbar {
        flex-wrap: wrap !important;
        flex: 1 !important;
        min-width: 200px !important;
    }

    /* ===== SCREEN CLIENTS (TABLET) ===== */
    #screen-clients>div>div>div[style*="display: flex"][style*="gap: 10px"] {
        flex-wrap: wrap !important;
    }

    /* ===== ALL MODALS (TABLET) ===== */
    .modal-content {
        max-width: calc(100vw - 30px) !important;
    }

    /* ===== MODAL ADMIN LOAN DETAIL (TABLET) ===== */
    #modal-admin-loan-detail .modal-content {
        max-width: calc(100vw - 30px) !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* ===== RENEWAL CARD (TABLET) ===== */
    .renewal-card {
        max-width: calc(100vw - 30px) !important;
    }

    /* ===== SCREEN INVESTOR PENDING (TABLET) ===== */
    #screen-investor-pending>div[style*="max-width: 320px"] {
        max-width: 90% !important;
    }

    #screen-investor-pending button[style*="max-width: 320px"] {
        max-width: 90% !important;
    }

    /* ===== ADMIN SCREENS HEADER (TABLET) ===== */
    #screen-loan-manager .dash-header,
    #screen-client-list .dash-header,
    #screen-admin-investments .dash-header {
        padding-right: 60px !important;
    }
}

/* ===== LANDSCAPE PHONES & SMALL DEVICES ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-container {
        max-height: 85vh !important;
        overflow-y: auto !important;
    }

    .db-sidebar {
        max-height: none !important;
    }
}

/* ===== TABLETS: 769px - 1024px ===== */
@media (min-width: 769px) and (max-width: 1024px) {

    .db-container {
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .db-sidebar {
        width: 35% !important;
    }

    .db-content {
        width: 65% !important;
    }

    .modal-container {
        max-width: 500px !important;
    }

    .flow-modal-container {
        max-width: 750px !important;
    }
}

/* ===== TOUCH DEVICE IMPROVEMENTS ===== */
@media (hover: none) and (pointer: coarse) {

    /* Larger tap targets */
    .btn-main,
    .btn-secondary,
    .btn-pay,
    .pm-btn-primary,
    .admin-option,
    .db-nav-item,
    .db-cta-btn {
        min-height: 44px !important;
    }

    /* Remove hover effects on touch */
    .renewal-req-card:hover,
    .flow-item:hover,
    .option-card:hover,
    .renewal-option-card:hover {
        transform: none !important;
    }

    /* Smooth scrolling */
    .table-wrapper,
    .gallery-container {
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
    }

    /* Better scrollbars for mobile */
    ::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 10px;
    }
}

/* ===== PAYMENT MODAL RESPONSIVE ===== */
@media (max-width: 480px) {
    .pm-modal-content {
        max-width: calc(100vw - 20px) !important;
        margin: 10px !important;
        border-radius: 14px !important;
    }

    .pm-header {
        padding: 1.25rem 1rem 0.75rem 1rem !important;
    }

    .pm-title {
        font-size: 1rem !important;
    }

    .pm-amount {
        font-size: 1.5rem !important;
    }

    .pm-body {
        padding: 0 1rem 1rem 1rem !important;
        max-height: 55vh !important;
    }

    .pm-bank-account {
        font-size: 0.875rem !important;
    }

    .pm-upload-area {
        height: 6rem !important;
    }
}

@media (max-width: 768px) {
    .pm-modal-content {
        max-width: calc(100vw - 30px) !important;
        margin: 15px !important;
    }
}

/* ===== TRUST SEALS RESPONSIVE ===== */
@media (max-width: 480px) {
    .trust-seals-container {
        gap: 10px !important;
        padding: 0 5px !important;
    }

    .trust-seal .seal-icon {
        font-size: 12px !important;
    }

    .trust-seal .seal-title {
        font-size: 8px !important;
    }
}

@media (max-width: 360px) {
    .trust-seals-container {
        gap: 6px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
}

/* ===== EXTRA-SMALL SCREENS (≤360px) ===== */
@media (max-width: 360px) {

    .card-container {
        margin: 8px !important;
        padding: 20px 14px !important;
    }

    .logo-text {
        font-size: 20px !important;
    }

    .db-amount-xxl {
        font-size: 1.75rem !important;
    }

    .db-greeting {
        font-size: 1.1rem !important;
    }

    .db-grid-item {
        padding: 10px 6px !important;
        min-height: 75px !important;
    }

    .db-grid-val {
        font-size: 0.8rem !important;
    }

    .db-grid-label {
        font-size: 0.5rem !important;
    }

    .db-cta-main {
        font-size: 0.8rem !important;
    }

    .admin-menu-grid {
        gap: 10px !important;
        padding: 12px !important;
    }

    .admin-option {
        padding: 12px !important;
        font-size: 11px !important;
    }

    .admin-option i {
        font-size: 18px !important;
    }

    #modal-impulsar>div>div:first-of-type+div h1 {
        font-size: 18px !important;
    }

    #modal-impulsar button[style*="padding: 22px 24px"] {
        padding: 12px 10px !important;
    }

    #modal-impulsar button[style*="padding: 22px 24px"] div[style*="width: 56px"] {
        width: 36px !important;
        height: 36px !important;
    }

    .pin-input {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px !important;
    }

    .promo-image {
        width: 60px !important;
        height: 60px !important;
    }

    .promo-image i {
        font-size: 25px !important;
    }

    .btn-main {
        padding: 12px !important;
        font-size: 14px !important;
    }

    .welcome-title {
        font-size: 32px !important;
    }

    .welcome-subtitle {
        font-size: 14px !important;
    }

    .renewal-amount-display {
        font-size: 28px !important;
    }
}

/* ===== SAFE AREA (iPhone Notch) ===== */
@supports (padding: env(safe-area-inset-top)) {
    .screen {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .modal-overlay {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ===== PRINT OVERRIDE ===== */
@media print {

    .modal-overlay,
    .screen {
        position: static !important;
        display: block !important;
    }

    .db-sidebar,
    .db-cta-btn,
    .db-logout,
    button {
        display: none !important;
    }
}