:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #dde3ef;
  --text: #0f172a;
  --muted: #51627b;
  --brand: #0b57d0;
  --brand-dark: #0a3f96;
  --ok: #0e9f6e;
  --warn: #b7791f;
  --live: #0ea5e9;
  --panel-shadow: 0 18px 40px rgba(23, 41, 84, 0.08);
  --panel-shadow-hover: 0 24px 52px rgba(23, 41, 84, 0.12);
  --glass-line: rgba(255, 255, 255, 0.68);
  --soft-blue: #edf4ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(80% 52% at 100% 0%, rgba(119, 145, 221, 0.14), transparent 70%),
    radial-gradient(70% 44% at 0% 100%, rgba(93, 127, 207, 0.08), transparent 72%),
    linear-gradient(180deg, #f9fbff, var(--bg));
}

.container {
  width: min(1150px, 94%);
  margin: 0 auto;
}

.auth-body {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(6, 20, 55, 0.88), rgba(5, 18, 48, 0.84));
}

.auth-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.20)),
    url('../img/banner.png') 22% 36% / cover no-repeat;
  opacity: .55;
  z-index: 0;
}

.auth-body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(5, 22, 58, 0.20), rgba(5, 22, 58, 0.12)),
    url('../img/banner.png') right 1.5% top 1.5% / auto 92% no-repeat;
  z-index: 0;
}

.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(1280px, 94%);
  margin: 0 auto;
  padding: 24px;
}

.auth-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(221, 227, 239, 0.95);
  border-radius: 16px;
  padding: 32px 34px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(4px);
}

.auth-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.auth-brand img {
  max-width: 150px;
  width: 100%;
  height: auto;
}

.auth-card h2 {
  margin: 6px 0 14px;
  font-size: 1.9rem;
  font-weight: 600;
  color: #253044;
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: #2f3a4f;
  font-size: 1rem;
}

input {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 50px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.26);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  color: #fff;
  min-height: 50px;
  width: 100%;
  font-size: 1.02rem;
  margin-top: 6px;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(11, 87, 208, 0.35);
  filter: brightness(1.03);
}

.btn-secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid #b5c6e7;
}

.team-size-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
}

.team-size-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(11, 87, 208, 0.16), rgba(59, 130, 246, 0.24));
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: #18428f;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.team-size-meta {
  color: #5c6f8e;
  font-size: .82rem;
  line-height: 1.45;
}

.alert {
  margin-top: 14px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 10px;
  padding: 10px;
}

.header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.caption {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.header h1 {
  margin: 3px 0 0;
  font-size: 1.7rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.dashboard {
  padding: 24px 0 40px;
}

.app-body {
  background: #eef1f7;
}

.app-body::before,
.app-body::after {
  content: none !important;
  display: none !important;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  flex-shrink: 0;
  background: linear-gradient(185deg, #1b3f79 0%, #0f2f66 46%, #0a214d 70%, #081737 100%);
  color: #dbe7ff;
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(5, 18, 43, 0.52);
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 65% at 0% 0%, rgba(106, 165, 255, 0.20), transparent 55%),
    radial-gradient(120% 70% at 100% 100%, rgba(72, 129, 236, 0.12), transparent 58%);
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-logo {
  width: 90px;
  height: auto;
  object-fit: contain;
}

.sidebar-brand strong {
  font-size: 2.2rem;
  line-height: 1.06;
  color: #fff;
  letter-spacing: .1px;
  font-weight: 700;
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  text-rendering: geometricPrecision;
}

.sidebar-menu {
  display: grid;
  gap: 7px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  height: 46px;
  color: #e6efff;
  text-decoration: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background .24s ease, color .24s ease, transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  animation: menuItemIn .45s cubic-bezier(.22, .61, .36, 1) both;
}

.sidebar-menu a::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8fc2ff, #4f95ff);
  opacity: 0;
  transform: translateY(-50%) scaleY(0.6);
  box-shadow: 0 0 12px rgba(104, 164, 255, 0.65);
  transition: opacity .24s ease, transform .24s ease, box-shadow .24s ease;
}

.sidebar-menu a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 100%);
  transform: translateX(-120%);
  transition: transform .45s ease;
  pointer-events: none;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(2px);
  box-shadow: 0 10px 20px rgba(12, 26, 58, 0.25);
}

.sidebar-menu a:hover::before {
  opacity: .9;
  transform: translateY(-50%) scaleY(1);
}

.sidebar-menu a:hover::after {
  transform: translateX(120%);
}

