/* ===========================
   1. GLOBAL STYLES
=========================== */

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a; /* Dark background you like */
    color: #e0e0e0;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

h2 {
    font-size: 15px;
    font-weight: lighter;
    line-height: 2;
}


/* Global container for dashboard */
.dashboard-container {
    max-width: 1200px;   /* adjust as needed */
    margin: 0 auto;      /* center horizontally */
    padding: 16px;       /* optional padding around content */
    box-sizing: border-box;
}


/* ===========================
   BUTTON STYLES (Modern + Rounded)
=========================== */

/* General nav buttons */
.nav-button {
    background-color: transparent;
    color: #e0e0e0;
    padding: 8px 16px;       /* slightly larger padding for comfort */
    margin-left: 8px;
    border-radius: 5px;     /* more rounded */
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    border: 1px solid #555;  /* subtle border for modern look */
}

/* Hover effect for nav buttons */
.nav-button:hover {
    color: #ff4c4c;          /* red on hover */
    background-color: rgba(255, 76, 76, 0.1); /* subtle hover background */
    border-color: #ff4c4c;
}

/* Logout button (specific) */
.header-right a.nav-button:last-child {
    color: #fff;
    background-color: #ff4c4c;
    border: none;
    border-radius: 5px;     /* more rounded */
    box-shadow: 0 3px 6px rgba(0,0,0,0.3); /* subtle shadow */
    transition: all 0.2s ease-in-out;
}

.header-right a.nav-button:last-child:hover {
    background-color: #ff1a1a;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Refresh / Update Ledger button */
#refreshButton {
    background-color: #222;
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 5px;
    border: 1px solid #555;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

#refreshButton:hover {
    background-color: #333;
    border-color: #ffc94c;
    color: #ffc94c;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

#refreshButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}


/* ===========================
   2. HEADER STYLES
=========================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #060606; /* Black header */
    padding: 10px 20px;
    border-bottom: 2px solid #333;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left h1 {
    margin-left: 12px;
    font-size: 1.8rem;
    font-weight: bold;
}

.corp-logo {
    width: 80px;
    height: 80px;
    border-radius: 4px;
}


/* ===========================
   Character Panel Layout
=========================== */
 .totals-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #1a1a1a; /* keep your panel color */
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    margin-bottom: 24px;
}

/* Left column */
.totals-left {
    display: flex;
    align-items: flex-start;

}

.char-portrait {
    width: 128px;
    height: 128px;
    border-radius: 8px;
    margin-right: 12px;
    margin-top: 2px;
}

.left-text h1 {
    font-size: 1.75rem; /* slightly smaller heading */
    margin: 0 0 4px 0;
}

.left-text p {
    max-width: 800px; /* adjust as needed */
    padding-right: 20px;
    margin-top: 8px;
}

.info-note {
    font-size: 0.85rem;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
}

/* Right column */
.totals-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1rem;
    text-align: right;

}

.totals-right p {
    margin: 4px 0;
    font-size: 22px; /* slightly larger */
    line-height: 1.4;
}

.totals-right h1 {
    margin: 0;
    font-size: 0.9rem; /* slightly larger */
    line-height: 1.4;
    font-weight: light;
}

.update-refresh-row {
    display: flex;
    align-items: center;
    gap: 12px; /* space between last update and button */
    margin-top: 8px;
}

.update-refresh-row span {
    font-size: 0.9rem;
    color: #ccc;
}



#infoButton {
    margin-top: 55px;
    width: 110px;
}


/* ===========================
   Pop-up
=========================== */

.info-popup,
.popup {
    display: none;
    justify-content: center;
    align-items: center;
}

/* Popup overlay */
.info-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75); /* semi-transparent background */
    z-index: 1000;
}

/* Popup overlay */
.popup {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0,0,0,0.75);
    z-index: 999;
}

.popup-content {
    background-color: #1a1a1a;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    max-width: 900px;
    width: 90%;
    text-align: center;
}

.popup-content canvas {
    width: 100% !important;
    max-height: 500px;
}

.popup-close {
    margin-top: 16px;
    padding: 10px 20px;
    border: none;
    background-color: red;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
}

/* Popup content box */
.info-popup .popup-content {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 24px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

/* Text inside the popup */
.info-popup .popup-content p {
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

/* Close button always at bottom center */
.info-popup .popup-content button {
    margin-top: auto; /* pushes button to bottom */
    align-self: center;
    margin-top: 20px;
}




/*==========CHART================*/

#doubleYChartCanvas {
    width: 100% !important;
    max-height: 500px;
}


.chart-container {
    width: 100%;
    max-width: 900px;
    margin: auto;
}



/* ===========================
   4. MINING TABLE
=========================== */

.mining-table-container {
    margin: 20px;
    overflow-x: auto;
}

#miningTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem; /* compact font */
}

#miningTable th,
#miningTable td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #333;
}

#miningTable th {
    background-color: #111;
    color: #fff;
    font-weight: 600;
}

#miningTable tr:nth-child(even) {
    background-color: #1e1e1e;
}

#miningTable tr:hover {
    background-color: #333;
}

#miningTable td img {
    vertical-align: middle;
    margin-right: 4px;
}
