:root{
    --bg:#0b1220;
    --bg2:#111827;
    --card:#172033;
    --card2:#1c2740;
    --line:rgba(255,255,255,.08);
    --text:#eef4ff;
    --muted:#9fb0d1;
    --blue:#3E8FD8;
    --blue2:#62a8e8;
    --danger:#ff6b6b;
    --shadow:0 18px 50px rgba(0,0,0,.35);
}

*{box-sizing:border-box}

html,body{
    margin:0;
    padding:0;
    font-family:Arial,Helvetica,sans-serif;
    background:
        radial-gradient(circle at top, rgba(62,143,216,.18), transparent 35%),
        linear-gradient(180deg, var(--bg), var(--bg2));
    color:var(--text);
    min-height:100%;
}

a{text-decoration:none;color:inherit}

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.login-wrap{
    width:100%;
    max-width:420px;
}

.login-card{
    background:rgba(23,32,51,.92);
    backdrop-filter:blur(10px);
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:var(--shadow);
    padding:28px 22px;
}

.login-logo{
    display:flex;
    justify-content:center;
    margin-bottom:16px;
}

.login-logo img{
    width:74px;
    height:74px;
    border-radius:18px;
    box-shadow:0 10px 30px rgba(62,143,216,.30);
}

.login-card h1{
    margin:0;
    text-align:center;
    font-size:28px;
    font-weight:800;
}

.login-sub{
    margin:8px 0 22px 0;
    text-align:center;
    color:var(--muted);
    font-size:14px;
}

.field{
    margin-bottom:14px;
}

.field label{
    display:block;
    margin-bottom:7px;
    font-size:13px;
    color:#cfe0ff;
}

.field input{
    width:100%;
    height:48px;
    border-radius:14px;
    border:1px solid var(--line);
    background:#0f1728;
    color:var(--text);
    padding:0 14px;
    font-size:15px;
    outline:none;
}

.field input:focus{
    border-color:rgba(62,143,216,.7);
    box-shadow:0 0 0 3px rgba(62,143,216,.15);
}

.btn-primary{
    width:100%;
    height:48px;
    border:0;
    border-radius:14px;
    background:linear-gradient(180deg, var(--blue2), var(--blue));
    color:#fff;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    margin-top:6px;
}

.login-error{
    margin-top:14px;
    background:rgba(255,107,107,.12);
    color:#ffc1c1;
    border:1px solid rgba(255,107,107,.25);
    border-radius:14px;
    padding:12px;
    text-align:center;
    font-size:14px;
}

.app-page{
    min-height:100vh;
}

.topbar{
    position:sticky;
    top:0;
    z-index:20;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px;
    background:rgba(11,18,32,.88);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--line);
}

.topbar-title{
    font-size:20px;
    font-weight:800;
    line-height:1.1;
}

.topbar-sub{
    font-size:13px;
    color:var(--muted);
    margin-top:3px;
}

.btn-ghost{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:78px;
    height:40px;
    padding:0 14px;
    border-radius:12px;
    border:1px solid rgba(62,143,216,.45);
    color:#d8ebff;
    background:rgba(62,143,216,.08);
    font-weight:700;
}

.app-main{
    padding:16px;
    max-width:760px;
    margin:0 auto;
}

.welcome-card{
    background:linear-gradient(180deg, rgba(28,39,64,.95), rgba(23,32,51,.95));
    border:1px solid var(--line);
    border-radius:22px;
    padding:18px;
    box-shadow:var(--shadow);
    margin-bottom:16px;
}

.welcome-kicker{
    color:var(--blue2);
    font-size:12px;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    margin-bottom:8px;
}

.welcome-card h2{
    margin:0 0 8px 0;
    font-size:24px;
}

.welcome-card p{
    margin:0;
    color:var(--muted);
    font-size:14px;
}

.menu-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
}

.menu-card{
    display:flex;
    align-items:center;
    gap:14px;
    background:linear-gradient(180deg, rgba(28,39,64,.95), rgba(23,32,51,.95));
    border:1px solid var(--line);
    border-radius:20px;
    padding:16px;
    box-shadow:var(--shadow);
}

.menu-icon{
    width:50px;
    height:50px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    background:rgba(62,143,216,.14);
    border:1px solid rgba(62,143,216,.18);
    flex:0 0 50px;
}

