﻿.rr-page {
    --rr-accent: #ff7417;
    --rr-accent-dark: #d85c08;
    --rr-ink: #172036;
    --rr-muted: #76839a;
    --rr-border: #e5e8ef;
    --rr-bg: #f6f6fb;
    min-height: 100%;
    padding: 18px;
    background: var(--rr-bg);
    color: var(--rr-ink);
}

.rr-shell {
    min-height: calc(100vh - 36px);
    padding: 26px;
    border: 1px solid var(--rr-border);
    border-radius: 20px;
    background: radial-gradient(circle at top right, rgba(255, 116, 23, .08), transparent 28%), #fff;
    box-shadow: 0 12px 34px rgba(31, 39, 58, .055);
}

.rr-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 2px 0 22px;
}

.rr-eyebrow {
    margin-bottom: 5px;
    color: var(--rr-accent-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.rr-hero h1 {
    margin: 0;
    color: var(--rr-ink);
    font-size: 31px;
    font-weight: 900;
    line-height: 1.15;
}

.rr-hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--rr-muted);
    font-size: 14px;
    line-height: 1.55;
}

.rr-button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

    .rr-button:hover:not(:disabled) {
        transform: translateY(-1px);
    }

    .rr-button:disabled {
        opacity: .58;
        cursor: not-allowed;
    }

.rr-button-light {
    border: 1px solid var(--rr-border);
    background: #fff;
    color: #4c5a70;
    box-shadow: 0 6px 16px rgba(24, 35, 55, .05);
}

    .rr-button-light:hover:not(:disabled) {
        border-color: rgba(255, 116, 23, .35);
        color: var(--rr-accent-dark);
    }

.rr-button-approve {
    background: #2fa56f;
    color: #fff;
    box-shadow: 0 7px 18px rgba(47, 165, 111, .2);
}

    .rr-button-approve:hover:not(:disabled) {
        background: #25885c;
    }

.rr-button-reject {
    border: 1px solid #efc4c8;
    background: #fff5f6;
    color: #b83d48;
}

    .rr-button-reject:hover:not(:disabled) {
        background: #fdecee;
    }

.rr-button-danger {
    background: #cf4651;
    color: #fff;
    box-shadow: 0 7px 18px rgba(207, 70, 81, .2);
}

    .rr-button-danger:hover:not(:disabled) {
        background: #b73843;
    }

.rr-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.rr-stat-card {
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--rr-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 22px rgba(31, 39, 58, .045);
}

.rr-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 16px;
}

    .rr-stat-icon.is-all {
        background: #eef1f7;
        color: #657086;
    }

    .rr-stat-icon.is-pending {
        background: #fff0dd;
        color: #ca6f12;
    }

    .rr-stat-icon.is-approved {
        background: #e0f6ec;
        color: #23895e;
    }

    .rr-stat-icon.is-rejected {
        background: #fde7ea;
        color: #bd4852;
    }

.rr-stat-card span {
    display: block;
    color: var(--rr-muted);
    font-size: 12px;
    font-weight: 800;
}

.rr-stat-card strong {
    display: block;
    margin-top: 3px;
    color: var(--rr-ink);
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

.rr-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 13px;
}

.rr-tabs {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.rr-tab {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #dfe4ed;
    border-radius: 999px;
    background: #fff;
    color: #69768b;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

    .rr-tab:hover {
        border-color: rgba(255, 116, 23, .35);
        color: var(--rr-accent-dark);
    }

    .rr-tab.is-active {
        border-color: var(--rr-accent);
        background: var(--rr-accent);
        color: #fff;
        box-shadow: 0 7px 16px rgba(255, 116, 23, .2);
    }

    .rr-tab span {
        min-width: 23px;
        min-height: 23px;
        padding: 0 7px;
        border-radius: 999px;
        background: #f0f2f6;
        color: #69768b;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 900;
    }

    .rr-tab.is-active span {
        background: rgba(255, 255, 255, .22);
        color: #fff;
    }

.rr-search {
    width: min(100%, 340px);
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #dfe4ed;
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 5px 14px rgba(31, 39, 58, .035);
}

    .rr-search > span {
        color: #98a3b5;
    }

    .rr-search input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: #2d3748;
        font: inherit;
        font-size: 13px;
    }

    .rr-search:focus-within {
        border-color: rgba(255, 116, 23, .55);
        box-shadow: 0 0 0 4px rgba(255, 116, 23, .09);
    }

.rr-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: #8792a4;
    font-size: 12px;
    font-weight: 700;
}

