  .keystore-header {
    padding-top: 18px;
  }
  /* Forzar hover correcto en botón primary */
  .keystore-btn.primary:hover {
    background: #6B0F0F !important;
    color: #fff !important;
    border: 1.5px solid #6B0F0F !important;
  }
 
.modal-actions .keystore-btn {
  min-width: 120px;
  width: 120px;
  height: 44px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-break: anywhere;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Subir la card para que quede más arriba */
.keystore-container {
  margin-top: 16px;
  height: auto;
  min-height: 0;
}
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #3A1319;
  background-image:
    url('data:image/svg+xml;utf8,<svg width="192" height="192" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><polygon points="24,4 44,14 44,34 24,44 4,34 4,14" fill="%23FF9800" stroke="%23FF9800" stroke-width="2"/><polygon points="24,4 44,14 24,24 4,14" fill="%23FF9800" opacity="0.85"/><polygon points="24,24 44,14 44,34 24,44" fill="%23FFB74D" opacity="0.7"/><polygon points="24,24 24,44 4,34 4,14" fill="%23A0522D" opacity="0.7"/><rect x="21" y="12" width="6" height="20" rx="3" fill="white" opacity="0.25"/><rect x="23" y="8" width="2" height="6" rx="1" fill="white" opacity="0.25"/></svg>'),
    url('data:image/svg+xml;utf8,<svg width="192" height="192" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><polygon points="24,4 44,14 44,34 24,44 4,34 4,14" fill="%23FF9800" stroke="%23FF9800" stroke-width="2"/><polygon points="24,4 44,14 24,24 4,14" fill="%23FF9800" opacity="0.85"/><polygon points="24,24 44,14 44,34 24,44" fill="%23FFB74D" opacity="0.7"/><polygon points="24,24 24,44 4,34 4,14" fill="%23A0522D" opacity="0.7"/><rect x="21" y="12" width="6" height="20" rx="3" fill="white" opacity="0.25"/><rect x="23" y="8" width="2" height="6" rx="1" fill="white" opacity="0.25"/></svg>');
  background-repeat: repeat;
  background-size: 192px 192px, 192px 192px;
  background-position: 0 0, 96px 96px;
}

.keystore-container {
  width: 100vw;
  box-sizing: border-box;
  /* Eliminado flex para que la card quede arriba */
}

.keystore-card {
  background: #220F17;
  border: none;
  border-radius: 15px;
  padding: 24px 32px;
  box-shadow: 0 8px 32px rgba(247, 147, 26, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-width: 360px;
  max-width: 480px;
  min-height: 40vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.keystore-header h2 {
  margin: 0 0 8px 0;
  color: #f7931a;
}

.keystore-card p {
  color: #fff;
  margin-bottom: 18px;
}

.keystore-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
    align-items: flex-start;
}
.modal-actions .keystore-btn {
  flex: 0 0 120px;
  min-width: 120px;
  width: 120px;
  height: 44px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-break: anywhere;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  vertical-align: top;
  margin-top: 0 !important;
}

.keystore-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: #f7931a;
  color: #220F17;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.keystore-btn.primary {
  background: #f7931a;
  color: #fff !important;
}

.keystore-btn:disabled {
  background: #888;
  color: #ccc;
  cursor: not-allowed;
}

.keystore-status {
  color: #f7931a;
  font-size: 0.95em;
  min-height: 24px;
  text-align: center;
}

/* Modal básico */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #220F17;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(247, 147, 26, 0.25);
  min-width: 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-content h3 {
  color: #f7931a;
  margin-top: 8px;
  margin-bottom: 12px;
}

.modal-content input[type="password"] {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #f7931a;
  margin-bottom: 16px;
  width: 100%;
  font-size: 1em;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 700px) {
  body { justify-content: flex-start; align-items: stretch; }
  .header-content { padding: 10px 4vw; }
  .keystore-container { width: 100%; padding: 0 4vw; margin-top: 96px; }
  .keystore-card { max-width: 100%; width: 100%; min-width: 0; margin: 12px 0; padding: 0 4vw; border-radius: 12px; box-sizing: border-box; }
  .keystore-header h2 { font-size: 1.2rem; text-align: center; }
  .keystore-card p { font-size: 0.95rem; text-align: center; }
  .card-actions, .keystore-actions { flex-direction: column; gap: 10px; width: 100%; }
  .keystore-btn { width: 100%; min-height: 40px; }
  label { font-size: 0.95rem; }
  input[type="text"], input[type="number"], input[type="password"], input[type="file"], select { width: 100%; font-size: 1rem; padding: 10px; }
}
