/**
 * ================================================================================
 * CO-READIT - Admin Wallet Styles
 * ================================================================================
 * 
 * Styles for admin wallet management pages.
 * 
 * @author      Edu Brazeal
 * @version     1.0.0
 * ================================================================================
 */

/* ========== Page Header ========== */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    margin: 0.5rem 0;
}

.page-description {
    margin: 0.25rem 0 0 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.header-actions .badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

/* ========== Stats Grid ========== */
.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card-warning {
    border-left: 4px solid #f59e0b;
}

.stat-card-success {
    border-left: 4px solid #10b981;
}

.stat-card-danger {
    border-left: 4px solid #ef4444;
}

/* ========== Section Header ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    margin: 0;
}

.link-view-all {
    font-size: 0.875rem;
    color: #4f46e5;
}

/* ========== Data Table ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.data-table th {
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background: #f9fafb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

/* ========== User Cell ========== */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-cell .username {
    display: block;
    font-weight: 500;
    color: #111827;
}

.user-cell .user-email {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* ========== Amount Cell ========== */
.amount-cell {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.amount-cell.credit {
    color: #10b981;
}

.amount-cell.debit {
    color: #ef4444;
}

/* ========== Status & Type Badges ========== */
.status-badge,
.type-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-completed {
    background: #d1fae5;
    color: #047857;
}

.status-approved {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-rejected,
.status-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.status-processing {
    background: #e0e7ff;
    color: #4338ca;
}

.type-badge {
    background: #f3f4f6;
    color: #374151;
}

.type-topup {
    background: #d1fae5;
    color: #047857;
}

.type-withdrawal {
    background: #fee2e2;
    color: #b91c1c;
}

.type-transfer_in {
    background: #dbeafe;
    color: #1d4ed8;
}

.type-transfer_out {
    background: #fef3c7;
    color: #b45309;
}

.type-admin_credit {
    background: #d1fae5;
    color: #047857;
}

.type-admin_debit {
    background: #fee2e2;
    color: #b91c1c;
}

/* ========== Filters Bar ========== */
.filters-bar {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #4f46e5;
}

/* ========== Table Info ========== */
.table-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* ========== Quick Actions Grid ========== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.action-card svg {
    width: 32px;
    height: 32px;
    color: #4f46e5;
}

.action-card span {
    font-weight: 500;
}

/* ========== Gateways Grid ========== */
.gateways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gateway-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.gateway-card.enabled {
    border-color: #10b981;
}

.gateway-card.disabled {
    opacity: 0.6;
}

.gateway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f9fafb;
}

.gateway-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.gateway-body {
    padding: 1.25rem;
}

.gateway-body h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.gateway-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}

.gateway-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gateway-info .info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.gateway-info .info-row span:first-child {
    color: #6b7280;
}

.gateway-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
}

/* ========== Toggle Switch ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ========== Settings Form ========== */
.settings-form {
    max-width: 1400px;
}

.settings-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h3 .section-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 640px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.input-with-prefix {
    position: relative;
}

.input-with-prefix .prefix {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.input-with-prefix input {
    padding-left: 2rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ========== Info Section ========== */
.info-section {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.info-section h3 {
    color: #0369a1;
}

.gateway-docs h4 {
    margin: 1rem 0 0.5rem;
    font-size: 0.9375rem;
}

.gateway-docs ul {
    margin: 0;
    padding-left: 1.25rem;
}

.gateway-docs li {
    margin-bottom: 0.375rem;
}

.gateway-docs a {
    color: #0369a1;
}

/* ========== Modal Styles ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.text-warning {
    color: #b45309;
    font-size: 0.875rem;
}

.text-muted {
    color: #9ca3af;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.pagination-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}


/* ========== User Search Styles ========== */
.user-search-wrapper {
    position: relative;
}

.user-search-wrapper input {
    width: 100%;
}

.user-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.user-search-results.active {
    display: block;
}

.user-search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.user-search-item:last-child {
    border-bottom: none;
}

.user-search-item:hover {
    background: #f9fafb;
}

.user-search-item .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-search-item .user-info {
    flex: 1;
    min-width: 0;
}

.user-search-item .username {
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.user-search-item .user-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.user-search-empty {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.selected-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.selected-user-name {
    flex: 1;
    font-weight: 600;
    color: #059669;
    font-size: 0.875rem;
}

.btn-clear {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0 0.25rem;
    line-height: 1;
}

.btn-clear:hover {
    color: #ef4444;
}

/* ========== Confirmation Modal ========== */
#confirm-action-modal {
    z-index: 9999 !important; /* Above other modals */
}

#confirm-action-modal .modal-overlay {
    z-index: 9999 !important;
}

#confirm-action-modal .modal-content {
    z-index: 10000 !important;
}

.confirm-modal-content {
    max-width: 400px;
    text-align: center;
}

.confirm-modal-body {
    padding: 2rem 1.5rem;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
}

.confirm-icon-warning {
    background: #fef3c7;
    color: #f59e0b;
}

.confirm-icon-danger {
    background: #fee2e2;
    color: #ef4444;
}

.confirm-icon-success {
    background: #d1fae5;
    color: #10b981;
}

.confirm-icon-info {
    background: #dbeafe;
    color: #3b82f6;
}

.confirm-message {
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.confirm-message small {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
}

#confirm-action-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

#confirm-action-modal .modal-header h3 {
    width: 100%;
    text-align: center;
    padding-right: 2rem;
}

#confirm-action-modal .modal-footer {
    justify-content: center;
    border-top: none;
    padding-top: 0;
}

#confirm-action-modal .btn {
    min-width: 100px;
}

.btn-success {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

/* ========== Info Section & Gateway Docs ========== */
.info-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.info-section h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary, #1f2937);
}

.info-section > p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary, #6b7280);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
}

