:root {
    --pnl-bg: #f4f7f6;
    --pnl-white: #ffffff;
    --pnl-primary: #4a90e2;
    --pnl-dark: #333;
    --pnl-gray: #888;
    --pnl-border: #e0e0e0;
}

#pnl-app {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--pnl-dark);
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Controls */
.pnl-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    background: var(--pnl-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.pnl-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pnl-control-group input {
    padding: 10px;
    border: 1px solid var(--pnl-border);
    border-radius: 6px;
}

/* Buttons */
.pnl-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.pnl-btn.primary { background: var(--pnl-primary); color: #fff; }
.pnl-btn.primary:hover { background: #357abd; }
.pnl-btn.secondary { background: #f0f0f0; color: #333; border: 1px solid #ccc; }
.pnl-btn.small { padding: 5px 10px; font-size: 0.9em; }
.pnl-btn.full-width { width: 100%; margin-top: 15px; }

/* Dashboard Grids */
.pnl-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.pnl-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin-bottom: 20px; }

/* Cards */
.pnl-card {
    background: var(--pnl-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--pnl-border);
}
.pnl-card h2 { margin: 10px 0 0; font-size: 2rem; }
.pnl-card h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; font-size: 1.2rem; }
.pnl-card small { text-transform: uppercase; letter-spacing: 1px; color: var(--pnl-gray); font-size: 0.8rem; }
.pnl-card .desc { font-size: 0.85rem; color: #666; margin-bottom: 5px; }

/* Highlights */
.highlight-blue { border-left: 5px solid #4a90e2; }
.highlight-red { border-left: 5px solid #e74c3c; }
.highlight-green { border-left: 5px solid #2ecc71; }
.highlight-orange { border-left: 5px solid #f39c12; }
.highlight-dark { background: #34495e; color: #fff; }
.highlight-dark h3, .highlight-dark small, .highlight-dark .desc { color: #ccc; border-color: #555; }

/* List Items */
.pnl-list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.95rem;
}
.pnl-list-item:last-child { border-bottom: none; }
.pnl-list-item.total-row { font-weight: bold; background: #fafafa; padding: 10px; border-radius: 5px; margin-top: 5px; }
.sub-head { margin: 15px 0 5px; font-size: 1rem; color: var(--pnl-primary); }
.text-red { color: #e74c3c; }

/* Modal */
.pnl-modal {
    display: none; 
    position: fixed; 
    z-index: 999; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.5);
}
.pnl-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
}
.pnl-close { position: absolute; right: 20px; top: 15px; font-size: 28px; font-weight: bold; cursor: pointer; }
#pnl-edit-fields label { display: block; margin-top: 15px; font-weight: 600; font-size: 0.9rem; }
#pnl-edit-fields input { width: 100%; padding: 8px; margin-top: 5px; box-sizing: border-box; }

@media screen and (max-width: 768px) {
    .pnl-grid-2 { grid-template-columns: 1fr; }
    .pnl-header { flex-direction: column; align-items: stretch; }
    .pnl-control-group { flex-direction: column; align-items: stretch; }
}