/* UTXO List Container and Section */
.utxo-list-section {
    margin-top: 10px;
}
.utxo-list-container {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.utxo-balance {
    color: #f7931a;
    font-weight: bold;
    font-size: 18px;
}
/* UTXO Card Styles */
.utxo-card {
    padding: 10px;
    border-radius: 8px;
    background: #28A745;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-family: monospace;
}
.utxo-card-details {
    min-width: 0;
    flex: 1 1 auto;
}
.utxo-card-address {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}
.utxo-card-amount {
    font-weight: 700;
    margin-top: 6px;
}
.utxo-card-meta {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}
.utxo-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.burn-btn {
    background-color: #d32f2f !important;
    color: #fff !important;
    border: none !important;
}
.coincontrol-utxo-row .utxo-checkbox {
    flex: 0 0 auto !important;
    width: 15px !important;
    min-width: 15px !important;
    max-width: 15px !important;
    height: 15px !important;
    box-sizing: content-box !important;
    display: inline-block !important;
    margin-right: 8px;
}
.coincontrol-utxo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    background-color: rgb(40, 167, 69);
    margin-bottom: 6px;
}

.coincontrol-utxo-row label.utxo-meta {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Coinbase UTXO: premio de minado */
.coincontrol-utxo-row.coinbase-utxo {
  background-color: orange !important;
}

.utxo-select-list {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 0;
}
:root {
    --wine-main: #6A0D25;   /* vino intenso */
    --wine-light: #8B1E3F;  /* luz */
    --wine-dark: #3B0A14;   /* sombra */
    --size: 80px;           /* tamaño más compacto para patrón */
}

.wine-background {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--size), 1fr));
    gap: 20px;
    padding: 40px;
    background-color: #111; /* fondo oscuro para dashboard */
}

body {
    /* Fondo repetitivo de cubos estilo Balena Etcher */
    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;
}
/* Alinear todos los botones de la nav perfectamente usando flexbox en el contenedor */
.nav {
    display: flex;
    align-items: center;
    gap: 0;
}
/* Igualar altura y alineación de los botones en la nav */
.nav .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-width: 90px;
    padding: 0 18px;
    font-size: 1em;
    border: none;
    background: #eaeafc;
    color: #222;
    border-radius: 8px;
    margin-left: 8px;
    margin-right: 0;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}
.nav .btn:hover, .nav .btn:focus {
    background: #d1d1f7;
}
.nav a.btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-width: 90px;
    padding: 0 18px;
    font-size: 1em;
    border-radius: 8px;
    margin-left: 8px;
    margin-right: 0;
    box-sizing: border-box;
}
/* Footer Wallet Global Bodega */
.wallet-footer-card {
    width: 100%;
    max-width: 700px;
    margin: 40px auto 0 auto;
    padding: 18px 18px 14px 18px;
    background: #f4f4fa;
    border-top: 2px solid #bdbdfc;
    border-radius: 14px 14px 0 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wallet-footer-card h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 600;
}
.wallet-footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.wallet-footer-content label {
    font-size: 1em;
    margin-bottom: 2px;
}
.wallet-footer-content input[type="file"],
.wallet-footer-content input[type="password"] {
    padding: 6px 8px;
    font-size: 1em;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
}
.wallet-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
}
.wallet-footer-actions .wallet-btn {
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    font-size: 1em;
    padding: 8px 0;
}
#wallet-global-status {
    font-size: 13px;
    color: #2a2;
    margin-top: 6px;
    min-height: 18px;
}
@media (max-width: 800px) {
    .wallet-footer-card {
        max-width: 100vw;
        border-radius: 0;
        padding: 12px 4vw 10px 4vw;
    }
    .wallet-footer-actions {
        grid-template-columns: 1fr;
    }
}
/* Fondo de pared de ladrillo visto estilo videojuego clásico */
/* Fondo de pared de ladrillo visto estilo videojuego clásico */


