/* ==========================================================================
   ZAFE TECNOLOGIA - ADMIN CMS & AUTH STYLESHEET
   Edição Zafe Connect (Executive Light Canvas & Deep Navy Sidebar)
   ========================================================================== */

/* ── AUTH / LOGIN SCREEN ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0e2238 0%, #173b5e 50%, #0d9488 100%);
  padding: 24px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 42px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 60px -15px rgba(14, 34, 56, 0.35);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #14b8a6 0%, #0e2238 100%);
}

.auth-brand {
  text-align: center;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-badge {
  display: inline-block;
  padding: 4px 14px;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  color: #0f766e;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 10px;
}

.auth-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

/* ── ADMIN LAYOUT (ZAFE CONNECT STYLE) ────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f4f6f8;
}

/* Sidebar Deep Navy */
.admin-sidebar {
  width: 270px;
  background: #0e2238; /* Deep Navy do Zafe Connect */
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  color: #cbd5e1;
  transition: width 0.25s ease;
}

.sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.sidebar-nav {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #62829f; /* Muted cyan-gray da referência */
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 12px 6px 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9.5px 14px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.sidebar-item svg {
  color: #7b96b2;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.sidebar-item:hover svg {
  color: #ffffff;
}

.sidebar-item.active {
  background: rgba(30, 80, 126, 0.65); /* Cápsula azul contrastante da foto */
  color: #ffffff;
  font-weight: 700;
}

.sidebar-item.active svg {
  color: #2dd4bf; /* Centelha teal ativa */
}

.sidebar-item .badge-count {
  margin-left: auto;
  background: #f43f5e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Sidebar Footer & User Profile */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1c3d60;
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role-badge {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.btn-logout {
  width: 100%;
  padding: 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

/* ── MAIN CONTENT AREA ──────────────────────────────────────────────── */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f4f6f8; /* Light warm canvas */
}

/* Topbar com Breadcrumbs da Foto */
.admin-topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #64748b;
}

.breadcrumb-nav a {
  color: #64748b;
  font-weight: 500;
}
.breadcrumb-nav a:hover {
  color: #0f172a;
}

.breadcrumb-nav .breadcrumb-sep {
  color: #cbd5e1;
  font-size: 12px;
}

.breadcrumb-nav .breadcrumb-active {
  color: #0f172a;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-content-area {
  padding: 32px;
  flex-grow: 1;
  overflow-y: auto;
}

/* ── WELCOME & ACTION CALLOUT BANNER (DO ZAFE CONNECT) ─────────────────── */
.admin-welcome-block {
  margin-bottom: 24px;
}

.welcome-kicker {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.welcome-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.welcome-desc {
  font-size: 14.5px;
  color: #475569;
  line-height: 1.5;
  max-width: 760px;
}

.action-callout-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.action-callout-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.callout-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.callout-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.callout-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

/* ── QUICK ACTION CARDS ("ENQUANTO ISSO, DEIXE TUDO PRONTO") ─────────── */
.quick-action-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.quick-action-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  cursor: pointer;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
}

.quick-action-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0e2238;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.quick-action-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.quick-action-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 14px;
}

.quick-action-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── STATS COUNTER CARDS ─────────────────────────────────────────────── */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.stat-card-info {
  display: flex;
  flex-direction: column;
}

.stat-card-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: #0e2238;
  margin-top: 3px;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0369a1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── PANELS & CMS CARDS ─────────────────────────────────────────────── */
.cms-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 26px;
}

.cms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
}

.cms-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cms-card-desc {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
}

/* ── DATA TABLES ────────────────────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.cms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.cms-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-weight: 700;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

.cms-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  vertical-align: middle;
}

.cms-table tr:hover td {
  background: #f8fafc;
}

/* Status Chips */
.status-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-chip.novo {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.status-chip.em_atendimento {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-chip.respondido {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.status-chip.arquivado {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Modais */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 34, 56, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
}
.btn-close-modal:hover {
  color: #0f172a;
}

@media (max-width: 1024px) {
  .quick-action-grid, .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
