/* style.css */
:root { --bg-dark: #121212; --card-dark: #1e1e1e; --text-primary: #e0e0e0; --text-secondary: #a0a0a0; --accent-blue: #3d5afe; --accent-green: #00c853; --accent-red: #ff1744; --border-color: #333; }
body { font-family: 'Segoe UI', sans-serif; background-color: var(--bg-dark); color: var(--text-primary); max-width: 1200px; margin: 0 auto; padding: 20px; }
h2, h3, h4 { color: #fff; margin-top: 0; }
.header-container { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.btn-icon { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 0 5px; opacity: 0.7; transition: 0.2s; }
.btn-icon:hover { opacity: 1; transform: scale(1.1); }
.goal-section { background: var(--card-dark); padding: 15px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 30px; }
.goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-track { background: #333; height: 12px; border-radius: 6px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, #00c853, #00e676); height: 100%; width: 0%; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-tiny { background: #333; color: #ccc; border: none; padding: 4px 8px; font-size: 0.7rem; border-radius: 4px; cursor: pointer; }
.btn-tiny:hover { background: #444; color: white; }
.charts-wrapper { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 30px; }
.chart-box { background: var(--card-dark); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.chart-tools { display: flex; gap: 5px; align-items: center; }
.chart-tools input { padding: 4px; font-size: 0.8rem; width: auto; background: #333; border: 1px solid #555; color: white; border-radius: 4px; }
.btn-mini { padding: 4px 8px; background: var(--accent-blue); border: none; color: white; border-radius: 4px; cursor: pointer; }
.canvas-container { flex: 1; min-height: 250px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; margin-bottom: 30px; }
.summary-card { background: var(--card-dark); padding: 15px; border-radius: 12px; border: 1px solid var(--border-color); position: relative; overflow: hidden; transition: transform 0.2s; }
.summary-card:hover { transform: translateY(-3px); }
.summary-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; }
.c-reksa::before { background: #29b6f6; } .c-kas::before { background: #66bb6a; } .c-saham::before { background: #ab47bc; } .c-komo::before { background: #ffca28; } .c-kripto::before { background: #ff7043; }
.summary-card h4 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 5px; }
.summary-card .nilai { font-size: 1.1rem; font-weight: bold; color: #fff; }
.summary-card .persen { font-size: 0.75rem; color: var(--text-secondary); margin-top: 5px; }
button { cursor: pointer; transition: 0.2s; border: none; border-radius: 6px; font-weight: bold; } button:hover { opacity: 0.9; }
.action-area { display: flex; gap: 15px; margin-bottom: 20px; }
.btn-big { flex: 1; padding: 15px; font-size: 1rem; color: white; display: flex; justify-content: center; align-items: center; gap: 8px;}
.btn-add { background-color: var(--accent-blue); } .btn-trans { background-color: #ff9800; color: #212121; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background: var(--card-dark); padding: 25px; border-radius: 12px; width: 400px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.close-btn { background: transparent; color: var(--text-secondary); font-size: 1.5rem; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-secondary); }
input, select { width: 100%; padding: 12px; background: #2a2a2a; border: 1px solid var(--border-color); color: white; border-radius: 6px; box-sizing: border-box; }
input:focus, select:focus { outline: none; border-color: var(--accent-blue); }
.btn-submit { width: 100%; padding: 12px; background: var(--accent-green); color: white; margin-top: 10px; }
.table-container { background: var(--card-dark); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; }
th { background: #252525; color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; text-align: left; padding: 15px; }
td { padding: 15px; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.trend-up { color: var(--accent-green); } .trend-down { color: var(--accent-red); }
.trend-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; background: rgba(255,255,255,0.05); }
.hidden { display: none !important; }
.suggestion-box { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; margin-bottom: 15px; animation: fadeIn 0.3s ease-in-out; }
.chip { background-color: #2c2c2c; color: #aaa; padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; cursor: pointer; border: 1px solid #444; transition: all 0.2s; display: flex; align-items: center; gap: 5px; }
.chip:hover { background-color: #3d5afe; color: white; border-color: #3d5afe; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(61, 90, 254, 0.3); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.advanced-section { margin-top: 50px; border-top: 1px dashed #333; padding-top: 30px; }
.advanced-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; }
.adv-card { background: var(--card-dark); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); }
.adv-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.runway-display { display: flex; align-items: center; gap: 15px; }
.status-badge { padding: 5px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: bold; }
.status-gray { background: #333; color: #ccc; } .status-red { background: rgba(255, 23, 68, 0.2); color: #ff1744; border: 1px solid #ff1744; } .status-yellow { background: rgba(255, 202, 40, 0.2); color: #ffca28; border: 1px solid #ffca28; } .status-green { background: rgba(0, 200, 83, 0.2); color: #00c853; border: 1px solid #00c853; }
.rebalance-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.rebalance-table th { text-align: left; padding: 8px; color: #888; border-bottom: 1px solid #444; }
.rebalance-table td { padding: 8px; border-bottom: 1px solid #333; vertical-align: middle; }
.rebalance-input { width: 50px; background: #222; border: 1px solid #444; color: white; padding: 4px; border-radius: 4px; text-align: center; }
.action-buy { color: #00c853; font-weight: bold; } .action-sell { color: #ff1744; font-weight: bold; } .action-ok { color: #888; }
.action-cell { display: flex; gap: 5px; align-items: center; justify-content: center; height: 100%; }
.btn-mini-action { padding: 5px 8px; border-radius: 4px; border: none; cursor: pointer; font-size: 0.75rem; font-weight: bold; }
.btn-edit { background-color: #ffb300; color: #222; } .btn-delete { background-color: #e53935; color: white; }
.btn-mini-action:hover { transform: scale(1.1); opacity: 0.9; }
.bibit-toggle-card { background-color: #1e2a23; border: 1px solid #00c853; border-radius: 8px; padding: 12px; margin-bottom: 15px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: background 0.2s; }
.bibit-toggle-card:hover { background-color: #25352c; }
.bibit-checkbox { width: 20px; height: 20px; accent-color: #00c853; cursor: pointer; }
.bibit-label { flex: 1; color: #00c853; font-weight: bold; font-size: 0.9rem; }
.bibit-icon { font-size: 1.2rem; }
.bibit-input-group { background: #141d18; border: 1px dashed #00c853; padding: 15px; border-radius: 8px; margin-bottom: 15px; animation: fadeIn 0.3s; }
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px); color: #fff; padding: 12px 20px; border-radius: 8px; border-left: 4px solid #00c853; box-shadow: 0 4px 15px rgba(0,0,0,0.5); font-size: 0.9rem; min-width: 250px; display: flex; align-items: center; justify-content: space-between; animation: slideIn 0.3s ease-out forwards; opacity: 0; transform: translateX(100%); }
.toast.error { border-left-color: #ff1744; } .toast.info { border-left-color: #29b6f6; }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* --- INSTALL BANNER (NEW) --- */
.install-banner {
    display: none; /* Hidden Default */
    position: fixed; top: 0; left: 0; right: 0;
    background: #1e1e1e; border-bottom: 1px solid #00c853;
    padding: 12px 20px; z-index: 10000;
    align-items: center; justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    animation: slideDown 0.5s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.install-content { display: flex; align-items: center; gap: 15px; }
.install-content div { display: flex; flex-direction: column; }
.install-content strong { font-size: 14px; color: #fff; }
.install-content span { font-size: 11px; color: #a0a0a0; }
.btn-install { background: #00c853; border: none; padding: 6px 15px; border-radius: 20px; color: white; font-weight: bold; cursor: pointer; font-size: 12px; }
.btn-close-banner { background: transparent; border: none; color: #ccc; cursor: pointer; font-size: 20px; }

@media (max-width: 768px) {
    body { padding: 15px; padding-bottom: 80px; overflow-x: hidden; }
    .header-container { flex-direction: column; align-items: center; gap: 15px; text-align: center; }
    .header-container > div:last-child { text-align: center !important; width: 100%; }
    .header-container div[style*="justify-content:flex-end"] { justify-content: center !important; }
    #grandTotalDisplay { font-size: 2rem !important; }
    .header-container div[style*="display: flex; gap: 15px"] { flex-direction: column; gap: 5px; margin-top: 10px; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .summary-card h4 { font-size: 0.75rem; } .summary-card .nilai { font-size: 0.95rem; }
    .charts-wrapper { display: flex; flex-direction: column; width: 100%; gap: 20px; margin: 0; box-sizing: border-box; }
    .chart-box { width: 100%; box-sizing: border-box; padding: 15px; margin: 0; }
    .canvas-container { width: 100%; max-width: 100%; overflow: hidden; position: relative; }
    .advanced-grid { display: flex; flex-direction: column; width: 100%; gap: 20px; }
    .table-container, .adv-card { width: 100%; box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }
    .action-area { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .btn-big { padding: 12px; font-size: 0.9rem; justify-content: center; }
    .modal-content { width: 90%; margin: 0 auto; max-height: 85vh; overflow-y: auto; padding: 20px; box-sizing: border-box; }
    .chart-controls { flex-direction: column; align-items: stretch; }
    .date-inputs { flex-direction: column; width: 100%; }
    .date-inputs input { width: 100%; box-sizing: border-box; }
    .chart-buttons { width: 100%; justify-content: space-between; margin-top: 10px; }
    .btn-mini { flex: 1; padding: 8px; }
    .runway-display { flex-direction: column; align-items: flex-start; gap: 5px; }
    #runwayResult { font-size: 1.8rem !important; }
    #toast-container { left: 20px; right: 20px; bottom: 80px; }
    .toast { width: auto; }
}