/* =========================================================
   GranHub 3.0.2 — acabamento visual, temas e Admin mobile
   ========================================================= */

/* Logos de empresa: a imagem ocupa todo o quadro, sem miolo branco sobrando. */
.company-logo,
.sidebar-company-logo,
.profile-company-logo,
.company-profile-logo{
  overflow:hidden!important;
  padding:0!important;
}
.company-logo img,
.sidebar-company-logo img,
.profile-company-logo img,
.company-profile-logo img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  padding:0!important;
}

/* Identidade do Admin: logo sempre visível e proporcional. */
.admin-sidebar-brand{
  min-height:66px!important;
  margin:0 0 12px!important;
  padding:8px 10px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:14px!important;
  background:#fff!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.admin-sidebar-brand .admin-brand-logo{
  display:block!important;
  width:calc(100% - 42px)!important;
  max-width:178px!important;
  height:42px!important;
  max-height:42px!important;
  object-fit:contain!important;
  object-position:left center!important;
  filter:none!important;
  opacity:1!important;
}
.admin-mobile-brand{display:none;align-items:center;min-width:0}
.admin-mobile-brand img{display:block;width:116px;height:30px;object-fit:contain}

/* ---------- GranHub Dark: contraste real, sem cartões claros perdidos ---------- */
html[data-gh-theme="escuro"]{
  color-scheme:dark;
  --gh-blue:#71adff;
  --gh-blue-700:#4d94f3;
  --gh-navy:#f4f7fb;
  --gh-navy-900:#ffffff;
  --gh-surface:#20252d;
  --gh-bg:#15191f;
  --gh-bg-2:#1b2027;
  --gh-border:#343c47;
  --gh-border-strong:#46515e;
  --gh-text:#f3f6fa;
  --gh-muted:#aeb9c7;
  --gh-shadow:0 18px 48px rgba(0,0,0,.24);
  --gh-shadow-sm:0 8px 24px rgba(0,0,0,.20);
}
html[data-gh-theme="escuro"] body,
html[data-gh-theme="escuro"] .portal-main,
html[data-gh-theme="escuro"] .portal-content{background:#15191f!important;color:var(--gh-text)!important}
html[data-gh-theme="escuro"] .portal-topbar{background:rgba(24,29,36,.96)!important;border-color:#333b46!important}
html[data-gh-theme="escuro"] .portal-sidebar{background:linear-gradient(180deg,#171c23,#11151a)!important;border-color:#2a313a!important}
html[data-gh-theme="escuro"] :is(.card,.metric-card,.dashboard-welcome-main,.dashboard-quick-card,.service-shortcut,.section-card,.support-quick-panel,.calendar-card,.project-card,.doc-card,.tutorial-card,.profile-card,.status-card,.ticket-list,.conversation,.filter-bar,.table-wrap,.modal,.notification-popover,.top-company-popover){background:#20252d!important;border-color:#343c47!important;color:#f3f6fa!important;box-shadow:var(--gh-shadow-sm)!important}
html[data-gh-theme="escuro"] :is(h1,h2,h3,h4,strong,.top-title,.company-context,.section-kicker){color:#f4f7fb!important}
html[data-gh-theme="escuro"] :is(p,small,.muted,.small,.company-meta,.project-progress small){color:#aeb9c7!important}
html[data-gh-theme="escuro"] :is(.field input,.field textarea,.field select,.search-input){background:#181d23!important;border-color:#424c58!important;color:#f5f7fa!important}
html[data-gh-theme="escuro"] :is(.btn-secondary,.btn-ghost,.icon-btn,.kpi-chip){background:#272d35!important;border-color:#3c4652!important;color:#dce8f8!important}
html[data-gh-theme="escuro"] table{color:#eaf0f7!important}
html[data-gh-theme="escuro"] th{background:#181d23!important;color:#9db0c7!important;border-color:#343c47!important}
html[data-gh-theme="escuro"] td{border-color:#343c47!important}
html[data-gh-theme="escuro"] .theme-option{background:#20252d!important;border-color:#3b4551!important;color:#f3f6fa!important}
html[data-gh-theme="escuro"] .theme-option.active{border-color:#71adff!important;box-shadow:0 0 0 3px rgba(113,173,255,.14)!important}
html[data-gh-theme="escuro"] .company-hero{border-color:#343c47!important}

/* ---------- GranHub SST: verde de segurança consistente e profissional ---------- */
html[data-gh-theme="sst"]{
  color-scheme:light;
  --gh-blue:#078a58;
  --gh-blue-700:#056d46;
  --gh-navy:#153c30;
  --gh-navy-900:#0b2c22;
  --gh-surface:#ffffff;
  --gh-bg:#f3faf6;
  --gh-bg-2:#eaf7f0;
  --gh-border:#d5eadf;
  --gh-border-strong:#bcdccc;
  --gh-text:#173f33;
  --gh-muted:#648679;
  --gh-shadow:0 18px 48px rgba(10,93,61,.08);
  --gh-shadow-sm:0 8px 24px rgba(10,93,61,.07);
}
html[data-gh-theme="sst"] body,
html[data-gh-theme="sst"] .portal-main,
html[data-gh-theme="sst"] .portal-content{background:linear-gradient(180deg,#f8fcfa,#eef8f3)!important;color:#173f33!important}
html[data-gh-theme="sst"] .portal-topbar{background:rgba(255,255,255,.96)!important;border-color:#d5eadf!important}
html[data-gh-theme="sst"] .portal-sidebar{background:linear-gradient(180deg,#086a49,#064c37)!important;border-color:#07593f!important}
html[data-gh-theme="sst"] .portal-sidebar .brand-logo-main{filter:brightness(0) invert(1)!important}
html[data-gh-theme="sst"] .portal-sidebar .nav-link{color:rgba(255,255,255,.84)!important}
html[data-gh-theme="sst"] .portal-sidebar .nav-link:hover{background:rgba(255,255,255,.10)!important;color:#fff!important}
html[data-gh-theme="sst"] .portal-sidebar .nav-link.active{background:#fff!important;color:#076f4b!important;box-shadow:none!important}
html[data-gh-theme="sst"] :is(.card,.metric-card,.dashboard-welcome-main,.dashboard-quick-card,.service-shortcut,.section-card,.support-quick-panel,.calendar-card,.project-card,.doc-card,.tutorial-card,.profile-card,.status-card,.ticket-list,.conversation,.filter-bar,.table-wrap,.modal){background:#fff!important;border-color:#d5eadf!important;box-shadow:var(--gh-shadow-sm)!important}
html[data-gh-theme="sst"] :is(.metric-icon,.qicon,.support-quick-icon,.viewer-highlight-icon){background:#e5f6ed!important;color:#078a58!important}
html[data-gh-theme="sst"] :is(.btn-primary,.gh27-calendar-add){background:linear-gradient(135deg,#078a58,#13a76c)!important;border-color:#078a58!important;box-shadow:0 10px 22px rgba(7,138,88,.18)!important}
html[data-gh-theme="sst"] :is(.btn-secondary,.btn-ghost,.icon-btn){background:#f4fbf7!important;border-color:#cbe5d7!important;color:#076f4b!important}
html[data-gh-theme="sst"] :is(.field input,.field textarea,.field select,.search-input){background:#fbfefc!important;border-color:#bddccc!important;color:#173f33!important}
html[data-gh-theme="sst"] .theme-option.active{border-color:#078a58!important;box-shadow:0 0 0 3px rgba(7,138,88,.12)!important}
html[data-gh-theme="sst"] .eyebrow{color:#078a58!important}

/* ---------- Admin mobile: drawer e topo sem cores lavadas / logo ausente ---------- */
@media(max-width:860px){
  .admin-app{background:#f3f7fc!important}
  .admin-sidebar{
    width:min(310px,90vw)!important;
    padding:12px!important;
    background:linear-gradient(180deg,#0b2b59 0%,#071d3e 100%)!important;
    color:#fff!important;
    border-right:1px solid rgba(255,255,255,.08)!important;
  }
  .admin-sidebar .sidebar-nav{padding:0 2px 8px!important}
  .admin-sidebar .nav-section{color:#7fa6d5!important;margin:8px 8px 6px!important}
  .admin-sidebar .nav-link{color:#bed1ea!important;border:1px solid transparent!important}
  .admin-sidebar .nav-link:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}
  .admin-sidebar .nav-link.active{background:#0972ff!important;color:#fff!important;box-shadow:0 8px 18px rgba(9,114,255,.22)!important}
  .admin-sidebar .sidebar-foot{border-color:rgba(255,255,255,.10)!important;padding-top:10px!important}
  .admin-sidebar .admin-client-portal-link{background:rgba(255,255,255,.08)!important;color:#fff!important;border-color:rgba(255,255,255,.12)!important}
  .admin-sidebar-brand{min-height:64px!important;margin-bottom:10px!important}
  .admin-sidebar-brand .admin-brand-logo{width:calc(100% - 40px)!important;max-width:190px!important;height:44px!important}
  .mobile-sidebar-close{color:#0b2b59!important;background:#eef5ff!important;border-color:#d5e5fb!important}

  .admin-topbar{
    height:64px!important;
    min-height:64px!important;
    padding:0 10px!important;
    gap:8px!important;
    background:rgba(255,255,255,.98)!important;
    border-bottom:1px solid #dbe6f4!important;
    box-shadow:0 7px 22px rgba(15,57,109,.07)!important;
  }
  .admin-topbar .mobile-menu{display:grid!important;color:#1456a8!important;background:#f5f9ff!important;border-color:#d7e6f8!important}
  .admin-mobile-brand{display:flex!important;flex:0 1 120px!important}
  .admin-top-title-wrap{display:none!important}
  .admin-topbar .topbar-actions{margin-left:auto!important;gap:6px!important;min-width:0!important}
  .admin-topbar .brasilia-clock,.admin-environment-chip{display:none!important}
  .admin-topbar .user-chip{display:flex!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;padding:2px!important;background:#f7faff!important;border-color:#d9e7f8!important}
  .admin-topbar .user-chip>span:not(.avatar){display:none!important}
  .admin-topbar .user-chip .avatar{width:32px!important;height:32px!important}
  .admin-topbar>.icon-btn:last-child{width:38px!important;height:38px!important;color:#1456a8!important;background:#f7faff!important}
  .admin-content{padding:14px 10px 30px!important;background:#f3f7fc!important}
  .admin-card,.admin-metric,.kpi-chip{border-color:#dce7f5!important}
  .responsive-cards tr{background:#fff!important;border:1px solid #e0e9f5!important;border-radius:12px!important;margin-bottom:10px!important;padding:12px!important}
  .responsive-cards td{color:#17345c!important}
  .responsive-cards td::before{color:#7790af!important}
  .page-head h1{font-size:1.55rem!important}
  .page-head p{font-size:.82rem!important}
}
@media(max-width:430px){
  .admin-mobile-brand{flex-basis:104px!important}
  .admin-mobile-brand img{width:104px!important;height:28px!important}
  .admin-topbar .user-chip{display:none!important}
}
