/* ReportIT WSS Professional V5 — reporting, master data, activity and suggestions */
:root {
    --rit-v5-red: #b91c1c;
    --rit-v5-red-dark: #7f1d1d;
    --rit-v5-ink: #0f172a;
    --rit-v5-muted: #64748b;
    --rit-v5-line: #e2e8f0;
    --rit-v5-soft: #f8fafc;
    --rit-v5-surface: #fff;
    --rit-v5-shadow: 0 14px 38px rgba(15, 23, 42, .08);
}

.rit-report-stats,
.rit-mini-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rit-report-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.rit-report-filter .form-group,
.rit-filter-card-v4 .form-group {
    margin-bottom: 12px;
}

.rit-report-table-wrap {
    margin-top: 18px;
}

.rit-report-table {
    min-width: 1680px;
    font-size: 11px;
}

.rit-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #172033;
    color: #fff;
    border: 0;
    font-size: 10px;
    letter-spacing: .35px;
    padding: 13px 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.rit-report-table td {
    max-width: 260px;
    border-top: 1px solid #eef2f7;
    padding: 13px 12px;
    vertical-align: top;
}

.rit-report-description,
.rit-report-response {
    display: block;
    max-width: 280px;
    line-height: 1.55;
    white-space: normal;
}

.rit-report-response {
    max-height: 84px;
    overflow: hidden;
}

.rit-report-response + small {
    display: block;
    color: var(--rit-v5-muted);
    margin-top: 6px;
}

.rit-user-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin-right: 9px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--rit-v5-red), var(--rit-v5-red-dark));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    vertical-align: middle;
}

.rit-log-message {
    display: block;
    color: #334155;
    line-height: 1.6;
}

.rit-feedback-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.rit-feedback-card {
    display: flex;
    min-height: 245px;
    flex-direction: column;
    border: 1px solid var(--rit-v5-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--rit-v5-shadow);
    padding: 19px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.rit-feedback-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .11);
}

.rit-feedback-head {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rit-feedback-head strong,
.rit-feedback-head span {
    display: block;
}

.rit-feedback-head strong {
    color: var(--rit-v5-ink);
    font-size: 13px;
}

.rit-feedback-head span {
    margin-top: 3px;
    color: var(--rit-v5-muted);
    font-size: 10px;
}

.rit-feedback-body {
    flex: 1;
    margin: 17px 0;
    padding: 15px;
    border-radius: 12px;
    background: var(--rit-v5-soft);
    color: #334155;
    font-size: 12px;
    line-height: 1.7;
}

.rit-feedback-meta {
    display: grid;
    gap: 7px;
    margin-bottom: 13px;
    color: var(--rit-v5-muted);
    font-size: 10px;
}

.rit-feedback-meta span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rit-feedback-meta i {
    width: 14px;
    color: var(--rit-v5-red);
    text-align: center;
}

.rit-feedback-empty {
    grid-column: 1 / -1;
    min-height: 260px;
    border: 1px dashed #cbd5e1;
    border-radius: 17px;
    background: #fff;
}

/* Legacy master data pages receive a professional surface without rewriting CRUD logic. */
body.rit-master-page .content-wrapper > .container,
body.rit-master-page .content-wrapper > .container-fluid,
body.rit-master-form-page .content-wrapper > .container,
body.rit-master-form-page .content-wrapper > .container-fluid {
    max-width: none;
    padding: 22px 24px 30px;
}

body.rit-master-page .content-wrapper > .container > .row:first-child,
body.rit-master-form-page .content-wrapper > .container > .row:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 17px;
    padding: 0 !important;
}

body.rit-master-page .header-title,
body.rit-master-page .header-button,
body.rit-master-form-page .header-title,
body.rit-master-form-page .header-button {
    flex: initial;
    max-width: none;
    padding: 0;
}

body.rit-master-page .header-title h3,
body.rit-master-form-page .header-title h3 {
    margin: 0;
    color: var(--rit-v5-ink);
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    font-weight: 800;
}

body.rit-master-page .header-title h3::before,
body.rit-master-form-page .header-title h3::before {
    content: "MASTER DATA";
    display: block;
    margin-bottom: 6px;
    color: var(--rit-v5-red);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

body.rit-master-page .header-button .btn,
body.rit-master-form-page .header-button .btn {
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--rit-v5-red), var(--rit-v5-red-dark));
    box-shadow: 0 9px 20px rgba(185, 28, 28, .2);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 16px;
}

body.rit-master-page .content-wrapper > .container > .row.py-3:not(:first-child),
body.rit-master-form-page .content-wrapper > .container > .row.py-3:not(:first-child) {
    margin: 0;
    padding: 0 !important;
}

body.rit-master-page .table-responsive,
body.rit-master-form-page .card,
body.rit-master-form-page form:not(.navbar-search) {
    border: 1px solid var(--rit-v5-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--rit-v5-shadow);
    padding: 18px;
}

body.rit-master-page .table-responsive {
    overflow-x: auto;
}

body.rit-master-page table.dataTable,
body.rit-master-page #table_id {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

body.rit-master-page #table_id thead th {
    border: 0;
    background: #172033;
    color: #fff;
    font-size: 10px;
    letter-spacing: .4px;
    padding: 13px 14px;
    text-transform: uppercase;
}

body.rit-master-page #table_id thead th:first-child { border-radius: 10px 0 0 10px; }
body.rit-master-page #table_id thead th:last-child { border-radius: 0 10px 10px 0; }
body.rit-master-page #table_id tbody td {
    border-top: 1px solid #eef2f7;
    padding: 13px 14px;
    color: #334155;
    font-size: 12px;
}

body.rit-master-page #table_id tbody tr:hover {
    background: #fef2f2;
}

body.rit-master-page .dataTables_wrapper .dataTables_length,
body.rit-master-page .dataTables_wrapper .dataTables_filter {
    margin-bottom: 13px;
    color: var(--rit-v5-muted);
    font-size: 11px;
}

body.rit-master-page .dataTables_wrapper input,
body.rit-master-page .dataTables_wrapper select,
body.rit-master-form-page .form-control {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}

body.rit-master-page .btn-sm {
    min-width: 35px;
    min-height: 34px;
    border-radius: 9px;
}

body.rit-master-form-page form:not(.navbar-search) {
    max-width: 850px;
    margin: 0 auto;
}

body.rit-master-form-page label {
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

body.rit-master-form-page .btn-primary,
body.rit-master-form-page .btn-success {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--rit-v5-red), var(--rit-v5-red-dark));
}

.public-complaint-form textarea:invalid:not(:placeholder-shown),
#isi_laporan:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

.textarea-counter small {
    color: #64748b;
    font-size: 10px;
}

@media (max-width: 1199px) {
    .rit-report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rit-feedback-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .rit-report-stats,
    .rit-mini-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rit-feedback-grid { grid-template-columns: 1fr; }
    body.rit-master-page .content-wrapper > .container,
    body.rit-master-form-page .content-wrapper > .container { padding: 16px 14px 24px; }
    body.rit-master-page .content-wrapper > .container > .row:first-child,
    body.rit-master-form-page .content-wrapper > .container > .row:first-child {
        align-items: stretch;
        flex-direction: column;
    }
    body.rit-master-page .header-button .btn,
    body.rit-master-form-page .header-button .btn { width: 100%; }
    .rit-report-table { min-width: 0; }
}
