/* =========================================================
   Railway RFI Manager PRO 1.3.0
   Complete UI CSS
   ========================================================= */


/* =========================================================
   MAIN WRAPPER
   ========================================================= */

.rrfi-wrap,
.rrfi-modal-wrap {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: #172033;
    max-width: 1400px;
    margin: 18px auto;
    padding: 0 14px;
}


/* =========================================================
   RFI PAGE HEADER + COUNT BOXES
   ========================================================= */

/*
   IMPORTANT:
   Header and statistics are arranged by the parent grid.
   This allows RFI Management on the left and the
   3 small count boxes on the right WITHOUT changing
   the existing PHP structure.
*/

.rrfi-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 28px;
    row-gap: 0;
}


/* Header */

.rrfi-head {
    grid-column: 1;
    grid-row: 1;

    display: flex;
    align-items: flex-start;
    justify-content: flex-start;

    margin: 0;
    padding: 2px 0 0 0;

    min-width: 0;
}


.rrfi-head .rrfi-kicker {
    display: none;
}


.rrfi-head h2 {
    margin: 0 0 6px 0;
    padding: 0;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;

    color: #111827;
}


.rrfi-head p {
    margin: 0;
    padding: 0;

    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}


/* =========================================================
   SMALL RFI COUNT BOXES
   ========================================================= */

.rrfi-stats {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    margin: 0;
    padding: 0;

    width: auto;
}


/* Each small box */

.rrfi-stats > div {
    flex: 0 0 auto;

    width: 108px;
    min-width: 108px;

    height: 58px;
    min-height: 58px;

    box-sizing: border-box;

    padding: 8px 11px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 9px;

    box-shadow: 0 2px 7px rgba(15, 23, 42, .04);

    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Count number */

.rrfi-stats b {
    display: block;

    margin: 0 0 3px 0;
    padding: 0;

    font-size: 21px;
    line-height: 1;

    font-weight: 600;

    color: #111827;
}


/* Count title */

.rrfi-stats span {
    display: block;

    margin: 0;
    padding: 0;

    font-size: 10.5px;
    line-height: 1.15;

    color: #64748b;

    white-space: nowrap;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.rrfi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 17px;

    border-radius: 10px;

    text-decoration: none;

    border: 1px solid #dbe1ea;

    font-weight: 700;
    font-size: 14px;

    cursor: pointer;
}


.rrfi-primary {
    background: #1f5eff;
    color: #fff !important;
    border-color: #1f5eff;
}


.rrfi-light {
    background: #fff;
    color: #334155;
}


/* =========================================================
   FILTER AREA
   ========================================================= */

.rrfi-filters {
    grid-column: 1 / -1;
    grid-row: 2;

    display: grid;

    grid-template-columns: repeat(6, 1fr);

    gap: 12px;

    background: #f8fafc;

    border: 1px solid #e7ebf1;

    padding: 15px;

    border-radius: 13px;

    margin: 18px 0 18px 0;
}


/* Filter labels */

.rrfi-filters label,
.rrfi-form label {
    display: block;

    font-size: 12px;
    font-weight: 800;

    color: #475569;

    margin: 0 0 6px 0;
}


/* Inputs */

.rrfi-filters input,
.rrfi-filters select,
.rrfi-form input,
.rrfi-form select,
.rrfi-form textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #d7dee8;

    border-radius: 9px;

    background: #fff;

    min-height: 42px;

    padding: 9px 11px;

    font: inherit;

    color: #172033;
}


.rrfi-form textarea {
    min-height: 100px;
    resize: vertical;
}


/* Filter buttons */

.rrfi-filter-actions {
    display: flex;

    gap: 8px;

    align-items: end;
}


/* =========================================================
   RFI TABLE
   ========================================================= */

.rrfi-table-card {
    grid-column: 1 / -1;
    grid-row: 3;

    background: #fff;

    border: 1px solid #e5e9ef;

    border-radius: 14px;

    overflow: hidden;

    box-shadow: 0 5px 18px rgba(15, 23, 42, .05);

    margin: 0;
}


.rrfi-table-scroll {
    overflow: auto;
}


.rrfi-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 1050px;
}


.rrfi-table th {
    background: #f7f8fa;

    text-align: left;

    padding: 13px 12px;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: .4px;

    color: #64748b;

    white-space: nowrap;
}


