/*
 * Rivercraft Global
 * UI tetap mengikuti Webarch/Bootstrap bawaan template.
 * File ini hanya untuk standar global Rivercraft dan koreksi responsif minimum.
 */

html,
body {
    min-width: 0;
}

body,
.page-content,
.page-content p,
.page-content label,
.page-content .table,
.page-content .btn,
.page-content .dropdown-menu,
.page-content .form-control,
.page-content input,
.page-content select,
.page-content textarea {
    font-size: 14px;
}

.page-content .content {
    min-height: 120px;
}

.table-responsive {
    border: 0;
}

img {
    max-width: 100%;
}

.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-confirm,
.swal2-cancel {
    font-size: 14px;
}

@media (max-width: 1024px) {
    .page-content .content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 767px) {
    body,
    .page-content,
    .page-content p,
    .page-content label,
    .page-content .table,
    .page-content .btn,
    .page-content .dropdown-menu,
    .page-content .form-control,
    .page-content input,
    .page-content select,
    .page-content textarea,
    .page-sidebar .page-sidebar-wrapper > ul > li > a,
    .page-sidebar .page-sidebar-wrapper > ul > li > ul.sub-menu > li > a {
        font-size: 16px;
    }

    .page-content .content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .grid.simple .grid-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .swal2-popup,
    .swal2-title,
    .swal2-html-container,
    .swal2-confirm,
    .swal2-cancel {
        font-size: 16px;
    }
}

/* =========================================================
   Rivercraft form-control normalization v1.5.0
   Keep native Webarch/Bootstrap resets from changing field height/alignment.
   ========================================================= */
.rivercraft-shell,
.rivercraft-shell *,
.rivercraft-shell *::before,
.rivercraft-shell *::after {
    box-sizing: border-box;
}

body.rivercraft-shell .rc-field {
    min-width: 0;
    margin: 0;
}

body.rivercraft-shell .rc-field input,
body.rivercraft-shell .rc-field select,
body.rivercraft-shell .rc-field textarea {
    box-sizing: border-box !important;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    border: 1px solid var(--rc-line-strong, #cad8d6);
    border-radius: 9px;
    background-color: #fff;
    color: var(--rc-ink-950, #1d2829);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    vertical-align: middle;
    outline: 0;
}

body.rivercraft-shell .rc-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.rivercraft-shell .rc-field select {
    height: 42px !important;
    min-height: 42px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.rivercraft-shell .rc-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]) {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

body.rivercraft-shell .rc-field select {
    -webkit-appearance: none;
    appearance: none;
    padding-left: 12px !important;
    padding-right: 34px !important;
    background-image:
        linear-gradient(45deg, transparent 50%, #667879 50%),
        linear-gradient(135deg, #667879 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 18px,
        calc(100% - 11px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

body.rivercraft-shell .rc-field textarea {
    height: auto !important;
    min-height: 96px !important;
    padding: 10px 12px !important;
    line-height: 1.45;
    resize: vertical;
}

body.rivercraft-shell .rc-field input[type="date"],
body.rivercraft-shell .rc-field input[type="datetime-local"],
body.rivercraft-shell .rc-field input[type="time"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    color-scheme: light;
    line-height: normal !important;
}

body.rivercraft-shell .rc-field input[type="date"]::-webkit-date-and-time-value,
body.rivercraft-shell .rc-field input[type="datetime-local"]::-webkit-date-and-time-value,
body.rivercraft-shell .rc-field input[type="time"]::-webkit-date-and-time-value {
    min-height: 0;
    margin: 0;
    padding: 0;
    text-align: left;
}

body.rivercraft-shell .rc-field input[type="date"]::-webkit-calendar-picker-indicator,
body.rivercraft-shell .rc-field input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.rivercraft-shell .rc-field input[type="time"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 2px;
    cursor: pointer;
}

body.rivercraft-shell .rc-field input:disabled,
body.rivercraft-shell .rc-field select:disabled,
body.rivercraft-shell .rc-field textarea:disabled,
body.rivercraft-shell .rc-field input[readonly] {
    opacity: 1;
    background-color: #f4f6f5;
    color: var(--rc-ink-500, #6c7d7e);
    cursor: not-allowed;
}

body.rivercraft-shell .rc-field input:focus,
body.rivercraft-shell .rc-field select:focus,
body.rivercraft-shell .rc-field textarea:focus {
    border-color: #75aea8;
    box-shadow: 0 0 0 3px var(--rc-river-soft, #e8f4f2);
}

body.rivercraft-shell .rc-password-input {
    width: 100%;
    min-width: 0;
}

body.rivercraft-shell .rc-password-input input {
    padding-right: 46px !important;
}

@media (max-width: 767px) {
    body.rivercraft-shell .rc-field input,
    body.rivercraft-shell .rc-field select,
    body.rivercraft-shell .rc-field textarea {
        font-size: 16px;
    }

    body.rivercraft-shell .rc-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
    body.rivercraft-shell .rc-field select {
        height: 46px !important;
        min-height: 46px !important;
    }

    body.rivercraft-shell .rc-field select {
        background-position:
            calc(100% - 16px) 20px,
            calc(100% - 11px) 20px;
    }
}

/* =========================================================
   Rivercraft generated identifiers + native control polish v1.5.1
   System codes are displayed, never typed manually.
   ========================================================= */
body.rivercraft-shell .rc-system-code-field {
    min-width: 0;
}

body.rivercraft-shell .rc-generated-code {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px dashed #bfd0ce;
    border-radius: 9px;
    background: #f7faf9;
    color: var(--rc-ink-700, #405557);
    overflow: hidden;
}

body.rivercraft-shell .rc-generated-code .material-icons {
    flex: 0 0 auto;
    color: var(--rc-river, #0e6f68);
    font-size: 18px;
}

body.rivercraft-shell .rc-generated-code strong {
    min-width: 0;
    overflow: hidden;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace !important;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.rivercraft-shell .rc-system-code-field > small {
    display: block;
    margin-top: 5px;
    color: var(--rc-ink-500, #7b8b8d);
    font-size: 11px;
    line-height: 1.45;
}

body.rivercraft-shell .rc-field input[type="date"],
body.rivercraft-shell .rc-field input[type="datetime-local"],
body.rivercraft-shell .rc-field input[type="time"] {
    padding-right: 10px !important;
}

body.rivercraft-shell .rc-field input[type="date"]::-webkit-calendar-picker-indicator,
body.rivercraft-shell .rc-field input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.rivercraft-shell .rc-field input[type="time"]::-webkit-calendar-picker-indicator {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    padding: 0;
    opacity: .75;
}

@media (max-width: 767px) {
    body.rivercraft-shell .rc-generated-code {
        min-height: 46px;
        padding: 0 13px;
    }

    body.rivercraft-shell .rc-generated-code strong {
        font-size: 13px;
    }

    body.rivercraft-shell .rc-system-code-field > small {
        font-size: 12px;
    }
}
