:root {
  --bg: #eef4ff;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.9);
  --text: #183153;
  --muted: #6d85a5;
  --line: #d9e6f5;
  --brand-blue: #1f5eff;
  --brand-blue-2: #4d8dff;
  --brand-orange: #78a9ff;
  --brand-orange-2: #d8e7ff;
  --brand-ice: #f4f9ff;
  --shadow: 0 18px 42px rgba(31, 94, 255, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", Arial, sans-serif;
  font-size: 14px;
  background:
    radial-gradient(circle at top right, rgba(77, 141, 255, 0.14), transparent 24%),
    radial-gradient(circle at bottom left, rgba(31, 94, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: var(--brand-blue-2);
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 100vh;
}

.sidebar {
  color: #fff;
  padding: 16px 12px;
  background:
    linear-gradient(180deg, rgba(16, 43, 91, 0.92), rgba(31, 94, 255, 0.86)),
    url("https://etiflexbahia.com.br/wp-content/uploads/2021/09/08.jpg") center center / cover,
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(200deg, #0f2f62 0%, #1f5eff 48%, #7ab1ff 100%);
  position: relative;
  overflow: hidden;
  border-radius: 0 34px 34px 0;
}

.sidebar::before,
.sidebar::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar::before {
  width: 230px;
  height: 230px;
  top: -80px;
  right: -70px;
}

.sidebar::after {
  width: 180px;
  height: 180px;
  bottom: -70px;
  left: -40px;
  background: rgba(255, 255, 255, 0.12);
}

.brand,
.public-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand {
  margin-bottom: 20px;
}

.brand strong,
.public-brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand span,
.public-brand span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.public-brand span {
  color: var(--muted);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-2));
  box-shadow: 0 12px 26px rgba(31, 94, 255, 0.22);
}

.brand-logo {
  width: 82px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  padding: 6px 8px;
  box-shadow: 0 8px 20px rgba(8, 24, 43, 0.08);
}

.nav {
  position: relative;
  z-index: 1;
}

.nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 14px;
  color: rgba(233, 242, 252, 0.86);
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.nav a:hover,
.nav a.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(122, 177, 255, 0.16));
  color: #fff;
}

.content,
.public-main {
  padding: 18px;
}

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-brand strong {
  font-size: 17px;
  color: var(--brand-blue);
}

.mobile-menu {
  position: relative;
}

.mobile-menu summary {
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff;
  font-weight: 700;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  z-index: 20;
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
}

.mobile-nav a:hover {
  background: rgba(77, 79, 178, 0.08);
}

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

.page-header h1,
.hero h1,
.public-hero h1 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.05;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-2,
.public-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.hero,
.public-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 430px;
  background:
    linear-gradient(120deg, rgba(15, 47, 98, 0.9) 0%, rgba(31, 94, 255, 0.76) 54%, rgba(122, 177, 255, 0.7) 100%),
    url("https://etiflexbahia.com.br/wp-content/uploads/2024/02/001_BANNER.png") center center / cover,
    linear-gradient(120deg, rgba(15, 47, 98, 0.95) 0%, rgba(31, 94, 255, 0.84) 56%, rgba(122, 177, 255, 0.82) 100%);
  border-radius: 20px;
  padding: 14px 16px;
  color: #fff;
  box-shadow: 0 24px 48px rgba(31, 94, 255, 0.12);
  margin-bottom: 24px;
}

.hero::after,
.public-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 47, 98, 0.18) 0%, rgba(31, 94, 255, 0.14) 40%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
}

.hero::before,
.public-hero::before {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.hero-panel div {
  border-radius: 16px;
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-panel strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
}

.hero-panel span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.metric {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-blue);
}

.muted {
  color: var(--muted);
}

