:root {
  /* Paleta clara inspirada na nova UI */
  --bg-primario: #f9fafb;
  --bg-secundario: #ffffff;
  --bordas: #e5e7eb;
  --texto-primario: #1f2937;
  --texto-secundario: #6b7280;
  --botoes-links: #3b82f6;
  --botoes-links-hover: #2563eb;
  --destaques: #facc15;
  --erro: #ef4444;
  --sucesso: #10b981;
  --even-table: #f9fafb;
  --hover-table: #f3f4f6;
  --hover-even-table: #d2d2d3;
}

/* Layout geral */
body {
  display: flex;
  flex-direction: column;
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primario);
  margin: 0;
  padding: 0;
  color: var(--texto-primario);
}

a {
  color: var(--botoes-links);
  text-decoration: none;
}

a:hover {
  color: var(--botoes-links-hover);
  text-decoration: underline;
}


.topbar-right ul {
  display: flex;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.topbar-right li a {
  color: var(--texto-primario);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 80px; /* logo abaixo da topbar */
  left: 0;
  bottom: 0;
  width: 220px;
  background: var(--bg-secundario);
  border-right: 1px solid var(--bordas);
  padding: 20px 0;
  overflow-y: auto; /* se o menu for muito grande */
}


.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  margin-bottom: 5px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--texto-primario);
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.menu-item a:hover {
  background: var(--bg-primario);
  border-left: 3px solid var(--botoes-links);
  color: var(--botoes-links);
}

.menu-item.active a {
  background: var(--bg-primario);
  border-left: 3px solid var(--botoes-links);
  color: var(--botoes-links);
}

/* Topbar */
.topbar {
  background: var(--bg-secundario);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-right ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.topbar-right li a {
  color: var(--texto-secundario);
  font-weight: 500;
  transition: color 0.2s ease;
}

.topbar-right li a:hover {
  color: var(--botoes-links);
}


/* Container principal */
.layout {
  display: flex;
  margin-top: 60px; /* espaço para a topbar */
}

.the-container {
  margin-left: 220px; /* espaço para a sidebar */
  padding: 30px;
  flex: 1;
  height: calc(100vh - 60px); /* ocupa o restante da tela */
  overflow-y: auto; /* scroll só aqui */
}


/* HOME */
.home-page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.home-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--texto-primario);
  margin-bottom: 1.5rem;
  text-align: center;
}

.welcome-card {
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 6px;
  padding: 0.75rem 1rem;   /* menor padding */
  margin-bottom: 1.5rem;   /* menos espaço abaixo */
  font-size: 0.95rem;      /* fonte um pouco menor */
  color: var(--texto-secundario);
}


.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--botoes-links);
  margin-bottom: 1rem;
}

.news-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.news-item {
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.news-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--botoes-links);
}

.news-summary {
  color: var(--texto-secundario);
  margin-bottom: 0.5rem;
}

.news-meta {
  font-size: 0.85rem;
  color: var(--texto-secundario);
}

/* fim da Home */

/* Página */
.page-header {
  border-bottom: 1px solid var(--bordas);
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.page-title {
  font-size: 1.8rem;
  margin: 0;
  color: var(--texto-primario);
}

.section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--botoes-links);
  border-bottom: 1px solid var(--bordas);
  padding-bottom: 5px;
}

/* Tabelas */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
}

table th, table td {
  border: 1px solid var(--bordas);
  padding: 12px;
  text-align: left;
}

table th {
  background-color: var(--bg-secundario);
  color: var(--texto-primario);
}

table tr:nth-child(even) {
  background: var(--even-table);
}

table tr:nth-child(even):hover {
  background: var(--hover-even-table);
}

table tr:hover {
  background: var(--hover-table);
}

/* Formulários */
form div {
  margin-bottom: 15px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--texto-primario);
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--bordas);
  border-radius: 6px;
  background: var(--bg-primario);
  color: var(--texto-primario);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--botoes-links);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
  outline: none;
}

