/* ==========================================================================
   EVENT TEMPLATES & DETAILS OVERHAUL STYLES
   ========================================================================== */

/* --- Brand Logo Styles --- */
.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-logo-img {
  transform: scale(1.05) rotate(-2deg);
}

.login-card-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto 16px auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.16));
}

.header-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
}

/* --- Event Details Panel (Thông tin sự kiện) --- */
.event-details-grid {
  display: grid !important;
  grid-template-columns: 1.35fr 1fr !important;
  gap: 24px !important;
  align-items: start !important;
  max-width: 1250px !important;
  margin: 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 960px) {
  .event-details-grid {
    grid-template-columns: 1fr !important;
  }
}

.details-side-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.field span, .field > b {
  font-size: 13px !important;
  font-weight: 650 !important;
  color: var(--ink) !important;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100% !important;
  padding: 10px 14px !important;
  border: 1.5px solid #dce2e0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #1a2421 !important;
  font-size: 13.5px !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #176c59 !important;
  box-shadow: 0 0 0 3px rgba(23, 108, 89, 0.15) !important;
  outline: none !important;
}

.field-hint {
  font-size: 11px !important;
  color: #717d79 !important;
  line-height: 1.4 !important;
  margin-top: 2px !important;
}

.fields-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  width: 100% !important;
}

@media (max-width: 600px) {
  .fields-row {
    grid-template-columns: 1fr !important;
  }
}

.cloud-info-box {
  background: #f8faf9 !important;
  border: 1px solid #e1e7e4 !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin-top: 10px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.danger-panel {
  border: 1.5px solid #fecaca !important;
  background: #fff8f8 !important;
}

.danger-panel h2 {
  color: #dc2626 !important;
}

/* --- Template Selection Modal --- */
.template-dialog {
  border: none !important;
  border-radius: 22px !important;
  padding: 0 !important;
  max-width: 880px !important;
  width: 95vw !important;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.28) !important;
  background: #ffffff !important;
  color: #1e2925 !important;
  overflow: hidden !important;
}

.template-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(5px) !important;
}

.template-dialog-inner {
  display: flex !important;
  flex-direction: column !important;
  max-height: 90vh !important;
}

.template-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  padding: 24px 28px 18px !important;
  border-bottom: 1px solid #e8ecea !important;
  background: #fafbfa !important;
}

.template-badge {
  display: inline-block !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: #176c59 !important;
  background: #eaf4ef !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  margin-bottom: 6px !important;
}

.template-header h2 {
  font-size: 20px !important;
  font-weight: 750 !important;
  margin: 0 0 4px 0 !important;
  color: #1e2925 !important;
}

.template-tabs {
  display: flex !important;
  gap: 12px !important;
  padding: 12px 28px 0 !important;
  border-bottom: 1px solid #e8ecea !important;
  background: #ffffff !important;
}

.template-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  color: #6a7672 !important;
  border-bottom: 3px solid transparent !important;
  cursor: pointer !important;
  background: none !important;
  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  transition: all 0.15s !important;
}

.template-tab:hover {
  color: #1e2925 !important;
}

.template-tab.active {
  color: #176c59 !important;
  border-bottom-color: #176c59 !important;
}

.template-pane {
  padding: 20px 28px !important;
  overflow-y: auto !important;
  flex: 1 !important;
}

.template-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 14px !important;
}

.template-card {
  border: 2px solid #e5eae8 !important;
  border-radius: 14px !important;
  padding: 16px !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  user-select: none !important;
}

.template-card:hover {
  border-color: #a3c9be !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(23, 108, 89, 0.08) !important;
}

.template-card.selected {
  border-color: #176c59 !important;
  background: #f6faf8 !important;
  box-shadow: 0 0 0 3px rgba(23, 108, 89, 0.18) !important;
}

.template-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
}

.template-icon {
  font-size: 26px !important;
  display: inline-block !important;
}

.template-tag {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  text-transform: uppercase !important;
}

.tag-wedding { background: #ffe4e6 !important; color: #e11d48 !important; }
.tag-birthday { background: #ede9fe !important; color: #7c3aed !important; }
.tag-corporate { background: #dbeafe !important; color: #2563eb !important; }
.tag-standard { background: #e0f2fe !important; color: #0284c7 !important; }
.tag-custom { background: #fef3c7 !important; color: #d97706 !important; }

.template-card h3 {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  margin: 0 0 6px 0 !important;
  color: #1e2925 !important;
}

.template-card p {
  font-size: 11.5px !important;
  color: #6a7672 !important;
  line-height: 1.5 !important;
  margin: 0 0 12px 0 !important;
  flex: 1 !important;
}

.template-features {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.template-features span {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  background: #f1f4f3 !important;
  color: #3b4d47 !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
}

.template-card.selected .template-features span {
  background: #deeee7 !important;
  color: #115443 !important;
}

.template-form-wrap {
  padding: 16px 28px !important;
  background: #fafbfa !important;
  border-top: 1px solid #e8ecea !important;
}

.template-form-row {
  display: flex !important;
  gap: 14px !important;
}

@media (max-width: 720px) {
  .template-form-row {
    flex-direction: column !important;
  }
}

.template-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 16px 28px !important;
  border-top: 1px solid #e8ecea !important;
  background: #ffffff !important;
}

.clone-selection-box {
  background: #f8faf9 !important;
  border: 1.5px dashed #cbd5d1 !important;
  border-radius: 14px !important;
  padding: 20px !important;
}
