/* ============================================
   Adasomi Next.js additions
   (inline alerts, registration success, solicitor note, admin tables)
   ============================================ */

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.5;
}
.app-alert i { font-size: 18px; margin-top: 2px; }
.app-alert-danger { background: #fdecee; color: #8a1c28; border-left: 4px solid #dc3545; }
.app-alert-success { background: #e7f6ec; color: #155724; border-left: 4px solid #28a745; }
.app-alert-warning { background: #fff7e6; color: #7a4b00; border-left: 4px solid #f0a500; }

/* Registration: success panel */
.reg-success { text-align: center; }
.reg-success-icon {
    width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 117, 188, 0.1); color: #0575bc; font-size: 32px;
}
.reg-next-steps { text-align: left; max-width: 520px; margin: 10px auto 0; padding-left: 20px; }
.reg-next-steps li { margin-bottom: 10px; color: #444; line-height: 1.6; list-style: decimal; }
.solicitor-note { background: #fff7e6 !important; border-color: #f5d48a !important; }
.solicitor-note p { margin: 0; color: #5c3d00; line-height: 1.6; font-size: 14px; }
.solicitor-note i { color: #b7791f; margin-right: 4px; }

/* Theme .mil-up elements that are rendered after a client transition */
.mil-up.mil-active { opacity: 1; transform: none; }

/* Generic data table used by ported admin / list pages */
.app-table-wrap { overflow-x: auto; background: #fff; border-radius: 14px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); }
.app-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.app-table th { text-align: left; padding: 14px 16px; background: #f8f9fa; color: #555; font-weight: 600; white-space: nowrap; }
.app-table td { padding: 14px 16px; border-top: 1px solid #eee; vertical-align: top; color: #333; }
.app-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.app-badge-pending { background: #fff3cd; color: #856404; }
.app-badge-verified, .app-badge-active, .app-badge-delivered { background: #d4edda; color: #155724; }
.app-badge-rejected, .app-badge-inactive, .app-badge-failed { background: #f8d7da; color: #721c24; }
.app-badge-not_submitted { background: #e9ecef; color: #555; }
.app-badge-default { background: #e8f4fd; color: #0575bc; }
.app-page-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 30px; }
.app-btn-sm {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid #0575bc;
    background: #fff; color: #0575bc; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.app-btn-sm:hover { background: #0575bc; color: #fff; }
.app-btn-sm.app-btn-success { border-color: #28a745; color: #28a745; }
.app-btn-sm.app-btn-success:hover { background: #28a745; color: #fff; }
.app-btn-sm.app-btn-danger { border-color: #dc3545; color: #dc3545; }
.app-btn-sm.app-btn-danger:hover { background: #dc3545; color: #fff; }
.app-empty { text-align: center; padding: 50px 20px; color: #888; }
.app-empty i { font-size: 40px; color: #ccc; display: block; margin-bottom: 12px; }

/* Modals used by the dashboards (opened with the .is-open class from React state) */
.mil-modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.mil-modal.is-open { display: flex !important; }
.mil-modal-content { background: #fff; border-radius: 16px; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; }
.mil-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 25px; border-bottom: 1px solid #f0f0f0; }
.mil-modal-close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #999; }
.mil-modal-body { padding: 25px; }
.mil-modal-footer { padding: 15px 0 0; display: flex; justify-content: flex-end; gap: 10px; }
.mil-modal .mil-form-group { margin-bottom: 16px; }

/* Solicitor dashboard cards */
.pf-card-lite { background: #fff; border-radius: 16px; padding: 26px; box-shadow: 0 6px 28px rgba(0, 0, 0, 0.06); text-align: center; height: 100%; }
.pf-card-lite i { font-size: 26px; color: #0575bc; margin-bottom: 10px; display: block; }
.pf-card-lite h5 { font-size: 15px; color: #777; margin-bottom: 6px; }
.pf-card-lite p { font-size: 17px; font-weight: 600; color: #222; margin: 0; }

/* Admin: solicitor verification queue */
.sol-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.sol-tab { padding: 10px 16px; border-radius: 30px; background: #f1f4f7; color: #444; text-decoration: none; font-weight: 600; font-size: 14px; }
.sol-tab span { display: inline-block; margin-left: 6px; min-width: 22px; padding: 1px 7px; border-radius: 12px; background: #fff; font-size: 12px; text-align: center; }
.sol-tab.active { background: #0575bc; color: #fff; }
.sol-tab.active span { color: #0575bc; }
.sol-list { display: grid; gap: 20px; }
.sol-card { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 6px 28px rgba(0, 0, 0, 0.06); }
.sol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.sol-head h5 { margin: 0 0 4px; font-size: 18px; }
.sol-head p, .sol-muted { margin: 0; color: #777; font-size: 14px; }
.sol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; margin-bottom: 18px; }
.sol-grid span { display: block; font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.sol-grid strong { font-size: 15px; color: #222; word-break: break-word; }
.sol-full { grid-column: 1 / -1; }
.sol-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sol-reject { width: 100%; max-width: 560px; }

/* ============================================
   Header bar: solid, fixed, and content starts below it
   (the theme's floating transparent frame overlapped page content)
   ============================================ */
:root { --app-header-h: 80px; }
.mil-frame { height: auto !important; bottom: auto !important; padding: 0 !important; }
.mil-frame > .mil-frame-top {
    position: fixed !important;
    top: 0 !important; left: 0; right: 0;
    height: var(--app-header-h) !important;
    margin: 0 !important;
    padding: 0 30px !important;
    background: #fff !important;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
    display: flex; align-items: center; justify-content: space-between;
    z-index: 1000;
    pointer-events: auto;
}
.mil-frame > .mil-frame-top .mil-logo img { height: 44px; width: auto; display: block; }
.mil-wrapper > .mil-content { padding-top: var(--app-header-h); }
.mil-progress-track { z-index: 1001; }
/* keep headings clear of the bar when jumping to #anchors */
html { scroll-padding-top: calc(var(--app-header-h) + 16px); }

@media (max-width: 991px) {
    :root { --app-header-h: 70px; }
    .mil-frame > .mil-frame-top { padding: 0 20px !important; }
}
@media (max-width: 768px) {
    :root { --app-header-h: 64px; }
    .mil-frame > .mil-frame-top { padding: 0 16px !important; }
    .mil-frame > .mil-frame-top .mil-logo img { height: 36px; }
    /* the floating page label / back-to-top strip covers content on phones */
    .mil-frame-bottom { display: none !important; }
}
.mil-frame > .mil-frame-top .mil-menu-btn,
.mil-menu-frame .mil-frame-top .mil-menu-btn {
    width: 44px !important; height: 44px !important; padding: 0 !important; margin: 0 !important;
    display: flex !important; align-items: center; justify-content: center; position: relative; top: 0 !important;
}
.mil-frame > .mil-frame-top .mil-menu-btn span,
.mil-menu-frame .mil-frame-top .mil-menu-btn span { width: 30px; position: relative; top: 0; margin: 0; }
.mil-frame > .mil-frame-top .mil-menu-btn::before,
.mil-frame > .mil-frame-top .mil-menu-btn::after { display: none !important; }

/* Agent registration fee */
.pay-box { background: #fff7e6; border-left: 4px solid #f0a500; border-radius: 12px; padding: 20px 22px; }
.pay-lead { margin: 0 0 14px; color: #5c3d00; line-height: 1.6; font-size: 15px; }
.pay-details { margin: 0; display: grid; gap: 8px; }
.pay-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pay-row dt { min-width: 140px; color: #7a5a1c; font-weight: 500; font-size: 14px; }
.pay-row dd { margin: 0; display: flex; align-items: center; gap: 10px; color: #222; font-size: 16px; }
.pay-copy { border: 1px solid #d9b25c; background: #fff; color: #7a4b00; border-radius: 6px; font-size: 12px; padding: 3px 9px; cursor: pointer; }
.pay-copy:hover { background: #f0a500; color: #fff; border-color: #f0a500; }
.pay-box-compact { text-align: left; margin: 10px 0 20px; }

/* Receipt */
.rcpt { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 16px; box-shadow: 0 6px 28px rgba(0, 0, 0, 0.06); padding: 34px; }
.rcpt-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid #0575bc; padding-bottom: 18px; margin-bottom: 18px; }
.rcpt-head p { margin: 8px 0 0; color: #666; font-size: 13px; line-height: 1.6; }
.rcpt-logo { height: 42px; width: auto; }
.rcpt-title { text-align: right; }
.rcpt-title h3 { margin: 0 0 8px; letter-spacing: 3px; color: #0575bc; }
.rcpt-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rcpt-table td { padding: 11px 4px; border-bottom: 1px solid #eee; }
.rcpt-table td:first-child { color: #777; width: 42%; }
.rcpt-table td:last-child { text-align: right; font-weight: 600; color: #222; }
.rcpt-total td { border-bottom: none; font-size: 18px; }
.rcpt-total td:last-child { color: #0575bc; font-size: 22px; }
.rcpt-foot { margin: 22px 0 0; color: #777; font-size: 13px; text-align: center; }
.rcpt-actions { max-width: 720px; margin: 0 auto 16px; display: flex; justify-content: flex-end; }
@media print {
    .mil-frame, .mil-menu-frame, .mil-curtain, .mil-progress-track, footer, .mil-inner-banner, .rcpt-actions, .flash-message, .mil-hidden-elements { display: none !important; }
    .mil-wrapper > .mil-content { padding-top: 0 !important; }
    .rcpt { box-shadow: none; }
}

/* PWA install banner */
.pwa-install {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9998; max-width: 460px; margin: 0 auto;
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 14px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}
.pwa-install img { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.pwa-install div { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: #666; line-height: 1.4; }
.pwa-install strong { color: #111; font-size: 15px; }
.pwa-install-btn { background: #2d4198; color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.pwa-install-close { background: none; border: 0; font-size: 22px; line-height: 1; color: #999; cursor: pointer; padding: 4px; }
