:root {
  --primary-color: #007BFF;
  --primary-dark: #FFFFFF;
  --background: #F8F9FA;
  --secondary: #E9ECEF;
  --text-color: #212529;
  --danger: #DC3545;
  --success: #28A745;
  --warning: #FFC107;
  --info: #17A2B8;
  --success-light: rgba(40, 167, 69, 0.1);
  --danger-light: rgba(220, 53, 69, 0.1);
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0; font-family: 'Roboto', sans-serif;
  background: var(--background); color: var(--text-color);
  font-size: 16px; line-height: 1.5;
}
header {
  background: var(--primary-dark); padding: 15px; display: flex;
  justify-content: space-between; align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100;
}
header .logo-container { display: flex; align-items: center; }
header .logo {
  font-size: 1.2rem; font-weight: bold; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-right: 8px; color: var(--primary-color);
}
.datetime { font-size: 0.8rem; color: #6c757d; }
.logout-btn {
  padding: 5px 10px; background: var(--primary-color); color: white; border: none;
  border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 0.8rem;
  margin-left: 10px; width: auto; height: 30px; display: flex;
  align-items: center; justify-content: center;
}
.user-info { display: flex; align-items: center; }
.user-level {
    font-size: 0.7rem; font-weight: bold; padding: 3px 8px; border-radius: 10px;
    margin-left: 8px; background-color: var(--warning); color: var(--primary-dark);
    text-transform: uppercase;
}
.username {
  margin-right: 10px; font-size: 0.9rem; font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.tabs {
  display: flex; justify-content: center; background: var(--primary-dark);
  overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--secondary);
}
.tab {
  padding: 10px 15px; cursor: pointer; font-weight: bold; font-size: 0.9rem;
  min-width: 100px; text-align: center; color: #6c757d;
  border-bottom: 2px solid transparent; text-transform: uppercase;
  position: relative; /* Added for badge positioning */
}
.tab.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); }
.container {
  width: 95%; max-width: 1200px; margin: 15px auto; background: var(--primary-dark);
  padding: 15px; border-radius: 10px; box-shadow: 0 0 15px rgba(0,0,0,0.05);
}
input, button, select, textarea {
  padding: 10px; border-radius: 6px; border: 1px solid #ddd;
  margin: 8px 0; font-size: 1rem; width: 100%; font-family: 'Roboto', sans-serif;
}
textarea { resize: vertical; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 0.9rem; color: #6c757d; }
button {
  background: var(--primary-color); color: white; font-weight: bold;
  cursor: pointer; transition: all 0.3s ease; border: none;
}
button:hover { opacity: 0.9; }
button:disabled { background-color: #6c757d; cursor: not-allowed; }
.cancel-edit-btn { background-color: #6c757d; color: white; }

table {
  width: 100%; margin-top: 15px; border-collapse: collapse; font-size: 0.82rem;
}
th, td {
  border: 1px solid var(--secondary);
  padding: 6px 10px;
  text-align: center;
  word-break: break-word;
  vertical-align: middle;
}
.text-left { text-align: left !important; }
th { background: var(--secondary); font-weight: 700; }
tr:hover { background-color: #f1f1f1; }
tr.editing-row { background-color: #fffde7 !important; }

td input, td select {
    width: 100%;
    padding: 4px;
    font-size: 0.82rem;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
}

.hidden { display: none !important; }
.status {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: bold; white-space: nowrap; color: white;
}
.status-menunggu, .status-inactive, .status-block { background: var(--warning); }
.status-dibayar, .status-active, .status-aktif { background: var(--success); }
.status-ditolak, .status-full-block { background: var(--danger); }
.status-belum-diajukan { background-color: #6c757d; }

.status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.processed-by {
  color: #6c757d;
  font-size: 0.7rem;
  margin-top: 3px;
}

#toast {
  visibility: hidden; min-width: 250px; max-width: 90%; background-color: #333;
  color: white; text-align: center; border-radius: 8px; padding: 12px 20px;
  position: fixed; z-index: 9999; bottom: 20px; right: 20px; left: 20px;
  font-weight: bold; box-shadow: 0 0 12px rgba(0,0,0,0.2);
  transition: all 0.5s ease; margin: 0 auto;
}
#toast.show { visibility: visible; bottom: 30px; opacity: 1; }
#toast.danger { background-color: var(--danger); }

.actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px; /* Reduced from 8px */
}
.action-icon {
    background: none; border: 1px solid transparent; font-size: 1.1rem; /* Reduced from 1.2rem */
    cursor: pointer; padding: 0; width: 28px; height: 28px; /* Adjusted size */
    border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; transition: all 0.2s ease;
}
.action-icon:hover { transform: scale(1.15); background-color: #f0f0f0; }
.icon-approve { color: var(--success); }
.icon-reject { color: var(--danger); }
.icon-attach { color: var(--info); }
.icon-approve:hover { background-color: var(--success-light); }
.icon-reject:hover { background-color: var(--danger-light); }

.btn-small {
    padding: 3px 8px;
    font-size: 0.75rem;
    margin: 2px;
    width: auto;
}

.dropdown { position: relative; display: inline-block; }
.dropdown-content {
  display: none; position: absolute; background-color: var(--primary-dark);
  min-width: 90px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1; border-radius: 4px; right: 0;
}
.dropdown-content.show-dropdown { display: block; }
.dropdown-content button {
  color: var(--text-color);
  padding: 6px 10px;
  text-decoration: none; display: block;
  text-align: left; background: transparent; border: none; width: 100%;
  margin: 0;
  font-size: 0.75rem;
}
.dropdown-content button:hover { background-color: var(--secondary); }


[data-feature].hidden-feature { display: none !important; }
#loginContainer {
  max-width: 380px; margin: 80px auto 20px; padding: 40px; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1); border-radius: 12px;
}
#loginContainer h2 { color: var(--primary-color); }
.checkbox-container {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; margin-bottom: 15px;
  padding: 10px; background-color: #f8f9fa; border-radius: 6px;
}
.checkbox-item { display: flex; align-items: center; gap: 5px; }
.checkbox-item input[type="checkbox"] { width: 15px; height: 15px; }
.checkbox-item label { font-size: 0.85rem; }
.settings-section { margin-bottom: 30px; border: 1px solid #eee; padding: 15px; border-radius: 8px; }
.settings-section h3 { margin-top: 0; }

#staffProfileContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding-top: 15px;
}
.profile-card {
    background-color: #fff;
    border: 1px solid var(--secondary);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.profile-picture {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 10px;
    background-color: #eee;
}
.profile-info h3 {
    margin: 5px 0;
    font-size: 1.2rem;
    color: var(--text-color);
}
.profile-info .level {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 5px;
}
.profile-info .assigned-site {
    font-size: 0.8rem;
    font-weight: bold;
    color: #6c757d;
    background-color: var(--secondary);
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 10px;
}
.profile-details {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 15px;
    word-break: break-all;
}
.profile-budget {
    background-color: var(--background);
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.profile-budget .label {
    font-size: 0.8rem;
    color: #6c757d;
}
.profile-budget .amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}
.profile-actions .status { margin-bottom: 10px; }
.profile-actions .change-photo-btn {
    width: auto;
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: #6c757d;
}

.icons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    height: 100%;
}
.icon-viewer {
  cursor: pointer;
  font-size: 1.4rem;
  display: inline-block;
  transition: transform 0.2s;
}
.icon-viewer:hover {
  transform: scale(1.2);
}

#marketingAssignmentsContainer, #mutasiCollapsibleContainer, #arsipContentContainer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}
.marketing-card {
    background: #fff;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: max-height 0.5s ease-in-out;
}
.marketing-card-header {
    margin: 0;
    padding: 15px;
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    cursor: pointer;
    position: relative;
}
.marketing-card-header::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}
 .marketing-card.collapsed .marketing-card-header::after {
    transform: translateY(-50%) rotate(-90deg);
}
.marketing-card-content {
    padding: 15px;
    overflow: hidden;
    max-height: 5000px; /* Large value to allow content to expand */
    transition: max-height 0.7s ease-in-out, padding 0.5s ease;
}
/* Updated to also remove top padding for a smoother collapse */
.marketing-card.collapsed .marketing-card-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
}
/* FIX: Remove margin-top from tables inside Mutasi cards to prevent peeking when collapsed */
#mutasiCollapsibleContainer .marketing-card-content table {
    margin-top: 0;
}
/* FIX: Remove margin-top from the form inside reqpayTab card to prevent peeking */
#reqpayTab .marketing-card-content > form {
    margin-top: 0;
}