/* Optional larger bricks (10x) if needed on a container: apply .brick-large */
.brick-large {
    background-image:
        repeating-linear-gradient(to bottom, transparent 0 150px, #8b4513 150px 160px),
        repeating-linear-gradient(to right,  transparent 0 310px, #8b4513 310px 320px),
        url('images/BW-bottel.png');
    background-size: 640px 320px, 640px 320px, 640px 320px;
    background-repeat: repeat;
}

/* ====== Full-width site header (BlocksWine style) ====== */
.site-header {
    backdrop-filter: blur(8px) saturate(110%);
    -webkit-backdrop-filter: blur(8px) saturate(110%);
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, rgba(18,6,10,0.42), rgba(18,6,10,0.18));
    background-color: rgba(18,6,10,0.32);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    height: 72px;
    min-height: 72px;
    padding: 0;
    z-index: 1000;
}
.site-header.scrolled {
    background: linear-gradient(180deg, rgba(18,6,10,0.70), rgba(18,6,10,0.30));
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 320ms ease, box-shadow 320ms ease;
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    max-width: 100%;
    width: 100%;
    padding: 8px 18px;
    box-sizing: border-box;
}
.logo {
    font-weight: 700;
    letter-spacing: 0.6px;
    font-size: 1.4rem;
    line-height: 1;
    margin: 0;
    color: #f7931a;
}
.logo-icon {
    width: 46px;
    height: auto;
    margin-right: 10px;
}
.logo-icon.white {
    filter: invert(1) brightness(1.35) contrast(1.05);
    background-color: rgba(255,255,255,0.12);
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    transition: transform 420ms cubic-bezier(.2,.9,.2,1);
}
.logo-icon.white:hover { transform: scale(1.08) rotate(8deg); }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav .btn { display: inline-block; padding: 10px 16px; border-radius: 8px; text-decoration: none; background:#f7931a; color:#08101a; font-weight:600; border:1px solid rgba(0,0,0,0.08); transition: all .25s ease; }
.nav .btn:hover, .nav .btn:focus { background: linear-gradient(180deg,#8b1631 0%,#6a0f22 100%); color:#fff; outline:none; }
.nav .btn.active { background: linear-gradient(180deg,#8b1631 0%,#6a0f22 100%); color:#fff; border:1px solid rgba(139,22,49,.9); }

/* Offset main content below sticky header */
main, .dashboard { margin-top: 84px; }

#content,
#blocksContainer,
#transactionsContainer,
.block,
.transaction,
.public-key {
  background-color: rgba(255,255,255,0.85); /* Fondo blanco semitransparente */
  /* Puedes ajustar el valor 0.85 a menos si quieres más transparencia */
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    color: #333;
}

/* Navegación */
#navigation {
    width: 20%;
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100%;
}

/* Contenido principal */
#content {
    margin-left: 20%;
    padding: 20px;
}

/* Estilo de los botones */
button {
    background-color: #f7931a;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 16px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #e07d0b;
}

h2,
h1 {
    color: #f7931a;
    text-align: center;
}

/* Estilo del formulario */
form {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f6eeeebe;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilo de las etiquetas */
label {
    display: block;
    margin-bottom: 5px;
}

input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Estilo de filas */
.row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    overflow: hidden;
    /* Oculta el desbordamiento horizontal */
    width: 100%;
}

#blocksContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: stretch;

  border: 2px solid #f7931a;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

  max-width: 1200px;       /* Limita el ancho máximo para evitar que se expanda demasiado */
  width: 100%;             /* Ocupa todo el ancho disponible */
  box-sizing: border-box;  /* Incluye padding y border en el cálculo de ancho */
  overflow-x: auto;        /* Scroll horizontal si hay desbordamiento */
}

#transactionsContainer {
    border: 2px solid #f7931a;
    margin: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    width: 100%;
}

.block {
  border: 3px solid #f7931a;
  padding: 25px;
  margin: 15px;
  border-radius: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  box-shadow: 0 8px 32px rgba(247, 147, 26, 0.3);
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
  backdrop-filter: blur(10px);
  position: relative;
}

.block-body {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 15px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-height: 200px;
  background-color: rgba(247, 147, 26, 0.1);
  border-radius: 8px;
  border: 2px solid rgba(247, 147, 26, 0.3);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #333;
  margin-top: 10px;
}


/* Efecto hover para bloques */
.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(247, 147, 26, 0.4);
    border-color: #f7931a;
}

.block p {
    margin: 8px 0;
    line-height: 1.4;
}

.block p strong {
    color: #f7931a;
    font-weight: bold;
}

button {
    background-color: #f7931a;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #e07d0b;
}

.transaction-result {
    margin: 20px 0;
    padding: 10px;
    background-color: #ffe9c6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #420303;
}

/* Caja de transacciones */
.transaction-box {
    margin: 20px 0;
    padding: 10px;
    background-color: #ffe9c6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #420303;
}

/* Estilo de transacciones */
.transaction {
    border: 2px solid #f7931a;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    background-color: #fff5e1;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    overflow-x: auto;
    /* Agrega una barra de desplazamiento horizontal si es necesario */
    width: 100%;
    /* Ajusta el ancho al 50% */
    box-sizing: border-box;
    /* Asegura que el padding y border se incluyan en el ancho total */
}

.transaction p {
    margin: 5px 0;
}

.transaction strong {
    color: #f7931a;
}

.transaction-output {
    border-top: 1px solid #f7931a;
    padding-top: 5px;
    margin-top: 5px;
}

.public-key {
    border: 2px solid #f7931a;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    background-color: #fff5e1;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    overflow-x: auto;
    /* Agrega una barra de desplazamiento horizontal si es necesario */
}

.public-key p {
    margin: 5px 0;
}

.public-key strong {
    color: #f7931a;
}

/* Estilos para el Dashboard Principal */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(247, 147, 26, 0.05));
    border-radius: 15px;
    border: none;
}

