:root{--navy:#10233f;--navy2:#17365f;--orange:#f28c28;--bg:#f4f7fb;--text:#17243b;--muted:#68788f;--line:#dfe6ef;--white:#fff;--success:#14855f;--warning:#b66b00;--danger:#b42318;--radius:14px;--shadow:0 10px 30px rgba(16,35,63,.08)}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:30px}.auth-card{width:min(560px,100%);background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:34px}.brand{display:flex;align-items:center;gap:14px;margin-bottom:26px}.brand img{width:190px;max-height:72px;object-fit:contain}.brand-text{font-weight:700;color:var(--navy)}h1,h2,h3{margin-top:0}.sub{color:var(--muted);line-height:1.6}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px}.field.full{grid-column:1/-1}.field label{font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;border:1px solid #cbd6e3;border-radius:9px;padding:12px 13px;font:inherit;background:#fff}.field textarea{min-height:110px;resize:vertical}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;padding:12px 18px;font-weight:700;text-decoration:none;cursor:pointer}.btn-primary{background:var(--orange);color:#fff}.btn-secondary{background:#eaf0f7;color:var(--navy)}.btn-block{width:100%}.alert{padding:13px 15px;border-radius:9px;margin:0 0 18px}.alert-error{background:#fff1f0;color:#8f1d18;border:1px solid #ffd2cf}.alert-success{background:#eefbf5;color:#0b6948;border:1px solid #c8efdc}.portal{min-height:100vh;display:grid;grid-template-columns:270px minmax(0,1fr)}.sidebar{background:var(--navy);color:#fff;padding:24px 18px;position:sticky;top:0;height:100vh}.sidebar .logo{display:block;width:200px;max-height:70px;object-fit:contain;margin:0 auto 24px}.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#9fb0c8;margin:24px 12px 8px}.nav a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:8px;text-decoration:none;color:#e8eef7;font-size:14px;margin:3px 0}.nav a:hover,.nav a.active{background:rgba(255,255,255,.1);color:#fff}.main{min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}.page{padding:28px;min-width:0}.page-title{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--orange);font-weight:700}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid>*{min-width:0}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 4px 18px rgba(16,35,63,.05);padding:20px;min-width:0}.metric{font-size:28px;font-weight:800;color:var(--navy)}.metric-label{font-size:13px;color:var(--muted);margin-top:5px}.status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700;background:#eaf0f7;color:var(--navy)}.status.success{background:#e9f8f1;color:var(--success)}.status.warning{background:#fff5e6;color:var(--warning)}.status.danger{background:#fff0ef;color:var(--danger)}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);font-size:13px}th{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}.small{font-size:12px;color:var(--muted)}.toolbar{display:flex;gap:10px;flex-wrap:wrap}.notice{border-left:4px solid var(--orange);background:#fff;padding:16px 18px;border-radius:8px;box-shadow:0 4px 18px rgba(16,35,63,.05);margin-bottom:18px}.mobile-toggle{display:none}.table-wrap{overflow-x:auto}.stack{display:grid;gap:16px}.details{display:grid;grid-template-columns:minmax(120px,160px) minmax(0,1fr);gap:10px 18px;margin:0}.details dt{font-weight:700;color:#526174}.details dd{margin:0;overflow-wrap:anywhere}.timeline{display:block;width:100%}.timeline-item{display:block;position:relative;padding:0 0 22px 24px;border-left:2px solid #dbe4ef;min-width:0}.timeline-item:before{content:"";position:absolute;left:-7px;top:2px;width:12px;height:12px;border-radius:50%;background:#102a56}.timeline-item:last-child{padding-bottom:0;border-left-color:transparent}.timeline-item strong,.timeline-item .small,.timeline-item p{display:block;width:100%;margin-left:0;overflow-wrap:normal;word-break:normal}.timeline-item strong{margin-bottom:4px}.timeline-item .small{margin-bottom:7px}.timeline-item p{margin-top:0;line-height:1.55}.notification-card.unread{border-left:4px solid #102a56}.notification-head,.actions{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.actions{justify-content:flex-start;align-items:center;margin-top:16px}.actions form{margin:0}.alert-info{background:#eef5ff;border:1px solid #cfe0f7;color:#1d4779}hr{border:0;border-top:1px solid #e2e8f0;margin:22px 0}.table-wrap{overflow-x:auto}.toolbar,.inline-actions{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}.toolbar input{min-width:260px}.compact{min-width:280px;padding:.8rem 0}.wallet-address{display:block;max-width:320px;overflow-wrap:anywhere}.btn-danger{background:#8d2431;color:#fff}.narrow{max-width:760px}.alert-error{background:#fff0f1;border-color:#efb2b8;color:#7c1c26}details>summary{cursor:pointer;list-style:none}details[open]>summary{margin-bottom:.6rem}.document-upload-form{display:grid;grid-template-columns:1fr;margin-top:18px;max-width:720px}.document-upload-form .field{margin-bottom:0}.document-upload-form button{justify-self:start}@media(max-width:1050px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:820px){.portal{grid-template-columns:minmax(0,1fr)}.sidebar{position:fixed;left:-280px;z-index:30;width:270px;transition:.2s}.sidebar.open{left:0}.mobile-toggle{display:inline-flex}.page{padding:20px}.topbar{padding:0 18px}.grid-2,.grid-4,.form-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:640px){.details{grid-template-columns:minmax(0,1fr)}.details dt{margin-top:8px}.notification-head{display:block}.toolbar input{min-width:0;width:100%}}@media(max-width:520px){.auth-card{padding:24px}.brand img{width:160px}.page-title{flex-direction:column}}


/*
|--------------------------------------------------------------------------
| APPLICATION PAGE ARRANGEMENT REPAIR
|--------------------------------------------------------------------------
*/

.page {
    max-width: 1500px;
    margin: 0 auto;
}

.page-title {
    align-items: center;
}

.page-title > div {
    min-width: 0;
}

.grid-2 {
    align-items: stretch;
}

.grid-2 > .card {
    height: 100%;
}

.card h2 {
    margin-bottom: 18px;
}


/*
|--------------------------------------------------------------------------
| APPLICATION SUMMARY DETAILS
|--------------------------------------------------------------------------
*/

.details {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 20px;
    row-gap: 0;
    width: 100%;
}

.details dt,
.details dd {
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    line-height: 1.45;
}

.details dt {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.details dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.details dt:last-of-type,
.details dd:last-of-type {
    border-bottom: 0;
}

.details .status {
    vertical-align: middle;
}


/*
|--------------------------------------------------------------------------
| ADDRESS AND PURPOSE CARD
|--------------------------------------------------------------------------
*/

.card h3 {
    margin: 18px 0 6px;
    font-size: 13px;
    color: var(--navy);
}

.card h3:first-of-type {
    margin-top: 0;
}

.card .sub {
    margin-top: 0;
    overflow-wrap: anywhere;
}


/*
|--------------------------------------------------------------------------
| REQUESTED DOCUMENTS
|--------------------------------------------------------------------------
*/

.notice {
    width: 100%;
    min-width: 0;
}

.notification-head {
    align-items: center;
}

.document-upload-form {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.document-upload-form .field {
    width: 100%;
}

.document-upload-form input[type="file"],
.document-upload-form textarea {
    width: 100%;
}


/*
|--------------------------------------------------------------------------
| DOCUMENT TABLE ARRANGEMENT
|--------------------------------------------------------------------------
*/

.table-wrap table {
    min-width: 760px;
}

.table-wrap th,
.table-wrap td {
    vertical-align: top;
}

.table-wrap td strong,
.table-wrap td .small {
    display: block;
    max-width: 320px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-wrap td a {
    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| STATUS HISTORY
|--------------------------------------------------------------------------
*/

.timeline {
    max-width: 100%;
}

.timeline-item {
    padding-left: 30px;
}

.timeline-item strong {
    color: var(--navy);
    font-size: 14px;
}

.timeline-item .small {
    margin-top: 2px;
}

.timeline-item p {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| RESPONSIVE ARRANGEMENT
|--------------------------------------------------------------------------
*/

@media (max-width: 1050px) {
    .details {
        grid-template-columns: 130px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .page-title {
        align-items: flex-start;
    }

    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-2 > .card {
        height: auto;
    }
}

@media (max-width: 640px) {
    .details {
        display: block;
    }

    .details dt {
        padding: 12px 0 3px;
        border-bottom: 0;
    }

    .details dd {
        padding: 0 0 12px;
    }

    .notification-head {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .table-wrap table {
        min-width: 680px;
    }
}

@media (max-width: 520px) {
    .page {
        padding: 16px;
    }

    .card {
        padding: 16px;
    }

    .page-title .btn {
        width: 100%;
    }
}

/*
|--------------------------------------------------------------------------
| MOBILE STATUS HISTORY FIX
|--------------------------------------------------------------------------
| Prevents the status title, timestamp and message from collapsing into a
| narrow column on phones.
*/
@media (max-width:640px){

    .timeline{
        display:block !important;
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;
        overflow:visible !important;
    }

    .timeline-item{
        display:block !important;
        position:relative !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;

        padding:0 0 24px 30px !important;
        margin:0 !important;

        border-left:2px solid #dbe4ef !important;
    }

    .timeline-item:last-child{
        padding-bottom:0 !important;
        border-left-color:transparent !important;
    }

    .timeline-item::before{
        left:-7px !important;
        top:4px !important;
    }

    .timeline-item > *{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
    }

    .timeline-item strong,
    .timeline-item .small,
    .timeline-item p{
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;

        margin-left:0 !important;
        margin-right:0 !important;

        white-space:normal !important;
        word-break:normal !important;
        overflow-wrap:break-word !important;
    }

    .timeline-item strong{
        margin:0 0 4px !important;
        font-size:14px !important;
        line-height:1.35 !important;
    }

    .timeline-item .small{
        margin:0 0 8px !important;
        font-size:11px !important;
        line-height:1.4 !important;
    }

    .timeline-item p{
        margin:0 !important;
        font-size:13px !important;
        line-height:1.55 !important;
    }
}

@media (max-width:420px){
    .timeline-item{
        padding-left:27px !important;
    }

    .timeline-item strong{
        font-size:13px !important;
    }

    .timeline-item p{
        font-size:12px !important;
    }
}


/*
|--------------------------------------------------------------------------
| PORTAL MOBILE APP SHELL
|--------------------------------------------------------------------------
| Phone-only navigation and spacing. Desktop/laptop layout is untouched.
*/
.sidebar-mobile-head,.mobile-bottom-nav,.portal-backdrop{display:none}
.topbar-title{min-width:0}
.topbar-user{display:flex;align-items:center;gap:9px;min-width:0}
.topbar-avatar{display:none}

@media(max-width:820px){
    html,body{max-width:100%;overflow-x:hidden}
    body.portal-menu-open{overflow:hidden}
    .portal{display:block;min-height:100dvh;padding-bottom:calc(68px + env(safe-area-inset-bottom));background:#f4f7fb}
    .main{width:100%;min-height:100dvh}

    .sidebar,
    .client-sidebar{
        position:fixed !important;
        inset:0 auto 0 0;
        left:0 !important;
        width:min(86vw,320px) !important;
        height:100dvh !important;
        padding:0 16px calc(18px + env(safe-area-inset-bottom)) !important;
        overflow-y:auto;
        overflow-x:hidden;
        transform:translate3d(-105%,0,0);
        transition:transform .24s ease;
        box-shadow:16px 0 42px rgba(7,20,38,.28);
        z-index:1100;
        overscroll-behavior:contain;
        -webkit-overflow-scrolling:touch
    }
    .sidebar.open,.client-sidebar.open{left:0 !important;transform:translate3d(0,0,0)}
    .sidebar-mobile-head{display:flex;position:sticky;top:0;z-index:4;align-items:center;justify-content:space-between;min-height:54px;margin:0 -16px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;background:#10233f;border-bottom:1px solid rgba(255,255,255,.12);font-size:12px;font-weight:800;letter-spacing:.04em;color:#fff}
    .sidebar-close{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;font-size:24px;line-height:1;cursor:pointer}
    .sidebar .logo{width:174px !important;max-height:54px !important;margin:12px auto 10px !important}
    .sidebar .nav-section{margin:13px 10px 5px !important;font-size:9px !important}
    .sidebar .nav a{min-height:42px !important;padding:10px 12px !important;margin:2px 0 !important;border-radius:10px !important;font-size:13px !important;line-height:1.25 !important}

    .portal-backdrop{display:block;position:fixed;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(6,17,31,.48);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:1050}
    .portal-backdrop[hidden]{display:none !important}

    .topbar{height:calc(58px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0;display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:8px;position:sticky;top:0;z-index:1000;box-shadow:0 2px 12px rgba(16,35,63,.06)}
    .mobile-toggle{display:flex;width:40px;height:40px;padding:10px;border:0;border-radius:11px;background:#eef3f8;align-items:center;justify-content:center;flex-direction:column;gap:4px;cursor:pointer}
    .mobile-toggle span{display:block;width:18px;height:2px;border-radius:2px;background:#10233f}
    .topbar-title{text-align:center;overflow:hidden}
    .topbar-title strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#10233f}
    .topbar-user{justify-content:flex-end}
    .topbar-user .small{display:none}
    .topbar-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#10233f;color:#fff;font-size:12px;font-weight:800}

    .page{width:100%;max-width:none;margin:0;padding:16px 14px 24px}
    .page-title{margin-bottom:16px;gap:12px}
    .page-title h1{margin-bottom:6px;font-size:24px;line-height:1.15}
    .page-title .sub{margin-bottom:0;font-size:13px;line-height:1.5}
    .eyebrow{font-size:10px}
    .card{border-radius:16px;padding:16px;box-shadow:0 3px 14px rgba(16,35,63,.05)}
    .metric{font-size:25px}
    .grid{gap:12px}
    .grid-4{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
    .grid-2{grid-template-columns:minmax(0,1fr) !important}
    .form-grid{grid-template-columns:minmax(0,1fr) !important}
    .notice{padding:14px 15px;border-radius:12px;margin-bottom:12px}
    .table-wrap{margin-left:-2px;margin-right:-2px;padding-bottom:3px;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}

    .mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:1000;min-height:calc(64px + env(safe-area-inset-bottom));padding:5px 5px calc(5px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid #dfe6ef;box-shadow:0 -8px 26px rgba(16,35,63,.08);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
    .mobile-bottom-nav a,.mobile-bottom-nav button{min-width:0;min-height:52px;padding:5px 2px;border:0;border-radius:11px;background:transparent;color:#6c7a8d;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:inherit;font-size:9px;font-weight:700;line-height:1.1;cursor:pointer}
    .mobile-bottom-nav a.active{background:#eef3f8;color:#10233f}
    .mobile-bottom-nav .mobile-nav-icon{display:block;height:19px;font-size:18px;line-height:18px;font-weight:800}

    .dw-live-support-float{bottom:calc(76px + env(safe-area-inset-bottom)) !important;right:12px !important}
}

@media(max-width:420px){
    .page{padding-left:12px;padding-right:12px}
    .grid-4{gap:10px}
    .grid-4>.card{padding:14px 12px}
    .metric{font-size:23px}
    .metric-label{font-size:11px;line-height:1.3}
    .mobile-bottom-nav a,.mobile-bottom-nav button{font-size:8px}
}