.sidebar-menu a.active {
  background: linear-gradient(135deg, #3e82f3 0%, #2f6fed 54%, #2656cf 100%);
  color: #fff;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  border-color: rgba(181, 214, 255, 0.35);
  box-shadow: 0 12px 24px rgba(26, 84, 188, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.sidebar-menu a.active::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

.sidebar-menu a.active::after {
  transform: translateX(120%);
}

.sidebar-menu a.active:hover {
  transform: translateX(2px);
}

.sidebar-menu a:nth-child(1) { animation-delay: .03s; }
.sidebar-menu a:nth-child(2) { animation-delay: .06s; }
.sidebar-menu a:nth-child(3) { animation-delay: .09s; }
.sidebar-menu a:nth-child(4) { animation-delay: .12s; }
.sidebar-menu a:nth-child(5) { animation-delay: .15s; }
.sidebar-menu a:nth-child(6) { animation-delay: .18s; }
.sidebar-menu a:nth-child(7) { animation-delay: .21s; }

.menu-icon {
  display: inline-block;
  width: 22px;
  min-width: 22px;
  text-align: center;
  margin-right: 10px;
}

.sidebar-menu a span {
  pointer-events: none;
}

.sidebar-logout {
  margin-top: auto;
  width: calc(100% - 14px);
  margin-left: 7px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #eef3ff);
  color: #103a73;
  font-weight: 700;
  border: 1px solid #d2deef;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, border-color .22s ease;
}

.sidebar-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(12, 28, 58, 0.26);
  border-color: #a8c2f3;
  filter: brightness(1.02);
}

.sidebar-install-btn {
  width: calc(100% - 14px);
  margin: 10px 7px 0;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 800;
}

.main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
  padding: 30px 12px 34px;
}

.content-header {
  margin-bottom: 22px;
}

.content-header h1 {
  margin: 8px 0 0;
  font-size: 3.1rem;
  line-height: 1.02;
  color: #12233f;
  font-weight: 700;
  letter-spacing: -.02em;
}

.content-header .caption {
  color: #8090aa;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0;
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.96));
  border: 1px solid rgba(214, 224, 241, 0.95);
  border-radius: 18px;
  padding: 16px 18px 14px;
  box-shadow: var(--panel-shadow);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.kpi-card::after {
  content: '';
  position: absolute;
  inset: auto -18px -18px auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 111, 237, 0.10), transparent 68%);
  pointer-events: none;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--panel-shadow-hover);
  border-color: #cad7ef;
}

.kpi-card p {
  margin: 0;
  color: #60708b;
  font-size: 1.6rem;
}

.kpi-card strong {
  display: block;
  margin-top: 2px;
  font-size: 2.1rem;
  line-height: 1;
  color: #091a34;
}

.panel {
  margin-top: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 255, 0.96));
  border: 1px solid rgba(214, 224, 241, 0.96);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--panel-shadow-hover);
  border-color: #cfdaf0;
}

.panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(220, 227, 239, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 248, 255, 0.76));
}

.panel-header h2 {
  margin: 0;
  font-size: 1.85rem;
  color: #162742;
  letter-spacing: -.02em;
}

.panel-header span {
  color: #67758d;
  font-size: 1.1rem;
}

.panel-body {
  padding: 18px 20px 20px;
}

.page-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}

.form-panel .btn-primary {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-inline {
  min-height: 36px;
  padding: 8px 10px;
  font-size: .88rem;
  font-weight: 700;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: 1px solid #ef4444;
}

.btn-danger:hover {
  filter: brightness(.96);
}

.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-form input {
  flex: 1;
  min-height: 40px;
}

.actions-inline {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.actions-inline form {
  margin: 0;
}

.view-card {
  border: 1px solid #d7e2f3;
  background: linear-gradient(180deg, #eff5ff, #f7faff);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.view-card strong {
  display: block;
  margin-bottom: 6px;
}

.view-card p {
  margin: 4px 0;
  font-size: .95rem;
}

.alert-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid #dde3ee;
  padding: 14px 16px;
}

th {
  font-size: .84rem;
  letter-spacing: .2px;
  text-transform: uppercase;
  color: #6c7a93;
  font-weight: 800;
  background: rgba(246, 249, 255, 0.9);
}

td {
  font-size: .98rem;
  color: #23324c;
}

tbody tr {
  transition: background .2s ease, transform .2s ease;
}

tbody tr:hover {
  background: rgba(237, 244, 255, 0.72);
}

.status {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .85rem;
  font-weight: 800;
}

.status-aberta {
  background: #fef3c7;
  color: #92400e;
}

.status-em_rota {
  background: #e0f2fe;
  color: #0369a1;
}

.status-em_execucao {
  background: #d1fae5;
  color: #065f46;
}

.status-finalizada {
  background: #dcfce7;
  color: #166534;
}

.status-cancelada {
  background: #fee2e2;
  color: #991b1b;
}

/* Dashboard Control */
.control-page .sidebar {
  background: linear-gradient(185deg, #1b3f79 0%, #0f2f66 46%, #0a214d 70%, #081737 100%);
}

.control-page .main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
  padding: 22px 18px 34px;
  background:
    radial-gradient(75% 50% at 100% 0%, rgba(114, 145, 214, 0.10), transparent 70%),
    radial-gradient(70% 45% at 0% 100%, rgba(107, 133, 192, 0.08), transparent 72%);
}

.control-header h1 {
  margin: 0 0 14px;
  font-size: 2.3rem;
  color: #223455;
  letter-spacing: .2px;
  position: relative;
}

.control-header h1::after {
  content: '';
  display: block;
  width: 74px;
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4c88f1, #76a5ff);
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.summary-card {
  position: relative;
  border-radius: 14px;
  padding: 16px 18px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(28, 50, 95, .24);
  transition: transform .24s ease, box-shadow .24s ease, filter .24s ease;
  animation: homeFadeUp .5s ease both;
}

.summary-card::after {
  content: '';
  position: absolute;
  top: -120%;
  left: -35%;
  width: 56%;
  height: 300%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .22), rgba(255, 255, 255, 0));
  transform: rotate(18deg);
  transition: left .42s ease;
}

.summary-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 34px rgba(28, 50, 95, .3);
  filter: saturate(1.06);
}