/* Botões */
input[type="submit"],
button,
.btn {
  background-color: var(--botoes-links);
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

input[type="submit"]:hover,
button:hover,
.btn:hover {
  background-color: var(--botoes-links-hover);
}

/* Flash messages */
.notice {
  background-color: #ecfdf5;
  color: var(--sucesso);
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #d1fae5;
  border-radius: 6px;
}

.alert {
  background-color: #fef2f2;
  color: var(--erro);
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #fecaca;
  border-radius: 6px;
}

/* Responsividade */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* page style */

.page {
  color: var(--texto-primario);
}

.section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--botoes-links);
  border-bottom: 1px solid var(--bordas);
  padding-bottom: 5px;
}

.chat-box {
  border: 1px solid var(--bordas);
  padding: 15px;
  background: var(--bg-secundario);
  border-radius: 6px;
  height: 300px;
  overflow-y: auto;
  flex-direction: column-reverse;
}

.chat-line {
  margin-bottom: 8px;
}

.chat-line-right {
  text-align: right;
}

.chat-bubble {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 70%;
}

.bubble-left {
  background-color: #f1f0f0; /* já usado */
  color: #000;
}

.bubble-right {
  background-color: #dcf8c6; /* já usado */
  color: #000;
}

.list {
  list-style-type: disc;
  padding-left: 20px;
}

.link {
  color: var(--botoes-links);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.form {
  margin-top: 10px;
}

.input, .input-file {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--bordas);
  padding: 8px;
  background: var(--bg-primario);
  color: var(--texto-primario);
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  margin-top: 10px;
}

.btn-primary {
  background: var(--bg-secundario) !important;
  color: var(--bg-primario);
}

.btn-primary:hover {
  background: var(--destaques);
  color: var(--texto-primario);
}

.btn-secondary {
  background: #444;
  color: var(--texto-primario);
}

.btn-secondary:hover {
  background: var(--destaques);
}

/* News Index */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.news-card {
  background: var(--bg-secundario);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--bordas);
  color: var(--texto-primario);
  transition: box-shadow 0.2s ease;
}

.news-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-card-title {
  font-size: 1.6rem;
  margin: 0 0 10px 0;
  color: var(--texto-primario);
}

.news-card-title a {
  text-decoration: none;
  color: inherit;
}

.news-card-title a:hover {
  color: var(--primario);
}

.news-card-meta {
  font-size: 0.9rem;
  color: var(--texto-secundario);
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.news-card-excerpt {
  margin: 10px 0 15px 0;
  line-height: 1.5;
  color: var(--texto-primario);
}
.news-card-image {
  width: 100%;
  max-height: 220px;        /* altura padrão de thumbnail */
  object-fit: cover;        /* corta a imagem mantendo proporção */
  border-radius: 6px;       /* cantos arredondados */
  margin: 10px 0;           /* espaçamento em relação ao título/meta */
  border: 1px solid var(--bordas);
  display: block;
}



/* notícias da home */
.news-list {
  list-style: none;
  padding: 0;
}

.news-item {
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

.news-item h3 {
  margin: 0 0 10px;
  color: var(--botoes-links);
}

.news-item p {
  color: var(--texto-secundario);
}

.news-item small {
  color: var(--texto-secundario);
  font-size: 0.8rem;
}

.input.datepicker {
  padding: 8px;
  border: 1px solid var(--bordas);
  border-radius: 4px;
  background: var(--bg-secundario);
  color: var(--texto-primario);
}

[data-controller="autocomplete"] {
  position: relative; /* define contexto para o ul */
}

.autocomplete-results {
  position: absolute;
  left: 0;
  width: 100%;
  background: #87f8e9;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  margin: 0.5rem 0 0;
  padding: 0;
}

.autocomplete-results li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--texto-primario);
}

.autocomplete-results li:hover {
  background: var(--bg-primario);
}


/* Agenda */

.agenda {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.agenda-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--bordas);
  border-radius: 6px;
  padding: 1rem;
  background: var(--bg-secundario);
}

.agenda-time {
  flex: 0 0 180px;
  font-size: 0.9rem;
  color: var(--texto-secundario);
}

.agenda-content {
  flex: 1;
}

.agenda-content h3 {
  margin: 0 0 0.5rem;
}

.agenda-meta {
  font-size: 0.8rem;
  color: #777;
}

.agenda-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cases-page {
  max-width: 1000px;
  margin: 2rem auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--texto-primario);
}

