:root {
    --laundry-primary: #FCB515;
    --laundry-secondary: #003262;
}

/* Default light mode */
.laundry-dashboard {
    --laundry-bg: #ffffff;
    --laundry-card-bg: #ffffff;
    --laundry-panel-bg: #ffffff;
    --laundry-border: #e5e7eb;
    --laundry-text: #003262;
    --laundry-text-soft: #6b7280;
    --laundry-shadow: rgba(15, 23, 42, 0.04);
    --laundry-chart-grid: rgba(15, 23, 42, 0.10);
    --laundry-chart-text: #6b7280;

    padding: 8px 0 24px 0;
}

/* Dark mode - beberapa selector dipasang agar cocok dengan Unfold/browser */
html.dark .laundry-dashboard,
html[data-theme="dark"] .laundry-dashboard,
body.dark .laundry-dashboard,
.dark .laundry-dashboard {
    --laundry-bg: #0f172a;
    --laundry-card-bg: #111827;
    --laundry-panel-bg: #111827;
    --laundry-border: #1f2937;
    --laundry-text: #f9fafb;
    --laundry-text-soft: #9ca3af;
    --laundry-shadow: rgba(0, 0, 0, 0.25);
    --laundry-chart-grid: rgba(255, 255, 255, 0.12);
    --laundry-chart-text: #d1d5db;
}

.laundry-dashboard-header h1 {
    font-size: 34px;
    font-weight: 700;
    color: var(--laundry-text);
    margin: 0 0 8px;
}

.laundry-dashboard-header p {
    margin: 0 0 24px;
    color: var(--laundry-text-soft);
    font-size: 15px;
}

.laundry-grid {
    display: grid;
    gap: 20px;
}

.cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.laundry-card,
.laundry-panel {
    background: var(--laundry-card-bg);
    border: 1px solid var(--laundry-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 14px var(--laundry-shadow);
}

.laundry-panel {
    background: var(--laundry-panel-bg);
}

.laundry-card-title,
.laundry-panel-title {
    color: var(--laundry-text);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 12px;
}

.laundry-card-value {
    font-size: 42px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--laundry-primary);
    margin-bottom: 8px;
}

.laundry-card-subtitle {
    color: var(--laundry-text-soft);
    font-size: 14px;
}

.laundry-chart-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
}

.laundry-panel canvas {
    width: 100% !important;
    height: 100% !important;
}

.mt-24 {
    margin-top: 24px;
}

@media (max-width: 1200px) {
    .cards-4,
    .cards-3,
    .cards-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .cards-4,
    .cards-3,
    .cards-2 {
        grid-template-columns: 1fr;
    }

    .laundry-card-value {
        font-size: 34px;
    }
}

.laundry-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.laundry-date-filter {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--laundry-card-bg);
    border: 1px solid var(--laundry-border);
    border-radius: 16px;
    padding: 14px;
}

.laundry-date-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.laundry-date-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--laundry-text-soft);
}

.laundry-date-field input {
    height: 38px;
    border: 1px solid var(--laundry-border);
    border-radius: 10px;
    padding: 0 10px;
    background: var(--laundry-card-bg);
    color: var(--laundry-text);
    outline: none;
}

.laundry-date-field input:focus {
    border-color: var(--laundry-primary);
    box-shadow: 0 0 0 3px rgba(252, 181, 21, 0.18);
}