.rrfi-table td {
    padding: 13px 12px;

    border-top: 1px solid #edf0f4;

    font-size: 13px;

    vertical-align: middle;
}

/* Date column: keep the full date on one line */
.rrfi-table th:nth-child(2),
.rrfi-table td:nth-child(2) {
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* Action column: reserve enough space for all action buttons */
.rrfi-table th:last-child,
.rrfi-table td:last-child {
    width: 185px !important;
    min-width: 185px !important;
    white-space: nowrap !important;
}


.rrfi-table tbody tr:hover td {
    background: #fbfdff;
}


/* =========================================================
   STATUS
   ========================================================= */

.rrfi-status {
    display: inline-flex;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: .5px;
}


.rrfi-status.open {
    background: #e8f8ee;

    color: #167344;

    box-shadow:
        inset 0 0 0 1px rgba(22, 115, 68, .08);
}


.rrfi-status.close {
    background: #eef1f5;

    color: #475569;

    box-shadow:
        inset 0 0 0 1px rgba(71, 85, 105, .08);
}


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.rrfi-actions {
    display: flex !important;
    gap: 7px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
    min-width: 175px !important;
}


.rrfi-iconbtn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;

    border: 1px solid #cbd5e1 !important;

    border-radius: 7px !important;

    background: #ffffff !important;

    color: #172033 !important;

    font-weight: 700 !important;
    font-size: 15px !important;

    text-decoration: none;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    box-sizing: border-box;

    transition: .12s ease;
}


.rrfi-iconbtn:hover {
    background: #f3f7ff;

    border-color: #b8c9e8;

    color: #1555c0;

    transform: translateY(-1px);
}


.rrfi-iconbtn.danger {
    color: #b42318;
}


.rrfi-iconbtn.danger:hover {
    background: #fff2f2;

    border-color: #f0b7b7;

    color: #b42318;
}


/* =========================================================
   EMPTY / NOTICE
   ========================================================= */

.rrfi-empty {
    text-align: center;

    padding: 35px;

    color: #64748b;
}


.rrfi-notice {
    background: #ecfdf3;

    border: 1px solid #b7ebcc;

    color: #17633a;

    padding: 12px 15px;

    border-radius: 10px;

    margin-bottom: 14px;
}


/* =========================================================
   FORM
   ========================================================= */

.rrfi-modal-wrap {
    max-width: 1000px;
}


.rrfi-form-card {
    background: #fff;

    border: 1px solid #e2e7ef;

    border-radius: 16px;

    box-shadow:
        0 12px 40px rgba(15, 23, 42, .10);

    overflow: hidden;
}


.rrfi-form-head {
    display: flex;

    justify-content: space-between;

    padding: 22px 24px;

    border-bottom: 1px solid #edf0f4;
}


.rrfi-form-head h2 {
    margin: 4px 0 0;
}


.rrfi-close {
    text-decoration: none;

    font-size: 30px;

    color: #64748b;
}


.rrfi-form {
    padding: 22px;
}


.rrfi-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 16px;
}


.rrfi-grid .full {
    grid-column: 1 / -1;
}


.rrfi-form small {
    display: block;

    color: #94a3b8;

    margin-top: 5px;

    font-size: 11px;
}


.rrfi-form-footer {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    border-top: 1px solid #edf0f4;

    padding-top: 18px;

    margin-top: 18px;
}


/* =========================================================
   DETAIL PAGE
   ========================================================= */

.rrfi-detail-card {
    background: #fff;

    border: 1px solid #e2e7ef;

    border-radius: 16px;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, .06);

    padding: 24px;
}


.rrfi-detail-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}


.rrfi-detail-grid span,
.rrfi-description > span {
    display: block;

    font-size: 11px;

    color: #64748b;

    text-transform: uppercase;

    font-weight: 800;

    letter-spacing: .5px;

    margin-bottom: 5px;
}


.rrfi-detail-grid strong {
    font-size: 15px;
}


.rrfi-description {
    margin-top: 22px;

    padding-top: 18px;

    border-top: 1px solid #edf0f4;
}


.rrfi-description p {
    line-height: 1.6;
}


.rrfi-files {
    margin-top: 22px;
}


.rrfi-files h3 {
    font-size: 18px;
}


.rrfi-file {
    display: flex;

    gap: 10px;

    align-items: center;

    border: 1px solid #e4e8ee;

    border-radius: 10px;

    padding: 12px;

    text-decoration: none;

    color: #172033;

    margin-top: 8px;
}


