
:root{
  --bc-app-bg:#f4f5f7;
  --bc-app-surface:#ffffff;
  --bc-app-surface-2:#fafafa;
  --bc-app-line:#e8e6e1;
  --bc-app-text:#20242a;
  --bc-app-muted:#69707a;
  --bc-app-accent:#6f4b32;
  --bc-app-accent-soft:#f3ece5;
  --bc-app-radius:24px;
  --bc-app-shadow:0 12px 30px rgba(22,25,31,.06);
}
body.app-page, body.login-page, body.signup-page, body.landing-page, body.admin-page{
  background:linear-gradient(180deg,#f7f6f3 0%, #f1f3f5 100%);
  color:var(--bc-app-text);
}
.app-page .panel,
.app-page .stat-card,
.app-page .search-card,
.app-page .results-toolbar,
.app-page .method-card,
.app-page .edital-card,
.admin-page .panel,
.admin-page .results-toolbar{
  border-radius:22px;
  border-color:var(--bc-app-line);
  box-shadow:var(--bc-app-shadow);
}
.app-shell{min-height:100vh}
.sidebar{
  background:linear-gradient(180deg,#2a2f36 0%, #1f2329 100%);
  color:#fff;
  padding:26px 18px 18px;
}
.sidebar .brand{border-color:rgba(255,255,255,.08)}
.brand-mark{
  border-radius:14px;
  background:linear-gradient(180deg,#f4d283 0%, #c79642 100%);
  color:#211d17;
  box-shadow:0 8px 20px rgba(199,150,66,.25);
}
.side-nav{gap:8px}
.side-nav a{border-radius:14px;padding:13px 14px;color:#d7dde6}
.side-nav a span{display:grid;place-items:center;width:24px;height:24px;border-radius:10px;background:rgba(255,255,255,.08);font-size:13px}
.side-nav a.active,.side-nav a:hover{background:rgba(255,255,255,.09);color:#fff}
.side-nav a.active span,.side-nav a:hover span{background:rgba(255,255,255,.16)}
.sidebar-status{border-radius:18px;background:rgba(255,255,255,.06)}
.modern-topbar{
  min-height:80px;
  background:rgba(247,246,243,.82);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(112,86,58,.08);
  padding:18px 28px;
}
.modern-topbar h1{font-size:24px;font-weight:800;color:#222831}
.eyebrow{color:var(--bc-app-accent)}
.user-avatar{
  background:linear-gradient(180deg,#6f4b32 0%, #4f3624 100%);
  box-shadow:0 8px 18px rgba(111,75,50,.2)
}
main{max-width:1520px;padding:24px 28px 104px}
.section-kicker{color:var(--bc-app-accent)}
.btn{border-radius:14px;min-height:44px;font-size:12px;font-weight:800}
.btn-primary{background:linear-gradient(180deg,#2a2f36 0%, #1f2329 100%)}
.btn-secondary{border-color:#d8d7d2;color:#20242a}
.btn-ghost{color:#6a7078}
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea,
.app-page main input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
.app-page main select,
.app-page main textarea{
  border-radius:14px!important;
  border-color:#d8d7d2!important;
  background:#fff!important;
  color:#222831!important;
}
.app-page main input:focus,.app-page main select:focus,.app-page main textarea:focus,
input:focus, select:focus, textarea:focus{
  border-color:#b6916a!important;
  box-shadow:0 0 0 4px rgba(182,145,106,.12)!important;
}
/* Mobile app-like shell */
.mobile-bottom-nav,.mobile-sheet,.mobile-sheet-backdrop{display:none}
@media (max-width: 920px){
  .app-shell{display:block}
  .sidebar{display:none!important}
  .modern-topbar{
    position:sticky; top:0; z-index:30;
    border-radius:0 0 24px 24px;
    margin:0;
    padding:14px 16px 16px;
    box-shadow:0 8px 24px rgba(24,29,36,.06);
  }
  .modern-topbar h1{font-size:20px;line-height:1.15}
  .modern-topbar .admin-subtitle{margin-top:4px;font-size:11px}
  .user-box{gap:8px}
  .user-box strong{font-size:12px}
  main{padding:14px 14px 110px}
  .panel,.search-card,.results-toolbar,.stat-card,.method-card,.edital-card{border-radius:20px}
  .mobile-bottom-nav{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:8px;
    position:fixed;
    left:10px; right:10px; bottom:10px;
    z-index:90;
    padding:10px;
    background:rgba(255,255,255,.92);
    border:1px solid rgba(216,215,210,.92);
    box-shadow:0 18px 50px rgba(21,25,31,.14);
    border-radius:24px;
    backdrop-filter:blur(18px);
  }
  .mobile-bottom-nav .mobile-nav-item{
    border:0; background:transparent; text-decoration:none; color:#7a7f87;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
    min-height:56px; padding:6px 4px; border-radius:16px; cursor:pointer;
  }
  .mobile-bottom-nav .mobile-nav-item span{
    width:28px; height:28px; display:grid; place-items:center; border-radius:10px;
    background:#f2f1ee; color:#544133; font-size:13px; font-weight:800;
  }
  .mobile-bottom-nav .mobile-nav-item b{font-size:10px; line-height:1.1; font-weight:800}
  .mobile-bottom-nav .mobile-nav-item.active{background:#f6efe8;color:#2b231e}
  .mobile-bottom-nav .mobile-nav-item.active span{background:linear-gradient(180deg,#6f4b32 0%, #4f3624 100%);color:#fff}
  .mobile-sheet-backdrop.is-open{display:block;position:fixed;inset:0;background:rgba(17,22,29,.42);z-index:88}
  .mobile-sheet{
    position:fixed; left:0; right:0; bottom:0; z-index:89;
    background:#fff; border-radius:24px 24px 0 0; padding:10px 14px 18px;
    transform:translateY(110%); transition:transform .22s ease;
    box-shadow:0 -10px 38px rgba(17,22,29,.16);
  }
  .mobile-sheet.is-open{display:block;transform:translateY(0)}
  .mobile-sheet-handle{width:56px;height:5px;background:#dedad3;border-radius:999px;margin:4px auto 12px}
  .mobile-sheet-head{display:flex;justify-content:space-between;align-items:center;padding:0 2px 12px}
  .mobile-sheet-head strong{font-size:16px}
  .mobile-sheet-head button{border:0;background:#f3f2ef;width:36px;height:36px;border-radius:999px;font-size:22px;line-height:1;cursor:pointer}
  .mobile-sheet-nav{display:grid;gap:8px}
  .mobile-sheet-nav a{text-decoration:none;display:flex;align-items:center;gap:10px;padding:14px;border:1px solid #eee8df;border-radius:16px;background:#fcfbfa;color:#2b2f35}
  .mobile-sheet-nav a span{width:28px;height:28px;display:grid;place-items:center;border-radius:10px;background:#f3ece5;color:#6f4b32;font-weight:800}
  .mobile-sheet-nav a.active{background:#f7efe8;border-color:#e5d4c6}
}
/* Financeiro mobile */
@media (max-width: 760px){
  .billing-one-plan{grid-template-columns:1fr!important;gap:14px!important}
  .billing-product-card,.billing-current-box,.billing-actions,.billing-history{padding:18px!important}
  .billing-product-card h2{font-size:26px!important}
  .billing-feature-grid{grid-template-columns:1fr!important;gap:10px!important}
  .period-heading{margin:18px 0 12px!important}
  .billing-period-grid{display:grid!important;grid-auto-flow:column;grid-auto-columns:86vw;gap:14px!important;overflow:auto;padding-bottom:4px;scroll-snap-type:x mandatory}
  .billing-period-grid > *{scroll-snap-align:start}
  .billing-period{min-height:auto!important;padding:20px!important}
  .period-name{font-size:24px!important}
  .period-total strong{font-size:34px!important}
  .billing-actions{flex-direction:column;align-items:flex-start!important}
  .billing-action-buttons{width:100%;justify-content:stretch!important}
  .billing-action-buttons > *{width:100%}
  .billing-history-table{min-width:620px}
}
/* Search/results mobile */
@media (max-width: 760px){
  .search-card,.history-panel,.method-card,.edital-card{padding:18px!important}
  .search-input-wrap input{height:50px;border-radius:16px}
  .main-search-row,.quick-filters,.advanced-grid,.stats-grid,.method-grid,.team-overview,.comparison-summary{grid-template-columns:1fr!important}
  .table-wrap{border-radius:18px;background:#fff}
  table{min-width:880px}
}
/* Alerts and forms mobile */
@media (max-width: 760px){
  .digest-settings,.alert-form-card,.alert-list-card,.notifications-panel,.client-form-card,.team-list-head,.team-stat{padding:18px!important}
  .alert-layout,.digest-settings{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
  .alert-form-grid,.client-form-grid{grid-template-columns:1fr!important}
  .alert-rule{padding:14px!important;border-radius:16px!important}
}
/* Landing / auth polish */
.login-page{padding:18px}
.login-box{
  width:min(420px,100%);
  border-radius:28px;
  border:1px solid #ece7de;
  box-shadow:0 20px 50px rgba(22,25,31,.08);
  padding:26px 22px;
}
.login-brand-mark{background:linear-gradient(180deg,#6f4b32 0%, #4f3624 100%)}
.login-title h1{font-size:28px}
.login-title p,.login-source{color:#69707a;line-height:1.6}
.login-box button{height:48px;border-radius:16px;background:linear-gradient(180deg,#2a2f36 0%, #1f2329 100%)}
.signup-card,.price-card,.workflow-card,.analysis-box,.feature-strip-item{
  border-radius:28px!important;
  box-shadow:0 14px 34px rgba(22,25,31,.05)!important;
}
@media (max-width: 760px){
  .landing-nav{position:sticky;top:0;z-index:20;background:rgba(247,246,243,.88);backdrop-filter:blur(14px)}
  .landing-links{display:none!important}
  .landing-nav-actions{gap:8px}
  .hero-grid,.split-section,.pricing-grid,.workflow-grid,.signup-shell{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
  .hero-copy,.signup-panel,.signup-aside{order:initial}
  .hero-copy h1,.lp-section-head h2{font-size:34px!important;line-height:1.08}
  .trial-note,.hero-specs{flex-wrap:wrap}
  .price-card{padding:22px!important}
  .pricing-grid{overflow:auto;grid-auto-flow:column;grid-auto-columns:86vw;scroll-snap-type:x mandatory;padding-bottom:6px}
  .pricing-grid > *{scroll-snap-align:start}
  .signup-card{padding:22px!important}
}
