body {
    font-family: Arial, sans-serif;
    background: #111;
    color: #fff;
    margin: 0;
}

.logo {
    display: flex;
    justify-content: left;
    align-items: center;
}

.logo img {
    height: 100px;
}

.app {
    max-width: 900px;
    margin: auto;
    padding: 15px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.card {
    background: #1e1e1e;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    border-radius: 12px;
    margin-top: 20px; 
    max-height: 240px; 
    overflow: auto;
}
.row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 10px;
    margin-top: 10px;
}
input, button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    border: none;
}
button {
    background: orange;
    font-weight: bold;
    cursor: pointer;
}

/************** Today's Sales ***************/
.today-highlight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1f3d2b, #173026);
    border: 1px solid #2e6b4f;
    padding: 14px 18px;
    border-radius: 10px;
    margin: 16px 0 20px;
}

.today-highlight .label {
    font-size: 14px;
    color: #9adbb7;
    letter-spacing: 0.5px;
    margin-right: 14px;
}

.today-highlight .value {
    font-size: 22px;
    font-weight: 700;
    color: #4caf50;
}

/************** /Today's Sales ***************/

.summary {
    margin-top: 20px;
    background: #222;
    padding: 15px;
    border-radius: 12px;

    display: grid;
    row-gap: 10px;
}

.summary p {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin: 0;
}

/* Right-align all amounts */
.summary strong,
.summary span {
    text-align: right;
    white-space: nowrap;
}

/* Existing colors */
#capital-total {
    color: chartreuse;
}

#sales-total {
    color: #4caf50;
}

#expenses-total {
    color: #f44336;
}

#profit-total {
    color: #ffffff;
}

#bank-balance {
    color: chartreuse;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #333;
}

.grid a {
    text-align: center;
    text-decoration: none;
    color: #8cc9a8;
}

/******************* Last 10 Sales********************/
.sales-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sales-list li {
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.sale-main {
    font-size: 14px;
    color: #fff;
}

.sale-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

.muted {
    color: #888;
    font-size: 13px;
}
/******************* /Last 10 Sales********************/
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin: 10px 0 12px;
    font-size: 13px;
    color: #ddd;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.legend-line {
    width: 80px;
    height: 0;
    border-top-width: 3px;
    border-top-style: solid;
}

/* Match canvas colors */
.legend-line.sales {
    border-color: #4caf50;
}

.legend-line.expenses {
    border-color: #f44336;
}

.legend-line.daily-profit {
    border-color: #2196f3;
}

.legend-line.net-change {
    border-color: yellow;
    border-top-style: dashed;
}

.legend-line.cumulative {
    border-color: rgba(255,255,255,0.7);
    border-top-style: dashed;
}

.zoom-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.zoom-controls button {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
}

.zoom-controls button:hover {
    background: #333;
}

.chart-legend label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.chart-legend input[type="checkbox"] {
    cursor: pointer;
}

.chart-container {
    position: relative;
    margin-top: 25px;
    background: #222;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
}

.chart-container h3 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 16px;
}

.chart-scroll {
    width: 100%;
    height: 400px;
    overflow: auto;
    position: relative;
    background: #ffffff26;

    border-radius: 14px;

    /* ✨ Soft lifted effect */
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.06),
        0 12px 30px rgba(0, 0, 0, 0.08);
}

#combinedChart {
    height: 100%;
    display: block;
}

canvas {
    display: block;
    touch-action: pan-x pan-y;
}


.price { opacity: 0.8; }
@media (max-width: 600px) {
    h1 { font-size: 1.5em; }
}