@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Fira+Code:wght@400;500&display=swap');

:root {
  --agenda-cover: #1e293b;
  --agenda-spine: #0f172a;
  --agenda-page: #ffffff;
  --agenda-border: #e2e8f0;
  --tab-active-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0f172a;
  color: #1e293b;
  min-height: 100vh;
}

.font-serif-doc {
  font-family: 'Merriweather', Georgia, serif;
}

/* Agenda Book Container */
.agenda-book {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: visible;
}

/* Agenda Spine Effect on Left */
.agenda-spine-strip {
  width: 28px;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 70%, #334155 100%);
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  position: relative;
}

.agenda-ring {
  width: 14px;
  height: 22px;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 50%, #1e293b 100%);
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.5);
  margin: 18px auto;
}

/* Protruding Index Tabs (Orelhas de Fichário) */
.index-tab {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  user-select: none;
}

.index-tab:hover {
  transform: translateX(4px);
}

.index-tab.active {
  transform: translateX(8px);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 700;
  z-index: 20;
}

.index-tab.active::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

/* Page content area */
.agenda-page-inner {
  background: #ffffff;
  background-image: radial-gradient(#f1f5f9 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 720px;
}

/* Document Sheet for A4 Print Preview */
.a4-sheet {
  width: 100%;
  max-width: 800px;
  min-height: 1100px;
  padding: 60px 70px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  position: relative;
  box-sizing: border-box;
}

/* Coordination Cards */
.coord-box {
  transition: all 0.2s ease;
}
.coord-box:hover {
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08);
}

/* Print Specific Rules */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    margin: 0;
    padding: 0;
  }

  .no-print,
  nav,
  header,
  footer,
  .agenda-spine-strip,
  .index-tabs-column,
  .btn-action,
  #tabs-header,
  .filter-bar {
    display: none !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .agenda-book {
    box-shadow: none !important;
    border: none !important;
    background: white !important;
  }

  #page-modelos {
    display: block !important;
  }

  #modelos-config-col {
    display: none !important;
  }

  #modelos-preview-col {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .a4-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 15mm 20mm !important;
    max-width: 100% !important;
    min-height: auto !important;
    width: 100% !important;
    margin: 0 !important;
  }

  @page {
    size: A4 portrait;
    margin: 15mm;
  }
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animations */
.page-fade {
  animation: pageFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ESTILOS DA CAPA DE COURO EXECUTIVA (LEATHER AGENDA COVER & 3D UNLOCK)
   ========================================================================== */

/* Container 3D com perspectiva para rotação de capa de livro */
.leather-cover-container {
  perspective: 2200px;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.9s ease, filter 0.8s ease;
  will-change: transform, opacity;
}

/* Estado de abertura 3D (a capa de couro gira para a esquerda e desaparece) */
.leather-cover-container.opening {
  transform-origin: left center;
  transform: rotateY(-110deg) scale(0.92);
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
}

/* Capa com Efeito Papel Nobre Encadernado (Branco, Verde Esmeralda e Toque de Azul - Identidade Vitae) */
.leather-binder {
  background-color: #ffffff;
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.95) 55%, #f1f5f9 100%),
    repeating-linear-gradient(0deg, rgba(5, 150, 105, 0.012) 0, rgba(5, 150, 105, 0.012) 1px, transparent 1px, transparent 6px),
    repeating-linear-gradient(90deg, rgba(2, 132, 199, 0.012) 0, rgba(2, 132, 199, 0.012) 1px, transparent 1px, transparent 6px);
  box-shadow: 
    0 35px 70px -15px rgba(6, 78, 59, 0.4),
    0 15px 35px -10px rgba(15, 23, 42, 0.35),
    inset 0 0 0 1px rgba(5, 150, 105, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.95);
  border: 2px solid #059669;
  position: relative;
}

/* Moldura Interna em Filete Duplo Verde Esmeralda e Azul */
.leather-stitching {
  border: 2px solid rgba(5, 150, 105, 0.35);
  outline: 1px solid rgba(2, 132, 199, 0.3);
  outline-offset: -6px;
  border-radius: 12px;
  box-shadow: inset 0 0 25px rgba(16, 185, 129, 0.04);
  pointer-events: none;
}

/* Tipografia em Relevo com Dégradé Verde Esmeralda e Azul Marinho */
.gold-emboss {
  background: linear-gradient(135deg, #064e3b 0%, #047857 40%, #0369a1 85%, #0c4a6e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.8)) drop-shadow(0 2px 4px rgba(6, 78, 59, 0.2));
}



/* Cantoneiras Metálicas Decorativas nos 4 cantos da Capa */
.gold-corner-tl, .gold-corner-tr, .gold-corner-bl, .gold-corner-br {
  position: absolute;
  width: 38px;
  height: 38px;
  pointer-events: none;
  z-index: 5;
}
.gold-corner-tl {
  top: 6px;
  left: 6px;
  border-top: 4px solid #059669;
  border-left: 4px solid #059669;
  border-top-left-radius: 12px;
  filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.4));
}
.gold-corner-tr {
  top: 6px;
  right: 6px;
  border-top: 4px solid #059669;
  border-right: 4px solid #059669;
  border-top-right-radius: 12px;
  filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.4));
}
.gold-corner-bl {
  bottom: 6px;
  left: 6px;
  border-bottom: 4px solid #059669;
  border-left: 4px solid #059669;
  border-bottom-left-radius: 12px;
  filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.4));
}
.gold-corner-br {
  bottom: 6px;
  right: 6px;
  border-bottom: 4px solid #059669;
  border-right: 4px solid #059669;
  border-bottom-right-radius: 12px;
  filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.4));
}

/* Efeito de Tremor (Shake) caso senha inválida */
@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.shake {
  animation: lockShake 0.35s ease;
}




