/**
 * ==========================================================
 * MODUL IRIGASI - DESAIN MERCU BENDUNG
 * File: /modules/irigasi/bendung/assets/css/desain-mercu.css
 * Fungsi:
 * - Styling halaman desain mercu
 * - Styling mode preview/cetak
 * - Styling report desain mercu
 * ==========================================================
 */

/* ==========================================================
   MERCU PAGE LAYOUT
   ========================================================== */

.mercu-hero {
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, 0.12), transparent 32rem),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.mercu-hero .display-3 {
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.mercu-hero-panel {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.mercu-hero-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid #eef2f7;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 0.92rem;
}

.mercu-hero-metric span {
    color: #64748b;
}

.mercu-hero-metric strong {
    color: #0f172a;
    font-weight: 700;
}

.mercu-main {
    background: #f8fafc;
}

.mercu-main .card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden;
}

.mercu-main .card-body {
    padding: 24px;
}

.mercu-side-sticky {
    position: sticky;
    top: 92px;
}

.mercu-main .table {
    margin-bottom: 0;
}

.mercu-main .table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    vertical-align: middle;
}

.mercu-main .table td {
    vertical-align: middle;
}

.mercu-main .form-label {
    font-weight: 700;
    color: #1f2937;
}

.mercu-main .form-text {
    color: #64748b;
    font-size: 0.82rem;
}

.mercu-main .form-control,
.mercu-main .form-select,
.mercu-main .input-group-text {
    border-color: #dbe3ef;
}

.mercu-main .form-control:focus,
.mercu-main .form-select:focus {
    border-color: #7aa7ff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}

.mercu-main img {
    max-width: 100%;
}

.mercu-main .alert {
    border-radius: 14px;
}

.mercu-main .badge {
    letter-spacing: 0.01em;
}

/* ==========================================================
   REPORT / PREVIEW / CETAK
   ========================================================== */

.mercu-report-wrap {
    background: #ffffff;
    color: #111827;
    max-width: 980px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.mercu-report-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 2px solid #111827;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.mercu-report-header h1 {
    font-size: 26px;
    margin: 0 0 6px 0;
    color: #111827;
    letter-spacing: -0.025em;
}

.mercu-report-header p {
    margin: 0;
    color: #4b5563;
}

.mercu-report-meta {
    text-align: right;
    font-size: 13px;
    color: #374151;
    min-width: 220px;
}

.report-section {
    margin-bottom: 24px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.report-section h2 {
    font-size: 17px;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #d1d5db;
    color: #111827;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.report-table th,
.report-table td {
    border: 1px solid #d1d5db;
    padding: 7px 9px;
    vertical-align: top;
}

.report-table th {
    width: 20%;
    background: #f3f4f6;
    font-weight: 700;
}

.report-note {
    font-size: 12px;
    margin-top: 8px;
    color: #374151;
}

.report-note-box {
    border: 1px solid #d1d5db;
    background: #f9fafb;
    padding: 12px;
    font-size: 12px;
    white-space: normal;
    border-radius: 10px;
}

.report-svg {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
}

.report-svg svg {
    max-height: 430px;
    width: 100%;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 991.98px) {
    .mercu-side-sticky {
        position: static;
    }

    .mercu-report-header {
        flex-direction: column;
    }

    .mercu-report-meta {
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    .mercu-main .card-body {
        padding: 18px;
    }

    .mercu-report-wrap {
        padding: 18px;
        border-radius: 14px;
    }

    .report-table {
        font-size: 12px;
    }

    .report-table th,
    .report-table td {
        padding: 6px;
    }
}

/* ==========================================================
   PRINT
   ========================================================== */

@media print {
    .no-print,
    header,
    footer,
    .navbar,
    .breadcrumb,
    .btn,
    .alert-success,
    .alert-danger,
    .wrapper.bg-soft-primary {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .wrapper,
    .container {
        padding: 0 !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .mercu-main {
        background: #ffffff !important;
    }

    .mercu-report-wrap {
        max-width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .mercu-report-header {
        margin-bottom: 10mm;
        padding-bottom: 5mm;
    }

    .mercu-report-header h1 {
        font-size: 18pt;
    }

    .mercu-report-meta {
        font-size: 9pt;
    }

    .report-section {
        margin-bottom: 7mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .report-section h2 {
        font-size: 12pt;
    }

    .report-table {
        font-size: 8.7pt;
    }

    .report-table th,
    .report-table td {
        padding: 4px 5px;
    }

    .report-note,
    .report-note-box {
        font-size: 8.5pt;
    }

    .report-svg {
        border: 1px solid #cccccc;
        padding: 4mm;
    }

    .report-svg svg {
        max-height: 105mm;
        width: 100%;
    }

    @page {
        size: A4 portrait;
        margin: 12mm;
    }
}

/* ==========================================================
   CATATAN PERHITUNGAN MERCU
   ========================================================== */

.mercu-note-box {
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-left: 5px solid #0d6efd;
    border-radius: 14px;
    padding: 18px 20px;
}

.mercu-note-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 0.98rem;
}

.mercu-note-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.65;
}

.mercu-note-list li {
    margin-bottom: 6px;
}

.mercu-note-list li:last-child {
    margin-bottom: 0;
}

.report-note-box .mercu-note-list {
    font-size: 12px;
    line-height: 1.55;
}

@media print {
    .mercu-note-box {
        border: 1px solid #cccccc;
        border-left: 3px solid #000000;
        background: #ffffff;
        padding: 8px 10px;
    }

    .mercu-note-title {
        font-size: 10pt;
        margin-bottom: 6px;
    }

    .mercu-note-list,
    .report-note-box .mercu-note-list {
        font-size: 8.5pt;
        line-height: 1.45;
    }

    .mercu-note-list li {
        margin-bottom: 3px;
    }
}