/* =============================================
   Agenda Lagoinha — Estilos globais
   Identidade visual: Igreja Batista da Lagoinha
   Paleta: Preto · Branco · Grafite · Cinza
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Cores da marca */
  --black:    #000000;
  --white:    #FFFFFF;
  --gray-900: #2B2A29;
  --gray-700: #4A4A49;
  --gray-500: #6F6F6E;
  --gray-300: #A9A9A8;
  --gray-200: #D0D0CF;
  --gray-100: #E8E8E7;
  --gray-50:  #F5F5F4;

  /* Tokens funcionais */
  --primary:       var(--black);
  --primary-hover: var(--gray-900);
  --bg:            var(--gray-50);
  --surface:       var(--white);
  --border:        var(--gray-100);
  --text:          var(--gray-900);
  --text-muted:    var(--gray-500);

  /* Status */
  --success:       #1A5C38;
  --success-light: #D4EDDA;
  --danger:        #8B1A1A;
  --danger-light:  #FAE0E0;
  --warning:       #6B4400;
  --warning-light: #FEF3C7;
  --info:          #1A3A5C;
  --info-light:    #DBEAFE;

  /* Forma e espaço */
  --radius:    6px;
  --radius-lg: 10px;
  --sidebar-w: 240px;
  --topbar-h:  56px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.15);

  --transition: .2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CONTAINERS
   ============================================ */
.container    { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 540px; margin: 0 auto; padding: 0 1.25rem; }

/* ============================================
   HEADER — páginas públicas
   ============================================ */
header {
  background: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: .9rem;
  height: var(--topbar-h);
  padding: 0 1.25rem;
}
.header-logo { height: 32px; width: auto; }
.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,.18);
  flex-shrink: 0;
}
.header-text h1 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  color: var(--white);
}
.header-text p {
  font-size: .73rem;
  color: var(--gray-300);
  margin-top: 1px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236F6F6E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-300); }
.form-group textarea { resize: vertical; min-height: 80px; }

/* ============================================
   BOTÕES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .65rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.4;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; }

.btn-primary { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-primary:hover:not(:disabled) { background: var(--gray-900); border-color: var(--gray-900); box-shadow: 0 2px 8px rgba(0,0,0,.2); }

.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-success:hover:not(:disabled) { filter: brightness(1.15); }

.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.15); }

.btn-outline {
  background: transparent;
  border-color: var(--gray-200);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--black);
  background: var(--gray-50);
}

/* ============================================
   HORÁRIOS (slots)
   ============================================ */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}
.slot {
  padding: .55rem .4rem;
  text-align: center;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
  background: var(--surface);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot:hover          { border-color: var(--gray-500); background: var(--gray-50); }
.slot.selected       { background: var(--black); color: var(--white); border-color: var(--black); }
.slot.unavailable    { opacity: .3; cursor: not-allowed; text-decoration: line-through; pointer-events: none; }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info    { background: var(--info-light);    color: var(--info); }

/* ============================================
   ALERTAS
   ============================================ */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: none;
  border-left: 3px solid;
}
.alert.show     { display: block; }
.alert-success  { background: var(--success-light); color: var(--success); border-color: var(--success); }
.alert-error    { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger); }

/* ============================================
   TABELAS
   ============================================ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th {
  padding: .6rem 1rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

/* ============================================
   STEPS
   ============================================ */
.steps {
  display: flex;
  margin-bottom: 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.step {
  flex: 1;
  text-align: center;
  padding: .7rem .3rem;
  font-size: .73rem;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  position: relative;
  transition: color .15s, background .15s;
  letter-spacing: .01em;
}
.step:last-child { border-right: none; }
.step.active {
  color: var(--black);
  background: var(--gray-50);
}
.step.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--black);
}
.step.done { color: var(--success); }
.step.done::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--success);
}

/* ============================================
   LAYOUT COM SIDEBAR
   ============================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform var(--transition);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-brand img {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}
.sidebar-brand-text strong {
  display: block;
  font-size: .875rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.sidebar-brand-text span {
  display: block;
  font-size: .72rem;
  color: var(--gray-300);
  margin-top: 2px;
}
.sidebar nav {
  flex: 1;
  padding: .6rem 0;
  display: flex;
  flex-direction: column;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem 1.25rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s, border-left-color .15s;
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.sidebar nav a:hover {
  background: rgba(255,255,255,.07);
  color: var(--white);
}
.sidebar nav a.active {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border-left-color: var(--white);
  font-weight: 600;
}
.sidebar nav a.nav-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.nav-spacer { flex: 1; }
.sidebar nav a.nav-logout {
  color: rgba(255,120,120,.75);
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: .5rem;
}
.sidebar nav a.nav-logout:hover {
  background: rgba(255,80,80,.1);
  color: rgba(255,150,150,1);
}

/* ---- Conteúdo principal ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 2rem;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.page-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* ---- Topbar (mobile) ---- */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--black);
  color: var(--white);
  z-index: 150;
  align-items: center;
  padding: 0 1rem;
  gap: .85rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.07);
}
.topbar-logo { height: 28px; width: auto; }
.topbar-title {
  font-size: .9rem;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hamburger {
  width: 40px; height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .25s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Backdrop ---- */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 190;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

/* ============================================
   MODAIS
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}

/* ============================================
   ENTREVISTADOR CARDS (booking)
   ============================================ */
.entrevistador-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  margin-bottom: .6rem;
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
}
.entrevistador-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.entrevistador-card.selected { border-color: var(--black); background: var(--gray-50); box-shadow: var(--shadow); }

.avatar {
  width: 44px; height: 44px;
  background: var(--black);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  letter-spacing: -.01em;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.confirm-row:last-child { border: none; }
.confirm-row strong {
  color: var(--text-muted);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  padding-top: 2px;
}
.confirm-row span { text-align: right; }

/* ============================================
   MÉTRICAS
   ============================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.metric-value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .45rem;
  letter-spacing: -.04em;
}
.metric-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.metric-card.c-black   .metric-value { color: var(--black); }
.metric-card.c-success .metric-value { color: var(--success); }
.metric-card.c-warning .metric-value { color: var(--warning); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  padding: 1rem;
}
.login-box { width: 100%; max-width: 380px; }
.login-logo-wrap {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo {
  height: 72px;
  width: auto;
  margin: 0 auto 1.1rem;
}
.login-logo-wrap h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.01em;
}
.login-logo-wrap p {
  font-size: .82rem;
  color: var(--gray-400, #A9A9A8);
  margin-top: .3rem;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}
.login-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}

/* ============================================
   RESPONSIVE — Tablet (< 1024px)
   ============================================ */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .topbar { display: flex; }
  .main-content {
    margin-left: 0;
    padding-top: calc(var(--topbar-h) + 1.5rem);
  }
}

/* ============================================
   RESPONSIVE — Mobile (< 640px)
   ============================================ */
@media (max-width: 639px) {
  .container, .container-sm { padding: 0 1rem; }
  .main-content { padding: calc(var(--topbar-h) + 1rem) 1rem 2rem; }
  .card { padding: 1.1rem; }

  .steps .step { font-size: .65rem; padding: .65rem .2rem; }

  .table-wrapper { font-size: .82rem; }
  th, td { padding: .6rem .75rem; }

  .slots-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-value { font-size: 1.9rem; }

  .btn { padding: .6rem 1.1rem; }
  .btn-block { padding: .75rem 1.1rem; }
}

/* ============================================
   RESPONSIVE — Large desktop (> 1280px)
   ============================================ */
@media (min-width: 1280px) {
  .main-content { padding: 2.5rem 3rem; }
}