.cases-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  overflow: hidden;
}

.cases-table th,
.cases-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bordas);
  text-align: left;
}

.cases-table th {
  background: #f3f4f6;
  color: var(--texto-primario);
  font-weight: 600;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 4px;
}

.btn-secondary {
  background: #e5e7eb;
  color: var(--texto-primario);
}

.btn-secondary:hover {
  background: var(--botoes-links);
  color: #fff;
}
.case-form {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.case-form .form-group {
  margin-bottom: 1.2rem;
}

.case-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--texto-primario);
}

.case-form .form-control {
  width: 100%;
  padding: 0.6rem 0.0;
  border: 1px solid var(--bordas);
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: var(--texto-primario);
}

.case-form .form-control:focus {
  border-color: var(--botoes-links);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
  outline: none;
}

.form-actions {
  text-align: right;
}

.autocomplete-results li {
  padding: 8px;
  cursor: pointer;
}

.autocomplete-results li:hover {
  background: var(--bg-primario);
}
.case-show {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.case-header {
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.case-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--texto-primario);
}

.case-status {
  font-size: 1rem;
  color: var(--texto-secundario);
}

.case-section {
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--botoes-links);
  margin-bottom: 1rem;
}

/* Chat */
.chat-box {
  border: 1px solid var(--bordas);
  padding: 1rem;
  background: #f9fafb;
  border-radius: 6px;
  height: 250px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.chat-line {
  margin-bottom: 8px;
}

.chat-line-right {
  text-align: right;
}

.chat-bubble {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 70%;
  font-size: 0.95rem;
}

.bubble-left {
  background-color: #e5e7eb;
  color: var(--texto-primario);
}

.bubble-right {
  background-color: var(--botoes-links);
  color: #fff;
}

/* Documentos */
.doc-list {
  list-style: none;
  padding: 0;
}

.doc-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.doc-form {
  margin-top: 1rem;
}
/* Página de eventos */
.agenda {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.agenda-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg-secundario);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.agenda-time {
  flex: 0 0 160px;
  font-size: 0.9rem;
  color: var(--texto-secundario);
}

.agenda-content {
  flex: 1;
  padding: 0 1rem;
}

.agenda-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--botoes-links);
}

.agenda-meta {
  font-size: 0.85rem;
  color: var(--texto-secundario);
  margin: 0.2rem 0;
}

.agenda-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Show */
.event-show {
  max-width: 800px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.event-show h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--texto-primario);
}

.event-show p {
  margin: 0.5rem 0;
  color: var(--texto-secundario);
}

.event-show .actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

/* Form */
.form {
  max-width: 800px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--texto-primario);
}

.input, .datepicker {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--bordas);
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: var(--texto-primario);
}

.input:focus, .datepicker:focus {
  border-color: var(--botoes-links);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
  outline: none;
}

.form-actions {
  text-align: right;
  margin-top: 1.5rem;
}

.autocomplete-results li {
  padding: 8px;
  cursor: pointer;
}

.autocomplete-results li:hover {
  background: var(--bg-primario);
}

.news-page {
  max-width: 900px;
  margin: 2rem auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.news-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  overflow: hidden;
}

.news-table th,
.news-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bordas);
  text-align: left;
}

.news-table th {
  background: #f3f4f6;
  color: var(--texto-primario);
  font-weight: 600;
}

.news-show {
  max-width: 800px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.news-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--texto-primario);
}

.news-meta {
  font-size: 0.9rem;
  color: var(--texto-secundario);
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-content {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.news-image img {
  max-width: 100%;
  border-radius: 8px;
}
.clients-page {
  max-width: 900px;
  margin: 2rem auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  overflow: hidden;
}

.clients-table th,
.clients-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bordas);
  text-align: left;
}

.clients-table th {
  background: #f3f4f6;
  color: var(--texto-primario);
  font-weight: 600;
}

.client-show {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.client-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--texto-primario);
}

.actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.lawyers-page {
  max-width: 900px;
  margin: 2rem auto;
}

.lawyers-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  overflow: hidden;
}

.lawyers-table th,
.lawyers-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bordas);
  text-align: left;
}

