.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition:
    background var(--t),
    border-color var(--t),
    color var(--t),
    box-shadow var(--t),
    transform var(--t);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--outline:hover {
  background: var(--accent-dark);
  color: var(--accent);
}

.btn--ghost {
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
}

.btn--danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn--danger:hover {
  background: #991b1b;
  color: #fff;
  text-decoration: none;
}

.btn--sm {
  padding: 5px 12px;
  font-size: 13px;
}
.btn--lg {
  padding: 12px 28px;
  font-size: 16px;
}
.btn--full {
  width: 100%;
}


.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition:
    border-color var(--t),
    box-shadow var(--t);
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
.form-control::placeholder {
  color: var(--text-muted);
}
.form-control.is-invalid {
  border-color: var(--danger);
}
textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%234b5563' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}
.form-error {
  margin-top: 4px;
  font-size: 12px;
  color: var(--danger);
  display: block;
}


.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
}
.card-body {
  padding: 22px;
}
.card-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  font-size: 13px;
  color: var(--text-muted);
}


.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
}
.badge--pendente {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge--analise {
  background: var(--info-bg);
  color: var(--info);
}
.badge--resolvida {
  background: var(--success-bg);
  color: var(--success);
}
.badge--rejeitada {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge--baixa {
  background: #f0fdf4;
  color: #166534;
}
.badge--media {
  background: #fffbeb;
  color: #92400e;
}
.badge--alta {
  background: #fff1f2;
  color: #9f1239;
}


.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}
.flash__icon {
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.flash span {
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.flash--sucesso {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.flash--erro {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.flash--aviso {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.flash--info {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}


.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
  white-space: nowrap;
}
tbody td {
  padding: 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: var(--bg-hover);
}
tbody tr[data-href] {
  cursor: pointer;
}


.paginacao {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pag-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--t);
  text-decoration: none;
}
.pag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.pag-btn.ativo {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


.filtros {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filtros .form-group {
  margin-bottom: 0;
}
.filtros .form-control {
  height: 38px;
  font-size: 13px;
}


.upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--t),
    background var(--t);
  color: var(--text-muted);
  font-size: 14px;
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.upload-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.upload-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
}
.upload-preview-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.upload-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t);
}
.upload-preview-remove:hover {
  background: #991b1b;
}


.progress {
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  height: 7px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}


.oc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
}
.oc-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.oc-card__img {
  height: 180px;
  object-fit: cover;
  width: 100%;
  background: var(--bg-muted);
}
.oc-card__body {
  padding: 16px 18px;
  flex: 1;
}
.oc-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.oc-card__titulo {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.oc-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.oc-card__footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.feed-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
.feed-card__img-wrap img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.feed-card__img-placeholder {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-card__body {
  padding: 14px 16px;
  flex: 1;
}
.feed-card__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.feed-card__title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 4px;
}
.feed-card__loc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.feed-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.feed-card__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  overflow: visible;
}
.profile-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: -4px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  border: 2px solid #fff;
  transition: background var(--t);
}
.profile-avatar-edit:hover {
  background: var(--accent-dark);
}


.user-avatar--photo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}


.notif-badge--hidden {
  display: none !important;
}


.oc-fotos-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 20px 0;
  scrollbar-width: thin;
}
.oc-fotos-scroll img {
  height: 220px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  max-width: 340px;
}


.kpi-card--active {
  border: 2px solid var(--kpi-color, var(--accent));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}


.toast {
  transform: translateX(0);
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.toast--visible {
  opacity: 1;
  transform: translateX(0);
}
.toast.hide {
  opacity: 0;
  transform: translateX(20px);
}


.kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(var(--kpi-cols, 4), 1fr);
}
@media (max-width: 700px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


.oc-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.oc-meta-item__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.oc-meta-item__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}


.char-counter {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}
.char-counter.near-limit {
  color: var(--warning);
}
.char-counter.at-limit {
  color: var(--danger);
  font-weight: 600;
}


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeInUp 0.35s ease both;
}


.row-highlight {
  background: var(--accent-light) !important;
  transition: background 0.8s;
}


.pw-strength__label {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 500;
  transition: color 0.3s;
}


#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
#toast-container .toast {
  pointer-events: auto;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: #fff;
  min-width: 260px;
  max-width: 380px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transform: translateX(20px);
}

.fade-in-1 {
  animation-delay: 0.05s;
}
.fade-in-2 {
  animation-delay: 0.1s;
}
.fade-in-3 {
  animation-delay: 0.15s;
}
.fade-in-4 {
  animation-delay: 0.2s;
}

.cat-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  opacity: 0.9;
}
.cat-icon--lg {
  width: 32px;
  height: 32px;
  filter: brightness(0);
}

.notif-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.85;
}

.flash__icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.9;
  margin-top: 1px;
}

.toast__icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.9;
  filter: brightness(0) invert(1);
}
