/* ── Design tokens ──────────────────────────────────────────── */
:root {
    --dash-accent: #23b7e5;
    --dash-accent-dark: #1ea5d0;
    --dash-text: #363f44;
    --dash-muted: #98a6ad;
    --dash-border: #e6e9f0;
    --dash-border-soft: #eef1f3;
    --dash-bg: #f5f6f8;
    --dash-radius: 10px;
    --dash-font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Dashboard Menu */
section.breadcrumb-area { display: none !important; }
.dashboard_menu_area { background: #fff; border-bottom: 1px solid #eee; }

/* Footer always at bottom */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > section.dashboard-area { flex: 1 0 auto; }
footer { flex-shrink: 0; }
.dashboard_menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dashboard_menu li { flex: 0 0 auto; }
.dashboard_menu li a { display: block; padding: 12px 18px; font-size: 14px; color: #555; text-decoration: none; border-bottom: 2px solid transparent; transition: all .15s; white-space: nowrap; }
.dashboard_menu li a:hover { color: #23b7e5; border-bottom-color: #23b7e5; }
.dashboard_menu li a:focus-visible { outline: 2px solid #23b7e5; outline-offset: -2px; border-radius: 2px; }
.dashboard_menu li a span { margin-right: 6px; }
.dashboard_menu li.active a,
.dashboard_menu li a[aria-current="page"] { color: #23b7e5; border-bottom-color: #23b7e5; font-weight: 600; }

/* Dashboard Shared Styles */
body { padding-top: 100px; background: #f5f6f8; }
@media (max-width: 767px) { body { padding-top: 50px; } }
#content { padding: 5px 0 50px; }

/* Page Header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 32px; font-weight: 300; color: #363f44; margin: 0; }
.page-header-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Cards */
.dash-card { background: #fff; border: 1px solid #e6e9f0; border-radius: 10px; margin-bottom: 24px; overflow: hidden; }
.dash-card-header { padding: 18px 24px; border-bottom: 1px solid #eef1f3; display: flex; align-items: center; justify-content: space-between; }
.dash-card-header h2 { font-size: 18px; font-weight: 700; color: #363f44; margin: 0; }
.dash-card-body { padding: 24px; }

/* Tables */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th { padding: 12px 20px; text-align: left; font-size: 12px; font-weight: 700; color: #98a6ad; text-transform: uppercase; letter-spacing: .04em; background: #fafbfc; border-bottom: 1px solid #eef1f3; }
.dash-table td { padding: 14px 20px; font-size: 14px; color: #363f44; border-bottom: 1px solid #f2f4f5; vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table tr:hover td { background: #f9fafb; }

/* Badges */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-active { background: #e8f7fc; color: #23b7e5; }
.badge-pending { background: #fff4e8; color: #ff902b; }
.badge-deleted { background: #fdeeee; color: #f05050; }
.badge-success { background: #eef9f0; color: #27c24c; }
.badge-info { background: #e8f7fc; color: #23b7e5; }
.badge-warning { background: #fff4e8; color: #ff902b; }
.badge-danger { background: #fdeeee; color: #f05050; }
.badge-paid { background: #e8f7fc; color: #23b7e5; }
.badge-rejected { background: #fdeeee; color: #f05050; }
.badge-paypal { background: #e0f2fe; color: #0284c7; }
.badge-stripe { background: #ede9fe; color: #7c3aed; }
.badge-manual { background: #fef3c7; color: #d97706; }
.badge-completed { background: #dcfce7; color: #16a34a; }

/* Buttons */
.dash-btn { padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; }
.dash-btn-primary { background: #23b7e5; color: #fff; }
.dash-btn-primary:hover { background: #1ea5d0; color: #fff; }
.dash-btn-outline { border: 1px solid #dee5e7; color: #58666e; background: #fff; }
.dash-btn-outline:hover { border-color: #23b7e5; color: #23b7e5; }
.dash-btn-danger { background: #f05050; color: #fff; }
.dash-btn-danger:hover { background: #d94444; color: #fff; }
.dash-btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 6px; }
.dash-btn:focus-visible { outline: 2px solid #23b7e5; outline-offset: 2px; }

/* Action Buttons */
.action-btns { display: flex; gap: 6px; align-items: center; }
.action-btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid #e6e9f0; background: #fff; display: flex; align-items: center; justify-content: center; color: #98a6ad; font-size: 14px; text-decoration: none; transition: all .15s; }
.action-btn:hover { border-color: #23b7e5; color: #23b7e5; background: #f0f9fc; }
.action-btn.danger:hover { border-color: #f05050; color: #f05050; background: #fef5f5; }
.action-btn:focus-visible { outline: 2px solid #23b7e5; outline-offset: 2px; }

/* Forms */
.dash-form-group { margin-bottom: 16px; }
.dash-form-group label { display: block; font-size: 13px; font-weight: 600; color: #363f44; margin-bottom: 6px; }
.dash-form-control { width: 100%; padding: 10px 14px; border: 1px solid #dee5e7; border-radius: 6px; font-size: 14px; color: #363f44; outline: none; transition: border-color .15s; }
.dash-form-control:focus { border-color: #23b7e5; }
.dash-form-select { width: 100%; padding: 10px 14px; border: 1px solid #dee5e7; border-radius: 6px; font-size: 14px; color: #363f44; background: #fff; outline: none; cursor: pointer; }
.dash-form-select:focus { border-color: #23b7e5; }

/* Filter */
.filter-select { padding: 8px 14px; border: 1px solid #dee5e7; border-radius: 6px; font-size: 14px; color: #363f44; background: #fff; outline: none; cursor: pointer; }
.filter-select:focus { border-color: #23b7e5; }

/* Empty State */
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state i { font-size: 48px; color: #d0d5dd; margin-bottom: 16px; display: block; }
.empty-state h4 { color: #363f44; font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.empty-state p { font-size: 15px; color: #98a6ad; margin: 0; }
.empty-state .btn { margin-top: 16px; }

/* Stats Cards */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.dash-stat { background: #fff; border: 1px solid #e6e9f0; border-radius: 10px; padding: 22px; transition: transform .15s, box-shadow .15s; }
.dash-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(48,48,66,.07); }
.dash-stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.dash-stat-label { font-size: 13px; color: #98a6ad; }
.dash-stat-value { font-size: 26px; font-weight: 800; color: #363f44; line-height: 1; margin-bottom: 4px; }
.dash-stat-desc { font-size: 12px; color: #98a6ad; }

/* Horizontal stat variant (sales / earnings) */
.dash-stat-h { display: flex; align-items: center; gap: 14px; padding: 16px 20px; min-height: 0; }
.dash-stat-h .dash-stat-icon { flex-shrink: 0; }
.dash-stat-h .dash-stat-body { display: flex; flex-direction: column; min-width: 0; }
.dash-stat-h .dash-stat-value { font-size: 20px; font-weight: 700; color: #1a1f36; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stat-h .dash-stat-label { font-size: 11.5px; color: #6b7280; font-weight: 500; margin-top: 1px; }

/* Stat icon tints */
.icon-blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.icon-green { background: rgba(34,197,94,0.1); color: #22c55e; }
.icon-purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.icon-orange { background: rgba(249,115,22,0.1); color: #f97316; }
.icon-teal { background: rgba(20,184,166,0.1); color: #14b8a6; }
.icon-pink { background: rgba(236,72,153,0.1); color: #ec4899; }
.icon-yellow { background: rgba(234,179,8,0.1); color: #eab308; }

/* Toast */
.dash-toast { position: fixed; top: 80px; right: 24px; z-index: 9999; background: #363f44; color: #fff; padding: 14px 22px; border-radius: 10px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transform: translateX(120%); transition: transform .3s ease; }
.dash-toast.show { transform: translateX(0); }
.dash-toast i { color: #27c24c; }

/* Dropdown */
.dash-dropdown { position: relative; display: inline-block; }
.dash-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid #e6e9f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.1); min-width: 200px; z-index: 100; overflow: hidden; }
.dash-dropdown-menu.show { display: block; }
.dash-dropdown-menu a { display: block; padding: 10px 16px; font-size: 14px; color: #363f44; text-decoration: none; transition: background .1s; }
.dash-dropdown-menu a:hover { background: #f5f6f8; color: #23b7e5; }

/* Alerts */
.dash-alert { padding: 14px 20px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.dash-alert-success { background: #eef9f0; color: #27c24c; border: 1px solid #c3edd0; }
.dash-alert-danger { background: #fdeeee; color: #f05050; border: 1px solid #f5c6c6; }
.dash-alert-warning { background: #fff4e8; color: #ff902b; border: 1px solid #ffe0b2; }

/* Item Name Cell */
.item-name-cell { display: flex; align-items: center; gap: 14px; }
.item-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; border: 1px solid #eef1f3; flex-shrink: 0; }
.item-name { font-weight: 600; color: #363f44; text-decoration: none; }
.item-name:hover { color: #23b7e5; }

/* ── Account page hero ─────────────────────────────────────── */
.dash-hero {
    background: url('../img/backgrounds/header-dash.jpg') no-repeat center center;
    background-size: cover;
    padding: 40px 0;
    margin-bottom: 0;
}
.dash-hero h1 { font-size: 28px; font-weight: 300; color: #fff; margin: 0; }

/* ── Account page content ──────────────────────────────────── */
.dash-content { padding-top: 24px; padding-bottom: 60px; }
.dash-content .container > .row { margin-bottom: 24px; }

/* ── Section title inside a card ───────────────────────────── */
.dash-section-title { font-size: 16px; font-weight: 700; color: #363f44; margin: 0 0 16px; }

/* ── Radio option list (withdraw / payment methods) ────────── */
.option-list { list-style: none; padding: 0; margin: 0; }
.option-list > li { padding: 12px 0; border-bottom: 1px solid #f2f4f5; }
.option-list > li:last-child { border-bottom: none; }
.option-item { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.option-item input[type="radio"] { accent-color: #23b7e5; width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.option-item input[type="radio"]:focus-visible { outline: 2px solid #23b7e5; outline-offset: 2px; }
.option-item label { margin: 0; font-size: 14px; font-weight: 500; color: #363f44; cursor: pointer; }

/* ── Collapsible amount / detail fields ────────────────────── */
.amount-fields { display: none; padding: 12px 0 4px 26px; }
.amount-fields.open { display: block; }
.amount-fields .dash-form-group { margin-bottom: 12px; }
.amount-fields small { color: #98a6ad; line-height: 1.5; }
.amount-fields small strong { display: block; margin-bottom: 4px; }

/* ── Deposit amount cards ──────────────────────────────────── */
.amount-cards { display: flex; flex-wrap: wrap; gap: 14px; }
.amount-card { flex: 1 1 160px; max-width: 210px; position: relative; }
.amount-card input { position: absolute; opacity: 0; pointer-events: none; }
.amount-card label {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 18px 14px; background: #fff; border: 2px solid #e6e9f0; border-radius: 10px;
    cursor: pointer; transition: all .15s; text-align: center; height: 100%;
}
.amount-card label:hover { border-color: #b8c2cc; }
.amount-card input:checked + label { border-color: #23b7e5; background: #f0f9fc; }
.amount-card input:focus-visible + label { outline: 2px solid #23b7e5; outline-offset: 2px; }
.amount-card h2 { font-size: 20px; font-weight: 700; color: #363f44; margin: 0 0 4px; }
.amount-card p { font-size: 12.5px; color: #98a6ad; margin: 0; }

/* ── Payment method rows ───────────────────────────────────── */
.payment-methods { list-style: none; padding: 0; margin: 0; }
.payment-methods > li { padding: 14px 0; border-bottom: 1px solid #f2f4f5; }
.payment-methods > li:last-child { border-bottom: none; }
.payment-method { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.payment-method .payment-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 8px; background: #f4f6f8; color: #5c6b73; font-size: 20px; flex: none; }
.stripebox { margin-top: 12px; padding: 14px; background: #fafbfc; border: 1px dashed #dee5e7; border-radius: 8px; }
.stripebox label { font-size: 13px; font-weight: 600; color: #363f44; }
.stripebox #card-errors { color: #f05050; font-size: 13px; margin-top: 8px; }

/* ── Invoice (order details) ───────────────────────────────── */
.invoice { background: #fff; border: 1px solid #e6e9f0; border-radius: 4px; overflow: hidden; }
.invoice__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #eef1f3; flex-wrap: wrap; }
.invoice__head img { height: 40px; max-width: 160px; object-fit: contain; }
.invoice__head .info { text-align: right; }
.invoice__head .info h4 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #363f44; }
.invoice__head .info p { margin: 0; font-size: 13px; color: #98a6ad; }
.invoice__meta { display: flex; justify-content: space-between; gap: 24px; padding: 20px 24px; border-bottom: 1px solid #eef1f3; flex-wrap: wrap; }
.invoice__meta .address h5 { margin: 0 0 6px; font-size: 15px; }
.invoice__meta p { margin: 0 0 4px; font-size: 13px; color: #58666e; }
.invoice__meta .date_info p span { display: inline-block; min-width: 90px; font-weight: 700; color: #363f44; }
.invoice__meta .date_info p.status span { color: #23b7e5; }
.invoice__detail { padding: 20px 24px 24px; }
.pricing_info { display: flex; justify-content: flex-end; gap: 32px; margin-top: 16px; font-size: 14px; color: #58666e; }
.pricing_info .bold { font-weight: 700; color: #363f44; }
.pricing_info p { margin: 0; }

/* ── Sales chart card (30-day overview) ────────── */
.dash-chart-card { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); border: none; border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.dash-chart-card .sales-table-header { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 22px 26px 16px; }
.dash-chart-card .sales-table-header h3 { color: #f1f5f9; }
.dash-chart-body { padding: 8px 16px 20px; position: relative; height: 300px; }

/* ── Sales / earnings table card ──────────────── */
.sales-table-card { background: #fff; border: 1px solid #e6e9f0; border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.sales-table-header { padding: 20px 24px; border-bottom: 1px solid #e6e9f0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.sales-table-header h3 { font-size: 16px; font-weight: 600; color: #1a1f36; margin: 0; }
.sales-table { width: 100%; border-collapse: collapse; }
.sales-table th { padding: 14px 24px; text-align: left; font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; background: #f9fafb; border-bottom: 1px solid #e6e9f0; white-space: nowrap; }
.sales-table td { padding: 16px 24px; font-size: 14px; color: #374151; border-bottom: 1px solid #f3f4f6; }
.sales-table tr:last-child td { border-bottom: none; }
.sales-table tr:hover td { background: #f9fafb; }
.sales-table .sales-total-row { font-weight: 700; border-top: 2px solid #e6e9f0; }

/* View / link button used inside tables */
.btn-view { padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; border: 1px solid #e6e9f0; color: #374151; background: #fff; transition: all 0.15s; display: inline-block; }
.btn-view:hover { border-color: #3b82f6; color: #3b82f6; background: #f0f9ff; }

/* ── Downloads (purchases) ─────────────────────── */
.downloads-wrapper { display: flex; gap: 30px; }
.downloads-main { flex: 1; min-width: 0; }
.downloads-sidebar { width: 280px; flex-shrink: 0; }
.downloads-box { background: #fff; border: 1px solid #e6e9f0; border-radius: 4px; overflow: hidden; }
.download-item { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.download-item:last-child { border-bottom: none; }
.download-thumb { width: 60px; height: 60px; margin-right: 15px; flex-shrink: 0; }
.download-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.download-info { flex: 1; min-width: 0; }
.download-info h5 { margin: 0 0 5px; font-size: 15px; font-weight: 500; }
.download-info h5 a { color: #23b7e5; text-decoration: none; }
.download-info h5 a:hover { text-decoration: underline; }
.download-meta { font-size: 13px; color: #666; }
.download-meta a { color: #23b7e5; text-decoration: none; }
.download-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.btn-rate-item { background: #f0ad4e; color: #fff; padding: 8px 16px; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-rate-item:hover { background: #ec971f; color: #fff; }
.btn-rate-item .rating-stars { color: #fff; font-size: 16px; }
.btn-rate-item .rating-stars .fa-star-o { color: rgba(255,255,255,0.5); }
.btn-download-item { background: #5cb85c; color: #fff; padding: 8px 20px; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-download-item:hover { background: #449d44; color: #fff; }
.btn-download-item.text-danger { background: #f05050; }
.btn-download-item.text-danger:hover { background: #d94444; color: #fff; }
.sidebar-box { background: #fff; border: 1px solid #e6e9f0; border-radius: 4px; padding: 20px; }
.sidebar-box h4 { font-size: 16px; font-weight: 600; margin: 0 0 10px; color: #333; }
.sidebar-box p { font-size: 13px; color: #666; margin: 0; line-height: 1.6; }

/* ── Notifications inbox ───────────────────────────────────── */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #eef1f3; flex-wrap: wrap; }
.notif-item:last-child { border-bottom: none; }
.notif-item.is-unread { background: #f6fbfe; border-left: 3px solid #23b7e5; padding-left: 21px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 600; color: #363f44; }
.notif-text { font-size: 14px; color: #58666e; margin: 6px 0 4px; line-height: 1.5; }
.notif-time { font-size: 12.5px; color: #98a6ad; }
.notif-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.notif-pagination { padding: 16px 24px; border-top: 1px solid #eef1f3; }
.notif-pagination .pagination { margin: 0; }

/* Responsive */
@media (max-width: 991px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .downloads-wrapper { flex-direction: column; }
    .downloads-sidebar { width: 100%; }
}
@media (max-width: 767px) {
    .dash-stats { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .invoice__head .info { text-align: left; }
    .invoice__meta { flex-direction: column; }
    .pricing_info { flex-direction: column; gap: 8px; align-items: flex-end; }
    .amount-cards { flex-direction: column; }
    .amount-card { max-width: none; }
    .dashboard_menu { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
    .sales-table-card { overflow-x: auto; }
    .sales-table { min-width: 640px; }
    .dash-chart-body { height: 240px; }
    .download-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .download-thumb { margin-right: 0; }
    .download-actions { width: 100%; }
    .notif-item { flex-direction: column; }
    .notif-actions { width: 100%; }
}