.menu-text{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.menu-text strong{
    font-size:17px;
    color:#fff;
}

.menu-text span{
    font-size:13px;
    color:var(--muted);
}

@media (min-width:700px){
    .menu-grid{
        grid-template-columns:repeat(2,1fr);
    }
}
.search-card{
    background:linear-gradient(180deg, rgba(28,39,64,.95), rgba(23,32,51,.95));
    border:1px solid var(--line);
    border-radius:20px;
    padding:14px;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-bottom:16px;
}

.results-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
    color:var(--muted);
    font-size:14px;
}

.results-head strong{
    color:#fff;
}

.cards-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.client-card,
.detail-card,
.empty-card{
    background:linear-gradient(180deg, rgba(28,39,64,.95), rgba(23,32,51,.95));
    border:1px solid var(--line);
    border-radius:20px;
    padding:16px;
    box-shadow:var(--shadow);
}

.client-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    margin-bottom:10px;
}

.client-id{
    font-size:12px;
    color:var(--blue2);
    font-weight:700;
    margin-bottom:4px;
}

.client-top h3{
    margin:0;
    font-size:18px;
    line-height:1.2;
}

.client-line{
    color:var(--muted);
    font-size:14px;
    margin-top:7px;
    word-break:break-word;
}

.client-actions{
    margin-top:14px;
    display:flex;
    justify-content:flex-end;
}

.btn-mini{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:92px;
    height:38px;
    padding:0 14px;
    border-radius:12px;
    border:1px solid rgba(62,143,216,.45);
    color:#d8ebff;
    background:rgba(62,143,216,.08);
    font-weight:700;
    font-size:14px;
}

.status-pill{
    padding:7px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
    border:1px solid transparent;
}

.st-0{
    background:rgba(255,193,7,.10);
    color:#ffd86b;
    border-color:rgba(255,193,7,.20);
}

.st-2{
    background:rgba(40,167,69,.12);
    color:#82e7a0;
    border-color:rgba(40,167,69,.22);
}

.st-1{
    background:rgba(255,107,107,.12);
    color:#ffb0b0;
    border-color:rgba(255,107,107,.25);
}

.detail-row{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:10px 0;
    border-bottom:1px solid var(--line);
}

.detail-row:last-child{
    border-bottom:0;
    padding-bottom:0;
}

.detail-row strong{
    font-size:13px;
    color:#cfe0ff;
}

.detail-row span{
    font-size:15px;
    color:var(--text);
    word-break:break-word;
}
.client-actions-wrap{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.client-actions-wrap .btn-mini{
    width:100%;
    height:28px;
    font-size:12px;
    padding:0 6px;
    border-radius:8px;
}
.ficha-main{
    padding-bottom:90px;
}

.ficha-head-card{
    margin-bottom:14px;
}

.ficha-head-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}

.acc-card{
    background:linear-gradient(180deg, rgba(28,39,64,.95), rgba(23,32,51,.95));
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:var(--shadow);
    margin-bottom:12px;
    overflow:hidden;
}

.acc-card summary{
    list-style:none;
    cursor:pointer;
    padding:16px;
    font-weight:700;
    font-size:16px;
    color:#fff;
    position:relative;
}

.acc-card summary::-webkit-details-marker{
    display:none;
}

.acc-card summary::after{
    content:"+";
    position:absolute;
    right:16px;
    top:50%;
    transform:translateY(-50%);
    font-size:22px;
    color:var(--blue2);
}

.acc-card[open] summary::after{
    content:"−";
}

.acc-card .detail-card{
    border:0;
    border-top:1px solid var(--line);
    border-radius:0;
    box-shadow:none;
    background:transparent;
    padding:0 16px 14px 16px;
}

.bottom-actions{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:30;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    background:rgba(11,18,32,.94);
    backdrop-filter:blur(10px);
    border-top:1px solid var(--line);
}

.bottom-actions .btn-mini{
    width:100%;
    height:34px;
    font-size:12px;
    padding:0 8px;
    border-radius:10px;
    text-align:center;
}

@media (min-width:700px){
    .bottom-actions{
        left:50%;
        transform:translateX(-50%);
        max-width:760px;
        border-left:1px solid var(--line);
        border-right:1px solid var(--line);
    }
}
    