/* ==========================================================================
   MORE EM CHAPADA - ADMIN DASHBOARD & LOGIN STYLES
   ========================================================================== */

:root {
  --color-admin-bg: #F4F6F4;
  --color-brand-dark: #2F392C;
  --color-brand-olive: #3D4A39;
  --color-action: #D96B27;
  
  --color-surface: #FFFFFF;
  --color-border: #E0E4DF;
  --color-text-main: #1F241E;
  --color-text-muted: #667064;
  
  --font-main: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-admin-bg);
  color: var(--color-text-main);
  line-height: 1.5;
  font-size: 14px;
}

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

a:hover {
  text-decoration: underline;
}

/* Header */
.admin-header {
  background-color: var(--color-brand-dark);
  color: #FFFFFF;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--color-action);
}

.admin-header strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-header nav a {
  color: #E2E8E0;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-header nav a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.admin-header nav form {
  display: inline;
}

.admin-header nav button {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}

.admin-header nav button:hover {
  background: rgba(255,255,255,0.3);
}

/* Main Container */
.admin-main {
  max-width: 1240px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.panel {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
}

.panel h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-brand-dark);
  margin-bottom: 1.25rem;
}

/* Login Page */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-brand-dark);
}

.login-card {
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
}

.admin-logo, .login-card .brand-mark {
  height: 60px;
  width: auto;
  margin: 0 auto 0.5rem auto;
  object-fit: contain;
}

.login-card h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-brand-dark);
}

.login-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.login-card label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 600;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.login-card input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.login-card button {
  background-color: var(--color-action);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.login-card button:hover {
  background-color: #BF5719;
}

.login-card .error {
  background: #FFEBEE;
  color: #C62828;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.login-card small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Filters bar */
.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
  background: #FAFBF9;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.filters input, .filters select {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: #fff;
}

.filters input[name="search"] {
  min-width: 240px;
  flex: 1;
}

.filters button {
  background-color: var(--color-brand-olive);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

.filters button:hover {
  background-color: var(--color-brand-dark);
}

.filters a.secondary {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
}

/* Data Table */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: #FAFBF9;
  color: var(--color-brand-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--color-border);
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

td small {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

tr:hover td {
  background-color: #F8FAF7;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-novo { background: #E3F2FD; color: #1565C0; }
.badge-em_analise { background: #FFF8E1; color: #F57F17; }
.badge-contatado { background: #E8EAF6; color: #283593; }
.badge-interessado { background: #E8F5E9; color: #2E7D32; }
.badge-sem_perfil { background: #FFEBEE; color: #C62828; }
.badge-nao_respondeu { background: #F5F5F5; color: #616161; }
.badge-convertido { background: #E0F2F1; color: #00695C; }

/* Lead Detail View */
.panel.detail .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
  background: #FAFBF9;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.panel.detail .grid p {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.95rem;
}

.panel.detail .grid strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.edit-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 600px;
}

.edit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 700;
}

.edit-form select, .edit-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
}

.edit-form button {
  background-color: var(--color-brand-olive);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  align-self: flex-start;
}

.edit-form button:hover {
  background-color: var(--color-brand-dark);
}
