/* =========================================================
   RV ATTENDANCE MANAGER - UNIVERSAL THEME
   Change colours here to change the whole application
   ========================================================= */

:root {

    /* MAIN COLOURS */
    --rv-primary: #198754;
    --rv-primary-dark: #157347;
    --rv-primary-light: #e8f5ef;

    /* TABLE ROW COLOURS */
    --rv-row-light: #edf7f1;
    --rv-row-dark: #dcefe4;
    --rv-row-hover: #d1e8da;

    /* GENERAL COLOURS */
    --rv-text: #000000;
    --rv-heading: #293238;
    --rv-muted: #707a80;
    --rv-background: #f4f7f6;
    --rv-white: #ffffff;
    --rv-border: #dfe4e2;

    /* UNIVERSAL SIZING */
    --rv-page-padding: 18px 24px;
    --rv-card-padding: 22px 24px 26px;

    /* COMMON FONT SIZES */
    --rv-title-size: 32px;
    --rv-label-size: 14px;
    --rv-input-size: 14px;
    --rv-button-size: 14px;
    --rv-table-size: 14px;

    /* COMMON HEIGHTS */
    --rv-input-height: 36px;
    --rv-button-height: 36px;
   --rv-table-row-height: 28px;
}


/* =========================================================
   UNIVERSAL PAGE
   ========================================================= */

.rv-page {
    width: 100%;
    padding: var(--rv-page-padding);
    box-sizing: border-box;
}


.rv-card {
    width: 100%;
    background: var(--rv-white);
    border-radius: 14px;
    padding: var(--rv-card-padding);
    box-sizing: border-box;
}


/* =========================================================
   UNIVERSAL PAGE HEADING
   ========================================================= */

.rv-page-title {
    text-align: center;
    margin: 0 0 20px 0;

    font-size: var(--rv-title-size);
    font-weight: 700;

    color: var(--rv-heading);
}


/* =========================================================
   UNIVERSAL FORM ROW
   ========================================================= */

.rv-form-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(0, 1.25fr)
        minmax(130px, 0.8fr)
        auto;

    gap: 12px;

    align-items: end;

    width: 100%;
    margin-bottom: 18px;
}


/* =========================================================
   UNIVERSAL FORM FIELD
   ========================================================= */

.rv-field {
    width: 100%;
    min-width: 0;
}


.rv-field label {
    display: block;

    margin-bottom: 5px;

    font-size: var(--rv-label-size);
    font-weight: 700;

    color: var(--rv-heading);
}


/* =========================================================
   UNIVERSAL INPUT
   ========================================================= */

.rv-input {
    width: 100%;
    height: var(--rv-input-height);

    padding: 5px 10px;

    box-sizing: border-box;

    border: 1px solid var(--rv-border);
    border-radius: 7px;

    background: var(--rv-white);
    color: var(--rv-text);

    font-size: var(--rv-input-size);

    min-width: 0;
}


.rv-input:focus {
    outline: none;

    border-color: var(--rv-primary);

    box-shadow:
        0 0 0 2px rgba(25, 135, 84, 0.12);
}


/* =========================================================
   UNIVERSAL BUTTON
   ========================================================= */

.rv-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    height: var(--rv-button-height);

    padding: 0 14px;

    background: var(--rv-primary);
    color: #ffffff;

    border: none;
    border-radius: 6px;

    font-size: var(--rv-button-size);
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    text-align: center;

    white-space: nowrap;

    box-sizing: border-box;
}


.rv-btn:hover {
    background: var(--rv-primary-dark);
    color: #ffffff;
}


/* =========================================================
   UNIVERSAL SAVE BUTTON
   ========================================================= */

.rv-btn-save {
    background: var(--rv-primary);
    color: #ffffff;
}


.rv-btn-save:hover {
    background: var(--rv-primary-dark);
    color: #ffffff;
}


/* =========================================================
   UNIVERSAL CANCEL BUTTON
   ========================================================= */

.rv-btn-cancel {
    background: var(--rv-primary);
    color: #ffffff;
}


.rv-btn-cancel:hover {
    background: var(--rv-primary-dark);
    color: #ffffff;
}


/* =========================================================
   UNIVERSAL ADD BUTTON
   ========================================================= */