.marketing-card .nickname {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 15px;
}
.marketing-card table {
    margin-top: 0;
    font-size: 0.9rem;
}
.marketing-card table th, .marketing-card table td {
    padding: 8px;
}
.add-phone-form {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}
.add-phone-form input {
    margin: 0;
    font-size: 0.9rem;
}
.add-phone-form button {
    margin: 0;
    width: 120px;
    flex-shrink: 0;
}

/* STYLES FOR MARKETING TABS */
.totals-table {
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.totals-table table {
    width: 100%;
    table-layout: fixed;
}
.totals-table th {
    font-weight: bold;
    background-color: #e9ecef;
    padding: 10px;
}
.totals-table td {
    font-weight: 700;
    background-color: #fff;
    text-align: right;
    font-size: 1.1rem;
    padding: 10px;
    white-space: nowrap;
}
 .totals-table .total-cost { color: var(--danger); }
 .totals-table .total-margin.negative { color: var(--danger); }
 .totals-table .total-margin.positive { color: var(--success); }

 .add-summary-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--background);
    border-radius: 6px;
    border: 1px solid var(--secondary);
}
.add-summary-form input, .add-summary-form button {
    margin: 0;
    font-size: 0.85rem;
    height: 38px;
}
.add-summary-form input[type="text"], .add-summary-form input[type="date"] { flex: 2 1 120px; }
.add-summary-form input[type="number"] { flex: 1 1 60px; text-align: right; }
.add-summary-form button {
    flex: 1 1 80px;
    flex-shrink: 0;
}

