/* SatoshiFi Admin SPV Panel Styles */

/* Bitcoin Address Input */
.bitcoin-address-section {
    margin-bottom: 2rem;
}

.address-input-group {
    display: flex;
    gap: 0.75rem;
}

.address-input-group input {
    flex: 1;
    font-family: 'Courier New', monospace;
}

.address-display {
    padding: 1rem;
    background: var(--satoshi-light-gray);
    border-radius: 0.5rem;
    border-left: 4px solid var(--satoshi-orange);
    margin-top: 1rem;
}

.address-display code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    color: var(--satoshi-black);
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.step {
    padding: 1rem;
    background: var(--satoshi-light-gray);
    border-radius: 0.5rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.step.active {
    border-color: var(--satoshi-orange);
    background: rgba(247, 147, 26, 0.1);
}

.step.completed {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.step-number {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--satoshi-border);
    color: var(--satoshi-white);
    font-weight: 700;
    line-height: 2rem;
    margin-bottom: 0.5rem;
}

.step.active .step-number {
    background: var(--satoshi-orange);
}

.step.completed .step-number {
    background: #28a745;
}

.step-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--satoshi-text);
}

/* Block Cards */
.blocks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.block-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--satoshi-white);
    border: 2px solid var(--satoshi-border);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.block-card:hover {
    border-color: var(--satoshi-orange);
    box-shadow: 0 2px 8px rgba(247, 147, 26, 0.15);
}

.block-card.mature {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.block-card.pending {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.block-info {
    flex: 1;
}

.block-hash {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--satoshi-black);
    margin-bottom: 0.25rem;
}

.block-meta {
    font-size: 0.75rem;
    color: var(--satoshi-dark-gray);
}

.block-actions {
    display: flex;
    gap: 0.5rem;
}

/* UTXO Cards */
.utxo-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.utxo-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--satoshi-white);
    border: 2px solid var(--satoshi-border);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.utxo-card.ready {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.utxo-card.pending {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.utxo-card.distributed {
    border-color: var(--satoshi-border);
    background: var(--satoshi-gray);
    opacity: 0.7;
}

.utxo-info {
    flex: 1;
}

.utxo-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--satoshi-black);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.utxo-details {
    font-size: 0.875rem;
    color: var(--satoshi-dark-gray);
}

.utxo-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.utxo-status.ready {
    background: #28a745;
    color: white;
}

.utxo-status.pending {
    background: #ffc107;
    color: #333;
}

.utxo-status.distributed {
    background: var(--satoshi-dark-gray);
    color: white;
}

/* Distribution Preview */
.distribution-preview {
    margin-top: 1.5rem;
}

.distribution-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--satoshi-light-gray);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

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

.summary-label {
    font-size: 0.75rem;
    color: var(--satoshi-dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--satoshi-black);
}

.recipients-table {
    max-height: 400px;
    overflow-y: auto;
}

/* Confirmations Counter */
.confirmations {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--satoshi-light-gray);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.confirmations.mature {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.confirmations.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #f57c00;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--satoshi-dark-gray);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state small {
    font-size: 0.875rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--satoshi-border);
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--satoshi-orange) 0%, #e07f00 100%);
    transition: width 0.3s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--satoshi-border);
    background: var(--satoshi-light-gray);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--satoshi-black);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--satoshi-border);
    background: var(--satoshi-light-gray);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--satoshi-dark-gray);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--satoshi-border);
    color: var(--satoshi-black);
}

/* Header & Navigation for Admin Pages */
header {
    background: var(--satoshi-white);
    border-bottom: 2px solid var(--satoshi-border);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--satoshi-black);
}

.subtitle {
    display: block;
    font-size: 0.875rem;
    color: var(--satoshi-dark-gray);
    font-weight: 400;
    margin-top: 0.25rem;
}

nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    padding: 0.5rem 1rem;
    color: var(--satoshi-text);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-weight: 500;
}

nav a:hover {
    background: var(--satoshi-light-gray);
}

nav a.active {
    background: var(--satoshi-orange);
    color: var(--satoshi-white);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--satoshi-light-gray);
    border-radius: 0.5rem;
}

#userAddress {
font-family: 'Courier New', monospace;
font-size: 0.875rem;
color: var(--satoshi-text);
}

/* Card Component */
.card {
    background: var(--satoshi-white);
    border: 1px solid var(--satoshi-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--satoshi-black);
}

/* Not Connected State */
.not-connected {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.not-connected .card {
    max-width: 400px;
    text-align: center;
}

.not-connected h2 {
    margin-bottom: 1rem;
}

.not-connected p {
    margin-bottom: 1.5rem;
    color: var(--satoshi-dark-gray);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--satoshi-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--satoshi-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--satoshi-orange);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.1);
}

.hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--satoshi-dark-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .process-steps {
        grid-template-columns: 1fr;
    }

    .block-card,
    .utxo-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .block-actions,
    .utxo-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .block-actions button,
    .utxo-actions button {
        flex: 1;
    }

    .distribution-summary {
        grid-template-columns: 1fr;
    }

    .address-input-group {
        flex-direction: column;
    }
}
