/* assets/css/style.css */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --radius: 10px;
    --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, sans-serif; background: #f0f4f8; color: var(--gray-800); font-size: 14px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--white); border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar-logo { padding: 20px; border-bottom: 1px solid var(--gray-200); }
.sidebar-logo h1 { font-size: 18px; font-weight: 700; color: var(--primary); }
.sidebar-logo span { font-size: 11px; color: var(--gray-400); }
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--gray-600); font-size: 13px; font-weight: 500; border-left: 3px solid transparent; transition: all .15s; }
.nav-item:hover, .nav-item.active { background: #eff6ff; color: var(--primary); border-left-color: var(--primary); text-decoration: none; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-section { padding: 8px 20px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: var(--gray-400); font-weight: 600; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--gray-200); font-size: 12px; }
.main { margin-left: 240px; flex: 1; }
.topbar { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.topbar h2 { font-size: 16px; font-weight: 600; }
.content { padding: 28px; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--gray-400); font-weight: 500; margin-bottom: 6px; }
.stat-card .value { font-size: 22px; font-weight: 700; color: var(--gray-800); }
.stat-card .sub { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.stat-card.blue .value { color: var(--primary); }
.stat-card.green .value { color: var(--success); }
.stat-card.orange .value { color: var(--warning); }
.stat-card.red .value { color: var(--danger); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all .15s; line-height: 1; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #eff6ff; text-decoration: none; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--gray-800); }
.form-label .req { color: var(--danger); }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 13px; background: var(--white); transition: border .15s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Badges / Status */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-paid { background: #dbeafe; color: #1e40af; }
.badge-verified { background: #d1fae5; color: #065f46; }
.badge-shipped { background: #e0e7ff; color: #3730a3; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-disputed { background: #fee2e2; color: #991b1b; }
.badge-refunded { background: #f3f4f6; color: #374151; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); border-bottom: 2px solid var(--gray-200); }
td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--primary); }
.timeline-item .time { font-size: 11px; color: var(--gray-400); margin-bottom: 2px; }
.timeline-item .action { font-size: 13px; font-weight: 500; }
.timeline-item .desc { font-size: 12px; color: var(--gray-600); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 3px solid var(--success); }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--danger); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 3px solid var(--warning); }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 3px solid var(--primary); }

/* Transaction Card (public) */
.tx-card { max-width: 620px; margin: 0 auto; }
.tx-amount { font-size: 36px; font-weight: 800; color: var(--gray-800); }
.tx-steps { display: flex; gap: 0; margin: 24px 0; }
.tx-step { flex: 1; text-align: center; position: relative; }
.tx-step::after { content: ''; position: absolute; top: 15px; left: 50%; right: -50%; height: 2px; background: var(--gray-200); z-index: 0; }
.tx-step:last-child::after { display: none; }
.tx-step .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--gray-400); margin: 0 auto 6px; position: relative; z-index: 1; }
.tx-step.done .dot { background: var(--success); color: #fff; }
.tx-step.active .dot { background: var(--primary); color: #fff; }
.tx-step .label { font-size: 11px; color: var(--gray-400); font-weight: 500; }
.tx-step.active .label { color: var(--primary); font-weight: 600; }
.tx-step.done .label { color: var(--success); }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%); padding: 20px; }
.auth-box { background: var(--white); border-radius: 16px; box-shadow: var(--shadow-md); padding: 36px 40px; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 24px; font-weight: 800; color: var(--primary); }
.auth-logo p { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-240px); transition: transform .3s; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); padding: 28px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* Copy button */
.copy-box { background: var(--gray-50); border: 1px dashed var(--gray-200); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: monospace; font-size: 14px; }
.copy-btn { background: var(--primary); color: #fff; border: none; padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; white-space: nowrap; }
.copy-btn:hover { background: var(--primary-dark); }