.laundry-filter-button,
.laundry-reset-button {
    height: 38px;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.laundry-filter-button {
    border: 1px solid var(--laundry-primary);
    background: var(--laundry-primary);
    color: #111827;
    cursor: pointer;
}

.laundry-reset-button {
    border: 1px solid var(--laundry-border);
    background: transparent;
    color: var(--laundry-text);
}

@media (max-width: 900px) {
    .laundry-dashboard-header {
        flex-direction: column;
    }

    .laundry-date-filter {
        width: 100%;
    }
}

/* =========================
   Better file input for admin
   ========================= */

input[type="file"] {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    border: 1px solid var(--laundry-border, #e5e7eb);
    border-radius: 12px;
    background: var(--laundry-card-bg, #ffffff);
    color: var(--laundry-text, #111827);
    cursor: pointer;
}

/* Chrome, Safari, Edge */
input[type="file"]::file-selector-button {
    margin-right: 14px;
    border: 0;
    border-radius: 10px;
    padding: 9px 14px;
    background: #FCB515;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
}

/* Safari fallback */
input[type="file"]::-webkit-file-upload-button {
    margin-right: 14px;
    border: 0;
    border-radius: 10px;
    padding: 9px 14px;
    background: #FCB515;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: #e3a312;
}

/* Dark mode */
html.dark input[type="file"],
html[data-theme="dark"] input[type="file"],
body.dark input[type="file"],
.dark input[type="file"] {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
}

/* =========================
   Image/File upload spacing
   ========================= */

.form-row input[type="file"],
fieldset input[type="file"],
.module input[type="file"] {
    margin-top: 8px;
    margin-bottom: 14px;
}

/* Beri jarak untuk preview image yang muncul setelah input file */
.form-row img,
fieldset img {
    margin-top: 12px;
}

/* Khusus gambar preview admin agar lebih rapi */
.form-row img[src*="/media/"],
fieldset img[src*="/media/"] {
    display: block;
    margin-top: 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid var(--laundry-border, #e5e7eb);
    object-fit: cover;
}

/* Area teks Currently / Change agar tidak terlalu dempet */
.form-row p.file-upload,
fieldset p.file-upload {
    line-height: 1.8;
}

/* Kalau Django render <br> di field upload */
.form-row p.file-upload br,
fieldset p.file-upload br {
    display: block;
    content: "";
    margin-top: 8px;
}

.laundry-report-page {
    padding: 24px 0;
}

.laundry-report-card {
    max-width: 760px;
    background: var(--laundry-card-bg, #ffffff);
    border: 1px solid var(--laundry-border, #e5e7eb);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 14px var(--laundry-shadow, rgba(15, 23, 42, 0.04));
}

.laundry-report-card h1 {
    margin: 0 0 8px;
    color: var(--laundry-text, #003262);
    font-size: 28px;
    font-weight: 800;
}

.laundry-report-card p {
    margin: 0 0 24px;
    color: var(--laundry-text-soft, #6b7280);
}

.laundry-report-form {
    display: grid;
    gap: 16px;
}

.laundry-report-field {
    display: grid;
    gap: 6px;
}

.laundry-report-field label {
    font-weight: 700;
    color: var(--laundry-text, #111827);
}

.laundry-report-field input,
.laundry-report-field select {
    height: 42px;
    border: 1px solid var(--laundry-border, #e5e7eb);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--laundry-card-bg, #ffffff);
    color: var(--laundry-text, #111827);
}

.laundry-report-preview {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(252, 181, 21, 0.12);
    color: var(--laundry-text, #111827);
}

.laundry-report-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.laundry-report-primary,
.laundry-report-secondary {
    height: 42px;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.laundry-report-primary {
    background: #FCB515;
    color: #111827;
    border: 1px solid #FCB515;
    cursor: pointer;
}

.laundry-report-secondary {
    background: transparent;
    color: var(--laundry-text, #111827);
    border: 1px solid var(--laundry-border, #e5e7eb);
}

/* =========================
   Income report button in changelist
   ========================= */

.income-report-object-button:hover {
    background: #e3a312 !important;
    border-color: #e3a312 !important;
    color: #111827 !important;
}

.income-report-object-icon {
    font-size: 18px !important;
    line-height: 1 !important;
}

/* Hilangkan pseudo icon jika Unfold/Django mencoba inject icon */
.income-report-object-button::before,
.income-report-object-button::after {
    display: none !important;
    content: none !important;
}

/* =========================
   Django Map Widgets + Unfold
   ========================= */

.map-widget,
.map-widget-wrapper,
.map-widget-container,
.django-map-widget,
[id*="mapwidget"],
[id*="map-widget"] {
    width: 100% !important;
    min-height: 420px !important;
}

.map-widget iframe,
.map-widget canvas,
.map-widget div,
[id*="mapwidget"] div {
    max-width: 100%;
}

.form-row .map-widget,
.form-row [id*="mapwidget"],
fieldset .map-widget,
fieldset [id*="mapwidget"] {
    margin-top: 10px;
    margin-bottom: 18px;
}