.rr-current-filter {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff0e5;
    color: var(--rr-accent-dark);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.rr-request-list {
    display: grid;
    gap: 14px;
}

.rr-request-card {
    padding: 18px;
    border: 1px solid var(--rr-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 39, 58, .045);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .rr-request-card:hover {
        transform: translateY(-1px);
        border-color: #d8dde7;
        box-shadow: 0 12px 30px rgba(31, 39, 58, .07);
    }

.rr-card-top {
    padding-bottom: 15px;
    border-bottom: 1px solid #eef1f5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.rr-person {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rr-avatar {
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff0e4, #ffe1cb);
    color: var(--rr-accent-dark);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 900;
}

.rr-person-copy {
    min-width: 0;
}

.rr-person-title-row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.rr-patient-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-ink);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

    .rr-patient-link:hover {
        color: var(--rr-accent-dark);
    }

.rr-person-copy > span {
    display: block;
    margin-top: 4px;
    color: var(--rr-muted);
    font-size: 11px;
}

.rr-separator {
    margin: 0 4px;
}

.student-request-status {
    min-height: 27px;
    padding: 5px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

    .student-request-status.pending {
        background: #fff0df;
        color: #b96510;
    }

    .student-request-status.approved {
        background: #e3f7ee;
        color: #227e58;
    }

    .student-request-status.rejected {
        background: #fde9eb;
        color: #b63e48;
    }

    .student-request-status.cancelled {
        background: #eef1f5;
        color: #69768a;
    }

.rr-submitted {
    text-align: right;
    flex: 0 0 auto;
}

    .rr-submitted span {
        display: block;
        color: #9aa4b4;
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .rr-submitted strong {
        display: block;
        margin-top: 4px;
        color: #4d596d;
        font-size: 12px;
    }

.rr-meta-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 0;
}

.rr-meta-item {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.rr-meta-icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #f3f5f9;
    color: #738097;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 12px;
}

.rr-meta-item > div {
    min-width: 0;
}

.rr-meta-item span {
    display: block;
    color: #99a3b3;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.rr-meta-item strong {
    display: block;
    margin-top: 4px;
    color: #455166;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.rr-notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 16px;
}

.rr-note {
    padding: 12px 14px;
    border: 1px solid #e8ebf1;
    border-radius: 11px;
    background: #f8f9fc;
}

    .rr-note.is-review {
        border-color: #e7dcfb;
        background: #f8f4ff;
    }

    .rr-note span {
        display: block;
        margin-bottom: 5px;
        color: #8d98a9;
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .rr-note p {
        margin: 0;
        color: #566276;
        font-size: 12px;
        line-height: 1.55;
        white-space: pre-wrap;
    }

.rr-card-actions {
    padding-top: 14px;
    border-top: 1px solid #eef1f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rr-review-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rr-reviewed-summary {
    color: #788599;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.rr-empty-state {
    min-height: 250px;
    padding: 32px;
    border: 1px dashed #d9dee8;
    border-radius: 17px;
    background: rgba(255, 255, 255, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.rr-empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #eef1f7;
    color: #7c889d;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.rr-empty-state h2 {
    margin: 12px 0 5px;
    font-size: 16px;
    font-weight: 900;
}

.rr-empty-state p {
    margin: 0;
    color: #8994a6;
    font-size: 12px;
}

.rr-loading-card,
.rr-error-card {
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--rr-border);
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 10px 28px rgba(31, 39, 58, .055);
}

    .rr-loading-card div {
        display: grid;
        gap: 3px;
    }

    .rr-loading-card strong {
        font-size: 14px;
    }

    .rr-loading-card span:not(.rr-spinner) {
        color: var(--rr-muted);
        font-size: 12px;
    }

.rr-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid #f0d4bf;
    border-top-color: var(--rr-accent);
    border-radius: 50%;
    display: inline-block;
    animation: rr-spin .8s linear infinite;
}

.rr-spinner-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.is-spinning {
    animation: rr-spin .8s linear infinite;
}

.rr-error-card {
    align-items: flex-start;
    justify-content: flex-start;
}

    .rr-error-card > div:nth-child(2) {
        flex: 1;
    }

.rr-error-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fdebed;
    color: #b93e49;
    display: grid;
    place-items: center;
}

.rr-error-card strong {
    font-size: 15px;
}

.rr-error-card p {
    margin: 5px 0 0;
    color: #8d5960;
    font-size: 13px;
}

.rr-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    padding: 20px;
    background: rgba(21, 27, 40, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rr-modal {
    width: min(100%, 540px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(13, 20, 35, .28);
}

.rr-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #eceff4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.rr-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
}

    .rr-modal-title-wrap > div:last-child > span {
        color: #98a2b2;
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .rr-modal-title-wrap h2 {
        margin: 3px 0 0;
        font-size: 18px;
        font-weight: 900;
    }

.rr-modal-icon {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

    .rr-modal-icon.is-approve {
        background: #e1f6ec;
        color: #23835b;
    }

    .rr-modal-icon.is-reject {
        background: #fde8ea;
        color: #b93f49;
    }

.rr-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid #e2e6ed;
    border-radius: 10px;
    background: #fff;
    color: #7d899b;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.rr-modal-body {
    padding: 20px;
}

.rr-review-summary {
    padding: 13px;
    margin-bottom: 17px;
    border: 1px solid #e7eaf0;
    border-radius: 13px;
    background: #f8f9fc;
    display: flex;
    align-items: center;
    gap: 11px;
}

    .rr-review-summary > div:last-child {
        min-width: 0;
    }

    .rr-review-summary span,
    .rr-review-summary strong,
    .rr-review-summary small {
        display: block;
    }

    .rr-review-summary span {
        color: #919cad;
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .rr-review-summary strong {
        margin-top: 3px;
        font-size: 14px;
    }

    .rr-review-summary small {
        margin-top: 3px;
        color: #7d899a;
        font-size: 11px;
    }

.rr-field-label {
    display: block;
    margin-bottom: 7px;
    color: #3f4a5c;
    font-size: 12px;
    font-weight: 900;
}

.rr-textarea {
    width: 100%;
    min-height: 118px;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 1px solid #dfe3eb;
    border-radius: 11px;
    outline: none;
    resize: vertical;
    color: #303a4d;
    font: inherit;
    line-height: 1.5;
}

    .rr-textarea:focus {
        border-color: rgba(255, 116, 23, .6);
        box-shadow: 0 0 0 4px rgba(255, 116, 23, .09);
    }

.rr-field-help {
    margin-top: 7px;
    color: #8d98a8;
    font-size: 11px;
}

.rr-inline-error {
    margin-top: 13px;
    padding: 10px 12px;
    border: 1px solid #f0c3c7;
    border-radius: 10px;
    background: #fff4f5;
    color: #aa303b;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 750;
}

.rr-modal-actions {
    padding: 15px 20px 19px;
    border-top: 1px solid #eceff4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

@@keyframes rr-spin {
    to {
        transform: rotate(360deg);
    }
}

@@media (max-width: 1120px) {
    .rr-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@@media (max-width: 900px) {
    .rr-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .rr-search {
        width: 100%;
    }

    .rr-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@@media (max-width: 680px) {
    .rr-page {
        padding: 10px;
    }

    .rr-shell {
        min-height: calc(100vh - 20px);
        padding: 16px;
        border-radius: 16px;
    }

    .rr-hero {
        flex-direction: column;
    }

    .rr-refresh-button {
        width: 100%;
    }

    .rr-hero h1 {
        font-size: 25px;
    }

    .rr-stats {
        grid-template-columns: 1fr;
    }

    .rr-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-tab {
        width: 100%;
    }

    .rr-card-top {
        flex-direction: column;
    }

    .rr-submitted {
        text-align: left;
    }

    .rr-meta-grid,
    .rr-notes-grid {
        grid-template-columns: 1fr;
    }

    .rr-card-actions {
        align-items: stretch;
        flex-direction: column;
    }

        .rr-card-actions > .rr-button,
        .rr-review-actions {
            width: 100%;
        }

            .rr-review-actions .rr-button {
                flex: 1;
            }

    .rr-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

        .rr-modal-actions .rr-button {
            width: 100%;
        }
}

@@media (max-width: 420px) {
    .rr-tabs {
        grid-template-columns: 1fr;
    }

    .rr-review-actions {
        flex-direction: column;
    }

        .rr-review-actions .rr-button {
            width: 100%;
        }
}