/* STYLES FOR CHARTS TAB */
#chartsTab .grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}
#chartsTab .chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
#chartsTab .chart-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}
#chartsTab .summary-box {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
#chartsTab .summary-box .label {
    font-size: 1rem;
    margin-bottom: 5px;
}
#chartsTab .summary-box .amount {
    font-size: 2.2rem;
    font-weight: bold;
}
#chartsTab .user-profile-box {
    background-color: var(--background);
    border: 1px solid var(--secondary);
}
#chartsTab .user-profile-box .amount {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-color);
}
#chartsTab .user-profile-box .label {
     color: #6c757d;
}

.marketing-charts-container {
    grid-column: 1 / -1; /* Make it span full width */
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.marketing-charts-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}
.marketing-charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.marketing-chart-item {
    min-width: 0; /* Prevents overflow in flex/grid context */
}
.marketing-chart-item .chart-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-color);
}
.marketing-chart-item canvas {
    max-height: 220px; /* Adjusted height */
    max-width: 100%;   /* Ensures responsiveness */
}
.chart-user-images {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto; 
    justify-content: flex-start;
    padding-bottom: 5px;
    margin-bottom: 10px;
    gap: 12px; /* Jarak antar gambar ditambah */
}
.chart-user-item {
    position: relative; /* Diperlukan agar posisi badge absolut terhadap item ini */
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 500;
}
.chart-user-item img {
    width: 45px;  /* Ukuran baru yang lebih besar */
    height: 45px; /* Ukuran baru yang lebih besar */
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}
.rank-badge {
    position: absolute;
    bottom: 0px;  /* Posisi vertikal disesuaikan */
    right: 0px;   /* Posisi horizontal disesuaikan */
    width: 22px;  /* Ukuran badge diperbesar */
    height: 22px; /* Ukuran badge diperbesar */
    border-radius: 50%;
    font-size: 16px; /* Ukuran emoji/font di dalam badge diperbesar */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    line-height: 1;
    border: 2px solid #fff; /* Border sedikit lebih tebal untuk kontras */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#customChartsContainer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}
.custom-chart-label-group {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.custom-chart-label-group h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.custom-chart-label-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.custom-chart-item .chart-title {
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

.pagination-container {
    display: flex;
    justify-content: flex-end; /* Posisi di kanan */
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}
.pagination-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--secondary);
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%; /* Membuat tombol menjadi lingkaran */
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.pagination-btn:hover:not(:disabled) {
    background-color: var(--secondary);
}
.pagination-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: transparent;
}
.page-number {
    font-weight: 500;
    font-size: 0.9rem;
    color: #6c757d;
    padding: 0 5px;
}

td .multi-select-container {
    position: relative;
}
td .multi-select-box {
    margin: 0;
    padding: 4px;
    font-size: 0.82rem;
}
td .multi-select-checkboxes {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px; 
    z-index: 10;
    text-align: left;
}
td .multi-select-checkboxes .search-input {
  font-size: 0.8rem;
}
td .multi-select-checkboxes label span {
  font-size: 0.85rem;
}

.multi-select-container {
    position: relative;
}
.multi-select-box {
    padding: 10px; border-radius: 6px; border: 1px solid #ddd;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    width: 100%; background-color: white; margin: 0;
}
#selectedSitesDisplay, .selectedItemsDisplay {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text-color); font-size: 1rem;
}
#selectedSitesDisplay.placeholder, .selectedItemsDisplay.placeholder { color: #6c757d; }