.lawyers-table th {
  background: #f3f4f6;
  color: var(--texto-primario);
  font-weight: 600;
}

.lawyer-show, .lawyer-edit, .lawyer-new {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.lawyer-card {
  margin-bottom: 1rem;
}

.lawyer-name {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}
.offices-page {
  max-width: 900px;
  margin: 2rem auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.offices-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.office-card {
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.office-name {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.office-show, .office-edit, .office-new {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.login-body {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.form-login {
  background: #fff;
  border: 1px solid var(--bordas);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--botoes-links);
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--texto-primario);
}

.input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--bordas);
  border-radius: 6px;
  font-size: 1rem;
}

.input:focus {
  border-color: var(--botoes-links);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
  outline: none;
}

.btn-block {
  width: 100%;
}
.logo {
  text-align: center;
  margin-bottom: 1rem;
}

.logo-img {
  max-height: 60px;
}

.main-header {
  background: var(--bg-secundario);
  border-bottom: 1px solid var(--bordas);
  padding: 1rem;
}

.main-menu {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}


@media (max-width: 768px) {
  .topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
  }

  .topbar-left,
  .topbar-right {
    flex: 0 0 auto;
  }

  .topbar-center {
    flex: 1;
    text-align: center;
  }

  .topbar-right ul {
    gap: 10px;
    font-size: 0.9rem;
  }

  .logo-img {
    max-height: 36px;
  }
}

/* Sidebar retrátil */
.sidebar {
  transition: transform 0.3s ease;
}

.sidebar {
  position: fixed;
  top: 60px; /* abaixo da topbar */
  left: 0;
  bottom: 0;
  width: 220px;
  background: var(--bg-secundario);
  border-right: 1px solid var(--bordas);
  padding: 20px 0;
  transform: translateX(-100%); /* escondida por padrão */
  z-index: 999;
}

.sidebar.active {
  transform: translateX(0); /* aparece quando ativa */
}

.the-container {
  margin-left: 0; /* não reserva espaço no mobile */
}


.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
  background: var(--bg-secundario);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.topbar-left,
.topbar-right {
  flex: 0 0 auto;
}

.topbar-center {
  flex: 1;
  text-align: center;
}

.logo-img {
  max-height: 40px;
  vertical-align: middle;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--texto-primario);
}

@media (max-width: 768px) {
  /* Forms ocupam toda a largura da tela */
  form, .form, .case-form, .login-container {
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  }

  /* Campos maiores e mais confortáveis */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select,
  textarea,
  .input,
  .datepicker {
    width: 100%;
    font-size: 1.1rem;       /* fonte maior */
    padding: 1rem;           /* mais espaço interno */
    border-radius: 8px;      /* cantos mais suaves */
  }

  /* Botões grandes e fáceis de clicar */
  .btn,
  input[type="submit"],
  button {
    width: 100%;             /* ocupa toda a largura */
    font-size: 1.1rem;       /* texto maior */
    padding: 1rem;           /* altura maior */
    margin-top: 0.75rem;
  }

  /* Labels com espaçamento maior */
  label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
}
@media (max-width: 768px) {
  .topbar {
    height: 70px;              /* aumenta a altura */
    padding: 0 15px;
  }

  .menu-toggle {
    font-size: 2rem;           /* botão ☰ maior */
  }

  .logo-img {
    max-height: 48px;          /* logo maior */
  }

  .topbar-right ul {
    gap: 15px;
    font-size: 1.1rem;         /* links maiores */
  }
}
@media (max-width: 768px) {
  table,
  .cases-table,
  .clients-table,
  .lawyers-table,
  .news-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  table th, table td,
  .cases-table th, .cases-table td,
  .clients-table th, .clients-table td,
  .lawyers-table th, .lawyers-table td,
  .news-table th, .news-table td {
    padding: 1rem;             /* mais espaço interno */
    font-size: 1.05rem;        /* fonte maior */
  }
}
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select,
  textarea,
  .input,
  .datepicker {
    width: 100%;
    font-size: 1.2rem;         /* fonte maior */
    padding: 1.2rem;           /* altura maior */
    border-radius: 10px;
  }

  .btn,
  input[type="submit"],
  button {
    width: auto;
    font-size: 1.2rem;
    padding: 1.2rem;
    margin-top: 1rem;
    border-radius: 10px;
  }

  label {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
  }
}
@media (max-width: 768px) {
  .sidebar {
    width: 100%;              /* sidebar mais larga */
  }

  .menu-item a {
    padding: 16px 24px;        /* mais espaço interno */
    font-size: 1.7rem;         /* fonte maior */
    width: 100%;
  }
  .menu-item{
    text-align: center;
  }

  a[data-action="edit"] {
    width: auto;
    position: relative;
    font-size: 0px;
  }

  a[data-action="delete"] {
    width: auto;
    position: relative;
    font-size: 0px;
  }

  a[data-action="edit"]::before {
    content: "✏️";
    font-size: 1.2rem;
  }

  a[data-action="delete"]::before {
    content: "🗑️";
    font-size: 1.2rem;
  }

  
}
/* Desktop: sidebar começa aberta e empurra conteúdo */
@media (min-width: 769px) {
  .layout.sidebar-open .the-container {
    margin-left: 220px; /* largura da sidebar */
    transition: margin-left 0.3s ease;
  }
}

