body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e8f4fd;
  margin: 0;
  padding: 20px;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: auto;
  background: rgba(37, 38, 54, 0.95);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid rgba(86, 156, 214, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

h1,
h2,
h3 {
  color: #569cd6;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-links a {
  color: #569cd6;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.nav-links a:hover {
  background: linear-gradient(135deg, rgba(86, 156, 214, 0.1), rgba(86, 156, 214, 0.2));
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(86, 156, 214, 0.2);
}

.btn-add {
  background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 8px;
  margin-right: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 122, 204, 0.3);
}

.btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.4);
}

.logout-btn,
.back-btn {
  background-color: #bb3636;
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.project-card {
  background: linear-gradient(145deg, rgba(51, 51, 51, 0.9), rgba(42, 42, 42, 0.9));
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(86, 156, 214, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(86, 156, 214, 0.2);
  border-color: rgba(86, 156, 214, 0.4);
}

.project-card h3 {
  margin-top: 0;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

button {
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-update {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-rollback {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-history {
  background-color: #2196F3;
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
}

.log-box {
  background: linear-gradient(145deg, rgba(17, 17, 17, 0.95), rgba(26, 26, 26, 0.95));
  color: #e8f4fd;
  padding: 20px;
  border-radius: 12px;
  height: 500px;
  overflow-y: scroll;
  white-space: pre-wrap;
  font-family: "Consolas", "Monaco", "Fira Code", monospace;
  font-size: 14px;
  border: 1px solid rgba(86, 156, 214, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.6;
}

.log-box::-webkit-scrollbar {
  width: 8px;
}

.log-box::-webkit-scrollbar-track {
  background: rgba(51, 51, 51, 0.5);
  border-radius: 4px;
}

.log-box::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.log-box::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

#status {
  margin-top: 15px;
  font-weight: bold;
}

.action-title {
  color: #d7ba7d;
}

.project-title {
  color: #4ec9b0;
}

.error {
  color: #f44336;
  font-weight: bold;
  margin-top: 10px;
}

form {
  display: inline;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  background-color: #3c3c3c;
  border: 1px solid #555;
  color: white;
  border-radius: 4px;
}

.project-form fieldset {
  border: 1px solid #444;
  border-radius: 5px;
  margin-bottom: 20px;
  padding: 20px;
}

.project-form legend {
  color: #569cd6;
  font-weight: bold;
  padding: 0 10px;
}

.project-form label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

.info {
  font-style: italic;
  color: #888;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.db-group {
  border: 1px dashed #555;
  padding: 15px;
  margin-top: 15px;
  border-radius: 4px;
}

.flash-messages {
  margin-bottom: 15px;
}

.flash {
  padding: 15px;
  border-radius: 4px;
}

.flash.success {
  background-color: #38793a;
  color: white;
  border: 1px solid #4CAF50;
}

.flash.error {
  background-color: #8b2a2a;
  color: white;
  border: 1px solid #f44336;
}

/* Al final de static/style.css */

.copy-fieldset {
  border-color: #d7ba7d;
}

.btn-add-small {
  background-color: #3e863d;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

.db-group {
  border: 1px dashed #555;
  padding: 15px;
  margin-top: 15px;
  border-radius: 4px;
  position: relative;
}

.db-group h4 {
  margin-top: 0;
  color: #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-remove {
  background-color: #c54242;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
}

.btn-edit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-edit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Panel de actividad reciente */
.recent-activity-panel {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #2a2a2a;
  border-radius: 8px;
  border: 1px solid #444;
}

.recent-activity-panel h2 {
  margin: 0 0 15px 0;
  color: #569cd6;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.activity-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: #333;
  border-radius: 6px;
  border-left: 4px solid #555;
  transition: background-color 0.2s;
}

.activity-item:hover {
  background-color: #3a3a3a;
}

.activity-item.status-success {
  border-left-color: #4CAF50;
}

.activity-item.status-failed {
  border-left-color: #f44336;
}

.activity-item.status-in_progress {
  border-left-color: #2196F3;
}

.activity-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.project-name {
  font-weight: bold;
  color: #569cd6;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85em;
  color: #888;
}

.view-more {
  text-align: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #444;
}

.view-more a {
  color: #569cd6;
  text-decoration: none;
  font-weight: bold;
}

.view-more a:hover {
  text-decoration: underline;
}

/* Encabezado del proyecto */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
}

.project-header h3 {
  margin: 0;
  color: #569cd6;
}

.project-type {
  padding: 4px 10px;
  background-color: #555;
  color: white;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Estadísticas del proyecto */
.project-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
  padding: 12px;
  background-color: #2a2a2a;
  border-radius: 6px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.3em;
  font-weight: bold;
  color: #569cd6;
  margin-bottom: 2px;
}

.stat-value.success {
  color: #4CAF50;
}

.stat-value.rate {
  color: #ff9800;
}

.stat-value.time {
  color: #2196F3;
}

.stat-label {
  display: block;
  font-size: 0.75em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Información del último deploy */
.last-deploy-info {
  margin-bottom: 15px;
  padding: 10px;
  background-color: #2a2a2a;
  border-radius: 6px;
  font-size: 0.9em;
  border-left: 3px solid #555;
}

.last-deploy-info strong {
  color: #ccc;
}

.last-deploy-info .timestamp {
  color: #888;
  font-size: 0.85em;
}

.last-deploy-info .release {
  color: #569cd6;
  font-weight: bold;
}

/* Histórico de despliegues */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-card {
  background: linear-gradient(145deg, rgba(51, 51, 51, 0.9), rgba(42, 42, 42, 0.9));
  padding: 25px;
  border-radius: 12px;
  border-left: 4px solid #555;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(86, 156, 214, 0.1);
}

.history-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(86, 156, 214, 0.15);
  border-color: rgba(86, 156, 214, 0.3);
}

.history-card.status-success {
  border-left-color: #4CAF50;
}

.history-card.status-failed {
  border-left-color: #f44336;
}

.history-card.status-in_progress {
  border-left-color: #2196F3;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.history-info h3 {
  margin: 0 0 8px 0;
  color: #569cd6;
}

.history-meta {
  text-align: right;
  font-size: 0.85em;
  color: #888;
}

.action-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-badge.action-update {
  background-color: #4CAF50;
  color: white;
}

.action-badge.action-rollback {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.status-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-success {
  background-color: #4CAF50;
  color: white;
}

.status-badge.status-failed {
  background-color: #f44336;
  color: white;
}

.status-badge.status-in_progress {
  background-color: #2196F3;
  color: white;
}

.history-details {
  margin-bottom: 15px;
}

.detail-item {
  margin-bottom: 6px;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  color: #888;
  font-weight: bold;
}

.detail-value {
  color: #ccc;
}

.error-message {
  color: #f44336;
  font-weight: bold;
  background-color: rgba(244, 67, 54, 0.1);
  padding: 8px;
  border-radius: 4px;
  margin-top: 8px;
}

.timings-section {
  margin-top: 12px;
}

.timings-section h4 {
  margin: 0 0 8px 0;
  color: #ccc;
  font-size: 0.9em;
}

.timings-list {
  margin: 5px 0;
  padding-left: 20px;
  font-size: 0.85em;
  color: #ccc;
}

.timings-list li {
  margin-bottom: 3px;
}

.history-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #444;
}

.history-actions a {
  color: #569cd6;
  text-decoration: none;
  font-size: 0.9em;
}

.history-actions a:hover {
  text-decoration: underline;
}

.project-filter {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #2a2a2a;
  border-radius: 8px;
  border: 1px solid #444;
}

.project-filter h2 {
  margin: 0 0 10px 0;
  color: #569cd6;
}

.no-records {
  text-align: center;
  padding: 40px;
  color: #888;
  font-style: italic;
}

/* Estadísticas generales */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  background: linear-gradient(145deg, rgba(51, 51, 51, 0.9), rgba(42, 42, 42, 0.9));
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(86, 156, 214, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(86, 156, 214, 0.2);
  border-color: rgba(86, 156, 214, 0.4);
}

.stats-card h3 {
  margin: 0 0 15px 0;
  color: #569cd6;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.stats-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.metric {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 1.6em;
  font-weight: bold;
  color: #569cd6;
  margin-bottom: 4px;
}

.metric-value.success {
  color: #4CAF50;
}

.metric-value.rate {
  color: #ff9800;
}

.metric-value.time {
  color: #2196F3;
}

.metric-label {
  display: block;
  font-size: 0.8em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.last-deploy {
  margin-bottom: 15px;
  padding: 12px;
  background-color: #2a2a2a;
  border-radius: 6px;
  border-left: 3px solid #555;
}

.last-deploy h4 {
  margin: 0 0 10px 0;
  color: #ccc;
  font-size: 0.9em;
}

.last-deploy-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}

.release-info {
  font-size: 0.85em;
  color: #ccc;
}

.stats-actions {
  text-align: center;
  margin-top: 15px;
}

.stats-actions a {
  color: #569cd6;
  text-decoration: none;
  font-weight: bold;
}

.stats-actions a:hover {
  text-decoration: underline;
}

.recent-activity-section {
  margin-top: 30px;
}

.recent-activity-section h2 {
  margin: 0 0 15px 0;
  color: #569cd6;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.no-activity {
  text-align: center;
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* Indicador de Modo Rápido */
.fast-mode-indicator {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fast-mode-badge {
  font-weight: bold;
  font-size: 1.1em;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.fast-mode-desc {
  font-size: 0.9em;
  opacity: 0.9;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    justify-content: center;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .project-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-header {
    flex-direction: column;
    gap: 10px;
  }

  .activity-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .activity-meta {
    justify-content: space-between;
  }
}

/* Estilos para la sección de Jira */
.jira-section {
  margin-top: 15px;
  padding: 12px;
  background-color: #2a2a2a;
  border-radius: 6px;
  border-left: 4px solid #569cd6;
}

.jira-section strong {
  color: #569cd6;
  display: block;
  margin-bottom: 8px;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jira-tickets {
  margin-bottom: 8px;
}

.jira-tickets:last-child {
  margin-bottom: 0;
}

.jira-label {
  font-weight: bold;
  font-size: 0.85em;
  margin-right: 8px;
}

.jira-tickets.moved .jira-label {
  color: #4CAF50;
}

.jira-tickets.failed .jira-label {
  color: #f44336;
}

.jira-tickets.not-found .jira-label {
  color: #ff9800;
}

.jira-tickets.commented .jira-label {
  color: #2196f3;
}

.jira-tickets.error-commented .jira-label {
  color: #f44336;
}

.jira-ticket {
  display: inline-block;
  padding: 2px 6px;
  margin: 2px;
  background-color: #444;
  color: white;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

.jira-tickets.moved .jira-ticket {
  background-color: #4CAF50;
  color: white;
}

.jira-tickets.failed .jira-ticket {
  background-color: #f44336;
  color: white;
}

.jira-tickets.not-found .jira-ticket {
  background-color: #ff9800;
  color: white;
}

.jira-tickets.commented .jira-ticket {
  background-color: #2196f3;
  color: white;
}

.jira-tickets.error-commented .jira-ticket {
  background-color: #f44336;
  color: white;
}

/* Estilos para commits */
.commits-section {
  margin: 20px 0;
  padding: 20px;
  background: rgba(37, 38, 54, 0.95);
  border-radius: 8px;
  border: 1px solid rgba(86, 156, 214, 0.2);
}

.commits-list {
  margin-top: 15px;
}

.commit-item {
  background: linear-gradient(145deg, rgba(51, 51, 51, 0.9), rgba(42, 42, 42, 0.9));
  border: 1px solid rgba(86, 156, 214, 0.2);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.commit-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(86, 156, 214, 0.2);
}

.commit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.commit-hash {
  background: #569cd6;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

.commit-author {
  color: #e8f4fd;
  font-weight: 500;
}

.commit-date {
  color: #a0a0a0;
  font-size: 12px;
}

.commit-message {
  color: #e8f4fd;
  margin-bottom: 8px;
  line-height: 1.4;
}

.commit-jira {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(86, 156, 214, 0.2);
}

.jira-key {
  background: #ffc107;
  color: #212529;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 5px;
  font-weight: 500;
}

.no-commits {
  text-align: center;
  padding: 40px;
  color: #a0a0a0;
}

.deploy-info {
  background: linear-gradient(145deg, rgba(51, 51, 51, 0.9), rgba(42, 42, 42, 0.9));
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(86, 156, 214, 0.2);
  margin-bottom: 20px;
}

.deploy-details p {
  margin: 8px 0;
  color: #e8f4fd;
}

.deploy-details strong {
  color: #569cd6;
}

.help-text {
  color: #888;
  font-size: 0.85em;
  font-style: italic;
  margin-top: 4px;
  display: block;
}

.help-text::before {
  content: "💡 ";
  margin-right: 4px;
}

/* Estilos para botones de navegación en páginas específicas */
.btn {
  background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 8px;
  margin-right: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 122, 204, 0.3);
  display: inline-block;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.4);
  color: white;
  text-decoration: none;
}

/* Estilos específicos para la navegación en la página de commits */
header nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

header nav .btn {
  margin-right: 0;
}