/* ==========================================================================
   FL Contabilidade — Painel Administrativo CSS
   ========================================================================== */

.admin-body {
  background: #f3f4f6;
  color: #1f2937;
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 270px;
  background: #0f1012;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 40;
  transition: transform 0.3s ease, width 0.25s ease;
  overflow: hidden;
}

.admin-sidebar__brand {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  background: rgba(201, 162, 93, 0.2);
  color: var(--accent);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 93, 0.4);
}

.admin-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav__group {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #6b7280;
  padding: 0.75rem 0.75rem 0.25rem;
}

.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: #d1d5db;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-nav__item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.admin-nav__item.is-active {
  background: var(--accent);
  color: #0b0b0c;
  font-weight: 600;
}

.admin-nav__item.is-active .icon {
  color: #0b0b0c;
}

.admin-nav__item .icon {
  --size: 18px;
  color: var(--accent);
}

.admin-sidebar__footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.text-danger { color: #f87171 !important; }
.text-danger:hover { background: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; }

/* Main layout */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.admin-header__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-header__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #111827;
}

.admin-header__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0b0c;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.admin-user-info strong { font-size: 0.88rem; color: #111827; }
.admin-user-info small { font-size: 0.75rem; color: #6b7280; }

.admin-toggle-btn {
  display: flex;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.admin-toggle-btn span { width: 20px; height: 2px; background: #374151; }

.admin-content {
  padding: 2rem;
  flex: 1;
}

/* Cards & UI Elements */
.admin-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.admin-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.admin-card__head h2, .admin-card__head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

/* Stat cards grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fdf8ed;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card__icon .icon { --size: 26px; }

.stat-card__val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.stat-card__lbl {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Tables */
.admin-table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #4b5563;
  border-bottom: 1px solid #e5e7eb;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #fafafa;
}

/* Status badges */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.tag--success { background: #dcfce7; color: #166534; }
.tag--warning { background: #fef9c3; color: #854d0e; }
.tag--info    { background: #e0f2fe; color: #075985; }
.tag--danger  { background: #fee2e2; color: #991b1b; }

/* Admin Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 93, 0.2);
  outline: none;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Login Page Specific */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1c1d21 0%, #0b0b0c 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.login-card__brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card__brand img {
  margin: 0 auto 1rem;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.login-card p {
  color: #9ca3af;
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.login-card .form-control {
  background: #0f1012;
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.login-card .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 93, 0.3);
}

.login-card label {
  color: #e5e7eb;
}

/* Webmail / Inbox 3-Column Layout */
.inbox-layout {
  display: grid;
  grid-template-columns: 260px 340px 1fr;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  height: calc(100vh - 160px);
  min-height: 580px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.inbox-sidebar {
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.inbox-sidebar__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 700;
}
.inbox-tree {
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.inbox-account-group {
  border-radius: 8px;
  padding: 0.4rem;
  transition: background 0.15s;
}
.inbox-account-group.is-active-account {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}
.inbox-account-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}
.inbox-account-title strong {
  display: block;
  color: #111827;
  font-size: 0.82rem;
}
.inbox-account-title small {
  color: #6b7280;
  font-size: 0.75rem;
}
.inbox-folder-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.25rem;
  padding-left: 0.5rem;
}
.inbox-section-group {
  display: flex;
  flex-direction: column;
}
.inbox-subfolders {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.inbox-subfolders .inbox-folder-item {
  color: #6b7280;
  font-weight: 500;
  border-radius: 6px;
}
.inbox-subfolders .inbox-folder-item:hover {
  background: #f3f4f6;
  color: #111827;
}
.inbox-subfolders .inbox-folder-item.is-active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
.inbox-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.15s;
}
.inbox-folder-item:hover {
  background: #f3f4f6;
  color: #111827;
}
.inbox-folder-item.is-active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
.folder-count {
  background: #e5e7eb;
  color: #374151;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}
.folder-count--unread {
  background: #ef4444;
  color: #ffffff;
}
.folder-count--spam {
  background: #fbbf24;
  color: #78350f;
}
.inbox-folder-item.is-active .folder-count {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.inbox-list-col {
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
}
.inbox-list-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.inbox-search-form {
  display: flex;
  gap: 0.35rem;
}
.inbox-search-input {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 0.85rem;
}
.inbox-list-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}
.inbox-messages-scroll {
  flex: 1;
  overflow-y: auto;
}
.inbox-msg-item {
  display: block;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  transition: background 0.15s;
}
.inbox-msg-item:hover {
  background: #f9fafb;
}
.inbox-msg-item.is-selected {
  background: #fdf8ed;
  border-left: 3px solid var(--accent);
}
.inbox-msg-item.is-unread .inbox-msg-sender {
  font-weight: 700;
  color: #111827;
}
.inbox-msg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.inbox-msg-sender {
  font-size: 0.85rem;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.inbox-msg-date {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}
.inbox-msg-subject {
  font-size: 0.82rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #9ca3af;
}
.inbox-empty-state span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}
.inbox-pagination {
  padding: 0.5rem 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.inbox-reader-col {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow-y: auto;
}
.inbox-reader-placeholder {
  margin: auto;
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
}
.inbox-reader-placeholder span {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}
.inbox-reader__toolbar {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}
.inbox-reader__head {
  padding: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}
.inbox-reader__subject {
  font-size: 1.25rem;
  color: #111827;
  margin: 0 0 0.75rem;
  font-weight: 700;
}
.inbox-reader__meta {
  font-size: 0.82rem;
  color: #4b5563;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.35rem 1rem;
}
.inbox-reader__body {
  padding: 1.5rem;
  flex: 1;
}
.inbox-reader__frame {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 360px;
  border: 0;
  background: #ffffff;
}
.inbox-reader__content {
  font-size: 0.92rem;
  color: #374151;
  line-height: 1.6;
  word-break: break-word;
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    transform: translateX(-100%);
  }
  .admin-sidebar.is-open {
    transform: translateX(0);
  }
  .admin-toggle-btn {
    display: flex;
  }
  .admin-content {
    padding: 1.25rem;
  }
  .inbox-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Menu lateral recolhido (desktop): apenas ícones */
.sidebar-collapsed .admin-sidebar { width: 72px; }
.sidebar-collapsed .admin-sidebar__brand { padding: 1.25rem 0.5rem; justify-content: center; }
.sidebar-collapsed .admin-sidebar__brand img { width: 44px; height: auto; object-fit: cover; object-position: left center; }
.sidebar-collapsed .admin-badge,
.sidebar-collapsed .admin-nav__item .label,
.sidebar-collapsed .admin-nav__group { display: none; }
.sidebar-collapsed .admin-nav__item { justify-content: center; padding: 0.7rem 0; }
.sidebar-collapsed .admin-nav { padding: 1rem 0.5rem; }
.sidebar-collapsed .admin-sidebar__footer { padding: 1rem 0.5rem; }
.sidebar-collapsed .admin-nav__item .bullet { font-size: 1.1rem; }
.admin-toggle-btn:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }

@media (max-width: 900px) {
  .sidebar-collapsed .admin-sidebar { width: 270px; }
  .sidebar-collapsed .admin-badge { display: inline-block; }
  .sidebar-collapsed .admin-nav__item .label { display: inline; }
  .sidebar-collapsed .admin-nav__group { display: block; }
  .sidebar-collapsed .admin-nav__item { justify-content: flex-start; padding: 0.65rem 0.85rem; }
}

/* ===== Cadastro de pessoas ===== */
.pf-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.pf-title { font-size: 1.6rem; font-weight: 700; color: #111827; margin: 0; }
.pf-sub { color: #6b7280; font-size: 0.9rem; margin-top: 0.25rem; }
.pf-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; padding: 0.6rem 1.2rem; border-radius: 8px; }
.pf-alert { margin-bottom: 1.25rem; padding: 0.85rem 1.25rem; border-radius: 8px; }
.pf-errors { margin: 0.4rem 0 0 1.1rem; padding: 0; }
.pf-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-bottom: 1.5rem; overflow: hidden; }
.pf-card__head { padding: 1.1rem 1.5rem; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; }
.pf-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.pf-filters__q { flex: 1 1 280px; }
.pf-input { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font: inherit; font-size: 0.9rem; color: #111827; }
.pf-filters .pf-input { width: auto; }
.pf-filters .pf-filters__q { width: auto; }
.pf-input:focus { outline: 2px solid rgba(200, 155, 63, 0.45); border-color: #c89b3f; }
.pf-table { width: 100%; border-collapse: collapse; text-align: left; }
.pf-table th { background: #f9fafb; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: #4b5563; padding: 0.85rem 1.1rem; border-bottom: 1px solid #e5e7eb; }
.pf-table td { padding: 0.9rem 1.1rem; border-bottom: 1px solid #f3f4f6; vertical-align: top; font-size: 0.9rem; }
.pf-table small { display: block; }
.pf-right { text-align: right; white-space: nowrap; }
.pf-empty { text-align: center; color: #9ca3af; padding: 2.5rem 1rem !important; }
.pf-muted { color: #6b7280; font-size: 0.8rem; }
.pf-name { font-weight: 600; color: #111827; text-decoration: none; }
.pf-name:hover { color: #c89b3f; }
.pf-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pf-wa { display: inline-block; margin-left: 0.4rem; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px; background: #dcfce7; color: #166534; border: 1px solid #86efac; text-decoration: none; }
.pf-status { font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; }
.pf-status.is-on { background: #ecfdf5; color: #065f46; }
.pf-status.is-off { background: #f3f4f6; color: #6b7280; }
.pf-inline { display: inline; }
.pf-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; cursor: pointer; }
.pf-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 1rem; font-size: 0.85rem; color: #4b5563; }

.pf-section { padding: 1.5rem; }
.pf-section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.pf-h2 { font-size: 1.1rem; font-weight: 700; color: #111827; margin: 0 0 1rem; }
.pf-section__head .pf-h2 { margin: 0; }
.pf-grid { display: grid; gap: 1rem; }
.pf-grid label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; }
.pf-grid label .pf-input { margin-top: 0.3rem; font-weight: 400; }
.pf-grid [hidden] { display: none; }
.pf-grid--main { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pf-grid--addr { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pf-grid--phone { grid-template-columns: 150px minmax(180px, 1fr) auto auto auto; align-items: end; }
.pf-grid--mail { grid-template-columns: 150px minmax(220px, 1fr) auto auto; align-items: end; }
.pf-span2 { grid-column: span 2; }
.pf-span3 { grid-column: 1 / -1; }
.pf-row { border: 1px solid #e5e7eb; background: #f9fafb; border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; }
.pf-row__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.pf-radio { display: inline-flex !important; align-items: center; gap: 0.45rem; font-weight: 600; color: #1f2937; cursor: pointer; }
.pf-radio input { width: 1.05rem; height: 1.05rem; accent-color: #c89b3f; }
.pf-check { padding-bottom: 0.65rem; white-space: nowrap; }
.pf-active { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #f3f4f6; width: 100%; }
.pf-remove { background: none; border: 0; color: #b91c1c; font-weight: 600; font-size: 0.8rem; cursor: pointer; padding: 0.4rem 0.2rem; }
.pf-grid--phone .pf-remove, .pf-grid--mail .pf-remove { padding-bottom: 0.65rem; }
.pf-remove:hover { text-decoration: underline; }
.pf-actions { display: flex; gap: 1rem; align-items: center; }

@media (max-width: 700px) {
  .pf-grid--phone, .pf-grid--mail { grid-template-columns: 1fr 1fr; }
  .pf-span2 { grid-column: 1 / -1; }
}

/* Auditoria: comparação dado anterior x novo dado */
.log-diff { margin-top: 0.4rem; }
.log-diff summary { cursor: pointer; color: #1d4ed8; font-size: 0.8rem; font-weight: 600; }
.log-diff__table { width: 100%; margin-top: 0.5rem; border-collapse: collapse; font-size: 0.8rem; background: #fff; }
.log-diff__table th, .log-diff__table td { border: 1px solid #e5e7eb; padding: 0.35rem 0.6rem; text-align: left; vertical-align: top; word-break: break-word; }
.log-diff__table th { background: #f9fafb; font-size: 0.72rem; text-transform: uppercase; color: #4b5563; }
.log-diff__old { background: #fef2f2; color: #991b1b; }
.log-diff__new { background: #f0fdf4; color: #166534; }

/* Botões de ação em ícone */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; color: #4b5563; cursor: pointer; padding: 0; transition: all 0.15s ease; }
.icon-btn:hover { background: #f3f4f6; color: #111827; }
.icon-btn:focus-visible { outline: 2px solid #c89b3f; outline-offset: 2px; }
.icon-btn--accent { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.icon-btn--accent:hover { background: #fef3c7; color: #78350f; }
.log-actions { text-align: center; white-space: nowrap; width: 1%; }

/* Janela de detalhes do log */
.log-dialog { border: 0; border-radius: 12px; padding: 0; width: min(760px, 94vw); max-height: 88vh; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.log-dialog::backdrop { background: rgba(0,0,0,0.55); }
.log-dialog[open] { display: flex; flex-direction: column; }
.log-dialog__head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb; background: #fafafa; }
.log-dialog__head h3 { margin: 0; font-size: 1.05rem; color: #111827; }
.log-dialog__body { padding: 1.25rem; overflow-y: auto; }
.log-meta { display: grid; grid-template-columns: 110px 1fr; gap: 0.5rem 1rem; margin: 0 0 1.25rem; font-size: 0.88rem; }
.log-meta dt { font-weight: 600; color: #6b7280; }
.log-meta dd { margin: 0; color: #111827; word-break: break-word; }
.log-meta__ua { font-size: 0.78rem; color: #6b7280 !important; }
.log-diff__title { margin: 0 0 0.5rem; font-size: 0.95rem; color: #111827; }

.icon-actions { display: inline-flex; gap: 0.35rem; align-items: center; justify-content: flex-end; }
.icon-actions form { display: inline-flex; margin: 0; }
.icon-btn { text-decoration: none; }
.icon-btn--info { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.icon-btn--info:hover { background: #e0f2fe; color: #075985; }
.icon-btn--danger { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.icon-btn--danger:hover { background: #fee2e2; color: #991b1b; }
.icon-btn--sm { width: 28px; height: 28px; }

.icon-btn--wa { color: #166534; border-color: #86efac; background: #f0fdf4; }
.icon-btn--wa:hover { background: #dcfce7; color: #14532d; }
.icon-btn--disabled { opacity: 0.4; cursor: not-allowed; }

.wa-open { max-width: 560px; margin: 3rem auto; text-align: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.wa-open__icon { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; background: #dcfce7; color: #166534; display: flex; align-items: center; justify-content: center; }
.wa-open__icon svg { width: 28px; height: 28px; }
.wa-open__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 1.5rem 0 1rem; }
.wa-open__to { font-size: 1rem; color: #111827; margin-top: 0.75rem; }
