/* ============================================
   AutoWithdraw — Custom Professional Styles
   ============================================ */

/* --- Stat Cards with colored left accent --- */
.stat-card {
    position: relative;
    border: none;
    border-radius: .625rem;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}
.stat-card.accent-primary::before  { background: #506fd9; }
.stat-card.accent-warning::before  { background: #f5a623; }
.stat-card.accent-success::before  { background: #0cb785; }
.stat-card.accent-danger::before   { background: #dc3545; }
.stat-card.accent-info::before     { background: #0dcaf0; }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.stat-icon.bg-primary-soft  { background: rgba(80,111,217,.12); color: #506fd9; }
.stat-icon.bg-warning-soft  { background: rgba(245,166,35,.12); color: #f5a623; }
.stat-icon.bg-success-soft  { background: rgba(12,183,133,.12); color: #0cb785; }
.stat-icon.bg-danger-soft   { background: rgba(220,53,69,.12);  color: #dc3545; }
.stat-icon.bg-info-soft     { background: rgba(13,202,240,.12); color: #0dcaf0; }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1b1642;
}
.stat-card .stat-label {
    font-size: .8125rem;
    font-weight: 600;
    color: #41465a;
    margin-bottom: 2px;
}
.stat-card .stat-sub {
    font-size: .75rem;
    color: #8e94a5;
}

/* --- Filter bar --- */
.filter-bar {
    background: #f8f9fc;
    border: 1px solid #e2e5ec;
    border-radius: .5rem;
    padding: .625rem 1rem;
}
.filter-bar .form-control,
.filter-bar .form-select {
    font-size: .8125rem;
    border-color: #dce0e8;
}
.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
    border-color: #506fd9;
    box-shadow: 0 0 0 .15rem rgba(80,111,217,.15);
}

/* --- Better table --- */
.table-modern thead th {
    background: #f8f9fc;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6e7687;
    border-bottom: 2px solid #e2e5ec;
    padding: .625rem .75rem;
    white-space: nowrap;
}
.table-modern tbody td {
    font-size: .8125rem;
    padding: .625rem .75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f1f5;
    color: #41465a;
}
.table-modern tbody tr:hover {
    background: #f8f9fc;
}
.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* --- Status badges --- */
.badge-status {
    font-size: .6875rem;
    font-weight: 600;
    padding: .3em .65em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* --- Action buttons --- */
.btn-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .375rem;
    border: 1px solid #e2e5ec;
    background: #fff;
    color: #6e7687;
    transition: all .15s ease;
    font-size: 14px;
}
.btn-action:hover {
    background: #f0f1f5;
    color: #1b1642;
    border-color: #d0d4dd;
}
.btn-action.btn-action-danger:hover {
    background: #fff5f5;
    color: #dc3545;
    border-color: #f5c2c7;
}
.btn-action.btn-action-success:hover {
    background: #ecfbf6;
    color: #0cb785;
    border-color: #a3e4d3;
}

/* --- Card improvements --- */
.card-one {
    border: 1px solid #e2e5ec;
    border-radius: .625rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card-one .card-header {
    background: transparent;
    border-bottom: 1px solid #f0f1f5;
    padding: 1rem 1.25rem;
}
.card-one .card-header .card-title {
    font-size: .9375rem;
    font-weight: 600;
    color: #1b1642;
    margin: 0;
}

/* --- Pagination --- */
.pagination .page-link {
    font-size: .8125rem;
    border-radius: .375rem;
    margin: 0 2px;
    border: 1px solid #e2e5ec;
    color: #506fd9;
    padding: .35rem .7rem;
}
.pagination .page-item.active .page-link {
    background: #506fd9;
    border-color: #506fd9;
}

/* --- Empty state --- */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}
.empty-state i {
    font-size: 3rem;
    color: #d0d4dd;
    margin-bottom: .75rem;
}
.empty-state p {
    font-size: .875rem;
    color: #8e94a5;
    margin: 0;
}

/* --- Monospace IDs --- */
.cell-id {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: .75rem;
    color: #6e7687;
}

/* --- Amount cell --- */
.cell-amount {
    font-weight: 600;
    color: #1b1642;
    white-space: nowrap;
}

/* --- Tooltip on truncate --- */
.text-truncate-cell {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Toast / SweetAlert theme --- */
.swal2-popup {
    font-size: .875rem !important;
    border-radius: .625rem !important;
}

/* --- Login page enhancements --- */
.page-sign .card-sign {
    border-radius: .75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    border: none;
}
.page-sign .header-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

/* --- Sidebar active glow --- */
.sidebar .nav-link.active {
    position: relative;
}
.sidebar .nav-link.active::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #506fd9;
    border-radius: 3px 0 0 3px;
}

/* --- Section header in cards --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1b1642;
    margin: 0;
}

/* --- Responsive helper --- */
@media (max-width: 767.98px) {
    .stat-card .stat-value { font-size: 1.375rem; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 18px; }
    .filter-bar .row { gap: .5rem; }
}

/* --- Attention (orange) badge --- */
.bg-orange {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

/* --- Manual approve modal --- */
.approve-detail dt {
    font-size: .75rem;
    color: #8e94a5;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.approve-detail dd {
    font-size: .875rem;
    color: #1b1642;
    margin-bottom: .75rem;
}
