/* Império Crédito — interface responsiva com foco em celular */
:root{--ink:#241b0b;--muted:#76684d;--line:#e8dfcc;--bg:#faf8f2;--gold:#bd8417;--gold-dark:#8a5a08;--gold-light:#e6b94f;--green:#0f9f6e;--red:#dc2626;--surface:#fff;--shadow:0 8px 24px rgba(36,27,11,.06)}
*{box-sizing:border-box}html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}img{max-width:100%;height:auto}a{touch-action:manipulation}button,input,select,textarea{font:inherit}button,.button{min-height:44px}
.topbar{background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px max(20px,calc((100% - 1120px)/2));position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}
.brand{min-width:0;font-size:20px;font-weight:800;text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:9px;flex:0 1 auto}.brand-logo{display:block;width:128px;max-width:34vw;max-height:54px;height:auto;object-fit:contain;object-position:left center}
.topbar nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.topbar nav a{color:#514630;text-decoration:none;font-size:14px;font-weight:650;padding:9px 11px;border-radius:9px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}.topbar nav a:hover,.topbar nav a:focus-visible{background:#fbf0d1;color:var(--gold-dark)}.nav-user{font-size:12px;color:var(--muted);max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 4px}.topbar nav .nav-logout{color:#7f1d1d}.container{width:min(1120px,100%);margin:30px auto;padding:0 22px;min-height:calc(100vh - 150px)}.footer{text-align:center;color:#8c806a;font-size:12px;padding:22px 16px 30px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.page-head h1{margin:0;font-size:clamp(23px,3vw,30px);letter-spacing:-.6px;line-height:1.2}.muted{color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.card{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:20px;box-shadow:var(--shadow)}.metric-label{color:var(--muted);font-size:13px}.metric-value{font-size:clamp(20px,2vw,26px);font-weight:800;margin-top:7px;letter-spacing:-.6px;overflow-wrap:anywhere}.section{margin-top:25px}.section h2{font-size:18px}.button,button{border:0;background:var(--gold);color:#fff;padding:11px 16px;border-radius:10px;text-decoration:none;font-weight:700;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;gap:7px;line-height:1.25;transition:background .15s,transform .15s}.button:hover,button:hover{background:var(--gold-dark)}.button:active,button:active{transform:translateY(1px)}.button-small{padding:9px 12px;min-height:40px;font-size:13px}.button-light{background:#fbf0d1;color:#80520a}.button-light:hover{background:#f5e2a8}.button-danger{background:#fee2e2;color:#991b1b}.button-danger:hover{background:#fecaca}.table-wrap{overflow:auto;max-width:100%;-webkit-overflow-scrolling:touch;background:white;border:1px solid var(--line);border-radius:14px}table{border-collapse:collapse;width:100%;min-width:620px}th,td{text-align:left;padding:13px 15px;border-bottom:1px solid #f0eadf;font-size:14px;vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);background:#fbf8f0;white-space:nowrap}tr:last-child td{border-bottom:0}.badge{display:inline-block;padding:4px 9px;border-radius:99px;font-size:12px;font-weight:700;background:#fef3c7;color:#80520a;white-space:nowrap}.badge.active,.badge.paid{background:#dcfce7;color:#166534}.badge.blocked,.badge.overdue{background:#fee2e2;color:#991b1b}.badge.pending{background:#fef3c7;color:#92400e}
.form-card{width:100%;max-width:520px;margin:26px auto;background:white;border:1px solid var(--line);border-radius:18px;padding:clamp(18px,4vw,30px);box-shadow:var(--shadow)}.form-card h1{margin-top:0;font-size:clamp(24px,5vw,30px);line-height:1.2}.field{display:grid;gap:7px;margin:15px 0;min-width:0}.field label{font-size:14px;font-weight:750;color:#493b23}.field input,.field select,.field textarea,.toolbar input{width:100%;min-width:0;min-height:46px;border:1px solid #d6cbb5;border-radius:10px;padding:11px 12px;font:inherit;background:white;color:var(--ink)}.field textarea{min-height:100px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus,.toolbar input:focus{outline:3px solid #e6b94f66;border-color:var(--gold)}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.alert{border-radius:11px;padding:12px 15px;margin-bottom:18px;overflow-wrap:anywhere}.alert.success{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}.alert.info{background:#fbf0d1;color:#80520a}.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:15px;flex-wrap:wrap}.toolbar input{max-width:380px;flex:1 1 220px}.empty{padding:32px;text-align:center;color:var(--muted)}.hero{padding:34px 0 25px}.hero h1{font-size:clamp(32px,5vw,50px);line-height:1.08;max-width:680px;letter-spacing:-1.8px;margin:0 0 15px}.hero p{font-size:17px;color:var(--muted);max-width:620px}.hero-actions{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap}.split{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:20px}.inline-form{display:inline}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.small{font-size:12px}.login-note{font-size:13px;color:var(--muted);margin-top:15px}.topbar nav a:focus-visible,.button:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid var(--gold-light);outline-offset:2px}
@media(max-width:850px){.topbar{padding:10px 16px;gap:10px}.brand-logo{width:112px;max-height:48px}.topbar nav{gap:4px}.topbar nav a{font-size:13px;padding:8px}.nav-user{max-width:100px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.split{grid-template-columns:1fr}.container{margin:24px auto}}
@media(max-width:600px){body{font-size:15px;padding-bottom:74px}.topbar{position:sticky;top:0;flex-direction:row;align-items:center;justify-content:center;min-height:64px;padding:7px 14px;box-shadow:0 2px 12px rgba(36,27,11,.04)}.brand{justify-content:center}.brand-logo{width:104px;max-width:44vw;max-height:45px;object-position:center}.topbar nav{position:fixed;z-index:30;left:0;right:0;bottom:0;top:auto;display:flex;flex-wrap:nowrap;justify-content:space-around;align-items:stretch;gap:0;padding:7px max(5px,env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--line);box-shadow:0 -5px 20px rgba(36,27,11,.08);overflow-x:auto;overscroll-behavior-x:contain}.topbar nav a{font-size:11px;line-height:1.15;min-width:0;flex:1 0 auto;max-width:25%;padding:8px 5px;border-radius:8px;text-align:center;white-space:normal;overflow-wrap:anywhere;min-height:48px}.topbar nav .button{min-height:42px;margin:auto 2px}.nav-user{display:none}.topbar nav .nav-logout{max-width:20%}.container{margin:20px auto;padding:0 14px;min-height:calc(100vh - 150px)}.page-head{align-items:stretch;flex-direction:column;gap:12px;margin-bottom:18px}.page-head .button,.page-head button{width:100%}.page-head h1{font-size:25px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.card{padding:14px;border-radius:13px}.metric-label{font-size:12px;line-height:1.35}.metric-value{font-size:clamp(17px,5vw,22px);letter-spacing:-.4px}.section{margin-top:20px}.section h2{font-size:17px}.form-card{margin:12px auto;padding:19px 16px;border-radius:15px}.form-row{grid-template-columns:minmax(0,1fr);gap:0}.field{margin:13px 0}.field input,.field select,.field textarea,.toolbar input{font-size:16px;min-height:48px}.button,button{min-height:46px}.button-small{min-height:42px}.toolbar{align-items:stretch}.toolbar input{max-width:none;flex-basis:100%}.toolbar .button,.toolbar button{flex:1}.table-wrap{border-radius:11px}table{min-width:600px}th,td{padding:11px 12px;font-size:13px}.hero{padding:23px 0 16px}.hero h1{font-size:clamp(30px,9vw,40px);letter-spacing:-1.2px}.hero p{font-size:16px}.hero-actions{flex-direction:column;gap:9px}.hero-actions .button{width:100%}.split{gap:14px}.actions{gap:6px}.actions .button,.actions button{flex:1 1 auto}.footer{padding:15px 12px 20px}}
@media(max-width:360px){.container{padding:0 10px}.grid{gap:8px}.card{padding:11px}.metric-value{font-size:17px}.brand-logo{width:94px}.topbar nav a{font-size:10px;padding:7px 3px}.form-card{padding:16px 12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}

.install-app{margin:0 0 0 8px;white-space:nowrap}.install-app[hidden]{display:none!important}
@media(max-width:640px){.install-app{position:fixed;right:12px;bottom:76px;z-index:1000;box-shadow:0 4px 18px #0002;padding:12px 16px;border-radius:999px}}

/* Ajustes de navegação e instalação PWA */
.brand-logo{width:150px;max-width:38vw;max-height:62px;object-fit:contain;object-position:center}
.install-banner{width:min(1120px,calc(100% - 32px));margin:12px auto 0;padding:12px 14px;display:flex;align-items:center;gap:12px;background:#fff9e8;border:1px solid #ead39b;border-radius:14px;box-shadow:0 5px 18px rgba(36,27,11,.05)}
.install-banner[hidden]{display:none!important}.install-copy{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.install-copy strong{font-size:14px;color:#5b3b08}.install-copy span{font-size:12px;color:#76684d;line-height:1.4}.install-close{min-width:34px;width:34px;min-height:34px;padding:0;background:transparent;color:#76684d;font-size:24px}.install-close:hover{background:#f3e5bd;color:#5b3b08}
@media(max-width:600px){
 body{padding-bottom:calc(86px + env(safe-area-inset-bottom))}
 .topbar{min-height:76px;padding:5px 12px;justify-content:center}
 .brand{width:100%;justify-content:center;min-height:64px}
 .brand-logo{width:116px;max-width:42vw;max-height:74px;object-fit:contain}
 .topbar nav{justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:7px 8px calc(7px + env(safe-area-inset-bottom));gap:4px}
 .topbar nav::-webkit-scrollbar{display:none}
 .topbar nav a{flex:0 0 auto;width:auto;min-width:68px;max-width:none;padding:9px 8px;font-size:11px;white-space:nowrap;overflow-wrap:normal}
 .topbar nav .nav-logout{max-width:none}
 .install-banner{width:calc(100% - 24px);margin:10px auto 0;padding:11px 10px;gap:8px;align-items:center}
 .install-copy strong{font-size:13px}.install-copy span{font-size:11px}
 .install-banner .button{font-size:11px;padding:9px 10px;min-height:42px;flex:0 0 auto;max-width:116px;white-space:normal}
 .install-close{flex:0 0 28px;width:28px;min-width:28px}
 .container{margin:16px auto;padding:0 12px}
}
@media(max-width:380px){.brand-logo{width:106px;max-height:68px}.topbar nav a{min-width:64px;font-size:10px;padding-left:6px;padding-right:6px}.install-banner .button{max-width:96px;font-size:10px}}


/* Ajustes finais: cabeçalho claro no celular e sem aviso de instalação */
.install-banner,.install-app{display:none!important}
@media(max-width:600px){
  body{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
  .topbar{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;min-height:0;padding:7px 12px 0;overflow:visible}
  .brand{display:flex;width:100%;min-height:68px;height:68px;flex:0 0 68px;align-items:center;justify-content:center;overflow:visible}
  .brand-logo{display:block;width:104px;height:68px;max-width:46vw;max-height:68px;object-fit:contain;object-position:center;flex:0 0 auto}
  .topbar nav{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:1000;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;gap:4px;width:100%;max-width:100%;margin:0;padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.99);border-top:1px solid var(--line);box-shadow:0 -5px 20px rgba(36,27,11,.08);overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .topbar nav::-webkit-scrollbar{display:none}
  .topbar nav a{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:70px;max-width:none;min-height:48px;padding:9px 10px;font-size:12px;line-height:1.2;white-space:nowrap;overflow-wrap:normal}
  .topbar nav .nav-logout{max-width:none}
  .container{margin:18px auto;padding:0 12px}
}
@media(max-width:380px){.brand{height:64px;min-height:64px;flex-basis:64px}.brand-logo{width:96px;height:64px;max-height:64px}.topbar nav a{min-width:64px;font-size:11px;padding-left:8px;padding-right:8px}}

/* Identidade visual refinada: logo sempre visível e cabeçalho responsivo */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0}
.topbar .brand{display:flex;align-items:center;justify-content:flex-start;flex:0 0 auto;min-width:0;width:auto;padding:3px 0}
.topbar .brand-logo{display:block;width:118px;height:58px;max-width:30vw;max-height:58px;object-fit:contain;object-position:center;opacity:1;visibility:visible}
.topbar nav{min-width:0}
@media(max-width:600px){
 body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
 .topbar{position:sticky;top:0;z-index:50;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;padding:5px 12px 0;min-height:0;background:#fff}
 .topbar .brand{display:flex;width:100%;height:54px;min-height:54px;flex:0 0 54px;align-items:center;justify-content:center;margin:0 auto;overflow:visible}
 .topbar .brand-logo{display:block;width:88px;height:48px;max-width:34vw;max-height:48px;object-fit:contain;object-position:center}
 .topbar nav{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:1000;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;gap:4px;width:100%;max-width:100%;margin:0;padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.99);border-top:1px solid var(--line);box-shadow:0 -5px 20px rgba(36,27,11,.08);overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .topbar nav::-webkit-scrollbar{display:none}
 .topbar nav a{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:70px;max-width:none;min-height:46px;padding:9px 10px;font-size:12px;line-height:1.2;white-space:nowrap;overflow-wrap:normal}
 .topbar nav .nav-logout{max-width:none}
 .container{width:100%;padding-left:14px;padding-right:14px;margin:18px auto;min-height:calc(100vh - 160px)}
 .hero{padding-top:18px}
}
@media(max-width:380px){.topbar .brand-logo{width:80px;height:46px}.topbar nav a{min-width:64px;padding-left:8px;padding-right:8px;font-size:11px}}


/* Ajustes finais mobile: contraste de marca, navegação e conteúdo sem cortes */
.topbar{background:#17130b!important;border-bottom:1px solid #4b3712!important;color:#f8e7b4}
.topbar .brand{background:transparent}
.topbar .brand-logo{width:106px;height:48px;max-width:28vw;object-fit:contain;filter:drop-shadow(0 2px 4px #0008)}
.topbar nav a{color:#f5e7c2!important}
.topbar nav a:hover,.topbar nav a:focus-visible{background:#3a2b12!important;color:#f4c75d!important}
.topbar nav .button{background:#bd8417!important;color:#fff!important}
.topbar nav .nav-logout{color:#ffb4a8!important}
@media(max-width:600px){
 .topbar{padding:4px 12px 0!important;gap:0!important}
 .topbar .brand{height:54px;min-height:54px;justify-content:center}
 .topbar .brand-logo{width:92px;height:48px;max-width:30vw}
 .topbar nav{background:#fff!important;border-top:1px solid var(--line)!important}
 .topbar nav a{color:#514630!important}
 .topbar nav .nav-logout{color:#991b1b!important}
 .container{overflow-x:clip}
 .page-head h1{overflow-wrap:anywhere}
 .table-wrap{display:none}
 .mobile-loans{display:grid;gap:10px}
 .mobile-loan{border:1px solid var(--line);background:#fff;border-radius:13px;padding:13px;box-shadow:var(--shadow);min-width:0}
 .mobile-loan-head{font-weight:800;font-size:15px;overflow-wrap:anywhere;margin-bottom:8px}
 .mobile-loan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .mobile-loan-label{display:block;color:var(--muted);font-size:11px;margin-bottom:3px}
 .mobile-loan-value{font-weight:700;font-size:13px;overflow-wrap:anywhere}
 .form-card{margin:12px auto 24px;max-width:100%;width:100%}
 .form-brand{display:flex;justify-content:center;margin:0 auto 14px;padding:8px;background:#17130b;border-radius:12px;width:fit-content;max-width:100%}
 .form-brand img{display:block;width:104px;height:68px;object-fit:contain}
}
@media(min-width:601px){.mobile-loans{display:none}}

/* Correções: listas legíveis no celular e valores separados */
.mobile-client-cards{display:none}
@media(max-width:600px){
 .clients-table-wrap{display:none!important}
 .mobile-client-cards{display:grid;gap:12px}
 .mobile-client-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px;box-shadow:var(--shadow)}
 .mobile-client-card h3{margin:0 0 12px;font-size:17px;overflow-wrap:anywhere}
 .mobile-client-detail{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #f0eadf;font-size:13px}
 .mobile-client-detail span{color:var(--muted);flex:0 0 auto}.mobile-client-detail strong{text-align:right;overflow-wrap:anywhere;min-width:0}
 .mobile-client-detail .client-email{font-size:12px}.mobile-client-actions{margin-top:12px}.mobile-client-actions form{flex:1}.mobile-client-actions button,.mobile-client-actions a{width:100%}
 .dashboard-table{display:none!important}.mobile-loans{display:grid;gap:10px}
}
@media(min-width:601px){.mobile-client-cards,.mobile-loans{display:none!important}}


/* Tema monocromático e responsivo — regras finais */
:root{--ink:#111;--muted:#666;--line:#dedede;--bg:#fff;--gold:#111;--gold-dark:#333;--gold-light:#aaa;--green:#166534;--red:#991b1b;--surface:#fff;--shadow:0 5px 20px rgba(0,0,0,.045)}
body{background:#fff;color:#111}
.topbar{background:#080808;border-bottom:1px solid #303030;color:#fff}
.topbar .brand{background:#080808;min-height:54px;display:flex;align-items:center;justify-content:center;padding:2px 8px;border-radius:8px}
.topbar .brand-logo{display:block!important;visibility:visible!important;opacity:1!important;width:108px;height:52px;max-width:30vw;max-height:52px;object-fit:contain;object-position:center;flex:0 0 auto}
.topbar nav a{color:#f5f5f5}.topbar nav a:hover,.topbar nav a:focus-visible{background:#252525;color:#fff}.topbar nav .nav-logout{color:#ffb4b4}.button,button{background:#111;color:#fff}.button:hover,button:hover{background:#333}.button-light{background:#eee;color:#111}.button-light:hover{background:#ddd}.button-danger{background:#f3f3f3;color:#8b1111;border:1px solid #e2bcbc}
.card,.form-card,.table-wrap,.mobile-loan,.mobile-client-card{background:#fff;border-color:#e2e2e2;box-shadow:var(--shadow)}
th{background:#f5f5f5;color:#555}th,td{border-bottom-color:#eee}.field label{color:#222}.field input,.field select,.field textarea,.toolbar input{border-color:#d0d0d0;color:#111;background:#fff}.field input:focus,.field select:focus,.field textarea:focus,.toolbar input:focus{outline:3px solid #0001;border-color:#777}.badge,.badge.pending{background:#eee;color:#333}.badge.active,.badge.paid{background:#e7f4e9;color:#185c2a}.badge.blocked,.badge.overdue{background:#fce8e8;color:#8b1111}.alert.success{background:#eaf5ec;color:#185c2a}.alert.error{background:#fce8e8;color:#8b1111}.alert.info{background:#f2f2f2;color:#222}.footer{color:#777}
.mobile-loans{display:none}
@media(max-width:600px){
 body{padding-bottom:82px}
 .topbar{position:sticky;top:0;display:flex;flex-direction:column;gap:3px;min-height:0;padding:5px 8px 0;justify-content:center;align-items:center;background:#080808}
 .topbar .brand{min-height:43px;height:43px;padding:0 8px}
 .topbar .brand-logo{width:86px;height:41px;max-width:42vw;max-height:41px}
 .topbar nav{position:static;z-index:30;width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;gap:3px;padding:2px 0 5px;background:#080808;border:0;box-shadow:none;overflow-x:auto;overscroll-behavior-x:contain}
 .topbar nav a{flex:0 0 auto;max-width:none;min-width:max-content;min-height:37px;padding:7px 12px;font-size:12px;color:#fff;white-space:nowrap}
 .topbar nav .nav-logout{color:#ffb4b4}.nav-user{display:none}
 .container{margin:17px auto;padding:0 13px;min-height:calc(100vh - 150px)}
 .page-head{align-items:stretch;flex-direction:column;gap:10px;margin-bottom:16px}
 .page-head .button,.page-head button{width:100%}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .card{padding:13px;border-radius:13px}.metric-value{font-size:clamp(16px,4.7vw,21px);overflow-wrap:anywhere}
 .form-row{grid-template-columns:minmax(0,1fr)}
 .table-wrap{display:none!important}
 .mobile-loans{display:grid;gap:11px}
 .mobile-loan{border:1px solid #e1e1e1;border-radius:13px;padding:14px;min-width:0}
 .mobile-loan-head{font-weight:800;font-size:16px;margin-bottom:10px;overflow-wrap:anywhere;color:#111}
 .mobile-loan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 9px}
 .mobile-loan-label{display:block;font-size:11px;color:#666;margin-bottom:3px}
 .mobile-loan-value{display:block;font-size:13px;font-weight:750;overflow-wrap:anywhere;color:#111}
 .mobile-loan-actions{margin-top:12px}.mobile-loan-actions details{border-top:1px solid #eee;padding-top:10px}
 .mobile-loan-actions summary{cursor:pointer;font-weight:700;font-size:13px}
 .mobile-loan-actions form{margin-top:10px}
 .footer{padding:15px 12px calc(18px + env(safe-area-inset-bottom))}
}
@media(min-width:601px){.mobile-loans{display:none!important}}


/* Navegacao revisada: cabeçalho claro, logo nova e menu recolhivel no celular */
.topbar{background:#fff!important;color:#111!important;border-bottom:1px solid #e7e7e7!important;box-shadow:0 2px 10px rgba(0,0,0,.04);padding:8px max(18px,calc((100% - 1120px)/2));min-height:70px;gap:18px}
.topbar .brand{background:transparent!important;border-radius:0!important;min-height:0;height:auto;padding:0;justify-content:flex-start}
.topbar .brand-logo{width:112px;height:52px;max-width:32vw;max-height:52px;object-fit:contain;object-position:left center;filter:none}
.topbar .main-nav{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.topbar .main-nav a{color:#171717!important}
.topbar .main-nav a:hover,.topbar .main-nav a:focus-visible{background:#f1f1f1!important;color:#000!important}
.topbar .main-nav .nav-logout{color:#555!important}
.menu-toggle{display:none;align-items:center;justify-content:center;flex-direction:column;gap:5px;width:44px;height:44px;min-height:44px;padding:9px;border:1px solid #dedede;border-radius:10px;background:#fff;color:#111;cursor:pointer}
.menu-toggle span{display:block;width:20px;height:2px;background:#111;border-radius:2px;transition:transform .18s,opacity .18s}
.menu-toggle[aria-expanded="true"] span:first-child{transform:translateY(7px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.menu-toggle[aria-expanded="true"] span:last-child{transform:translateY(-7px) rotate(-45deg)}
@media(max-width:700px){
 body{padding-bottom:20px!important}
 .topbar{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;align-items:center;justify-content:space-between;min-height:64px;padding:7px 14px!important;gap:12px;background:#fff!important;overflow:visible}
 .topbar .brand{flex:0 1 auto;min-width:0;width:auto;height:48px;min-height:48px;justify-content:flex-start;margin:0;overflow:visible}
 .topbar .brand-logo{width:98px;height:48px;max-width:40vw;max-height:48px;object-position:left center}
 .menu-toggle{display:flex;flex:0 0 44px;margin-left:auto}
 .topbar .main-nav{display:none;position:absolute;top:calc(100% + 1px);left:0;right:0;z-index:200;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;padding:10px 14px 14px;background:#fff;border-bottom:1px solid #e5e5e5;box-shadow:0 12px 20px rgba(0,0,0,.12);max-height:calc(100dvh - 75px);overflow-y:auto}
 .topbar .main-nav.is-open{display:flex}
 .topbar .main-nav a{display:flex;width:100%;min-height:46px;flex:0 0 auto;justify-content:flex-start;text-align:left;padding:12px 14px;font-size:14px;white-space:normal;border-radius:8px;color:#111!important}
 .topbar .main-nav .button{justify-content:center;background:#111!important;color:#fff!important}
 .topbar .main-nav .nav-logout{color:#555!important}
 .nav-user{display:block;max-width:none;padding:10px 14px;border-top:1px solid #eee;white-space:normal;overflow-wrap:anywhere}
 .container{margin:20px auto;padding:0 14px;min-height:calc(100dvh - 150px)}
 .footer{padding-bottom:18px}
}
@media(min-width:701px){.topbar .main-nav{display:flex!important}.menu-toggle{display:none!important}}


/* Correções finais de marca e menu mobile */
.form-brand{display:flex;justify-content:center;align-items:center;margin:0 auto 16px;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;width:100%;max-width:100%}
.form-brand img{display:block;width:118px;height:82px;max-width:48vw;object-fit:contain;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.topbar{position:relative;overflow:visible!important;background:#fff!important}
.topbar .brand{background:transparent!important;border:0!important;box-shadow:none!important}
.topbar .brand-logo{display:block!important;opacity:1!important;visibility:visible!important;width:104px;height:58px;max-width:34vw;max-height:58px;object-fit:contain;object-position:center;background:transparent!important}
.menu-toggle{display:none;flex:0 0 44px;position:relative;z-index:1201}
@media(max-width:700px){
 body{padding-bottom:18px!important}
 .topbar{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:64px!important;padding:6px 14px!important;overflow:visible!important}
 .topbar .brand{display:flex!important;flex:0 1 auto!important;width:auto!important;min-width:0!important;height:52px!important;min-height:52px!important;justify-content:flex-start!important;margin:0!important}
 .topbar .brand-logo{width:96px;height:50px;max-width:38vw;max-height:50px;object-position:left center}
 .menu-toggle{display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:5px;width:44px;height:44px;min-height:44px;padding:9px;border:1px solid #dedede;border-radius:10px;background:#fff;color:#111;cursor:pointer}
 .menu-toggle span{display:block;width:20px;height:2px;background:#111;border-radius:2px}
 .topbar .main-nav{display:none!important;position:absolute!important;top:100%!important;left:0!important;right:0!important;bottom:auto!important;z-index:1200!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:4px!important;width:100%!important;max-height:calc(100dvh - 75px)!important;overflow-y:auto!important;padding:10px 14px 14px!important;margin:0!important;background:#fff!important;border:1px solid #e5e5e5!important;border-top:0!important;box-shadow:0 12px 20px rgba(0,0,0,.14)!important}
 .topbar .main-nav.is-open{display:flex!important}
 .topbar .main-nav[hidden]{display:none!important}
 .topbar .main-nav a{display:flex!important;align-items:center;justify-content:flex-start!important;width:100%!important;min-height:46px!important;flex:0 0 auto!important;padding:12px 14px!important;font-size:14px!important;color:#111!important;background:transparent!important;white-space:normal!important;border-radius:8px!important}
 .topbar .main-nav a:hover,.topbar .main-nav a:focus-visible{background:#f1f1f1!important}
 .topbar .main-nav .nav-logout{color:#555!important}
 .topbar .main-nav .button{background:#111!important;color:#fff!important;justify-content:center!important}
 .topbar .main-nav .nav-user{display:block!important;max-width:none!important;padding:10px 14px!important;border-top:1px solid #eee;white-space:normal;overflow-wrap:anywhere}
}
@media(min-width:701px){.topbar .main-nav{display:flex!important}.menu-toggle{display:none!important}.topbar .main-nav[hidden]{display:flex!important}}

/* Administração: lista de usuários responsiva; auditoria recente removida da tela */
.mobile-admin-users{display:none}
.admin-user-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.admin-user-heading h3{margin:0 0 8px;font-size:16px;overflow-wrap:anywhere}
.mobile-admin-user{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px;box-shadow:var(--shadow)}
.mobile-admin-actions{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px}
.mobile-admin-actions form{flex:1 1 130px}
.mobile-admin-actions button{width:100%}
@media(max-width:600px){.admin-users-table{display:none!important}.mobile-admin-users{display:grid;gap:12px}.toolbar .muted{font-size:12px}.mobile-admin-user .mobile-client-detail{align-items:flex-start}}
@media(min-width:601px){.mobile-admin-users{display:none!important}}

/* Pesquisa rápida de clientes e empréstimos */
.search-form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 10px;padding:12px;background:var(--surface, #fff);border:1px solid var(--line, #e7e1d5);border-radius:14px}
.search-form input[type="search"]{flex:1 1 240px;min-width:0;width:100%;min-height:44px;padding:10px 13px;border:1px solid var(--line, #ddd);border-radius:9px;background:#fff;color:var(--text, #171717);font:inherit}
.search-form button,.search-form .button{min-height:44px;white-space:nowrap}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){.search-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px}.search-form input[type="search"]{grid-column:1/-1}.search-form button,.search-form .button{width:100%;justify-content:center}.search-form input[type="search"]{font-size:16px}}

/* Checkout Pix: layout mobile-first, código com largura completa e ações claras */
.pix-checkout{width:min(100%,600px);margin:18px auto 38px;background:#fff;border:1px solid #eae3d6;border-radius:22px;box-shadow:0 18px 52px rgba(36,27,11,.075);overflow:hidden;min-width:0}
.pix-checkout-head{padding:28px 30px 23px;background:linear-gradient(145deg,#fffdf8,#fff8e8);border-bottom:1px solid #f1e6d1;text-align:center}
.pix-eyebrow{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.13em;color:#9c650b;background:#fff3d3;border:1px solid #f6e0a4;border-radius:20px;padding:7px 13px}
.pix-checkout-head h1{font-size:clamp(23px,5vw,29px);letter-spacing:-.9px;margin:15px 0 8px;line-height:1.22;color:#211a11}
.pix-checkout-head p{color:#746958;font-size:14px;margin:0 auto;max-width:390px}
.pix-checkout-body{padding:26px 30px 28px;min-width:0}
.pix-order-details{display:flex;justify-content:space-between;align-items:center;gap:15px;padding-bottom:15px}
.pix-kicker{font-size:13px;font-weight:600;color:#827663}
.pix-amount{font-size:34px;font-weight:850;letter-spacing:-1px;color:#191919;line-height:1.35;margin-top:5px}
.pix-plan-symbol{width:45px;height:45px;flex:none;display:grid;place-items:center;border-radius:14px;background:#fbefd0;color:#ab7616;font-size:25px}
.pix-customer{border-top:1px solid #f0ebe1;border-bottom:1px solid #f0ebe1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;font-size:13px}.pix-customer span{color:#837969}.pix-customer strong{font-size:14px;max-width:72%;text-align:right;overflow-wrap:anywhere}
.pix-payment-status{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-top:18px;border-radius:11px;font-size:13px;font-weight:700;line-height:1.4;min-width:0}.pix-payment-status.is-pending{color:#96600b;background:#fff6df;border:1px solid #f6e6b8}.pix-payment-status.is-approved{color:#0a7a4d;background:#eafaf1;border:1px solid #bcebd0}.pix-payment-status.is-expired{color:#a52828;background:#fff0f0;border:1px solid #f9d1d1}
.pix-status-icon{flex:0 0 27px;width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:rgba(0,0,0,.05);font-size:16px}
.pix-qr-panel{text-align:center;margin:26px 0 22px}.pix-step-label{display:block;text-align:center;font-size:11px;font-weight:850;letter-spacing:.085em;color:#89734d}.pix-qr-frame{width:min(100%,284px);margin:14px auto 10px;aspect-ratio:1;padding:14px;background:#fff;border:1px solid #e9e5db;border-radius:17px;box-shadow:0 5px 26px rgba(0,0,0,.045);display:grid;place-items:center}.pix-qr-frame img{display:block;width:100%;height:auto;max-height:254px;object-fit:contain;image-rendering:auto}.pix-qr-panel p{font-size:12px;color:#81786b;margin:0}
.pix-code-panel{border:1px solid #eee6d7;background:#fffdf9;padding:20px;border-radius:15px;min-width:0;margin-top:22px}.pix-code-description{text-align:center;font-size:13px;color:#746b5c;margin:8px 0 14px}
.pix-code-wrap{width:100%;min-width:0}.pix-code-input,.pix-checkout .pix-code-input{box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;height:90px;min-height:90px;padding:12px 13px;border:1px solid #e5ddce;border-radius:10px;background:#fff;color:#5f564b;font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:0;overflow-wrap:anywhere;word-break:break-all;white-space:pre-wrap;resize:none;overflow-y:auto;outline-offset:2px}.pix-code-input:focus{outline:2px solid #bd8417}
.pix-copy-button,.pix-checkout .pix-copy-button{width:100%;display:flex;min-width:0;min-height:52px;margin-top:12px;border-radius:11px;padding:14px 12px;justify-content:center;background:#151515;color:white;font-size:15px;font-weight:800;gap:10px;transition:background .15s}.pix-copy-button:hover{background:#373024}.pix-copy-button.is-copied,.pix-copy-button.is-copied:hover{background:#0d8554}.pix-copy-button:disabled{opacity:.5;cursor:not-allowed}
.pix-copy-feedback{min-height:0;margin:7px 0 0;font-size:12px;text-align:center;color:#397752}.pix-copy-feedback:empty{display:none}
.pix-wait-panel{display:flex;gap:11px;align-items:flex-start;padding:18px 0 15px}.pix-wait-icon{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e8f8ee;color:#128655;font-weight:900}.pix-wait-panel strong{font-size:13px;display:block}.pix-wait-panel p{font-size:12px;color:#817766;margin:3px 0 0;line-height:1.55}
.pix-check-button,.pix-checkout .pix-check-button{display:block;text-align:center;width:100%;padding:10px;min-height:43px;color:#805813;background:#faf1df;border:1px solid #f1e0bb;border-radius:10px;font-size:13px;font-weight:750}.pix-check-button:hover{background:#f4e1bc}.pix-check-button:disabled{opacity:.55;cursor:wait}.pix-footer-note{text-align:center;font-size:11px;color:#9b9282;margin:15px 0 0}
@media(max-width:600px){.pix-checkout{margin:6px auto 25px;border-radius:16px}.pix-checkout-head{padding:23px 18px 20px}.pix-checkout-body{padding:19px 16px 22px}.pix-amount{font-size:31px}.pix-code-panel{padding:15px 12px;margin-top:19px}.pix-qr-panel{margin:24px 0 18px}.pix-qr-frame{width:min(100%,266px)}.pix-copy-button,.pix-checkout .pix-copy-button{font-size:14px}.pix-customer{align-items:flex-start}.pix-customer strong{max-width:70%}}
@media(max-width:360px){.pix-checkout-body{padding:16px 11px}.pix-code-panel{padding:13px 10px}}

/* Perfil do usuário */
.profile-form{max-width:590px;margin:24px auto 45px}
.profile-form h2{margin:26px 0 6px;font-size:20px}
.profile-account{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:23px 0 26px}
.profile-account>div{min-width:0;border:1px solid #e9e9e9;background:#fafafa;border-radius:12px;padding:14px;overflow-wrap:anywhere}
.profile-account strong,.profile-caption{display:block}
.profile-account strong{font-size:15px;color:#111;margin-top:4px}
.profile-caption{font-size:12px;color:#666}
.profile-save{width:100%;margin-top:10px}
.profile-form small{font-size:12px;line-height:1.45}
@media(max-width:480px){.profile-account{grid-template-columns:1fr;gap:9px}}

/* Aviso preventivo de renovação de assinatura (3 dias antes do vencimento). */
.subscription-notice{display:flex;align-items:center;gap:18px;padding:21px 23px;margin:0 0 22px;background:#fff9eb;border:1px solid #e8c67d;border-left:5px solid #bd831e;border-radius:16px;box-shadow:0 5px 20px #6b4b1710;color:#493713}
.subscription-notice.is-urgent{background:#fff3ef;border-color:#efb3a1;border-left-color:#c44d2e;color:#672919}
.subscription-notice-symbol{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;background:#fae6b6;border-radius:13px;font-size:24px}
.subscription-notice.is-urgent .subscription-notice-symbol{background:#ffded3}
.subscription-notice-content{flex:1;min-width:0}
.subscription-notice-label{font-size:12px;font-weight:800;letter-spacing:.025em;text-transform:uppercase;opacity:.85}
.subscription-notice-content h2{font-size:clamp(18px,2.4vw,23px);line-height:1.25;margin:3px 0 6px;color:inherit}
.subscription-notice-content p{font-size:14px;line-height:1.5;margin:0;max-width:660px}
.subscription-notice-action{flex:0 0 auto;text-align:center;white-space:nowrap;background:#1c1c1c;color:white;min-height:46px}
.subscription-notice-action:hover{background:#3b3324}
.subscription-renew-price{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f8f6f1;border:1px solid #e7dfd1;padding:15px 17px;border-radius:12px;margin:20px 0;font-size:14px;color:#56504a}
.subscription-renew-price strong{font-size:26px;color:#191919;white-space:nowrap}
@media(max-width:760px){.subscription-notice{align-items:flex-start;flex-wrap:wrap;gap:12px;padding:16px}.subscription-notice-symbol{flex-basis:38px;width:38px;height:38px;font-size:19px}.subscription-notice-content{flex-basis:calc(100% - 54px)}.subscription-notice-action{width:100%;justify-content:center}}
@media(max-width:390px){.subscription-notice-content{flex-basis:100%}.subscription-notice-symbol{display:none}}