.stack-list {
  display: grid;
  gap: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 8px 7px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

form.stack {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
}

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfdae8;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button, .button {
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(77, 79, 178, 0.25);
  font-size: 12px;
}

.button.secondary {
  background: linear-gradient(135deg, #2350b8, #4d8dff);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flash {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.flash.success {
  background: #ecfdf3;
  color: #166534;
}

.flash.error {
  background: #fef2f2;
  color: #b42356;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at bottom left, rgba(221, 90, 125, 0.08), transparent 20%),
    radial-gradient(circle at bottom right, rgba(77, 141, 255, 0.08), transparent 18%),
    linear-gradient(180deg, #f9fbff 0%, #edf4ff 100%);
}

.login-brand-top {
  margin-bottom: 18px;
}

.login-logo-top {
  width: 220px;
  max-width: 100%;
  display: block;
}

.login-panel {
  width: min(920px, 100%);
  position: relative;
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 18px;
  padding: 28px 22px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef0f8;
  box-shadow: 0 18px 38px rgba(31, 94, 255, 0.1);
  border-radius: 28px;
}

.login-avatar {
  position: absolute;
  top: -42px;
  left: 22px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: #fff;
  border: 4px solid #e9ebf4;
  box-shadow: 0 10px 20px rgba(39, 42, 120, 0.08);
}

.login-panel-left {
  padding-top: 36px;
}

.login-panel-left h1 {
  margin: 8px 0 4px;
  font-size: 20px;
  line-height: 1.02;
  text-transform: uppercase;
  color: #174a87;
  letter-spacing: 0.01em;
}

.login-company {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  color: #174a87;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card {
  width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 8px 0 0;
  box-shadow: none;
  border: 0;
}

.tag {
  display: inline-block;
  background: rgba(217, 66, 111, 0.12);
  color: #a22d55;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tag.soft {
  background: rgba(91, 93, 192, 0.1);
  color: #3c44b0;
}

.field-with-icon {
  position: relative;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.85;
}

.field-with-icon input {
  padding-left: 46px;
  min-height: 46px;
  background: #f6faff;
  border-color: #d7e7fb;
}

.login-help {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.login-help strong {
  color: var(--brand-blue);
}

.canvas-wrap {
  border: 1px dashed #9eb1c8;
  border-radius: 20px;
  padding: 12px;
  background: #f8fbff;
}

canvas.signature {
  width: 100%;
  height: 150px;
  background: #fff;
  border-radius: 14px;
  display: block;
}

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

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge {
  background: #e8f1ff;
  color: var(--brand-blue);
}

.status-pill.warning {
  background: #e8f1ff;
  color: #1f5eff;
}

.status-pill.info {
  background: #edf5ff;
  color: #2d67ff;
}

.status-pill.success {
  background: #dbf8e8;
  color: #166534;
}

.status-pill.neutral {
  background: #eef2f7;
  color: #475569;
}

.preview-box img,
.preview-box iframe {
  width: 100%;
  min-height: 320px;
  border: none;
  border-radius: 20px;
  background: #fff;
}

.queue-card {
  border-top: 6px solid var(--brand-orange);
}

.queue-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.table-wrap table {
  font-size: 14px;
}

.table-wrap small {
  font-size: 12px;
}

.hero p,
.card p,
.muted {
  font-size: 14px;
  line-height: 1.45;
}

.queue-head h2 {
  margin: 0 0 6px;
}

.queue-head small {
  color: var(--muted);
}

.queue-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.attachment-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
}

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

.compact-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.public-body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 242, 250, 0.94)),
    url("https://etiflexbahia.com.br/wp-content/uploads/2021/09/06.jpg") center top / contain fixed no-repeat,
    radial-gradient(circle at top right, rgba(77, 141, 255, 0.12), transparent 25%),
    linear-gradient(180deg, #eff6fb 0%, #eaf1f8 100%);
}

.public-hero {
  margin: 22px;
}

.public-grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

.info-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-strip > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31, 94, 255, 0.05), rgba(122, 177, 255, 0.09));
  border: 1px solid rgba(31, 94, 255, 0.08);
}

.info-strip strong {
  display: block;
  margin-bottom: 6px;
}

.hero p,
.card p,
.muted,
.table-wrap small {
  font-size: 13px;
  line-height: 1.4;
}

.actions {
  gap: 8px;
}