.dashboard-header h1 {
    color: #f7931a;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Cards se distribuyen en filas si no caben */
    gap: 38px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 8px;
    padding-right: 8px;
}

.dashboard-card {
    background: #fff;
    border: none;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(247, 147, 26, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 0;
    max-width: none;
    margin-left: unset;
    margin-right: unset;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(247, 147, 26, 0.4);
}

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

.card-header h2 {
    color: #f7931a;
    font-size: 1.4rem;
    margin: 0;
}

.status-badge {
    background-color: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

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

.dashboard-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.dashboard-btn.primary {
    background-color: #f7931a;
    color: white;
}

    /* Header decoration and content moved from inline styles in view.html */
  

   

    
    

    /* Responsive tweak: reduce padding and radius on small screens */
    @media (max-width: 560px) {
        .header-content { padding: 8px 10px; border-radius: 8px; }
        .main-title .master { font-size: 1.1rem; }
    }

.dashboard-btn.primary:hover {
    background-color: #e8841a;
    transform: translateY(-1px);
}

.dashboard-btn.secondary {
    background-color: #f7931a;
    color: #fff;
    border: 2px solid #f7931a;
}

.dashboard-btn.secondary:hover {
    background-color: #f7931a;
    color: white;
    transform: translateY(-1px);
}

/* Override: use a burgundy (vino borgoña) hover for dashboard buttons and modal action buttons
   so that buttons created dynamically by JS (with .dashboard-btn) show the same hover color */
.dashboard-btn:hover,
.dashboard-btn.primary:hover,
.dashboard-btn.secondary:hover,
.dashboard-btn.btn-outline:hover,
button.dashboard-btn:hover,
.modal-content button:hover,
button.modal-action:hover {
    background-color: #6B0F0F !important; /* borgoña profundo */
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(107,15,15,0.22);
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .dashboard-btn {
        flex: none;
        width: 100%;
    }
}

/* Estilos para modales - Consistente con el diseño del proyecto */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    margin: 5% auto;
    padding: 30px;
    border: 3px solid #f7931a;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(247, 147, 26, 0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.modal-content h2 {
    color: #f7931a;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f7931a;
    padding-bottom: 10px;
}

.close {
    color: #f7931a;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: rgba(247, 147, 26, 0.1);
}

.close:hover,
.close:focus {
    color: #fff;
    background-color: #f7931a;
    transform: scale(1.1);
    text-decoration: none;
}

/* Animaciones para los modales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estilos para formularios dentro de modales */
.modal-content form {
    background-color: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    border-color: #f7931a;
    outline: none;
    box-shadow: 0 0 8px rgba(247, 147, 26, 0.3);
}

.modal-content button {
    width: 100%;
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contenido específico de modales */
.modal-body {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #f7931a;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #e07d0b;
}

/* Estilo para información en modales */
.modal-info {
    background-color: rgba(247, 147, 26, 0.1);
    border: 1px solid #f7931a;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    word-break: break-all;
}

.modal-info p {
    margin: 5px 0;
    line-height: 1.4;
}

.modal-info strong {
    color: #f7931a;
}

/* Estilos para botones dentro de modales que siguen el tema del proyecto */
.modal-content button {
    background-color: #f7931a;
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 8px 4px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 120px;
}

.modal-content button:hover {
    background-color: #e07d0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.4);
}

.modal-content button:active {
    transform: translateY(0);
}

/* Botones de acción específicos */
.modal-content button[type="submit"] {
    background-color: #28a745;
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 16px;
}

.modal-content button[type="submit"]:hover {
    background-color: #218838;
}

.modal-content button.cancel-btn {
    background-color: #dc3545;
}

.modal-content button.cancel-btn:hover {
    background-color: #c82333;
}

/* Mejoras para elementos de lista en modales */
.modal-content ul {
    list-style-type: none;
    padding: 0;
}

.modal-content li {
    background-color: rgba(247, 147, 26, 0.05);
    border: 1px solid rgba(247, 147, 26, 0.2);
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0;
    word-break: break-all;
}

/* Mejoras para código y elementos pre */
.modal-content pre,
.modal-content code {
    background-color: #2d3748;
    color: #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
    border: 1px solid #4a5568;
}

/* JSON/pre blocks that use a light background should explicitly set dark text */
.json-display,
.json-display pre {
    background: #f4f4f4;
    color: #111;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
}

/* Transaction item styles */
.tx-item { list-style: none; }
.tx-label { color: #333; font-weight: 700; }
.tx-id { color: #0b3d2e; background: #eef6f2; padding: 2px 6px; border-radius: 4px; }
.tx-copy-btn { padding: 6px 10px; font-size: 0.9rem; }

.modal-content code {
    padding: 2px 6px;
    display: inline;
}

/* Estados de carga para modales */
.modal-loading {
    text-align: center;
    padding: 20px;
}

.modal-loading::after {
    content: "⏳";
    font-size: 24px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notificaciones toast para feedback rápido */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f7931a;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: slideInFromRight 0.3s ease-out;
    max-width: 300px;
    word-wrap: break-word;
}

.toast-notification.success {
    background-color: #28a745;
}

.toast-notification.error {
    background-color: #dc3545;
}

.toast-notification.warning {
    background-color: #ffc107;
    color: #212529;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mejoras para el diseño responsive */
@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5% auto;
        padding: 15px;
    }
    
    .modal-content h2 {
        font-size: 18px;
    }
    
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    .close {
        font-size: 24px;
        top: 8px;
        right: 12px;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 🧪 Estilos para botones de testing rápido */
.testing-buttons {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #6c757d;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.testing-buttons h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    text-align: center;
}

.test-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 4px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.test-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #218838 0%, #1dc287 100%);
}

.test-btn.clear {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.test-btn.clear:hover {
    background: linear-gradient(135deg, #c82333 0%, #e8650e 100%);
}

.test-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Mejorar placeholders */
input::placeholder, textarea::placeholder {
    color: #6c757d;
    font-style: italic;
    opacity: 0.8;
}

/* Indicador visual para campos opcionales */
input:not([required]), textarea:not([required]) {
    border-left: 4px solid #28a745;
}

input:not([required])::placeholder, textarea:not([required])::placeholder {
    color: #28a745;
}

/* 🔄 Estilos para modal de progreso */
.progress-container {
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-steps {
    margin: 20px 0;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-step {
    display: flex;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.progress-step.completed {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.step-icon {
    margin-right: 10px;
    font-size: 14px;
    min-width: 20px;
}

.step-text {
    font-size: 14px;
    color: #495057;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-message {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    margin: 10px 0 0 0;
}

/* 🎉 Estilos para modal de éxito */
.modal-success {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.modal-success h3 {
    color: #28a745;
    margin: 10px 0;
    font-weight: 600;
}

.modal-success p {
    color: #2d3748;
    margin: 8px 0;
    font-weight: 500;
}

.modal-success strong {
    color: #1a202c;
    font-weight: 600;
}

.modal-success code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #4a5568;
}

.status-success {
    color: #28a745;
    font-weight: bold;
    background: #d4edda;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.modal-details {
    margin-top: 15px;
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.modal-details summary {
    cursor: pointer;
    color: #007bff;
    font-size: 14px;
    margin-bottom: 10px;
}

.json-display {
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-size: 11px;
    overflow-x: auto;
    max-height: 300px;
}

/* 🍷 Header temático para vinos */
.dashboard-header.wine-themed {
    background: none;
    color: #f8f5f0;
    padding: 8px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 
        0 8px 25px rgba(139, 21, 56, 0.3),
        inset 0 1px 0 rgba(248, 245, 240, 0.1);
    position: relative;
    overflow: hidden;
}

.dashboard-header.wine-themed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(184, 134, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 101, 101, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.header-decoration {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.wine-leaf, .wine-bottle {
    font-size: 24px;
    opacity: 0.7;
    animation: gentle-float 3s ease-in-out infinite;
}

.wine-bottle {
    animation-delay: 1.5s;
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.header-content {
    text-align: center;
    flex: 1;
    padding: 0;
    margin: 0;
}

.main-title {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.grape-icon, .blockchain-icon {
    font-size: 0.8em;
    vertical-align: middle;
    margin: 0 8px;
    opacity: 0.9;
}

.master {
    color: #8B1A1A; /* Rojo vino */
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}









.tagline {
    font-size: 0.9em;
    color: #008C45; /* Verde vidrio botella */
    font-style: italic;
    margin-top: 8px;
    opacity: 0.8;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .header-decoration {
        flex-direction: column;
        text-align: center;
    }
    
    .wine-leaf, .wine-bottle {
        display: none;
    }
    
    .main-title {
        font-size: 1.8em;
    }
    
    .elegant-subtitle {
        font-size: 1em;
    }
}

/* 🍷 Mejoras para las tarjetas del dashboard */
.dashboard-card {
    border-top: none;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 21, 56, 0.15);
    border-top-color: #fbbf24;
}

.card-header h2 {
    color: #722f37;
    font-weight: 600;
}

.status-badge {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

/* 🍷 Estilos para el modal QR */
.qr-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qr-info {
    flex: 1;
    min-width: 250px;
}

.qr-info h3 {
    color: #722f37;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #8b1538;
    padding-bottom: 8px;
}

.qr-info p {
    margin: 8px 0;
    font-size: 0.9em;
}

.qr-info strong {
    color: #8b1538;
    font-weight: 600;
}

.qr-code {
    flex: 0 0 auto;
    text-align: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 2px solid #f3f4f6;
}

.qr-code img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* 🔐 Estilos para la información de verificación blockchain */
.verification-info {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.verification-badge {
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
}

.verification-details {
    font-size: 0.85em;
    opacity: 0.9;
    line-height: 1.4;
}

.verification-details small {
    display: block;
    margin: 2px 0;
}

/* Animación sutil para verificación */
.verification-info {
    animation: verificationGlow 2s ease-in-out infinite alternate;
}

@keyframes verificationGlow {
    from {
        box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
    }
    to {
        box-shadow: 0 4px 12px rgba(5, 150, 105, 0.5);
    }
}

.qr-actions .dashboard-btn {
    min-width: 150px;
}

/* Responsive para el modal QR */
@media (max-width: 768px) {
    .qr-container {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-info {
        min-width: 100%;
    }
    
    .qr-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-actions .dashboard-btn {
        width: 100%;
        max-width: 250px;
    }
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA TEST QR PAGE
   ======================================== */

.test-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.test-container h1 {
    text-align: center;
    color: #f7931a;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.test-container > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

/* Status badges específicos */
.status-badge.development {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: white;
}

/* Placeholder info para funciones en desarrollo */
.placeholder-info {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}

.placeholder-info p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Estilos para modales de resultados */
.modal-result {
    font-size: 0.9rem;
    line-height: 1.6;
}

.modal-result.success {
    border-left: 4px solid #28a745;
}

.modal-result.warning {
    border-left: 4px solid #ffc107;
}

.modal-result.error {
    border-left: 4px solid #dc3545;
}

.modal-result.development {
    border-left: 4px solid #6f42c1;
}

.modal-result.loading {
    border-left: 4px solid #007bff;
}

/* Grid de información en modales */
.info-grid {
    display: grid;
    gap: 8px;
    margin: 15px 0;
}

.info-grid p {
    margin: 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8rem;
}

.info-grid strong {
    color: #495057;
}

/* Status cards para sistema */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.status-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f7931a;
}

.status-card h4 {
    margin: 0 0 10px 0;
    color: #f7931a;
    font-size: 0.9rem;
}

.status-card p {
    margin: 5px 0;
    font-size: 0.8rem;
}

/* Estados de verificación */
.verification-success,
.verification-pending,
.verification-error {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.verification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.verification-pending {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.verification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Status confirmados */
.status-confirmed,
.status-pending,
.status-error {
    background: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

/* Lista de estados */
.status-list {
    margin: 15px 0;
}

.status-item {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-item.success {
    background: #d4edda;
    color: #155724;
}

.status-item.warning {
    background: #fff3cd;
    color: #856404;
}

.status-item.error {
    background: #f8d7da;
    color: #721c24;
}

/* Loading spinner */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f7931a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Información de desarrollo */
.development-info h3 {
    color: #6f42c1;
    margin: 15px 0 10px 0;
    font-size: 0.9rem;
}

.development-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.development-info li {
    margin: 5px 0;
    font-size: 0.8rem;
}

/* Información del sistema */
.system-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

/* Responsive para test page */
@media (max-width: 768px) {
    .test-container {
        padding: 15px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .test-container h1 {
        font-size: 1.4rem;
    }
}

/* Eliminar scroll horizontal en el modal de wallet */
#walletModalBody, .modal-body {
  overflow-x: hidden !important;
  max-width: 100%;
  box-sizing: border-box;
}