.multi-select-checkboxes {
    border: 1px solid #ddd; position: absolute;
    background-color: white; width: 100%; z-index: 10;
    max-height: 250px; overflow-y: auto;
    border-radius: 6px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: 4px;
}
.multi-select-checkboxes .search-input {
  padding: 8px 12px;
  width: calc(100% - 16px);
  margin: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.multi-select-checkboxes label {
    display: block; padding: 8px 12px; cursor: pointer;
}
.multi-select-checkboxes label:hover {
    background-color: #f1f1f1;
}
.multi-select-checkboxes label input {
    width: auto; margin-right: 10px; vertical-align: middle;
    height: auto;
}
 .multi-select-checkboxes label span {
    vertical-align: middle; font-size: 0.95rem;
}

.paste-zone {
    border: 2px dashed #ccc;
    padding: 15px;
    text-align: center;
    border-radius: 6px;
    background-color: #f8f9fa;
    margin-top: 5px;
}
.paste-zone input[type="file"] {
    display: none; /* Hide the original input */
}
.paste-zone .paste-label {
    color: #6c757d;
    font-size: 0.9rem;
    cursor: pointer;
}
 .paste-zone .file-name-display {
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-top: 8px;
}

.notification-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 0; /* Adjusted for proximity to logo */
    margin-right: 15px;
}
.notification-icon {
    cursor: pointer;
    font-size: 1.5rem;
    position: relative;
    color: #6c757d;
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-dark);
}
.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%); 
    width: 350px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 101;
    border: 1px solid var(--secondary);
    max-height: 400px;
    flex-direction: column;
}
.notification-dropdown.show { display: flex; }
.notification-header {
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid var(--secondary);
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#notificationList { overflow-y: auto; }
.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: default;
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread { background-color: #eaf2ff; }
.notification-item .timestamp {
    font-size: 0.75rem;
    color: #6c757d;
    display: block;
    margin-top: 4px;
}
.notification-empty {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.tab-badge {
    background-color: var(--danger);
    color: white;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 8px;
    margin-left: 8px;
    font-weight: bold;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
}

.setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
}
.switch {
  position: relative; display: inline-block;
  width: 50px; height: 28px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0; width: 0; height: 0;
}
.slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc; transition: .4s;
  border-radius: 28px;
}
.slider:before {
  position: absolute; content: "";
  height: 20px; width: 20px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(22px); }

/* --- Detail Panel Styles --- */
.detail-panel {
    position: fixed; top: 0; right: -420px; /* Start off-screen */
    width: 100%; max-width: 400px; height: 100%;
    background-color: white; box-shadow: -4px 0 15px rgba(0,0,0,0.15);
    z-index: 1001; transition: right 0.4s ease-in-out;
    display: flex; flex-direction: column;
}
.detail-panel.show { right: 0; }
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background-color: var(--primary-color); color: white;
    flex-shrink: 0; /* Prevent header from shrinking */
}
.panel-header h3 { margin: 0; font-size: 1.1rem; }
.panel-header .close-btn {
    background: none; border: none; color: white; font-size: 1.5rem;
    cursor: pointer; padding: 0 5px; line-height: 1;
}
.panel-body {
    padding: 20px; overflow-y: auto; flex-grow: 1;
    word-break: break-word;
}
.panel-body img { max-width: 100%; height: auto; border-radius: 8px; }
.panel-body pre {
    white-space: pre-wrap; word-wrap: break-word; text-align: left;
    background-color: #f0f0f0; padding: 15px; border-radius: 5px;
    max-height: 70vh; overflow-y: auto;
}


@media (min-width: 992px) {
    #chartsTab .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-card.full-width, .marketing-charts-container, .custom-chart-label-group {
        grid-column: 1 / -1;
    }
    .marketing-charts-grid, .custom-chart-label-grid {
         grid-template-columns: repeat(2, 1fr);
    }
}


@media (min-width: 768px) {
  .container { padding: 20px; margin: 20px auto; }
  #toast { left: auto; right: 30px; max-width: 350px; }
}