/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000; /* default modal stacking */
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal .dialog {
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    margin: 20px;
}

.accounts-table .action-btn { padding:6px 8px; display:inline-flex; align-items:center; justify-content:center; }
.accounts-table .action-btn i { margin-right:0; }

/* Ensure accounts modal and add-account modal stacking order */
#accountsDetailModal { z-index: 1000; }
#addAccountModal { z-index: 100; }

.dialog-head {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-head h2 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.accounts-table {
    width: 100%;
    border-collapse: collapse;
}

.accounts-table th,
.accounts-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accounts-table th:last-child,
.accounts-table td:last-child {
    text-align: right;
}

.accounts-table button {
    padding: 6px 12px;
    margin-left: 8px;
}

.accounts-table i {
    margin-right: 6px;
}

/* Add spacing between icon and text in buttons */
.btn i {
    margin-right: 6px;
}