.summary-card:hover::after {
  left: 105%;
}

.summary-card strong {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
}

.summary-card span {
  font-size: 1.05rem;
  opacity: .96;
}

.summary-card em {
  position: absolute;
  right: 14px;
  top: 12px;
  opacity: .25;
  font-style: normal;
  font-size: 1.45rem;
}

.card-open { background: linear-gradient(135deg, #5f73d9, #7a87f1); }
.card-progress { background: linear-gradient(135deg, #f08b3e, #f5ac56); }
.card-done { background: linear-gradient(135deg, #1ea48f, #44c1ac); }
.card-team { background: linear-gradient(135deg, #4b87df, #62a2f5); }

.chart-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chart-panel {
  background: #fff;
  border: 1px solid #d5deef;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(38, 60, 96, 0.09);
  transition: transform .24s ease, box-shadow .24s ease;
  animation: homeFadeUp .62s ease both;
  animation-delay: .08s;
}

.chart-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(38, 60, 96, 0.15);
}

.bar-chart {
  height: 220px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
}

.bar-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.bar-group i {
  display: block;
  width: 30px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #6e7ee6, #7a87f1);
}

.bar-group.orange i {
  background: linear-gradient(180deg, #f08b3e, #f5ac56);
}

.bar-group.green i {
  background: linear-gradient(180deg, #1ea48f, #44c1ac);
}

.bar-group span {
  font-size: .84rem;
  color: #6f7f9e;
}

.pie-wrap {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 16px;
}

.pie-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: #4e5d7b;
  font-weight: 600;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 8px;
}

.dot-open { background: #6e7ee6; }
.dot-progress { background: #f5a24b; }
.dot-done { background: #31b59d; }

.pie-chart {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: conic-gradient(#6e7ee6 0 38%, #f5a24b 38% 77%, #31b59d 77% 100%);
  position: relative;
}

.pie-chart::after {
  content: '';
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  inset: 0;
  margin: auto;
}

.upcoming-panel {
  margin-top: 14px;
  background: #fff;
  border: 1px solid #d5deef;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(38, 60, 96, 0.09);
  animation: homeFadeUp .72s ease both;
  animation-delay: .14s;
}

.upcoming-panel tbody tr {
  transition: background .2s ease, transform .2s ease;
}

.upcoming-panel tbody tr:hover {
  background: #f8faff;
}

.upcoming-panel th {
  font-size: .95rem;
}

.upcoming-panel td {
  font-size: 1rem;
}

@media (max-width: 900px) {
  .auth-body::before {
    background:
      linear-gradient(120deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.28)),
      url('../img/banner.png') 18% 30% / cover no-repeat;
    opacity: .62;
  }

  .auth-body::after {
    background:
      linear-gradient(120deg, rgba(5, 22, 58, 0.24), rgba(5, 22, 58, 0.18)),
      url('../img/banner.png') right 0 top 2% / auto 78% no-repeat;
  }

  .auth-layout {
    justify-content: center;
    width: min(540px, 92%);
    padding: 16px;
  }

  .auth-card {
    width: 100%;
    padding: 26px;
  }

  .auth-card h2 {
    font-size: 1.7rem;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sidebar-menu {
    grid-template-columns: 1fr 1fr;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .content-header h1 {
    font-size: 2.2rem;
  }

  .content-header .caption {
    font-size: 1rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Colaboradores ERP */
.collab-page {
  background:
    radial-gradient(72% 48% at 100% 0%, rgba(125, 151, 225, 0.12), transparent 70%),
    linear-gradient(180deg, #f4f6fd, #eef2fb);
}

.collab-page .sidebar {
  background: linear-gradient(185deg, #1b3f79 0%, #0f2f66 46%, #0a214d 70%, #081737 100%);
  padding: 24px 14px;
}

.collab-page .sidebar-brand {
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 14px;
}

.collab-page .sidebar-logo {
  width: 90px;
}

.collab-page .sidebar-brand strong {
  font-size: 2.2rem;
  line-height: 1.06;
  font-weight: 700;
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

.collab-page .menu-icon {
  width: 22px;
  min-width: 22px;
  margin-right: 10px;
  opacity: .95;
}

.collab-page .sidebar-menu {
  gap: 7px;
}

.collab-page .sidebar-menu a {
  font-size: 14px;
  padding: 0 16px;
  border-radius: 10px;
  height: 46px;
  font-weight: 500;
}

.collab-page .sidebar-menu a.active {
  background: linear-gradient(135deg, #3e82f3 0%, #2f6fed 54%, #2656cf 100%);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  border-color: rgba(181, 214, 255, 0.35);
  box-shadow: 0 12px 24px rgba(26, 84, 188, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@keyframes homeFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .summary-card,
  .chart-panel,
  .upcoming-panel,
  .sidebar-menu a,
  .sidebar-logout {
    animation: none !important;
    transition: none !important;
  }
}

.collab-page .sidebar-logout {
  margin-top: auto;
}

.collab-page .main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
  padding: 28px 22px 24px;
}

.collab-top h1 {
  margin: 0 0 18px;
  color: #223557;
  font-size: 2.45rem;
  letter-spacing: -.02em;
}

.clients-page .collab-top {
  position: relative;
}

.clients-page .top-quick-icons {
  position: absolute;
  right: 0;
  top: 2px;
  display: flex;
  gap: 16px;
  color: #8a98b5;
  font-size: 1.3rem;
}

.top-quick-icons span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(215, 223, 239, 0.85);
  box-shadow: 0 8px 20px rgba(28, 47, 89, 0.06);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.top-quick-icons span:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(28, 47, 89, 0.11);
  background: rgba(255, 255, 255, 0.92);
}

.collab-tools {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
  margin-bottom: 14px;
}

.search-live {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d6dfef;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0 14px;
  min-height: 56px;
  box-shadow: 0 12px 24px rgba(28, 47, 89, 0.05);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.search-live span {
  font-size: 1.05rem;
  opacity: .75;
  color: #7b89a5;
}

.search-live input {
  border: none;
  outline: none;
  box-shadow: none;
  min-height: 48px;
  width: 100%;
  padding: 0;
  background: transparent;
  font-size: 1rem;
  color: #23324c;
}

.search-live:focus-within {
  border-color: #90b0ea;
  box-shadow: 0 16px 30px rgba(54, 92, 168, 0.10), 0 0 0 4px rgba(95, 145, 239, 0.12);
  transform: translateY(-1px);
}

.collab-page .add-btn {
  margin-top: 0;
  min-height: 56px;
  text-decoration: none;
  border-radius: 16px;
  box-shadow: 0 16px 28px rgba(29, 78, 216, 0.24);
}

.erp-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
}

.collab-page .panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 252, 255, 0.96));
  border: 1px solid rgba(214, 224, 241, 0.92);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(36, 57, 102, 0.08);
}

.collab-page .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}

.collab-page .panel-header h2 {
  margin: 0;
  font-size: 1.65rem;
  color: #263a5d;
  letter-spacing: -.02em;
}

.collab-page .panel-body {
  padding: 18px 20px 20px;
}

.compact-header span {
  font-size: 1.3rem;
  opacity: .7;
}

.list-scroll {
  max-height: calc(100vh - 245px);
  overflow-y: auto;
  padding: 0 12px 12px;
}

.collab-item {
  display: grid;
  grid-template-columns: 52px 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e0e7f4;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: 0 10px 24px rgba(30, 49, 91, 0.04);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.collab-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(30, 49, 91, 0.08);
  border-color: #d0dcf2;
}

.perm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  border: 1px solid transparent;
  min-width: 108px;
}

.perm-admin {
  background: #e8f0ff;
  color: #1d4ed8;
  border-color: #bdd0fb;
}

.perm-owner {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #ddbefc;
}

.perm-dev {
  background: #e6eff8;
  color: #3e5f82;
  border-color: #cad9ea;
}

.collab-item.selected {
  background: linear-gradient(180deg, #eff5ff, #f8fbff);
  border-color: #bfd2f4;
  box-shadow: 0 18px 30px rgba(54, 92, 168, 0.10);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dbe4f5;
  color: #5b6d91;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collab-meta strong {
  display: block;
  font-size: 1.08rem;
  color: #2c3f5f;
  margin-bottom: 2px;
}

.collab-meta small {
  color: #7384a5;
  font-size: .9rem;
  display: block;
  line-height: 1.25;
}

.collab-page .actions-inline {
  display: flex;
  gap: 6px;
}

.icon-btn {
  border: 1px solid #d5deee;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: .95rem;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(30, 49, 91, 0.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}

.icon-btn.edit {
  color: #1d4ed8;
}

.icon-btn.move {
  color: #2563eb;
}

.icon-btn.view {
  color: #64748b;
}

.icon-btn.delete {
  color: #dc2626;
}

.icon-btn:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(30, 49, 91, 0.10);
}

.icon-btn.gps {
  color: #2563eb;
}

.form-erp-card .panel-body {
  padding-top: 10px;
}

.form-section-title {
  margin: 0;
  font-size: 1.35rem;
  color: #334766;
  letter-spacing: -.01em;
}

.collab-page .form-grid {
  gap: 12px;
}

.collab-page .form-grid label {
  font-size: .93rem;
  color: #52637f;
  font-weight: 600;
}

.collab-page .form-grid input:not([type="radio"]):not([type="checkbox"]),
.collab-page .form-grid select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #d8dfed;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  padding: 0 14px;
  font: inherit;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease, background .22s ease;
}

.collab-page .form-grid select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7b8cab 50%), linear-gradient(135deg, #7b8cab 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.collab-page .form-grid input:not([type="radio"]):not([type="checkbox"]):focus,
.collab-page .form-grid select:focus {
  border-color: #7ea5eb;
  box-shadow: 0 0 0 4px rgba(126, 165, 235, 0.18), 0 10px 24px rgba(82, 122, 198, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.type-switch {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 2px 0 4px;
}

.type-switch label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.02rem !important;
  font-weight: 600;
  color: #334766 !important;
  cursor: pointer;
}

.type-switch input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-height: 18px !important;
  margin: 0;
  border: 2px solid #95a6c4;
  border-radius: 50%;
  background: #fff;
  display: inline-grid;
  place-content: center;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.type-switch input[type="radio"]::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .2s ease;
  background: linear-gradient(180deg, #3f88f5, #2f6fed);
}

.type-switch input[type="radio"]:checked {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.type-switch input[type="radio"]:checked::before {
  transform: scale(1);
}

.type-switch input[type="radio"]:hover {
  transform: translateY(-1px);
}

.collab-page .form-row {
  grid-template-columns: 1fr 1fr;
}

.settings-top {
  margin-bottom: 18px;
}

.settings-subtitle {
  margin: -8px 0 0;
  color: #70819f;
  font-size: 1rem;
  max-width: 760px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.settings-info-list {
  display: grid;
  gap: 12px;
}

.settings-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dde5f3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.settings-info-row strong {
  color: #284062;
  font-size: .95rem;
}

.settings-info-row span {
  color: #5a6d8e;
  font-weight: 600;
  text-align: right;
}

.settings-note {
  margin: 4px 2px 0;
  color: #7385a2;
  font-size: .93rem;
  line-height: 1.55;
}

.settings-form .save-btn {
  max-width: 280px;
}

.save-btn {
  max-width: 240px;
  margin: 10px auto 0;
  min-height: 52px;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(29, 78, 216, 0.24);
}

.photo-preview {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d8dfed;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.replace-image-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #4f6281 !important;
  font-size: .92rem !important;
  font-weight: 600;
}

.replace-image-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.field-note {
  display: block;
  margin-top: 6px;
  color: #70819e;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.45;
}

.team-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.team-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #d8e3fb;
  border-radius: 18px;
  padding: 14px 16px;
  background: #f8fbff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  cursor: pointer;
}

.team-checkbox-card.is-selected {
  border-color: #2f6fed;
  background: rgba(47, 111, 237, 0.08);
  box-shadow: 0 12px 30px rgba(47, 111, 237, 0.12);
}

.team-checkbox-card input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  accent-color: #2f6fed;
  flex-shrink: 0;
  cursor: pointer;
}

.team-checkbox-content {
  display: grid;
  gap: 4px;
}

.team-checkbox-content small {
  color: #6d7d99;
}

.related-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.related-equipment-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #d8e3fb;
  border-radius: 16px;
  padding: 12px 14px;
  background: #f8fbff;
  cursor: pointer;
}

.related-equipment-card input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  accent-color: #2f6fed;
  flex-shrink: 0;
  cursor: pointer;
}

.related-equipment-card-text {
  display: grid;
  gap: 4px;
}

.related-equipment-card-text small {
  color: #6d7d99;
}

.mobile-upload-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.upload-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-option span {
  font-size: 13px;
  font-weight: 700;
  color: #36507f;
}

.upload-option input[type="file"] {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7e2f3;
  border-radius: 12px;
  background: #f8fbff;
}

.single-avatar-input {
  margin-top: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7e2f3;
  border-radius: 12px;
  background: #f8fbff;
  width: 100%;
}

.empty-text {
  color: #7787a6;
  padding: 10px;
}

/* Equipamentos */
.equipments-page .eq-grid {
  display: grid;
  grid-template-columns: minmax(380px, 44%) minmax(420px, 56%);
  gap: 12px;
}

.equipments-page .selected-client-panel {
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selected-client-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-client-card .avatar.large {
  width: 48px;
  height: 48px;
}

.selected-client-card strong {
  display: block;
  font-size: 1.05rem;
  color: #2c3f5f;
}

.selected-client-card small {
  display: block;
  color: #7787a6;
}

.equipments-page .eq-scroll {
  max-height: calc(100vh - 275px);
  overflow-y: auto;
  padding: 10px;
}

.environment-card {
  border: 1px solid #dce4f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(30, 49, 91, 0.05);
}

.environment-card.selected {
  border-color: #b8cef4;
  background: #f4f8ff;
}

.environment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
}

.environment-title {
  color: #2e4365;
  font-weight: 700;
  text-decoration: none;
}

.environment-photo {
  height: 160px;
  border-top: 1px solid #e6ebf6;
  border-bottom: 1px solid #e6ebf6;
  background: #eef3fb;
}

.environment-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: #7f90ac;
  font-weight: 600;
}

.environment-count {
  padding: 8px 12px;
  color: #667898;
  font-size: .9rem;
}

.eq-right-body {
  display: grid;
  gap: 10px;
}

.inline-add-form summary {
  list-style: none;
  cursor: pointer;
  color: #2d69cc;
  font-weight: 700;
  border: 1px solid #d6e0f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f7faff;
}

.inline-add-form summary::-webkit-details-marker {
  display: none;
}

.mini-form {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.mini-form input {
  min-height: 40px;
}

.equipment-list {
  display: grid;
  gap: 8px;
}

.equipment-item {
  border: 1px solid #dce4f2;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: 0 10px 22px rgba(30, 49, 91, 0.04);
}

.equipment-item.selected {
  border-color: #b8cef4;
  background: #f4f8ff;
}

.equipment-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2d3f61;
  flex: 1;
}

.thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e8eef8;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #4f6283;
  font-weight: 700;
}

.thumb.large {
  width: 58px;
  height: 58px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js-zoom-image {
  cursor: zoom-in;
}

.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 13, 28, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox-dialog {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.image-lightbox-dialog img {
  max-width: 100%;
  max-height: calc(88vh - 56px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.image-lightbox-caption {
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.equipment-detail-card {
  border: 1px solid #dce4f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 24px rgba(30, 49, 91, 0.05);
}

.equipment-headline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  color: #32486b;
  font-size: 1.15rem;
  font-weight: 700;
}

.info-list {
  display: grid;
  gap: 6px;
}

.info-row {
  border: 1px solid #dde4f2;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.part-list {
  display: grid;
  gap: 8px;
}

.part-card {
  border: 1px solid #dde4f2;
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.part-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.part-head strong {
  flex: 1;
}

/* Chamados */
.chamados-page .called-new {
  width: 260px;
  margin: 0 0 14px auto;
  text-decoration: none;
}

.chamados-page .called-new.disabled {
  opacity: .55;
  pointer-events: none;
}

.chamados-filters-panel {
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 12px;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  border: 1px solid #d8e0ef;
  border-radius: 12px;
  padding: 9px 13px;
  text-decoration: none;
  color: #415273;
  background: linear-gradient(180deg, #f9fbff, #f1f5ff);
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(30, 49, 91, 0.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(30, 49, 91, 0.08);
}

.chip.active {
  border-color: #93b0e8;
  background: #eaf1ff;
}

.chip-open { color: #1d4ed8; }
.chip-progress { color: #c26d11; }
.chip-done { color: #15803d; }

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.advanced-filters select {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid #d6e0f0;
  padding: 0 10px;
}

.chamados-list-panel {
  margin-top: 12px;
  border-radius: 12px;
}

.contract-tag {
  margin-top: 4px;
  display: inline-block;
  border: 1px solid #bde4cb;
  background: linear-gradient(180deg, #edfdf3, #e4f7ec);
  color: #166534;
  border-radius: 999px;
  font-size: .78rem;
  padding: 4px 10px;
  font-weight: 700;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.status-open {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-progress {
  background: #ffedd5;
  color: #b45309;
}

.status-done {
  background: #dcfce7;
  color: #166534;
}

.chamados-form-panel {
  margin-top: 12px;
  border-radius: 12px;
}

.chamados-page textarea {
  border: 1px solid #d8dfed;
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 110px;
  font: inherit;
}

.cep-tip {
  margin: 2px 0 0;
  color: #6f7f9c;
  font-size: .92rem;
}

.history-report-page .report-toolbar {
  align-items: start;
}

.history-report-page .report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.history-report-page .report-filters-panel .panel-body,
.history-report-page .report-output-panel .panel-body {
  padding: 22px;
}

.history-report-page .report-inline-actions {
  display: flex;
  align-items: end;
  justify-content: flex-start;
}

.history-report-page .report-body {
  display: grid;
  gap: 18px;
}

.history-report-page .report-group {
  border: 1px solid #dfe8fa;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,255,0.96));
  box-shadow: 0 20px 42px rgba(27, 52, 98, 0.08);
  overflow: hidden;
}

.history-report-page .report-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5ecfa;
  background: linear-gradient(180deg, rgba(242,247,255,0.95), rgba(255,255,255,0.92));
}

.history-report-page .report-group-header h3 {
  margin: 0;
  font-size: 1.35rem;
  color: #203351;
}

.history-report-page .report-group-header p {
  margin: 6px 0 0;
  color: #6d7c97;
}

.history-report-page .report-group-count {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf3ff;
  color: #315aaf;
  font-weight: 700;
}

.history-report-page .report-ticket-card {
  margin: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #e2e9f8;
  background: #fff;
}

.history-report-page .report-ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.history-report-page .report-ticket-datetime {
  margin-top: 6px;
  color: #7082a1;
  font-size: .92rem;
}

.history-report-page .report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-report-page .report-field {
  color: #334766;
  line-height: 1.55;
}

.history-report-page .report-field-full {
  grid-column: 1 / -1;
}

.history-report-page .report-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.history-report-page .report-photo-card {
  margin: 0;
  padding: 12px;
  border: 1px solid #dfe8fa;
  border-radius: 18px;
  background: #f9fbff;
}

.history-report-page .report-photo-stage {
  font-weight: 700;
  margin-bottom: 8px;
  color: #223557;
}

.history-report-page .report-photo-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.history-report-page .report-photo-card figcaption {
  margin-top: 8px;
  font-size: .92rem;
}

.history-report-page .report-photo-card small {
  display: block;
  margin-top: 6px;
  color: #7082a1;
}

.history-report-page .report-history {
  margin-top: 16px;
}

.history-report-page .report-history h4 {
  margin: 0 0 12px;
  color: #203351;
}

.history-report-page .report-history-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e0e8f8;
  background: #f8fbff;
  margin-bottom: 12px;
  color: #334766;
  line-height: 1.55;
}

.history-report-page .report-history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.history-report-page .report-history-head span {
  font-size: .82rem;
  color: #6f81a0;
  white-space: nowrap;
}

.history-report-page .report-history-chip {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f1ff;
  color: #2f5eb8;
  font-size: .82rem;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .control-page .main-content {
    margin-left: 0;
    width: 100%;
  }

  .control-page .sidebar {
    position: static;
    width: 100%;
  }

  .summary-cards {
    grid-template-columns: 1fr 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .pie-wrap {
    grid-template-columns: 1fr;
  }

  .collab-page .main-content {
    margin-left: 0;
    width: 100%;
  }

  .collab-page .sidebar {
    position: static;
    width: 100%;
  }

  .erp-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .collab-tools {
    grid-template-columns: 1fr;
  }

  .clients-page .top-quick-icons {
    position: static;
    margin: 0 0 10px;
    justify-content: flex-end;
  }

  .list-scroll {
    max-height: 360px;
  }

  .collab-item {
    grid-template-columns: 52px 1fr;
  }

  .equipments-page .eq-grid {
    grid-template-columns: 1fr;
  }

  .equipments-page .selected-client-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .chamados-page .called-new {
    width: 100%;
  }

  .perm-badge {
    justify-self: start;
  }

  .history-report-page .report-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .report-print .sidebar,
  .report-print .top-quick-icons,
  .report-print .report-toolbar .report-actions,
  .report-print .report-filters-panel,
  .report-print .btn,
  .report-print .search-live,
  .report-print .collab-tools {
    display: none !important;
  }

  .report-print .app-shell,
  .report-print .main-content,
  .report-print .container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .report-print .report-output-panel,
  .report-print .report-group,
  .report-print .report-ticket-card,
  .report-print .report-history-item,
  .report-print .report-photo-card {
    box-shadow: none !important;
    break-inside: avoid;
  }

  .report-print body {
    background: #fff !important;
  }
}
.history-report-page .report-print-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.history-report-page .report-print-cover {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  margin-bottom: 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(240,245,255,0.96));
  box-shadow: 0 24px 60px rgba(27, 55, 104, 0.12);
}

.history-report-page .report-print-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.history-report-page .report-print-brand img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.history-report-page .report-print-brand h1 {
  margin: 0 0 8px;
  font-size: 32px;
  color: #17376d;
}

.history-report-page .report-print-brand p {
  margin: 0;
  max-width: 760px;
  color: #62769a;
  line-height: 1.6;
}

.history-report-page .report-print-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-report-page .report-summary-grid {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .history-report-page .report-print-cover {
    flex-direction: column;
    align-items: stretch;
  }

  .history-report-page .report-print-brand {
    align-items: flex-start;
  }

  .history-report-page .report-print-actions {
    justify-content: flex-start;
  }
}
.history-report-page .page-topbar {
  margin-bottom: 24px;
}

.history-report-page .report-toolbar,
.history-report-page .report-filters-panel,
.history-report-page .report-output-panel {
  width: 100%;
  max-width: 100%;
}

.history-report-page .report-toolbar .panel-body,
.history-report-page .report-filters-panel .panel-body,
.history-report-page .report-filters-panel .panel-header,
.history-report-page .report-output-panel .panel-body {
  padding: 28px 30px;
}

.history-report-page .report-toolbar h2,
.history-report-page .report-filters-panel h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
  color: #17376d;
}

.history-report-page .report-toolbar p,
.history-report-page .report-filters-panel p {
  margin: 0;
  color: #6b7f9f;
  line-height: 1.65;
}

.history-report-page .report-filters-panel form.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  align-items: end;
}

.history-report-page .report-filters-panel .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-report-page .report-filters-panel .field-full {
  grid-column: 1 / -1;
}

.history-report-page .report-filters-panel label {
  font-size: 14px;
  font-weight: 700;
  color: #4a5f85;
}

.history-report-page .report-filters-panel select,
.history-report-page .report-filters-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d6e0f1;
  border-radius: 16px;
  background: #fff;
  color: #17376d;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.history-report-page .report-filters-panel select:focus,
.history-report-page .report-filters-panel input:focus {
  outline: none;
  border-color: #2f6fed;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.history-report-page .report-inline-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
}

.history-report-page .report-inline-actions .btn {
  min-width: 240px;
  min-height: 52px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
}

.vehicles-page .vehicle-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 16px;
  margin-bottom: 18px;
}

.vehicles-page .vehicle-hero-card,
.vehicles-page .vehicle-summary-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.96));
  border: 1px solid #d9e4f5;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(20, 49, 96, 0.08);
}

.vehicles-page .vehicle-hero-card {
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
}

.vehicles-page .vehicle-hero-card::after {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,111,237,.14), transparent 70%);
  pointer-events: none;
}

.vehicles-page .vehicle-hero-card h2,
.vehicles-page .vehicle-summary-card h3 {
  margin: 0 0 10px;
  color: #17376d;
}

.vehicles-page .vehicle-hero-card p,
.vehicles-page .vehicle-summary-card p {
  margin: 0;
  color: #6b7f9f;
  line-height: 1.6;
}

.vehicles-page .vehicle-summary-card {
  padding: 20px 22px;
  display: grid;
  gap: 12px;
}

.vehicles-page .vehicle-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vehicles-page .vehicle-stat {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f4f8ff, #ffffff);
  border: 1px solid #dce6f7;
}

.vehicles-page .vehicle-stat strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  color: #17376d;
  margin-bottom: 6px;
}

.vehicles-page .vehicle-stat span {
  color: #607491;
  font-size: .92rem;
  font-weight: 700;
}

.vehicles-page .vehicle-layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.vehicles-page .vehicle-list-item {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.vehicles-page .vehicle-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #dce8ff, #eef4ff);
  color: #2455a7;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
}

.vehicles-page .vehicle-meta small,
.vehicles-page .vehicle-history-note,
.vehicles-page .vehicle-history-muted {
  color: #71839f;
}

.vehicles-page .vehicle-meta strong {
  display: block;
  margin-bottom: 4px;
  color: #203351;
  font-size: 1.05rem;
}

.vehicles-page .vehicle-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vehicles-page .vehicle-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vehicles-page .vehicle-form-grid .field-full {
  grid-column: 1 / -1;
}

.vehicles-page .vehicle-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.vehicles-page .vehicle-toolbar .search-form {
  margin-bottom: 0;
  flex: 1;
}

.vehicles-page .vehicle-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vehicles-page .vehicle-filters input,
.vehicles-page .vehicle-filters select {
  width: 100%;
}

.vehicles-page .vehicle-history-list {
  display: grid;
  gap: 12px;
}

.vehicles-page .vehicle-history-card {
  border: 1px solid #dce6f7;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: 0 12px 28px rgba(24, 50, 95, 0.06);
}

.vehicles-page .vehicle-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.vehicles-page .vehicle-history-head strong {
  color: #17376d;
  display: block;
  margin-bottom: 4px;
}

.vehicles-page .vehicle-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.vehicles-page .vehicle-history-grid .full {
  grid-column: 1 / -1;
}

.vehicles-page .vehicle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #2c5db7;
  font-size: .8rem;
  font-weight: 800;
}

.vehicles-page .vehicle-badge.inactive {
  background: #fef2f2;
  color: #b42318;
}

@media (max-width: 1200px) {
  .vehicles-page .vehicle-hero,
  .vehicles-page .vehicle-layout,
  .vehicles-page .vehicle-filters,
  .vehicles-page .vehicle-history-grid,
  .vehicles-page .vehicle-form-grid {
    grid-template-columns: 1fr;
  }
}

.history-report-page .report-output-panel {
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .history-report-page .report-filters-panel form.form-grid {
    grid-template-columns: 1fr;
  }

  .history-report-page .report-inline-actions {
    justify-content: stretch;
  }

  .history-report-page .report-inline-actions .btn {
    width: 100%;
  }
}

.mobile-nav-toggle {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-nav-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(178, 198, 235, 0.85);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: #17376d;
    box-shadow: 0 12px 24px rgba(20, 47, 92, 0.14);
    backdrop-filter: blur(12px);
  }

  .mobile-nav-toggle span {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-nav-toggle strong {
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1190;
    display: block;
    background: rgba(9, 20, 43, 0.44);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .sidebar,
  .control-page .sidebar,
  .collab-page .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 290px) !important;
    min-width: min(82vw, 290px) !important;
    max-width: min(82vw, 290px) !important;
    min-height: 100vh;
    z-index: 1250;
    transform: translateX(-112%);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    box-shadow: 0 26px 56px rgba(6, 17, 40, 0.42);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .main-content,
  .control-page .main-content,
  .collab-page .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 76px 14px 24px !important;
  }

  .container {
    width: min(100%, 100%);
    margin: 0 auto;
  }

  .dashboard {
    padding: 0 0 22px;
  }

  .collab-top {
    display: grid;
    gap: 14px;
  }

  .collab-top h1,
  .history-report-page .page-topbar h1 {
    font-size: clamp(1.9rem, 5vw, 2.25rem);
    line-height: 1.08;
  }

  .top-quick-icons {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .collab-tools {
    grid-template-columns: 1fr !important;
  }

  .advanced-filters {
    grid-template-columns: 1fr !important;
  }

  .actions-inline {
    flex-wrap: wrap;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 760px;
  }

  .panel,
  .chamados-form-panel,
  .chamados-list-panel,
  .chamados-filters-panel {
    border-radius: 18px;
  }
}

@media (max-width: 640px) {
  .mobile-nav-toggle {
    top: 12px;
    left: 12px;
    min-height: 44px;
    padding: 0 12px;
  }

  .main-content,
  .control-page .main-content,
  .collab-page .main-content {
    padding: 72px 10px 18px !important;
  }

  .panel-header,
  .panel-body,
  .report-toolbar .panel-body,
  .report-filters-panel .panel-body,
  .report-filters-panel .panel-header,
  .report-output-panel .panel-body {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  .sidebar-brand {
    padding-top: 8px;
  }

  .sidebar-logo {
    width: 78px;
  }

  .sidebar-brand strong {
    font-size: 1.9rem;
  }
}