@media (max-width: 1120px) {
  .hero,
  .public-hero,
  .grid.cols-2,
  .grid.cols-3,
  .public-grid,
  .info-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .login-logo-top {
    width: 210px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 460px;
    padding: 26px 18px 18px;
  }

  .login-avatar {
    width: 84px;
    height: 84px;
    font-size: 40px;
    top: -42px;
    left: 18px;
  }

  .login-panel-left {
    padding-top: 36px;
  }

  .login-panel-left h1 {
    font-size: 22px;
  }

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

  .sidebar {
    display: none;
  }

  .content,
  .public-main {
    padding: 14px;
  }

  .mobile-topbar {
    display: flex;
  }

  .public-hero {
    margin: 8px;
    padding: 16px;
  }

  .page-header,
  .queue-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .public-hero {
    border-radius: 20px;
    padding: 16px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .metric {
    font-size: 24px;
  }

  .brand-logo {
    width: 84px;
  }

  .login-card {
    padding: 4px 0 0;
    width: 100%;
  }

  .tag {
    padding: 4px 8px;
    margin-bottom: 4px;
  }

  .preview-box img,
  .preview-box iframe {
    min-height: 220px;
  }

  .actions,
  .info-strip {
    width: 100%;
  }

  .actions .button,
  .actions button,
  button,
  .button {
    width: 100%;
  }

  .queue-meta {
    width: 100%;
  }

  .queue-meta .badge,
  .queue-meta .status-pill {
    width: fit-content;
  }

  .page-header {
    margin-bottom: 14px;
  }

  .page-header h1,
  .hero h1,
  .public-hero h1 {
    font-size: 26px;
  }

  .hero p,
  .public-hero p,
  .login-card p,
  .muted {
    font-size: 14px;
    line-height: 1.35;
  }

  .login-card.stack {
    gap: 8px;
  }

  .hero-panel div {
    padding: 14px 12px;
    border-radius: 16px;
  }

  .hero-panel strong {
    font-size: 24px;
  }

  label {
    gap: 5px;
    font-size: 14px;
  }

  input,
  select,
  textarea {
    padding: 11px 12px;
    border-radius: 14px;
  }

  textarea {
    min-height: 96px;
  }

  .canvas-wrap {
    padding: 10px;
    border-radius: 16px;
  }

  canvas.signature {
    height: 130px;
  }

  .actions {
    gap: 8px;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    border: none;
    padding: 6px 0;
  }
}

@media (max-width: 560px) {
  .content,
  .public-main {
    padding: 10px;
  }

  body,
  .public-body {
    background: #f5f6fb;
  }

  .public-hero {
    margin: 4px;
    padding: 12px;
  }

  .page-header h1,
  .hero h1,
  .public-hero h1 {
    font-size: 20px;
    line-height: 1.05;
  }

  .hero-panel strong {
    font-size: 20px;
  }

  input,
  select,
  textarea,
  button,
  .button {
    font-size: 16px;
  }

  canvas.signature {
    height: 118px;
  }

  .login-shell {
    padding: 18px 12px;
    align-items: center;
    background: linear-gradient(180deg, #f6f7fc, #eceef8);
  }

  .login-card {
    padding: 14px 14px 12px;
    width: 100%;
    min-height: auto;
    margin-top: 0;
    box-shadow: none;
  }

  .login-logo-top {
    width: 180px;
  }

  .login-panel {
    padding: 22px 14px 14px;
    border-radius: 14px;
    gap: 10px;
  }

  .login-avatar {
    width: 68px;
    height: 68px;
    font-size: 32px;
    top: -34px;
    left: 14px;
  }

  .login-panel-left {
    padding-top: 24px;
  }

  .login-panel-left h1 {
    font-size: 18px;
  }

  .login-company {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .brand-logo {
    width: 72px;
  }

  .mobile-menu summary {
    padding: 10px 12px;
  }

  .hero-panel div,
  .attachment-item,
  .info-strip > div {
    padding: 12px;
  }

  .tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .card,
  .hero,
  .public-hero {
    box-shadow: none;
  }

  .login-card.stack {
    gap: 6px;
  }

  .login-card label {
    gap: 2px;
    font-size: 12px;
  }

  .login-card input {
    padding: 8px 10px;
    min-height: 36px;
  }

  .field-with-icon input {
    padding-left: 40px;
  }

  .login-card button {
    min-height: 38px;
    padding: 8px 10px;
  }

  .login-help {
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
  }
}