.rv-btn-add {
    background: var(--rv-primary);
    color: #ffffff;
}


.rv-btn-add:hover {
    background: var(--rv-primary-dark);
    color: #ffffff;
}


/* =========================================================
   UNIVERSAL EDIT BUTTON
   ========================================================= */

.rv-btn-edit {
    background: #0d6efd;
    color: #ffffff;
}


.rv-btn-edit:hover {
    background: #0b5ed7;
    color: #ffffff;
}


/* =========================================================
   UNIVERSAL HEADINGS
   ========================================================= */

.rv-heading {
    color: var(--rv-heading);
}


.rv-muted {
    color: var(--rv-muted);
}


/* =========================================================
   UNIVERSAL TABLE
   ========================================================= */

.rv-table {
    width: 100%;

    border-collapse: collapse;

    table-layout: fixed;

    color: var(--rv-text);

    font-size: var(--rv-table-size);
}


.rv-table th {
    height: var(--rv-table-row-height);

    padding: 5px 10px;

    background: var(--rv-primary);
    color: #ffffff;

    border: 1px solid var(--rv-primary-dark);

    font-weight: 700;

    text-align: left;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    box-sizing: border-box;
}


.rv-table td {
    height: var(--rv-table-row-height);

    padding: 5px 10px;

    color: var(--rv-text);

    border: 1px solid #c9d8d2;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    box-sizing: border-box;
}


/* =========================================================
   ALTERNATING TABLE ROWS
   ========================================================= */

.rv-table tbody tr:nth-child(odd) {
    background: var(--rv-row-light);
}


.rv-table tbody tr:nth-child(even) {
    background: var(--rv-row-dark);
}


.rv-table tbody tr:hover {
    background: var(--rv-row-hover);
}


/* =========================================================
   UNIVERSAL TABLE WRAPPER
   ========================================================= */

.rv-table-wrapper {
    width: 100%;

    overflow: hidden;
}


/* =========================================================
   UNIVERSAL VALIDATION
   ========================================================= */

.rv-validation {
    display: block;

    margin-top: 3px;

    font-size: 13px;

    color: #dc3545;
}


/* =========================================================
   UNIVERSAL ACTIVE MENU
   ========================================================= */

.rv-active {
    background: var(--rv-primary-light);

    color: var(--rv-primary);
}


/* =========================================================
   UNIVERSAL LINK COLOUR
   ========================================================= */

.rv-link {
    color: var(--rv-primary);
}


.rv-link:hover {
    color: var(--rv-primary-dark);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .rv-form-row {
        grid-template-columns:
            minmax(0, 1.2fr)
            minmax(0, 1.1fr)
            minmax(120px, 0.8fr)
            auto;

        gap: 10px;
    }


    .rv-btn {
        padding-left: 12px;
        padding-right: 12px;
    }
}


@media (max-width: 800px) {

    .rv-form-row {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 700px) {

    .rv-page {
        padding: 12px;
    }


    .rv-card {
        padding: 18px;
    }


    .rv-form-row {
        grid-template-columns: 1fr;
    }


    .rv-table {
        font-size: 13px;
    }


    .rv-table th,
    .rv-table td {
        padding: 5px 8px;
    }
}
/* =========================================================
   VENDOR MASTER
   ========================================================= */

.vendor-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* TITLE */

.vendor-title {
    margin: 0 0 2px 0;
    padding: 0;
    font-size: 25px;
    font-weight: 700;
    color: var(--rv-heading);
    white-space: nowrap;
}

.vendor-subtitle {
    margin: 0 0 12px 0;
    padding: 0;
    font-size: 14px;
    color: var(--rv-muted);
    white-space: nowrap;
}


/* ADD ROW */

.vendor-toolbar {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-bottom: 10px;
}

.vendor-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 36px;
    padding: 5px 10px;
    border: 1px solid #c9d2ce;
    border-radius: 5px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--rv-text);
    background: var(--rv-white);
    outline: none;
}

.vendor-input:focus {
    border-color: var(--rv-primary);
    box-shadow: 0 0 0 1px rgba(25, 135, 84, 0.08);
}


/* ADD BUTTON */

.vendor-add-btn {
    flex: 0 0 auto;
    height: 36px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    white-space: nowrap;
}