.info-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.info-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.gateway-docs {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.gateway-docs h4 {
    margin: 0 0 1rem 0;
    font-size: 0.9375rem;
}

.gateway-docs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gateway-docs a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.875rem;
}

.gateway-docs a:hover {
    text-decoration: underline;
}

/* ========== Notification Toast ========== */
.notification {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    margin-left: auto;
}

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

/* ========== Withdrawal Methods Grid (Settings Page) ========== */
.section-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: -0.5rem 0 1.5rem 0;
}

.section-description a {
    color: #4f46e5;
}

.withdrawal-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.withdrawal-method-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.withdrawal-method-item:hover {
    border-color: #d1d5db;
    background: white;
}

.method-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: white;
    padding: 4px;
}

.method-details {
    display: flex;
    flex-direction: column;
}

.method-name {
    font-weight: 600;
    color: #111827;
}

.method-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.method-toggles {
    display: flex;
    gap: 2rem;
}

.toggle-with-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #374151;
}

.switch-sm {
    width: 40px;
    height: 22px;
}

.switch-sm .slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
}

.switch-sm input:checked + .slider:before {
    transform: translateX(18px);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.empty-state a {
    color: #4f46e5;
}

/* ========== User Wallet Header ========== */
.user-wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-profile-large {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-xl {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.user-details h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: #111827;
}

.user-details .email {
    margin: 0 0 0.25rem 0;
    color: #4f46e5;
    font-size: 0.9375rem;
}

.user-details .meta {
    margin: 0;
    color: #6b7280;
    font-size: 0.8125rem;
}

.wallet-balance-large {
    text-align: right;
}

.wallet-balance-large .label {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.wallet-balance-large .amount {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
}

@media (max-width: 640px) {
    .user-wallet-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .user-profile-large {
        flex-direction: column;
    }
    
    .wallet-balance-large {
        text-align: center;
    }
}

/* ========== Detail Grid Layout (Withdrawal Details) ========== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    align-items: start;
}

.detail-main {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-main h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.125rem;
    color: #111827;
}

.detail-main h4 {
    margin: 1.5rem 0 1rem 0;
    font-size: 0.9375rem;
    color: #374151;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.detail-sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-sidebar h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #111827;
}

.detail-sidebar h4 {
    margin: 1.25rem 0 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: #6b7280;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.detail-row .value {
    color: #111827;
    font-weight: 500;
    text-align: right;
}

.detail-row .value.amount {
    font-size: 1.125rem;
    color: #059669;
}

/* User Profile Card in Sidebar */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-card .user-info {
    flex: 1;
    min-width: 0;
}

.user-profile-card .username {
    display: block;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-card .username:hover {
    text-decoration: underline;
}

.user-profile-card .email {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mini Transaction Table in Sidebar */
.mini-table {
    font-size: 0.8125rem;
}

.mini-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.mini-row:last-child {
    border-bottom: none;
}

.mini-row .type {
    flex: 1;
    color: #374151;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.mini-row .amount {
    font-weight: 600;
    font-size: 0.8125rem;
}

.mini-row .amount.positive {
    color: #059669;
}

.mini-row .amount.negative {
    color: #dc2626;
}

.mini-row .date {
    color: #9ca3af;
    font-size: 0.75rem;
}

.view-all-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #4f46e5;
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Payment Details Box */
.payment-details {
    background: #f9fafb;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.payment-details .detail-row {
    padding: 0.375rem 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.action-buttons .btn .icon {
    width: 16px;
    height: 16px;
    margin-right: 0.375rem;
    fill: currentColor;
}

/* Responsive Detail Grid */
@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-sidebar {
        order: -1;
    }
}

@media (max-width: 640px) {
    .withdrawal-method-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .method-toggles {
        width: 100%;
        justify-content: space-between;
    }
}

/* ========== Gateway Edit Page Enhancements ========== */

/* Stripe Mode Section */
.stripe-mode-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stripe-mode-section:first-of-type {
    border-left: 3px solid #f59e0b;
}

.stripe-mode-section:last-of-type {
    border-left: 3px solid #10b981;
}

/* Subsection Title */
.subsection-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

/* Test/Live Badges */
.test-badge,
.live-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.test-badge {
    background: #fef3c7;
    color: #b45309;
}

.live-badge {
    background: #d1fae5;
    color: #047857;
}

/* Info Box */
.info-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.info-box strong {
    display: block;
    font-size: 0.8125rem;
    color: #1e40af;
    margin-bottom: 0.375rem;
}

.info-box code {
    display: block;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8125rem;
    color: #1e3a8a;
    word-break: break-all;
    margin-bottom: 0.75rem;
}

.info-box .info-text {
    margin: 0;
    font-size: 0.8125rem;
    color: #3b82f6;
    line-height: 1.5;
}

.info-box .info-text code {
    display: inline;
    padding: 0.125rem 0.375rem;
    margin: 0 0.125rem;
    background: #dbeafe;
    border: none;
    font-size: 0.75rem;
}

/* Form Group Small Text */
.form-group small {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Section Description */
.section-description {
    margin: -0.5rem 0 1.25rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}
