/* =========================================================
   MININGCORE DASHBOARD - MAIN STYLE
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0b1220;
    --bg-secondary: #111a2e;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --card: #121b31;
    --card-2: #18233d;
    --border: rgba(255, 255, 255, 0.08);

    --text: #e8eefc;
    --text-muted: #9ca9c9;
    --text-soft: #7f8aad;

    --primary: #4f8cff;
    --primary-hover: #3e79ea;
    --secondary: #00c2a8;
    --secondary-hover: #00a58f;

    --warning: #f5b93f;
    --danger: #ff5f6d;
    --success: #22c55e;
    --info: #38bdf8;

    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.35);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --transition: all 0.25s ease;
    --container: 1400px;
}

/* =========================================================
   RESET
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.12), transparent 25%),
        radial-gradient(circle at top right, rgba(0, 194, 168, 0.08), transparent 20%),
        linear-gradient(180deg, #09101d 0%, #0b1220 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #7eabff;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    outline: none;
}

input,
select,
textarea {
    color: var(--text);
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 30px 0;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flex {
    display: flex;
    gap: 16px;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   TOPBAR / NAVBAR
   ========================================================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(9, 16, 29, 0.82);
    border-bottom: 1px solid var(--border);
}

.navbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* =========================================================
   HERO / PAGE HEADER
   ========================================================= */
.page-header {
    padding: 34px 0 10px;
}

.page-title {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
}

/* =========================================================
   CARD
   ========================================================= */
.card {
    background: linear-gradient(180deg, rgba(24, 35, 61, 0.92), rgba(15, 24, 43, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 140, 255, 0.22);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.card-subtitle {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.card-body {
    position: relative;
    z-index: 1;
}

.card-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* =========================================================
   STAT CARDS
   ========================================================= */
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 140, 255, 0.14);
    color: #9fc0ff;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.stat-meta {
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    appearance: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    line-height: 1;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6ea2ff);
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 140, 255, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #5d96fb);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #28ddc4);
    color: #08121d;
    box-shadow: 0 10px 24px rgba(0, 194, 168, 0.20);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-hover), #1dcdb5);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(79, 140, 255, 0.28);
}

.btn-danger {
    background: linear-gradient(135deg, #ff5f6d, #ff7e89);
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(1.05);
}

.btn-sm {
    padding: 9px 14px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 14px 22px;
    font-size: 1rem;
    border-radius: 14px;
}

/* =========================================================
   FORMS / SEARCH
   ========================================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input,
.select,
.textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text);
    transition: var(--transition);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--text-soft);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(79, 140, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    transition: var(--transition);
}

.search-input:focus {
    border-color: rgba(79, 140, 255, 0.65);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    pointer-events: none;
}

/* =========================================================
   TABLE
   ========================================================= */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table thead {
    background: rgba(255, 255, 255, 0.04);
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table th {
    color: #c8d6fb;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.table td {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* =========================================================
   BADGES / STATUS
   ========================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.badge-success {
    background: rgba(34, 197, 94, 0.14);
    color: #8af0b0;
}

.badge-warning {
    background: rgba(245, 185, 63, 0.14);
    color: #ffd37c;
}

.badge-danger {
    background: rgba(255, 95, 109, 0.14);
    color: #ff9ca6;
}

.badge-info {
    background: rgba(56, 189, 248, 0.14);
    color: #88dcff;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.20);
    color: #9df0bc;
}

.alert-warning {
    background: rgba(245, 185, 63, 0.12);
    border-color: rgba(245, 185, 63, 0.18);
    color: #ffd98f;
}

.alert-danger {
    background: rgba(255, 95, 109, 0.12);
    border-color: rgba(255, 95, 109, 0.18);
    color: #ffb2b9;
}

.alert-info {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.18);
    color: #9de7ff;
}

/* =========================================================
   MINI STATS / INFO BOXES
   ========================================================= */
.info-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.info-label {
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.info-value {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-link {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* =========================================================
   LIST / HASH / ADDRESS
   ========================================================= */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.02em;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

/* =========================================================
   CHART PLACEHOLDER
   ========================================================= */
.chart-box {
    min-height: 320px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(79, 140, 255, 0.05), transparent),
        rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    text-align: center;
    padding: 20px;
}

/* =========================================================
   LOADER
   ========================================================= */
.loader {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   TABS
   ========================================================= */
.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 11px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(79, 140, 255, 0.12);
    border-color: rgba(79, 140, 255, 0.35);
    color: #fff;
}

/* =========================================================
   MODAL
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 20, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 700px;
    background: #11192d;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-footer {
    border-bottom: none;
    border-top: 1px solid var(--border);
}

.modal-body {
    padding: 20px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    margin-top: 30px;
    padding: 24px 0 30px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.92rem;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-white { color: #fff; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-0 { padding: 0; }
.w-100 { width: 100%; }

.hidden {
    display: none !important;
}