/* VALIDATION */

.vendor-validation {
    display: block;
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #dc3545;
}


/* TABLE */

.vendor-table-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.vendor-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 12px;
    color: var(--rv-text);
}


/* COLUMN WIDTHS */

.vendor-table th:nth-child(1),
.vendor-table td:nth-child(1) {
    width: 12%;
}

.vendor-table th:nth-child(2),
.vendor-table td:nth-child(2) {
    width: 68%;
}

.vendor-table th:nth-child(3),
.vendor-table td:nth-child(3) {
    width: 20%;
}


/* HEADER */

.vendor-table th {
    height: 36px;
    padding: 7px 8px;
    background: var(--rv-primary);
    color: #ffffff;
    border: 1px solid var(--rv-primary-dark);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* DATA */

.vendor-table td {
    height: 36px;
    padding: 6px 8px;
    border: 1px solid #c8d8cf;
    color: var(--rv-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.vendor-table td:last-child {
    vertical-align: middle;
}

/* ALTERNATING ROWS */

.vendor-table tbody tr:nth-child(odd) {
    background-color: var(--rv-row-light);
}

.vendor-table tbody tr:nth-child(even) {
    background-color: var(--rv-row-dark);
}

.vendor-table tbody tr:hover {
    background-color: var(--rv-row-hover);
}


/* =========================================================
   RV COMMON FROZEN HEADER
   ========================================================= */

   .rv-app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: var(--rv-white);
    border-bottom: 1px solid var(--rv-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    z-index: 10000;
    box-sizing: border-box;
    padding: 0 24px;
}

.rv-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 250px;
}

.rv-header-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--rv-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    font-weight: 700;
}

.rv-header-title {
    font-size: 17px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--rv-heading);
    white-space: nowrap;
}

.rv-header-society {
    flex: 1;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--rv-heading);
    white-space: nowrap;
}

.rv-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex: 0 0 300px;
}

.rv-header-month {
    font-size: 17px;
    font-weight: 700;
    color: var(--rv-primary);
    white-space: nowrap;
}

.rv-header-user {
    font-size: 16px;
    font-weight: 600;
    color: var(--rv-text);
    white-space: nowrap;
}
/* FINAL VENDOR MASTER TABLE FIX */

.vendor-table {
    table-layout: fixed !important;
}

.vendor-table th,
.vendor-table td {
    height: 50px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.vendor-table th:nth-child(1),
.vendor-table td:nth-child(1) {
    width: 12% !important;
}

.vendor-table th:nth-child(2),
.vendor-table td:nth-child(2) {
    width: 58% !important;
}

.vendor-table th:nth-child(3),
.vendor-table td:nth-child(3) {
    width: 30% !important;
}

.vendor-table td:last-child {
    text-align: left !important;
    vertical-align: middle !important;
}

.vendor-table td:last-child form {
    margin: 0 !important;
    padding: 0 !important;
}

.vendor-table td:last-child button {
    height: 36px !important;
    margin: 0 !important;
}
/* VENDOR MASTER - FIT ROW TO CONTENT */

.vendor-table tbody tr {
    height: auto !important;
}

.vendor-table tbody td {
    height: 48px !important;
    padding: 5px 8px !important;
    vertical-align: middle !important;
}

.vendor-table td:last-child {
    width: 20% !important;
    white-space: nowrap !important;
}

.vendor-table td:last-child .rv-btn {
    height: 36px !important;
    padding: 6px 12px !important;
    margin: 0 4px 0 0 !important;
}
/* =========================================================
   VENDOR MASTER - FINAL COMPACT BUTTONS
   ========================================================= */

.vendor-table td {
    padding: 6px 12px !important;
    vertical-align: middle !important;
}

.vendor-table .rv-btn {
    height: 36px !important;
    min-height: 36px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 12px !important;
    font-size: 15px !important;
    line-height: 36px !important;
}

.vendor-table form {
    margin: 0 !important;
}

.vendor-edit-input {
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
}
/* =========================================================
   VENDOR MASTER - EDIT ROW FINAL SIZE
   ========================================================= */

.vendor-table td:last-child {
    width: 30% !important;
}

.vendor-edit-input {
    width: 400px !important;
    max-width: 100% !important;
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
}