
/* ========== BASE ========== */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    color:white !important;
}
body{
    font-family:Inter,system-ui,Arial;
    background: linear-gradient(180deg, #05070c 0%, #0a0d14 40%, #101726 100%);
    min-height:100vh;
    overflow-x:hidden;
    /*color:var(--text);*/
    color: white; /* Dark grey for a professional look */
}

.page{
    max-width:1300px;
    margin:28px auto;
    padding:20px;
}

.text-muted{
    color:#9aa6b2 !important;
}

/* ========== HEADER ========== */
header.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 18px;
    border-radius:var(--card-radius);
    background:var(--glass);
    backdrop-filter:var(--blur-bg);
    box-shadow:0 4px 14px rgba(0,0,0,0.25);
    border:none; /* removed white border */
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
}
.brand .logo{
    width:42px;
    height:42px;
    border-radius:8px;
    background:linear-gradient(90deg,var(--accent),#e0b23a);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#071018;
    font-weight:700;
}
.brand h1{
    font-size:1.1rem;
    color:var(--text);
}
.profile{
    display:flex;
    align-items:center;
    gap:12px;
}
.avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    background:linear-gradient(180deg,#233,#111);
    border:none; /* removed border */
}

/* ========== GRID ========== */
.grid{
    display:grid;
    grid-template-columns:repeat(12,1fr);
    gap:18px;
    margin-top:18px;
}
.col-3 {grid-column:span 3;}
.col-4 {grid-column:span 4;}
.col-6 {grid-column:span 6;}
.col-9 {grid-column:span 9;}
.col-12 {grid-column:span 12;}

/* ========== CARDS ========== */
.card{
    background:var(--glass);
    backdrop-filter:var(--blur-bg);
    border-radius:var(--card-radius);
    padding:16px;
    box-shadow:0 3px 10px rgba(0,0,0,0.25); /* reduced shadow */
    color:var(--text);
    transition: all 0.3s ease;
    border:none;
}
.card:hover{
    box-shadow:0 5px 14px rgba(0,0,0,0.3);
    transform:translateY(-2px);
}

.stat{
    display:flex;
    flex-direction:column;
    gap:8px;
}
.stat .label{
    color:var(--muted);
    font-size:0.85rem;
}
.stat .value{
    font-size:1.4rem;
    font-weight:700;
}

/* ========== BUTTONS ========== */
/*.btn{
    background:transparent;
    border:1px solid rgba(255,255,255,0.04);
    color:var(--text);
    padding:8px 10px;
    border-radius:8px;
    cursor:pointer;
    transition:0.3s;
}*/
/* action buttons: elegant CTA */
        .action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            justify-content: center;
            margin-top: 2.2rem;
        }
        
.btn {
/*    display: inline-flex;
    align-items: center;*/
    /*gap: 0.5rem;*/
    padding: 0.75rem 1.7rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    border: none;
    background: transparent;
    text-decoration: none;
}
.btn:hover{
    background:rgba(255,255,255,0.08);
}
/*.btn-primary{
    background:linear-gradient(90deg,var(--accent),#e0b23a);
    color:#071018;
    border:0;
}*/
.btn-primary {
            background: #1e2f3f;
            color: white;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(255,255,255,0.2);
        }

        .btn-primary:hover {
            background: #0f1e2c;
            transform: translateY(-2px);
            box-shadow: 0 12px 18px -10px rgba(0, 0, 0, 0.15);
        }

        .btn-secondary {
            background: #0f1e2d;
            color: #2c3e50;
            border: 1px solid #cddfe7;
            box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        }

        .btn-secondary:hover {
            background: #f5f9ff;
            border-color: #b6cfdf;
            transform: translateY(-1px);
        }
        
.time-toggle{
    display:flex;
    gap:8px;
}

/* ========== TABLES ========== */