.rrfi-file:hover {
    background: #f8fbff;

    border-color: #c8d8ef;
}


.rrfi-file span {
    font-size: 20px;
}


.rrfi-file b {
    flex: 1;
}


.rrfi-file em {
    font-style: normal;

    color: #1f5eff;

    font-size: 12px;

    font-weight: 800;
}


/* =========================================================
   ADMIN AREA
   ========================================================= */

.rrfi-admin-wrap {
    max-width: 1500px;

    padding-right: 20px;
}


.rrfi-admin-hero {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin: 22px 0 20px;

    padding: 24px 26px;

    background: linear-gradient(
        135deg,
        #0f2f63 0%,
        #174ea6 58%,
        #2563eb 100%
    );

    border-radius: 16px;

    color: #fff;

    box-shadow:
        0 12px 32px rgba(15, 47, 99, .18);
}


.rrfi-admin-hero h1 {
    margin: 5px 0 4px;

    color: #fff;

    font-size: 28px;

    font-weight: 800;
}


.rrfi-admin-hero p {
    margin: 0;

    color: rgba(255,255,255,.82);

    font-size: 13px;
}


.rrfi-admin-hero .rrfi-kicker {
    color: #bfdbfe;
}


.rrfi-admin-primary {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    background: #fff;

    color: #123a78 !important;

    text-decoration: none;

    border-radius: 10px;

    padding: 11px 16px;

    font-weight: 800;

    box-shadow: 0 5px 14px rgba(0,0,0,.12);

    white-space: nowrap;
}


.rrfi-admin-primary:hover {
    background: #f8fafc;
}


.rrfi-admin-primary span {
    font-size: 18px;

    line-height: 1;
}


.rrfi-admin-cards {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin: 22px 0;
}


.rrfi-admin-card {
    position: relative;

    overflow: hidden;

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 20px 21px;

    box-shadow:
        0 5px 18px rgba(15,23,42,.05);
}


.rrfi-admin-card:after {
    content: "";

    position: absolute;

    right: -22px;

    bottom: -28px;

    width: 90px;

    height: 90px;

    border-radius: 50%;

    background: currentColor;

    opacity: .06;
}


.rrfi-admin-card.blue {
    color: #1f5eff;
}


.rrfi-admin-card.green {
    color: #16844a;
}


.rrfi-admin-card.slate {
    color: #475569;
}


.rrfi-admin-card.purple {
    color: #7c3aed;
}


.rrfi-admin-card span,
.rrfi-admin-card strong,
.rrfi-admin-card small {
    position: relative;

    z-index: 1;
}


.rrfi-admin-card span {
    display: block;

    color: #64748b;

    font-weight: 700;

    font-size: 13px;
}


.rrfi-admin-card strong {
    display: block;

    color: #172033;

    font-size: 30px;

    margin-top: 8px;
}


.rrfi-admin-card small {
    display: block;

    color: #94a3b8;

    margin-top: 4px;

    font-size: 11px;
}


.rrfi-admin-quick {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;

    margin-top: 18px;
}


.rrfi-quick-card {
    display: block;

    background: #fff;

    border: 1px solid #e5eaf1;

    border-radius: 14px;

    padding: 18px 20px;

    text-decoration: none;

    box-shadow:
        0 5px 18px rgba(15,23,42,.04);

    transition: .15s ease;
}


.rrfi-quick-card:hover {
    transform: translateY(-1px);

    border-color: #b8c7df;

    box-shadow:
        0 9px 24px rgba(15,23,42,.08);
}


.rrfi-quick-card b {
    display: block;

    color: #172033;

    font-size: 15px;

    margin-bottom: 4px;
}


.rrfi-quick-card span {
    color: #64748b;

    font-size: 12px;
}


.rrfi-admin-title {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 16px;

    margin: 20px 0;

    padding: 3px 0 10px;
}


.rrfi-admin-title h1 {
    margin: 0 0 5px;

    font-size: 26px;

    font-weight: 800;
}


.rrfi-admin-title p {
    margin: 0;

    color: #64748b;

    font-size: 13px;
}


.rrfi-admin-wrap .rrfi-form-card {
    max-width: 1180px;

    border-radius: 16px;

    box-shadow:
        0 7px 26px rgba(15,23,42,.07);
}


