/* ==========================================================================
   CONFIGURAÇÕES GERAIS E RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body, html {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #f0f2f5;
}
/* INTERFACE PRINCIPAL */
#app-screen {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: row;
}
/* PAINEL ESQUERDO */
#form-panel {
  width: 380px;
  background: #ffffff;
  height: 100%;
  border-right: 1px solid #dcdcdc;
  padding: 25px;
  overflow-y: auto;
  flex-shrink: 0;
}
/* ÁREA DE PREVIEW */
#preview-panel {
  flex: 1;
  height: 100%;
  background-color: #e5e5e5;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  padding: 20px;
}
#capture-area {
  position: relative;
  width: 600px !important;
  height: 848px !important;
  background-color: #000000 !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  transform-origin: center center;
  transform: scale(0.7);
}
/* CONTROLE DE VISIBILIDADE DO LAÇO */
.black-ribbon {
  display: none;
  position: absolute;
  z-index: 3;
  object-fit: contain;
}
.tmpl-3 .black-ribbon {
  display: block;
}
/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
  #app-screen {
    flex-direction: column;
  }
  #form-panel {
    width: 100%;
    height: 50vh;
    order: 2;
  }
  #preview-panel {
    height: 50vh;
    order: 1;
  }
  #capture-area {
    transform: scale(0.4);
  }
}
/* ELEMENTOS INTERNOS DO CARD */
#bg-template {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.user-photo-container {
  position: absolute;
  z-index: 2;
  overflow: hidden;
}
#prev-user-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overlay-text {
  position: absolute;
  z-index: 2;
  width: 100%;
  color: white;
  text-align: center;
}





.date-icon {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    vertical-align: middle;
    margin-right: 5px;
    /* Filtros removidos: agora o JavaScript troca a imagem física, 
       então não precisamos alterar a cor via CSS */
    filter: none !important;
}

/* Garante que o container também esteja visível e posicionado */
.overlay-text.dates {
    z-index: 10 !important;
    position: relative;
}

/* Opcional: Garante que imagens não sofram deformação */
#capture-area img {
    min-width: 1px;
    min-height: 1px;
}



/* 1. Base do Capture Area (Padrão para Modelo 1 e 2) */
#capture-area {
    position: relative;
    width: 600px !important;
    height: 848px !important;
    background-color: #000000 !important; /* Fundo Preto para Tmpl 1 e 2 */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    transform-origin: center center;
    transform: scale(0.7);
}

/* 2. Override para o Modelo 3 (Fundo Branco) */
.tmpl-3 {
    background-color: #ffffff !important;
}

/* 3. Cores de Texto e Ícones (Agrupadas por Modelo) */

/* Modelos 1 e 2: Tudo Branco */
.tmpl-1 .name, .tmpl-2 .name,
.tmpl-1 .dates, .tmpl-2 .dates,
.tmpl-1 .label-detalhe, .tmpl-2 .label-detalhe,
.tmpl-1 .valor-detalhe, .tmpl-2 .valor-detalhe,
.tmpl-1 #details-table, .tmpl-2 #details-table {
    color: #ffffff !important;
}

/* Modelo 3: Tudo Preto */
.tmpl-3 .name,
.tmpl-3 .dates,
.tmpl-3 .vertical-details,
.tmpl-3 .label-detalhe,
.tmpl-3 .valor-detalhe,
.tmpl-3 #details-table {
    color: #000000 !important;
}



/* MENU DE DOWNLOAD */
#download-menu {
  margin-top: 15px;
  text-align: center;
  width: 100%;
}
/* UI COMPONENTS */
.section-title {
  font-size: 14px;
  color: #2c3e50;
  text-transform: uppercase;
  border-bottom: 2px solid #34495e;
  padding-bottom: 5px;
  margin: 20px 0 12px 0;
}
.form-group {
  margin-bottom: 14px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
}
input[type="text"], input[type="time"], select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 14px;
}
.btn-primary {
  width: 100%;
  padding: 11px;
  color: white;
  background-color: #34495e;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}
.btn-download {
  width: 100%;
  padding: 14px;
  color: white;
  background-color: #27ae60;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}
/* MODAIS E CROPPER (CORRIGIDOS) */
#login-screen, #admin-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1e1e24;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
#cropper-modal {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9) !important;
  z-index: 9999 !important;
  display: none;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.img-container {
  width: 100%;
  height: 400px;
  max-height: 50vh;
  background: #eaeaea;
  margin-bottom: 20px;
  overflow: hidden;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}
.modal-actions button {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}