.table-container{overflow-x:auto;}
.dash-table{
    width:100%;
    border-collapse:collapse;
    font-size:14px;
    color:var(--text);
}
.dash-table th,
.dash-table td{
    padding:8px 10px;
    border-bottom:1px solid rgba(255,255,255,0.08);
}
.dash-table tbody tr:hover{
    background:rgba(255,255,255,0.05);
    cursor:pointer;
}

/* ========== FORMS ========== */
label{
    display:block;
    font-size:0.9rem;
    margin-bottom:8px;
    color:var(--muted);
}
input[type="date"],
input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="textarea"],
.form-select, .textarea{
    width:100%;
    padding:12px 14px;
    border-radius:11px;
    border:1px solid rgba(255,255,255,0.09);
    background:rgba(255,255,255,0.02);
    color:var(--text);
    outline:none;
    backdrop-filter:blur(6px);
}

input[type="date"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus, /* Fixed the textarea selector here */
.form-select:focus, 
.textarea:focus {
    background-color: rgba(255, 255, 255, 0.05) !important; /* Forces dark background */
    border-color: darkorange !important;
    color: white !important;
    outline: none;
}

/* Style the dropdown options */
.form-select option {
    background: #333; /* Dark background for options */
    color: white; /* White text for options */
    padding: 10px;
}

/* For Firefox */
.form-select option:checked {
    background: #555;
}

/* For webkit browsers */
.form-select option:checked,
.form-select option:hover {
    background: #555;
}

/* ========== LINKS ========== */
a{text-decoration:none;color:var(--text);}
a:hover{color:var(--accent)!important;}

/* ========== RESPONSIVE ========== */
@media(max-width:1000px){
    .col-3, .col-4, .col-6, .col-9 {grid-column:span 12;}
    .chart-header {flex-direction:column;align-items:flex-start;gap:10px;}
}

.list-group-item {
    background-color: transparent !important;
    color: var(--text);
    border: none !important;
}

.journal-view-page {
    /*background: #fff;*/
    border-radius: 12px;
}

.journal-head div {
    padding: 6px 0;
}

.jitems-table th {
    /*background: #f7f9fc;*/
}

.journal-description {
    /*background: #fafafa;*/
    border-radius: 8px;
}


#searchHistoryDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    background: #fff;
    color:black !important;
    z-index: 2147483647 !important;   /* very high to stay on top */
}


.receipt-card {
    max-width: 600px;
    margin: auto;
    border-radius: 12px;
    background: transparent;
}
.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}
.receipt-row span {
    font-size: 15px;
}


.content-wrapper {
    position: relative;
    width: 100%;        /* example width */
    /*max-width: 1200px;  optional */
    /*margin: 0 auto;     center the wrapper */
    min-height: 100vh;
    /*padding-bottom: 60px;  space for footer */
}

.app-footer {
    background: rgba(15, 18, 30, 0.6);
    position: fixed;
    bottom: 0;
/*    left: 50%;
    transform: translateX(-50%);  center footer under wrapper */
    
    width: 100%;        /* same width as wrapper */
    /*max-width: 1200px;  optional*/ 

    height: 50px;
    /*background: #fff;*/
    /*border-top: 1px solid #ddd;*/
    display: flex;
    align-items: first;
    justify-content: left;
}


.kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
    margin-bottom:20px;
}

.kpi-card{
    background:#0b1622;
    padding:15px;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,0.4);
    color:#fff;
}

.kpi-card.green{border-left:4px solid #00c853;}
.kpi-card.red{border-left:4px solid #ff3d00;}

.report-table{
    width:100%;
    border-collapse:collapse;
    background:#071018;
    color:#fff;
}

.report-table th, .report-table td{
    padding:10px;
    border-bottom:1px solid #1a2a3a;
}

.report-table thead{
    background:#0d1b2a;
    position:sticky;
    top:0;
}

.pos{color:#00e676;}
.neg{color:#ff5252;}

.table-wrap{
    max-height:400px;
    overflow:auto;
}

.group-summary{
    margin-top:20px;
    background:#0b1622;
    padding:15px;
    border-radius:12px;
}