.rrfi-admin-wrap .rrfi-form {
    padding: 25px;

    background: #fff;
}


.rrfi-admin-wrap .rrfi-form input,
.rrfi-admin-wrap .rrfi-form select,
.rrfi-admin-wrap .rrfi-form textarea {
    border-color: #d5dce6;

    box-shadow:
        0 1px 2px rgba(15,23,42,.02);

    transition:
        border-color .15s,
        box-shadow .15s;
}


.rrfi-admin-wrap .rrfi-form input:focus,
.rrfi-admin-wrap .rrfi-form select:focus,
.rrfi-admin-wrap .rrfi-form textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37,99,235,.10);

    outline: none;
}


.rrfi-admin-wrap .rrfi-form input[type=file] {
    padding: 7px;

    background: #f8fafc;
}


.rrfi-admin-wrap .rrfi-form-footer {
    align-items: center;
}


.rrfi-admin-wrap .rrfi-form-footer .button,
.rrfi-admin-wrap .rrfi-form-footer button {
    min-height: 40px;

    padding: 0 16px;

    border-radius: 9px;

    font-weight: 700;
}


.rrfi-admin-wrap .button.button-primary {
    background: #1f5eff;

    border-color: #1f5eff;

    box-shadow:
        0 3px 8px rgba(31,94,255,.16);
}


.rrfi-admin-wrap .button.button-primary:hover {
    background: #174fd7;

    border-color: #174fd7;
}


.rrfi-admin-filters {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(120px, 1fr));

    align-items: end;

    gap: 12px;

    margin: 15px 0 20px;
}


.rrfi-admin-filters .rrfi-filter-actions {
    grid-column: auto;
}


.rrfi-admin-wrap .rrfi-table-card {
    margin-top: 10px;

    box-shadow:
        0 7px 25px rgba(15,23,42,.06);
}


.rrfi-admin-wrap .rrfi-table th {
    background: #f3f6fa;

    color: #526173;
}


.rrfi-admin-wrap .rrfi-table td {
    background: #fff;
}


.rrfi-admin-wrap .rrfi-table tbody tr:hover td {
    background: #fbfdff;
}


