:root{
  --tg-bg:#eef2f7;
  --tg-bg-2:#f8fafc;
  --tg-sidebar:#0f172a;
  --tg-sidebar-soft:#182338;
  --tg-accent:#f59e0b;
  --tg-accent-soft:#fff7ed;
  --tg-primary:#111827;
  --tg-text:#0f172a;
  --tg-muted:#64748b;
  --tg-card:#ffffff;
  --tg-border:#dbe3ee;
  --tg-border-strong:#c7d2e3;
  --tg-success:#16a34a;
  --tg-danger:#dc2626;
  --tg-shadow:0 16px 42px rgba(15,23,42,.08);
}
*{box-sizing:border-box}
html,body{min-height:100%;max-width:100%;overflow-x:hidden}
body{margin:0;background:radial-gradient(circle at top left,#ffffff 0,var(--tg-bg) 55%,#e8edf5 100%);color:var(--tg-text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{text-decoration:none}
img{max-width:100%;height:auto}
.app-shell,.app-container,.app-row{min-height:100vh}
.app-row>*{min-width:0}
.sidebar{min-height:100vh;background:linear-gradient(180deg,var(--tg-sidebar) 0,#09111f 100%);padding:1.4rem 1rem !important;position:sticky;top:0;z-index:1040}
.sidebar a{color:#dbe5f3;text-decoration:none;display:flex;align-items:center;gap:.7rem;padding:.9rem 1rem;border-radius:1rem;transition:.18s ease;font-weight:600;margin-bottom:.35rem;border:1px solid transparent;word-break:break-word}
.sidebar a:hover,.sidebar a.active{background:linear-gradient(180deg,#172337 0,var(--tg-sidebar-soft) 100%);color:#fff;transform:translateX(2px);border-color:rgba(255,255,255,.08)}
.sidebar-divider{height:1px;background:rgba(255,255,255,.08);margin:1rem .35rem}
.sidebar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.sidebar-close-btn{width:42px;height:42px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#fff;font-size:1.5rem;line-height:1}
.sidebar-backdrop{position:fixed;inset:0;background:rgba(2,6,23,.55);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:.2s ease;z-index:1030}
.brand{font-size:1.45rem;font-weight:900;color:#fff;line-height:1.05;letter-spacing:-.03em;margin-bottom:1.25rem}
.brand small{display:block;color:#9fb0ca;font-size:.98rem;font-weight:600;margin-top:.45rem;letter-spacing:0}
.main-wrap{padding:1.35rem 1.35rem 2rem;min-width:0}
.page-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;padding:1.15rem 1.25rem;border:1px solid rgba(255,255,255,.65);border-radius:1.35rem;background:linear-gradient(135deg,rgba(255,255,255,.95) 0,rgba(255,255,255,.8) 100%);backdrop-filter:blur(6px);box-shadow:var(--tg-shadow)}
.page-hero-main{flex:1 1 360px;min-width:0}
.page-hero-top{display:flex;align-items:flex-start;gap:.9rem;min-width:0}
.page-hero h3{margin:0;font-size:clamp(1.35rem,3vw,2.2rem);font-weight:900;letter-spacing:-.04em;word-break:break-word}
.small-muted{font-size:.92rem;color:var(--tg-muted)}
.user-pill{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .8rem;border-radius:999px;background:#f8fafc;border:1px solid var(--tg-border);font-weight:600;color:#334155;max-width:100%;flex-wrap:wrap}
.tg-badge{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .8rem;border-radius:999px;font-size:.82rem;font-weight:800;background:var(--tg-accent-soft);color:#9a3412;border:1px solid #fdba74;max-width:100%;flex-wrap:wrap}
.status-dot{width:.58rem;height:.58rem;border-radius:999px;background:#22c55e;display:inline-block;box-shadow:0 0 0 5px rgba(34,197,94,.12)}
.status-dot.off{background:#ef4444;box-shadow:0 0 0 5px rgba(239,68,68,.12)}
.mobile-menu-btn{display:inline-flex;flex-direction:column;justify-content:center;gap:4px;width:44px;height:44px;border:1px solid var(--tg-border);border-radius:14px;background:#fff;flex:0 0 auto}
.mobile-menu-btn span{display:block;width:18px;height:2px;background:#111827;margin:0 auto;border-radius:999px}
.card{border:1px solid rgba(219,227,238,.95);border-radius:1.45rem;box-shadow:var(--tg-shadow);background:linear-gradient(180deg,#fff 0,#fbfdff 100%);overflow:hidden}
.card.p-4,.card.p-3{padding:1.35rem !important}
.card-title-row{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;flex-wrap:wrap;margin-bottom:1rem}
.card-title-row h5{font-size:1.32rem;font-weight:900;letter-spacing:-.03em}
.section-kicker{display:inline-block;font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#66758d;background:#eff4fb;border-radius:999px;padding:.35rem .7rem;border:1px solid var(--tg-border);margin-bottom:.65rem;max-width:100%;word-break:break-word}
.section-note{padding:.95rem 1rem;border-radius:1rem;background:#f8fafc;border:1px dashed var(--tg-border-strong);color:#475569}
.quick-panel{padding:1rem;border-radius:1rem;background:#f8fafc;border:1px dashed #cbd5e1}
.block-title{margin-top:.3rem;padding:.72rem .95rem;border-radius:1rem;background:linear-gradient(90deg,#111827 0,#1f2937 100%);color:#fff;font-weight:800;font-size:.92rem;letter-spacing:.01em}
.form-label{font-weight:700;font-size:.92rem;color:#334155;margin-bottom:.45rem}
.form-control,.form-select{border-radius:1rem;padding:.78rem .92rem;border:1px solid var(--tg-border-strong);background:#fff;box-shadow:none;min-height:48px;max-width:100%}
.form-control:focus,.form-select:focus{border-color:#93c5fd;box-shadow:0 0 0 .22rem rgba(59,130,246,.12)}
textarea.form-control{min-height:auto;resize:vertical}
.form-text{color:#64748b;font-size:.84rem}
.btn{border-radius:1rem;padding:.72rem 1rem;font-weight:700;box-shadow:none;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;white-space:normal;text-align:center;max-width:100%}
.btn-sm{border-radius:.85rem;padding:.48rem .8rem;font-weight:700}
.btn-dark{background:linear-gradient(180deg,#111827 0,#0b1220 100%);border-color:#111827}
.btn-outline-dark{border-color:#1f2937;color:#111827}
.btn-outline-dark:hover{background:#111827;color:#fff}
.btn-outline-secondary{border-color:#cbd5e1;color:#334155}
.btn-outline-danger{border-color:#fca5a5;color:#dc2626}
.toolbar{display:flex;gap:.65rem;flex-wrap:wrap;align-items:center}
.toolbar > *{min-width:0}
.data-filter{max-width:280px}
.table-responsive{max-height:68vh;border:1px solid var(--tg-border);border-radius:1.1rem;overflow:auto;background:#fff;max-width:100%}
.table{--bs-table-bg:transparent;margin-bottom:0;min-width:760px}
.table thead th{position:sticky;top:0;background:#f8fafc;z-index:2;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;padding:.95rem .85rem;border-bottom:1px solid var(--tg-border-strong)}
.table td{padding:.95rem .85rem;border-color:#edf2f7;vertical-align:middle}
.table tbody tr:hover{background:#fafcff}
.table-actions{display:flex;flex-wrap:wrap;gap:.45rem;justify-content:flex-end}
.info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin-bottom:1rem}
.info-chip{padding:.85rem 1rem;border-radius:1rem;border:1px solid var(--tg-border);background:#f8fafc;min-width:0}
.info-chip strong{display:block;font-size:1.25rem;font-weight:900;color:#111827;word-break:break-word}
.info-chip span{font-size:.83rem;color:#64748b}
.kpi-card{padding:1.1rem 1rem;height:100%}
.kpi-value{font-size:2.1rem;font-weight:900;line-height:1;letter-spacing:-.04em}
.kpi-label{color:var(--tg-muted);font-size:.9rem;margin-top:.35rem;text-transform:capitalize}
.chart-bar{height:10px;background:#eef2f7;border-radius:999px;overflow:hidden}
.chart-bar span{display:block;height:100%;background:linear-gradient(90deg,#f59e0b,#fb923c);border-radius:999px}
.preview-thumb{max-width:88px;max-height:88px;border-radius:.9rem;border:1px solid var(--tg-border);object-fit:cover;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.preview-box{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-top:.45rem;max-width:100%}
.preview-file{display:inline-flex;align-items:center;gap:.4rem;padding:.5rem .75rem;background:#f8fafc;border:1px solid var(--tg-border);border-radius:.85rem;text-decoration:none;color:#0f172a;font-weight:600;max-width:100%;word-break:break-word}
.login-wrap{max-width:460px;margin:0 auto}
.login-brand{font-size:2rem;font-weight:900;letter-spacing:-.04em}
.login-card{padding:1.4rem}
.entity-layout{display:grid;grid-template-columns:minmax(320px,460px) minmax(0,1fr);gap:1rem;align-items:start}
.entity-panel{position:sticky;top:1rem;align-self:start}
.entity-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;flex-wrap:wrap;margin-bottom:1rem}
.entity-head p{margin:0;color:var(--tg-muted)}
.empty-state{padding:1.2rem;border:1px dashed var(--tg-border-strong);border-radius:1rem;background:#fbfdff;color:#64748b;text-align:center}
.listing-meta{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.3rem}
.tag-soft{display:inline-flex;align-items:center;gap:.3rem;padding:.3rem .6rem;border-radius:999px;background:#f8fafc;border:1px solid var(--tg-border);font-size:.76rem;font-weight:700;color:#475569;max-width:100%;word-break:break-word}
.asset-item-row{padding:.85rem;border:1px dashed #d1d5db;border-radius:1.1rem;margin-inline:0;background:#fcfdff}
.hero-actions{display:flex;flex-wrap:wrap;gap:.6rem}
.page-section-tabs{display:flex;gap:.6rem;flex-wrap:wrap;border-bottom:1px solid var(--tg-border);margin-bottom:1rem;padding-bottom:.9rem}
.page-section-tab{appearance:none;border:1px solid var(--tg-border);background:#fff;color:#334155;padding:.7rem .95rem;border-radius:999px;font-weight:800;font-size:.88rem;line-height:1.2;transition:.18s ease}
.page-section-tab.active,.page-section-tab:hover{background:#111827;color:#fff;border-color:#111827}
.page-tab-pane{display:none}
.page-tab-pane.active{display:block;animation:fadeTab .18s ease}
.sticky-action-bar{position:sticky;bottom:.65rem;z-index:5;display:flex;gap:.75rem;flex-wrap:wrap;padding:1rem 1.1rem;margin-top:1.2rem;border:1px solid rgba(255,255,255,.85);background:rgba(255,255,255,.92);backdrop-filter:blur(8px);border-radius:1.2rem;box-shadow:0 14px 30px rgba(15,23,42,.08)}
.summary-card{padding:1rem;border-radius:1rem;background:#f8fafc;border:1px solid var(--tg-border);height:100%}
.summary-card strong{display:block;font-size:1.1rem;font-weight:900;color:#111827}
.summary-card span{display:block;margin-top:.25rem;color:var(--tg-muted);font-size:.85rem}
@keyframes fadeTab{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (max-width:1199px){.entity-layout{grid-template-columns:1fr}.entity-panel{position:static}}
@media (max-width:991px){
  .sidebar{position:fixed;inset:0 auto 0 0;width:min(320px,88vw);min-height:100vh;transform:translateX(-100%);transition:transform .22s ease;overflow:auto}
  body.sidebar-open .sidebar{transform:translateX(0)}
  body.sidebar-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  body.sidebar-open{overflow:hidden}
  .main-wrap{padding:1rem}
  .page-hero h3{font-size:1.55rem}
  .table-responsive{max-height:none}
  .info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-section-tabs{overflow:auto;flex-wrap:nowrap;padding-bottom:.35rem}
  .page-section-tab{white-space:nowrap}
}
@media (min-width:992px){.sidebar-backdrop,.sidebar-close-btn,.mobile-menu-btn{display:none !important}}
@media (max-width:767px){
  .table{min-width:680px}
  .sticky-action-bar{bottom:0;padding:.9rem}
  .hero-actions,.table-actions{justify-content:flex-start}
}
@media (max-width:575px){
  .card.p-4,.card.p-3{padding:1rem !important}
  .info-grid{grid-template-columns:1fr}
  .page-hero{padding:1rem}
  .page-hero-top{align-items:center}
  .user-pill,.tg-badge{border-radius:1rem}
  .data-filter{max-width:100%}
  .sidebar a{padding:.8rem .9rem}
  .entity-layout{grid-template-columns:1fr}
}


.assets-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.asset-card{display:flex;flex-direction:column;gap:1rem;padding:1rem;border:1px solid var(--tg-border);border-radius:1.25rem;background:linear-gradient(180deg,#ffffff 0,#f8fbff 100%);min-width:0;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.asset-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.85rem;min-width:0}
.asset-code{display:inline-flex;max-width:100%;padding:.28rem .65rem;border-radius:999px;background:#eff4fb;border:1px solid var(--tg-border);font-size:.76rem;font-weight:800;color:#50637f;word-break:break-word}
.asset-name{margin:.55rem 0 0;font-size:1.08rem;font-weight:900;color:#111827;word-break:break-word}
.asset-stock-badge{display:inline-flex;align-items:center;justify-content:center;padding:.5rem .85rem;border-radius:999px;background:#111827;color:#fff;font-size:.82rem;font-weight:800;white-space:nowrap;flex:0 0 auto}
.asset-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.asset-meta-item{padding:.8rem .9rem;border-radius:1rem;background:#f8fafc;border:1px solid var(--tg-border);min-width:0}
.asset-meta-item span,.asset-section-label{display:block;font-size:.74rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b;margin-bottom:.3rem}
.asset-meta-item strong{display:block;color:#111827;font-size:.96rem;font-weight:800;word-break:break-word}
.asset-meta-item small{display:block;margin-top:.25rem;color:#64748b;word-break:break-word}
.asset-files-wrap{padding:.9rem;border-radius:1rem;background:#fcfdff;border:1px dashed var(--tg-border-strong);min-width:0}
.asset-files-wrap .d-flex{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem !important}
.asset-files-wrap .preview-box{align-items:flex-start;flex-direction:column}
.asset-files-wrap .preview-thumb{width:100%;max-width:100%;height:130px;max-height:none}
.asset-files-wrap .preview-file{width:100%;justify-content:center}
.asset-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}
.asset-actions .btn{width:100%;min-height:44px}
@media (max-width:1399px){.asset-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:991px){.assets-grid{grid-template-columns:1fr}}
@media (max-width:767px){.asset-card-head{flex-direction:column}.asset-stock-badge{white-space:normal}.asset-meta-grid,.asset-actions{grid-template-columns:1fr}}


/* Patrimônios premium */
.tg-assets-panel{border:1px solid rgba(226,232,240,.9);background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);box-shadow:0 24px 80px rgba(15,23,42,.06)}
.assets-topbar{display:flex;justify-content:space-between;gap:1.2rem;align-items:flex-start;flex-wrap:wrap;margin-bottom:1.2rem}
.assets-toolbar{flex-wrap:wrap}
.asset-view-tabs{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:1.1rem}
.asset-view-tab{border:1px solid #cbd5e1;background:#fff;color:#0f172a;padding:.8rem 1.15rem;border-radius:999px;font-weight:800;transition:.2s ease;box-shadow:0 8px 22px rgba(15,23,42,.04)}
.asset-view-tab.active,.asset-view-tab:hover{background:#0f172a;color:#fff;border-color:#0f172a;transform:translateY(-1px)}
.asset-view-pane{display:none}
.asset-view-pane.active{display:block}
.asset-search-panel{background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border:1px solid #e2e8f0;border-radius:1.5rem;padding:1rem 1rem 1.1rem;box-shadow:0 16px 32px rgba(15,23,42,.05);margin-bottom:1.35rem}
.asset-search-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;flex-wrap:wrap;margin-bottom:.9rem}
.asset-search-wrap{position:relative;flex:1 1 420px;max-width:720px}
.asset-search-wrap i{position:absolute;left:1rem;top:50%;transform:translateY(-50%);font-size:1.05rem;color:#64748b}
.asset-search-input{padding-left:2.8rem !important;height:56px;border-radius:1.2rem !important;background:#fff;border:1px solid #cbd5e1 !important;box-shadow:0 14px 40px rgba(148,163,184,.14)}
.asset-search-input:focus{box-shadow:0 0 0 .25rem rgba(59,130,246,.12),0 18px 42px rgba(148,163,184,.18) !important}
.asset-search-feedback{font-weight:700;color:#64748b}
.asset-filter-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) minmax(160px,180px) auto;gap:.75rem;align-items:center}
.asset-filter-select{height:48px;border-radius:1rem !important;border:1px solid #d5deea !important;background:#fff}
.asset-filter-clear{height:48px;border-radius:1rem !important;display:inline-flex;align-items:center;gap:.45rem;justify-content:center}
.assets-grid-premium{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.1rem}
.asset-card-premium{position:relative;border:1px solid rgba(203,213,225,.9);background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);padding:1.2rem;border-radius:1.4rem;box-shadow:0 16px 40px rgba(15,23,42,.06);overflow:hidden}
.asset-card-premium:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#0f172a,#3b82f6,#38bdf8)}
.asset-card-premium .asset-card-head{align-items:flex-start}
.asset-tags-inline{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.65rem}
.asset-soft-badge{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .7rem;border-radius:999px;background:#eef4ff;color:#1e3a8a;font-size:.74rem;font-weight:800}
.asset-soft-badge i,.asset-stock-badge i{font-size:.88rem}
.asset-hero-row{display:grid;grid-template-columns:120px minmax(0,1fr);gap:1rem;align-items:start;margin:1rem 0 1.15rem}
.asset-main-image-trigger{position:relative;border:1px solid #dbe4ef;background:#fff;border-radius:1rem;padding:.35rem;width:88px;height:88px;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(15,23,42,.08);transition:.22s ease;overflow:hidden;cursor:pointer}
.asset-main-image-trigger:hover{transform:translateY(-2px) scale(1.03);box-shadow:0 18px 32px rgba(15,23,42,.14)}
.asset-main-image-trigger img{width:100%;height:100%;object-fit:cover;border-radius:.75rem;transition:transform .2s ease}
.asset-main-image-trigger:hover img{transform:scale(1.08)}
.asset-main-image-trigger.is-empty{background:#f8fafc}
.asset-image-placeholder{display:flex;flex-direction:column;align-items:center;gap:.4rem;color:#94a3b8}
.asset-image-placeholder i{font-size:1.5rem}
.asset-image-counter{position:absolute;right:.35rem;bottom:.35rem;background:rgba(15,23,42,.88);color:#fff;border-radius:999px;padding:.15rem .42rem;font-size:.68rem;font-weight:800}
.premium-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));height:100%}
.asset-actions-icons{grid-template-columns:repeat(4,48px);justify-content:flex-start}
.icon-action{position:relative;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:14px;border:1px solid #d7e0ea;background:#fff;color:#0f172a;font-size:1.05rem;box-shadow:0 10px 22px rgba(15,23,42,.06);transition:.18s ease}
.icon-action:hover{transform:translateY(-2px) scale(1.02)}
.icon-action-dark:hover{background:#0f172a;color:#fff;border-color:#0f172a}
.icon-action-edit{color:#2563eb}
.icon-action-edit:hover{background:#eff6ff;border-color:#93c5fd}
.icon-action-duplicate{color:#1f2937}
.icon-action-duplicate:hover{background:#f8fafc;border-color:#94a3b8}
.icon-action-delete{color:#dc2626}
.icon-action-delete:hover{background:#fff1f2;border-color:#fda4af}
.asset-admin-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
.asset-admin-grid.two-cols{grid-template-columns:repeat(2,minmax(0,1fr))}
.asset-admin-card{border:1px solid rgba(226,232,240,.9);background:#fff;box-shadow:0 16px 44px rgba(15,23,42,.05)}
.asset-form-actions-center{display:flex;justify-content:center;gap:.75rem;flex-wrap:wrap}
.asset-image-modal{position:fixed;inset:0;display:none;z-index:1080}
.asset-image-modal.open{display:block}
.asset-image-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.22);backdrop-filter:blur(1.5px)}
.asset-image-dialog{position:relative;width:min(25vw,420px);min-width:280px;max-width:90vw;margin:8vh auto 0;background:#fff;border-radius:1.4rem;box-shadow:0 28px 70px rgba(15,23,42,.22);padding:1rem;border:1px solid rgba(226,232,240,.95)}
.asset-image-dialog-body{text-align:center}
.asset-image-dialog-body img{width:100%;aspect-ratio:1/1;object-fit:contain;border-radius:1rem;background:#f8fafc;border:1px solid #e2e8f0}
.asset-image-dialog-title{font-weight:800;color:#0f172a;margin-top:.9rem}
.asset-image-dialog-subtitle{font-size:.9rem;color:#64748b;margin-top:.25rem}
.asset-image-close{position:absolute;top:.75rem;right:.75rem;width:38px;height:38px;border-radius:999px;border:1px solid #dbe4ef;background:#fff;color:#0f172a}
@media (max-width:991px){.asset-admin-grid.two-cols{grid-template-columns:1fr}.asset-image-dialog{width:min(55vw,420px)}.asset-filter-row{grid-template-columns:1fr 1fr}}
@media (max-width:767px){.assets-topbar,.asset-search-row{align-items:stretch}.asset-search-wrap{flex-basis:100%;max-width:none}.asset-search-feedback{width:100%}.asset-filter-row{grid-template-columns:1fr}.asset-filter-clear{width:100%}.asset-hero-row{grid-template-columns:1fr}.asset-main-image-trigger{width:88px;height:88px}.premium-meta-grid{grid-template-columns:1fr}.asset-actions-icons{grid-template-columns:repeat(4,48px)}.asset-image-dialog{width:min(84vw,420px);margin-top:10vh}}


/* Refinos visuais v6 - Patrimônios */
.tg-assets-panel{padding:1.5rem !important;border-radius:1.75rem !important}
.tg-assets-panel .section-kicker{margin-bottom:.85rem;background:linear-gradient(180deg,#eef4ff 0%,#e2ebfb 100%);color:#5c6f8b;padding:.45rem .9rem;font-size:.82rem}
.tg-assets-panel h5{font-size:clamp(1.7rem,3vw,2.15rem);font-weight:900;letter-spacing:-.04em;color:#1f2937}
.tg-assets-panel .small-muted{font-size:1rem;line-height:1.55;color:#64748b}
.assets-topbar{margin-bottom:1.35rem;padding:1.15rem 1.2rem;border:1px solid #e8eef6;border-radius:1.45rem;background:linear-gradient(135deg,#ffffff 0%,#f7fbff 100%);box-shadow:0 14px 36px rgba(15,23,42,.05)}
.assets-topbar > div:first-child{flex:1 1 420px;min-width:280px}
.assets-toolbar{display:flex;gap:.8rem;align-items:center;justify-content:flex-end;flex:0 1 auto}
.assets-toolbar .btn{min-height:52px;padding:.85rem 1.2rem;border-radius:1.15rem;font-size:1rem;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.tg-assets-panel .asset-view-tabs{display:flex !important;flex-wrap:wrap;gap:.8rem;margin:1rem 0 1.35rem;padding:.35rem;border-radius:1.35rem;background:#eef3f9;border:1px solid #dde7f2;align-items:center}
.tg-assets-panel .asset-view-tab{appearance:none !important;-webkit-appearance:none !important;border:0 !important;background:transparent !important;color:#475569 !important;padding:.95rem 1.2rem !important;border-radius:1rem !important;font-weight:800 !important;font-size:1rem !important;line-height:1.15 !important;display:inline-flex !important;align-items:center;justify-content:center;min-height:50px;box-shadow:none !important;transition:.2s ease;position:relative}
.tg-assets-panel .asset-view-tab:hover{background:rgba(255,255,255,.78) !important;color:#0f172a !important;transform:translateY(-1px)}
.tg-assets-panel .asset-view-tab.active{background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;color:#0f172a !important;box-shadow:0 12px 26px rgba(15,23,42,.08) !important}
.tg-assets-panel .asset-view-tab.active::after{content:"";position:absolute;left:18px;right:18px;bottom:8px;height:3px;border-radius:999px;background:linear-gradient(90deg,#0f172a,#3b82f6)}
.asset-search-panel{padding:1.1rem 1.15rem 1.2rem;border-radius:1.55rem;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.asset-search-row{margin-bottom:1rem}
.asset-search-wrap{max-width:none}
.asset-search-input{height:58px !important;border-radius:1.25rem !important;font-size:1rem}
.asset-search-feedback{display:inline-flex;align-items:center;min-height:44px;padding:.65rem .9rem;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;color:#475569}
.asset-filter-row{margin-top:.1rem}
.assets-grid-premium{gap:1.25rem}
.asset-card-premium{border-radius:1.55rem;padding:1.25rem 1.25rem 1.15rem}
.asset-card-premium:hover{transform:translateY(-2px);box-shadow:0 24px 50px rgba(15,23,42,.08)}
.asset-card-premium .asset-name{font-size:1.22rem;margin-top:.45rem}
.asset-soft-badge{padding:.5rem .8rem;font-size:.76rem}
.asset-stock-badge{padding:.58rem .95rem;background:linear-gradient(180deg,#111827 0%,#1e293b 100%)}
.icon-action{border-radius:16px}
@media (max-width:767px){
  .tg-assets-panel{padding:1rem !important}
  .assets-topbar{padding:1rem;border-radius:1.2rem}
  .assets-toolbar{width:100%;justify-content:stretch}
  .assets-toolbar .btn{flex:1 1 190px}
  .tg-assets-panel .asset-view-tabs{gap:.55rem;padding:.45rem;border-radius:1.1rem}
  .tg-assets-panel .asset-view-tab{flex:1 1 calc(50% - .55rem);padding:.85rem .95rem !important;font-size:.96rem !important}
  .asset-search-feedback{width:100%;justify-content:center;border-radius:1rem}
}
@media (max-width:520px){
  .tg-assets-panel .asset-view-tab{flex:1 1 100%}
  .assets-toolbar .btn{width:100%}
}


/* Refinos visuais v7 - cabeçalho e abas de patrimônios */
.tg-assets-panel{
  max-width:100%;
  overflow:visible;
}
.tg-assets-panel .assets-topbar{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:1rem;
  padding:1.25rem 1.35rem;
  align-items:start;
}
.tg-assets-panel .assets-topbar > div:first-child{
  min-width:0;
}
.tg-assets-panel .section-kicker{
  margin-bottom:1rem;
}
.tg-assets-panel h5{
  margin:0 0 .45rem;
  line-height:1.05;
}
.tg-assets-panel .small-muted{
  max-width:62ch;
  display:block;
}
.tg-assets-panel .assets-toolbar{
  justify-content:flex-start;
  flex-wrap:wrap;
  width:100%;
  gap:.75rem;
}
.tg-assets-panel .assets-toolbar .btn{
  min-width:190px;
  min-height:50px;
  padding:.82rem 1.1rem;
}
.tg-assets-panel .asset-view-tabs{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.7rem;
  padding:.55rem;
  margin:0 0 1.25rem;
}
.tg-assets-panel .asset-view-tab{
  width:100%;
  min-width:0;
  text-align:center;
  white-space:normal;
  word-break:break-word;
  min-height:58px;
  padding:.95rem 1rem !important;
}
.tg-assets-panel .asset-search-panel{
  margin-top:.15rem;
}
.tg-assets-panel .asset-search-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:1rem;
  align-items:center;
}
.tg-assets-panel .asset-search-wrap{
  min-width:0;
}
.tg-assets-panel .asset-search-wrap i{
  left:1.05rem;
}
.tg-assets-panel .asset-search-input{
  width:100%;
  padding-left:2.9rem !important;
}
@media (max-width:900px){
  .tg-assets-panel .asset-view-tabs{
    grid-template-columns:1fr;
  }
  .tg-assets-panel .assets-toolbar .btn{
    flex:1 1 220px;
  }
  .tg-assets-panel .asset-search-row{
    grid-template-columns:1fr;
  }
  .tg-assets-panel .asset-search-feedback{
    width:100%;
    justify-content:center;
  }
}
@media (max-width:640px){
  .tg-assets-panel .assets-topbar{
    padding:1rem;
  }
  .tg-assets-panel .assets-toolbar{
    display:grid;
    grid-template-columns:1fr;
  }
  .tg-assets-panel .assets-toolbar .btn{
    width:100%;
    min-width:0;
  }
  .tg-assets-panel .asset-view-tab{
    min-height:54px;
    font-size:.95rem !important;
  }
}


.asset-search-panel{position:relative}
.asset-search-results{display:grid;gap:.6rem;margin-top:.85rem;padding:.85rem;border:1px solid #dbe5f0;border-radius:1rem;background:#fff;box-shadow:0 18px 40px rgba(15,23,42,.08)}
.asset-search-result-item{width:100%;border:1px solid #e2e8f0;background:#f8fbff;border-radius:.95rem;padding:.85rem 1rem;text-align:left;display:grid;gap:.22rem;transition:.18s ease}
.asset-search-result-item:hover{border-color:#94a3b8;background:#fff;transform:translateY(-1px)}
.asset-search-result-code{font-size:.8rem;font-weight:800;color:#475569;text-transform:uppercase;letter-spacing:.04em}
.asset-search-result-item strong{font-size:1rem;color:#0f172a}
.asset-search-result-item small{font-size:.88rem;color:#64748b}
.asset-no-results{padding:1.25rem;border:1px dashed #cbd5e1;border-radius:1rem;background:#f8fafc;display:grid;justify-items:center;gap:.4rem;color:#475569}
.asset-no-results i{font-size:1.4rem;color:#0f172a}
.asset-card-highlight{box-shadow:0 0 0 2px rgba(59,130,246,.28),0 18px 38px rgba(59,130,246,.12)!important;border-color:#93c5fd!important}


.asset-image-modal-fallback{
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px dashed #c9d4e5;
  border-radius:18px;
  background:#f7f9fc;
  color:#64748b;
  text-align:center;
  padding:22px;
}
.asset-image-modal-fallback i{
  font-size:2rem;
}


.task-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.task-calendar-weekday{font-size:.82rem;font-weight:700;text-transform:uppercase;color:#6b7280;padding:8px 4px}.task-calendar-cell{min-height:96px;border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:12px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}.task-calendar-cell.empty{background:rgba(148,163,184,.08);border-style:dashed;box-shadow:none}.task-calendar-cell.today{border-color:#111827;box-shadow:0 14px 34px rgba(15,23,42,.12)}.task-calendar-date{font-weight:700;margin-bottom:8px}.task-calendar-count{display:inline-flex;padding:6px 10px;border-radius:999px;background:rgba(17,24,39,.08);font-size:.82rem}.task-card{border:1px solid rgba(15,23,42,.08);border-radius:20px;padding:18px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}.task-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:flex-start;min-width:220px}.priority-baixa{background:rgba(34,197,94,.12)!important}.priority-media{background:rgba(59,130,246,.12)!important}.priority-alta{background:rgba(245,158,11,.18)!important}.priority-urgente{background:rgba(239,68,68,.18)!important}.status-done{background:rgba(34,197,94,.16)!important}.status-pending{background:rgba(245,158,11,.18)!important}@media (max-width:767.98px){.task-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}.task-calendar-weekday{display:none}.task-actions{min-width:0;justify-content:flex-start}}


/* Layout refinado dos formulários */
.entity-layout{grid-template-columns:minmax(360px,520px) minmax(0,1fr);gap:1.25rem}
.entity-panel .card,.entity-layout .card{border-radius:1.6rem}
.form-shell{display:grid;gap:1rem}
.form-shell .page-section-tabs{position:sticky;top:.5rem;z-index:4;background:rgba(255,255,255,.78);backdrop-filter:blur(10px);padding:.55rem;border:1px solid #dbe5f0;border-radius:1.2rem;box-shadow:0 12px 28px rgba(15,23,42,.06)}
.form-shell .page-section-tab{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:48px;font-size:.88rem}
.form-shell .page-tab-pane{padding:1.05rem;border:1px solid #e6edf5;border-radius:1.35rem;background:linear-gradient(180deg,#fff 0,#fbfdff 100%)}
.form-pane-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem;padding-bottom:.85rem;border-bottom:1px solid #edf2f7}
.form-pane-header h6{margin:0;font-size:1.02rem;font-weight:900;color:#111827}
.form-pane-header p{margin:.25rem 0 0;color:#64748b;font-size:.9rem}
.form-shell .sticky-action-bar{border-radius:1.25rem}
.form-switcher-note{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .75rem;border-radius:999px;background:#f8fafc;border:1px solid #dbe5f0;color:#475569;font-size:.82rem;font-weight:700}
.btn-icon-only{min-width:44px;width:44px;height:44px;padding:0;border-radius:14px}
.table-actions .btn,.hero-actions .btn{min-height:44px}
.entity-kpis{margin-bottom:1rem}
.quick-search-input{max-width:320px}
.form-select[multiple]{min-height:180px;padding-top:.65rem;padding-bottom:.65rem}
.form-upload-box{padding:.85rem;border:1px dashed #cbd5e1;border-radius:1rem;background:#f8fafc}
@media (max-width:1199px){.entity-layout{grid-template-columns:1fr}.entity-panel{position:static}.form-shell .page-section-tabs{top:0}}
@media (max-width:767px){.main-wrap{padding:1rem .85rem 1.6rem}.page-hero{padding:1rem}.card.p-4,.card.p-3{padding:1rem!important}.info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-shell .page-section-tabs{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}.form-shell .page-section-tab{width:100%;padding:.8rem}.form-shell .page-tab-pane{padding:.9rem}}
@media (max-width:520px){.info-grid{grid-template-columns:1fr}.form-shell .page-section-tabs{grid-template-columns:1fr}}


.document-thumb-trigger{border:0;background:transparent;padding:0;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.document-thumb-image{width:64px;height:64px;border-radius:1rem;border:1px solid var(--tg-border);object-fit:cover;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.12);transition:transform .18s ease, box-shadow .18s ease}
.document-thumb-trigger:hover .document-thumb-image{transform:scale(1.04);box-shadow:0 12px 26px rgba(15,23,42,.18)}
.document-image-modal{position:fixed;inset:0;display:none;z-index:1090}
.document-image-modal.open{display:block}
.document-image-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.72);backdrop-filter:blur(4px)}
.document-image-dialog{position:relative;z-index:1;max-width:min(92vw,900px);margin:4vh auto;background:#fff;border-radius:1.5rem;box-shadow:0 24px 80px rgba(15,23,42,.35);overflow:hidden}
.document-image-dialog-body{padding:1.25rem 1.25rem 1.5rem;text-align:center}
.document-image-dialog-body img{max-width:100%;max-height:72vh;border-radius:1rem;background:#f8fafc;border:1px solid var(--tg-border);box-shadow:0 14px 34px rgba(15,23,42,.12)}
.document-image-dialog-title{margin-top:1rem;font-size:1rem;font-weight:700;color:#0f172a}
.document-image-dialog-subtitle{font-size:.9rem;color:#64748b;margin-top:.25rem}
.document-image-close{position:absolute;top:.75rem;right:.75rem;z-index:2;width:42px;height:42px;border-radius:999px;border:0;background:rgba(15,23,42,.82);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(15,23,42,.24)}
.document-image-modal-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:2rem;color:#64748b}
.document-image-modal-fallback i{font-size:2rem}
@media (max-width: 768px){.document-image-dialog{max-width:94vw;margin:2vh auto}.document-image-dialog-body{padding:1rem}.document-image-dialog-body img{max-height:62vh}}
/* STATUS DISPONIBILIDADE */

.status-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: default;
}

.status-disponivel {
    background: #28a745;
    color: #fff;
}

.status-indisponivel {
    background: #dc3545;
    color: #fff;
}

/* efeito leve */
.status-btn:hover {
    opacity: 0.9;
}