/* Mobile: sidebar começa escondida e só abre ao clicar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .layout.sidebar-open .the-container {
    margin-left: 0;
  }
}

.the-container {
  transition: margin-left 0.3s ease;
}

/* alertas */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 6px;
  width: 50%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
}
.custom-modal.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
}

.custom-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow-y: auto; /* permite rolar o modal inteiro */
}

.custom-modal-content {
  background: #fff;
  margin: 5% auto; /* menos margem para caber melhor */
  padding: 20px;
  border-radius: 6px;
  width: 90%;       /* mais responsivo */
  max-width: 700px; /* limite no desktop */
}
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
}

.dropdown-menu .dropdown-item {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #333;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f1f1f1;
}

.dropdown.open .dropdown-menu {
  display: block;
}
.dropdown-item.disabled {
  color: #aaa;
  cursor: not-allowed;
  pointer-events: none; /* impede clique */
}
.dashboard-cards{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.card-home{
  flex: 1 1 200px; /* cresce, encolhe, largura mínima de 200px */
  background: var(--bg-secundario);
  border: 1px solid var(--bordas);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card-home h3 {
  margin: 0 0 10px;
  color: var(--botoes-links);
  text-align: center;
  font-size: 0.8rem;
}

.card-home p {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--texto-primario);
  text-align: center;
  align-content: end;
}

/* Ajustes relacionado a temas e configurações */

/* Tema claro (default) */
body.light {
  --bg-primario: #f9fafb;
  --bg-secundario: #ffffff;
  --bordas: #e5e7eb;
  --texto-primario: #1f2937;
  --texto-secundario: #6b7280;
  --botoes-links: #3b82f6;
  --botoes-links-hover: #2563eb;
  --destaques: #facc15;
  --erro: #ef4444;
  --sucesso: #10b981;
  --even-table: #f3f4f6;
}

/* Tema escuro */
body.dark {
  --bg-primario: #1f2937;
  --bg-secundario: #111827;
  --bordas: #374151;
  --texto-primario: #f9fafb;
  --texto-secundario: #d1d5db;
  --botoes-links: #60a5fa;
  --botoes-links-hover: #3b82f6;
  --destaques: #facc15;
  --erro: #f87171;
  --sucesso: #34d399;
  --even-table: #374151;
  --hover-table: #212224;
  --hover-even-table: #4b5563;
}

/* Paleta azul */
body.blue {
  --botoes-links: #3b82f6;
  --botoes-links-hover: #2563eb;
  --destaques: #60a5fa;
}

/* Paleta verde */
body.green {
  --botoes-links: #10b981;
  --botoes-links-hover: #059669;
  --destaques: #34d399;
}

/* Paleta vermelha */
body.red {
  --botoes-links: #ef4444;
  --botoes-links-hover: #b91c1c;
  --destaques: #f87171;
}

/* Paleta roxa */
body.purple {
  --botoes-links: #8b5cf6;
  --botoes-links-hover: #7c3aed;
  --destaques: #a78bfa;
}