.rrfi-login {
    max-width: 700px;

    margin: 35px auto;

    padding: 18px;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    background: #fff;

    color: #475569;

    text-align: center;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .rrfi-filters {
        grid-template-columns: repeat(3, 1fr);
    }

    .rrfi-admin-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .rrfi-admin-filters {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* =========================================================
   900px
   ========================================================= */

@media (max-width: 900px) {

    .rrfi-wrap {
        grid-template-columns: 1fr;
        row-gap: 0;
    }

    .rrfi-head {
        grid-column: 1;
        grid-row: 1;

        margin-bottom: 12px;
    }

    .rrfi-stats {
        grid-column: 1;
        grid-row: 2;

        justify-content: flex-start;

        margin-bottom: 16px;
    }

    .rrfi-filters {
        grid-column: 1;
        grid-row: 3;
    }

    .rrfi-table-card {
        grid-column: 1;
        grid-row: 4;
    }

    .rrfi-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rrfi-admin-title {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .rrfi-wrap,
    .rrfi-modal-wrap {
        margin: 14px auto;
        padding: 0 8px;
    }


    /* Header */

    .rrfi-head {
        margin-bottom: 10px;
    }

    .rrfi-head h2 {
        font-size: 24px;

        margin-bottom: 5px;
    }

    .rrfi-head p {
        font-size: 13px;
    }


    /* Small count boxes */

    .rrfi-stats {
        display: grid;

        grid-template-columns:
            repeat(3, 1fr);

        gap: 7px;

        width: 100%;

        margin-bottom: 14px;
    }


    .rrfi-stats > div {
        width: auto;

        min-width: 0;

        height: 54px;

        min-height: 54px;

        padding: 7px 8px;

        border-radius: 8px;
    }


    .rrfi-stats b {
        font-size: 19px;

        margin-bottom: 2px;
    }


    .rrfi-stats span {
        font-size: 9.5px;
    }


    /* Filters */

    .rrfi-filters {
        grid-template-columns: 1fr;

        gap: 11px;

        padding: 13px;

        margin-top: 0;
    }


    /* Form */

    .rrfi-grid {
        grid-template-columns: 1fr;
    }

    .rrfi-grid .full {
        grid-column: auto;
    }


    .rrfi-filter-actions {
        align-items: stretch;
    }


    .rrfi-filter-actions .rrfi-btn {
        flex: 1;
    }


    /* Details */

    .rrfi-detail-grid {
        grid-template-columns: 1fr;
    }


    .rrfi-detail-card {
        padding: 16px;
    }


    /* Admin */

    .rrfi-admin-hero {
        align-items: flex-start;

        flex-direction: column;

        padding: 20px;
    }


    .rrfi-admin-hero h1 {
        font-size: 23px;
    }


    .rrfi-admin-primary {
        width: 100%;

        justify-content: center;
    }


    .rrfi-admin-cards {
        grid-template-columns: repeat(2, 1fr);

        gap: 10px;
    }


    .rrfi-admin-card {
        padding: 15px;
    }


    .rrfi-admin-card strong {
        font-size: 25px;
    }


    .rrfi-admin-quick {
        grid-template-columns: 1fr;
    }


    .rrfi-admin-filters {
        grid-template-columns: 1fr;
    }


    .rrfi-admin-wrap {
        padding-right: 10px;
    }


    .rrfi-admin-wrap .rrfi-form {
        padding: 16px;
    }
}

/* =========================================================
   FINAL COMPACT RFI LAYOUT
   ========================================================= */


/* =========================================================
   COUNT BOXES - SMALL + CENTERED
   ========================================================= */

/* Put the 3 count boxes in the center */
.rrfi-stats {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;

    display: flex !important;

    justify-content: center !important;
    align-items: center !important;

    gap: 7px !important;

    width: 100% !important;

    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}


/* Very small count boxes */
.rrfi-stats > div {
    flex: 0 0 90px !important;

    width: 90px !important;
    min-width: 90px !important;

    height: 50px !important;
    min-height: 50px !important;

    max-height: 50px !important;

    padding: 6px 8px !important;

    box-sizing: border-box !important;

    border-radius: 7px !important;

    display: flex !important;

    flex-direction: column !important;

    justify-content: center !important;

    align-items: flex-start !important;

    background: #fff !important;

    border: 1px solid #e2e8f0 !important;

    box-shadow:
        0 1px 5px rgba(15, 23, 42, .04) !important;
}


/* Number */
.rrfi-stats b {
    display: block !important;

    margin: 0 0 2px 0 !important;
    padding: 0 !important;

    font-size: 19px !important;

    line-height: 1 !important;

    font-weight: 600 !important;

    color: #111827 !important;
}


/* Label */
.rrfi-stats span {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 9px !important;

    line-height: 1.1 !important;

    color: #64748b !important;

    white-space: nowrap !important;
}


/* =========================================================
   HEADER - REMOVE EXTRA SPACE
   ========================================================= */

.rrfi-head {
    grid-column: 1 / -1 !important;
    grid-row: 0 !important;

    width: 100% !important;

    margin: 0 0 4px 0 !important;
    padding: 0 !important;

    min-height: 0 !important;
}


.rrfi-head h2 {
    margin: 0 0 4px 0 !important;

    padding: 0 !important;

    font-size: 27px !important;

    line-height: 1.2 !important;

    font-weight: 700 !important;

    color: #111827 !important;
}


.rrfi-head p {
    margin: 0 !important;

    padding: 0 !important;

    font-size: 13px !important;

    line-height: 1.25 !important;

    color: #64748b !important;
}


/* =========================================================
   FILTER PANEL - COMPACT
   ========================================================= */

.rrfi-filters {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;

    display: grid !important;

    grid-template-columns:
        repeat(6, minmax(140px, 1fr)) !important;

    gap: 9px !important;

    padding: 10px !important;

    margin: 0 0 14px 0 !important;

    border-radius: 11px !important;

    box-sizing: border-box !important;

    align-items: end !important;
}


/* =========================================================
   FILTER LABELS
   ========================================================= */

.rrfi-filters label {
    display: block !important;

    font-size: 10.5px !important;

    line-height: 1.1 !important;

    font-weight: 700 !important;

    color: #475569 !important;

    margin: 0 0 4px 0 !important;

    padding: 0 !important;
}


/* =========================================================
   ALL FILTER INPUTS - EXACT SAME HEIGHT
   ========================================================= */

.rrfi-filters input,
.rrfi-filters select {
    width: 100% !important;

    height: 36px !important;

    min-height: 36px !important;

    max-height: 36px !important;

    box-sizing: border-box !important;

    padding: 5px 9px !important;

    margin: 0 !important;

    border-radius: 7px !important;

    border: 1px solid #d7dee8 !important;

    background: #fff !important;

    font-size: 13px !important;

    line-height: 24px !important;

    color: #172033 !important;
}


/* Month */
.rrfi-filters input[type="month"] {
    height: 36px !important;

    min-height: 36px !important;

    max-height: 36px !important;
}


/* Date */
.rrfi-filters input[type="date"] {
    height: 36px !important;

    min-height: 36px !important;

    max-height: 36px !important;
}


/* =========================================================
   FILTER BUTTON AREA
   ========================================================= */

.rrfi-filter-actions {
    display: flex !important;

    align-items: center !important;
    justify-content: flex-end !important;

    gap: 7px !important;

    height: 36px !important;

    margin: 0 !important;
    padding: 0 !important;

    grid-column: 1 / -1 !important;
}


/* Filter + Reset buttons */
.rrfi-filter-actions .rrfi-btn {
    height: 36px !important;

    min-height: 36px !important;

    max-height: 36px !important;

    padding: 0 14px !important;

    border-radius: 7px !important;

    font-size: 12px !important;

    line-height: 36px !important;

    box-sizing: border-box !important;
}


/* =========================================================
   TABLE - SMALLER GAP FROM FILTER
   ========================================================= */

.rrfi-table-card {
    grid-column: 1 / -1 !important;

    margin-top: 0 !important;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 901px) {

    .rrfi-wrap {
        grid-template-columns: 1fr !important;

        row-gap: 0 !important;

        column-gap: 0 !important;
    }

    .rrfi-head {
        grid-row: 1 !important;

        text-align: left !important;

        margin-bottom: 4px !important;
    }

    .rrfi-stats {
        grid-row: 2 !important;

        margin-top: 0 !important;

        margin-bottom: 10px !important;
    }

    .rrfi-filters {
        grid-row: 3 !important;

        margin-top: 0 !important;

        margin-bottom: 14px !important;
    }

    .rrfi-table-card {
        grid-row: 4 !important;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .rrfi-stats {
        justify-content: center !important;

        margin: 0 0 9px 0 !important;
    }

    .rrfi-filters {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 9px !important;

        padding: 10px !important;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .rrfi-head {
        margin-bottom: 5px !important;
    }

    .rrfi-head h2 {
        font-size: 23px !important;
    }

    .rrfi-head p {
        font-size: 12px !important;
    }


    /* Small centered boxes */
    .rrfi-stats {
        display: flex !important;

        justify-content: center !important;

        gap: 6px !important;

        width: 100% !important;

        margin-bottom: 9px !important;
    }


    .rrfi-stats > div {
        flex: 0 0 85px !important;

        width: 85px !important;

        min-width: 85px !important;

        height: 48px !important;

        min-height: 48px !important;

        max-height: 48px !important;

        padding: 5px 7px !important;
    }


    .rrfi-stats b {
        font-size: 18px !important;
    }


    .rrfi-stats span {
        font-size: 8.5px !important;
    }


    /* One column filter on mobile */
    .rrfi-filters {
        grid-template-columns: 1fr !important;

        gap: 9px !important;

        padding: 10px !important;

        margin-bottom: 12px !important;
    }


    .rrfi-filters input,
    .rrfi-filters select {
        height: 36px !important;

        min-height: 36px !important;

        max-height: 36px !important;
    }


    .rrfi-filter-actions {
        height: 36px !important;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .rrfi-stats {
        gap: 5px !important;
    }


    .rrfi-stats > div {
        flex: 0 0 80px !important;

        width: 80px !important;

        min-width: 80px !important;

        height: 46px !important;

        min-height: 46px !important;
    }


    .rrfi-stats b {
        font-size: 17px !important;
    }


    .rrfi-stats span {
        font-size: 8px !important;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .rrfi-head h2 {
        font-size: 22px;
    }


    .rrfi-head p {
        font-size: 12px;
    }


    .rrfi-stats {
        gap: 5px;
    }


    .rrfi-stats > div {
        height: 51px;

        min-height: 51px;

        padding: 6px 6px;
    }


    .rrfi-stats b {
        font-size: 18px;
    }


    .rrfi-stats span {
        font-size: 9px;
    }
}