:root {
    --dr-primary: #0d5ef4;
    --dr-primary-hover: #084cc8;
    --dr-success: #0fa77a;
    --dr-danger: #ef4444;
    --dr-warning: #f59e0b;
    --dr-navy-950: #061a3a;
    --dr-navy-900: #08244b;
    --dr-page-background: #f5f7fb;
    --dr-card-background: #ffffff;
    --dr-text-primary: #10213d;
    --dr-text-secondary: #60708a;
    --dr-border: #e2e8f0;
    --dr-input-border: #d7dee8;
    --dr-shadow: 0 12px 32px rgba(6, 26, 58, 0.08);
    --dr-radius: 16px;
}

html {
    font-size: 16px;
    min-height: 100%;
}
@font-face {
    font-family: 'vazir';
    src: url(../fonts/vazir/Vazir.eot);
}
@font-face {
    font-family: 'vazir';
    src: url(../fonts/vazir/Vazir.ttf);
}
@font-face {
    font-family: 'vazir';
    src: url(../fonts/vazir/Vazir.woff);
}
@font-face {
    font-family: 'vazir';
    src: url(../fonts/vazir/Vazir.woff2);
}
.dr-body,
body {
    min-height: 100vh;
    margin: 0;
    background: var(--dr-page-background);
    color: var(--dr-text-primary);
    font-family: vazir, "Vazirmatn", sans-serif;
}

.dr-app-shell {
    min-height: 100vh;
}

.dr-app-shell--auth {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.dr-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--dr-navy-950), var(--dr-navy-900));
    color: #fff;
    box-shadow: var(--dr-shadow);
}

.dr-navbar__brand,
.dr-navbar__account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dr-navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    flex-shrink: 0;
}

.dr-navbar__toggle span {
    display: block;
    width: 1.15rem;
    height: 2px;
    margin: 0 auto;
    background: currentColor;
}

.dr-navbar__avatar {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.dr-navbar__name {
    font-weight: 700;
}

.dr-navbar__caption,
.dr-page-text,
.dr-sidebar__link--muted {
    color: var(--dr-text-secondary);
}

.dr-content-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.dr-content-shell--auth {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.dr-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--dr-radius);
    background: linear-gradient(180deg, var(--dr-navy-950), #0b2f64);
    box-shadow: var(--dr-shadow);
}

.dr-sidebar-overlay {
    display: none;
}

.dr-sidebar__section + .dr-sidebar__section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dr-sidebar__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 0.4rem;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    text-align: right;
    text-decoration: none;
}

.dr-sidebar__link:hover,
.dr-sidebar__link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.dr-sidebar__link--active {
    background: var(--dr-primary);
    color: #fff;
}

.dr-sidebar__link--danger {
    color: #ffd5d5;
}

.dr-main {
    min-width: 0;
}

.dr-main--auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 88px);
    width: 100%;
    padding: 0;
}

.dr-page-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dr-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dr-page-title {
    margin: 0.25rem 0 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.dr-eyebrow {
    display: inline-block;
    color: var(--dr-primary);
    font-size: 0.85rem;
    font-weight: 700;
}

.dr-card {
    padding: 1.5rem;
    border: 1px solid var(--dr-border);
    border-radius: var(--dr-radius);
    background: var(--dr-card-background);
    box-shadow: var(--dr-shadow);
}

.dr-card--narrow {
    max-width: 42rem;
}

.dr-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.dr-grid {
    display: grid;
    gap: 1rem;
}

.dr-grid--stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dr-grid--content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dr-login {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: calc(100vh - 88px);
    padding: 2.5rem 1rem 2rem;
    overflow: hidden;
}

.dr-login::before,
.dr-login::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.dr-login::before {
    top: 2rem;
    right: max(1rem, 8vw);
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(13, 94, 244, 0.12), rgba(13, 94, 244, 0));
}

.dr-login::after {
    bottom: 1rem;
    left: max(1rem, 6vw);
    width: 16rem;
    height: 16rem;
    background: radial-gradient(circle, rgba(8, 36, 75, 0.1), rgba(8, 36, 75, 0));
}

.dr-login__stack {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 1.15rem;
    width: min(100%, 44rem);
    margin-inline: auto;
}

.dr-login__panel {
    width: min(100%, 42rem);
    padding: 2.75rem 2.75rem 2.4rem;
    border-radius: 1.5rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96)),
        var(--dr-card-background);
    box-shadow:
        0 24px 50px rgba(6, 26, 58, 0.1),
        0 8px 24px rgba(13, 94, 244, 0.08);
    animation: dr-login-panel-enter 520ms ease-out both;
}

.dr-login__header {
    margin-bottom: 2.1rem;
    text-align: center;
}

.dr-login__panel .dr-page-title {
    margin-top: 0.65rem;
    font-size: clamp(2rem, 4vw, 2.7rem);
}

.dr-login__panel .dr-page-text {
    max-width: 33rem;
    margin: 0.9rem auto 0;
    line-height: 1.9;
}

.dr-login .dr-form {
    display: grid;
    gap: 0.25rem;
}

.dr-login .dr-form label {
    font-weight: 700;
    color: var(--dr-text-primary);
}

.dr-login .dr-input {
    min-height: 54px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
}

.dr-login .dr-btn {
    min-height: 54px;
    margin-top: 0.6rem;
    font-size: 1.05rem;
}

.dr-login__brand {
    display: grid;
    place-items: center;
    width: fit-content;
    max-width: min(100%, 30rem);
    padding: 1rem 1.35rem;
    border: 1px solid rgba(13, 94, 244, 0.1);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 34px rgba(6, 26, 58, 0.08);
    animation: dr-login-brand-enter 560ms ease-out 140ms both;
}

.dr-login__brand-logo {
    display: block;
    width: min(100%, 20rem);
    height: auto;
    object-fit: contain;
}

@keyframes dr-login-panel-enter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dr-login-brand-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dr-form .form-group {
    margin-bottom: 1.25rem;
}

.dr-input,
.dr-btn {
    min-height: 48px;
    border-radius: 0.75rem;
}

.dr-input {
    border-color: var(--dr-input-border);
    text-align: right;
}

.dr-input:focus {
    border-color: var(--dr-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 94, 244, 0.15);
}

.dr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-weight: 700;
}

.dr-btn--block {
    width: 100%;
}

.dr-btn__icon {
    font-size: 0.95em;
    line-height: 1;
}

.dr-btn__text {
    line-height: 1.2;
}

.btn-sm.dr-btn {
    min-height: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 0.65rem;
    gap: 0.4rem;
}

.dr-alert {
    border-radius: 0.9rem;
}

.dr-validation-summary ul {
    margin-bottom: 0;
    padding-right: 1.25rem;
}

.dr-table thead th {
    border-top: 0;
    color: var(--dr-text-primary);
    text-align: right;
}

.dr-table tbody td {
    vertical-align: middle;
    text-align: right;
}

.dr-stat-card {
    position: relative;
    overflow: hidden;
}

.dr-stat-card::after {
    content: "";
    position: absolute;
    inset: auto auto -24px -24px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(13, 94, 244, 0.08);
}

.dr-stat-card__label {
    display: block;
    color: var(--dr-text-secondary);
    margin-bottom: 0.75rem;
}

.dr-stat-card__value {
    font-size: 2rem;
    line-height: 1;
}

.dr-empty-state {
    padding: 1rem;
    border: 1px dashed var(--dr-border);
    border-radius: 1rem;
    background: #f8fbff;
}

.dr-action-list {
    display: grid;
    gap: 0.75rem;
}

.dr-action-list__item {
    display: block;
    padding: 1rem;
    border: 1px solid var(--dr-border);
    border-radius: 1rem;
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
}

.dr-action-list__item span {
    display: block;
    margin-top: 0.35rem;
    color: var(--dr-text-secondary);
}

.dr-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dr-filter-actions {
    display: flex;
    align-items: end;
    gap: 0.75rem;
}

.dr-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dr-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #eef2ff;
    color: var(--dr-primary);
}

.dr-badge--success {
    background: rgba(15, 167, 122, 0.12);
    color: var(--dr-success);
}

.dr-badge--warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.dr-badge--danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--dr-danger);
}

.dr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dr-actions--attachments {
    align-items: center;
}

.dr-pagination {
    justify-content: center;
}

.dr-pagination .page-link {
    color: var(--dr-primary);
    border-radius: 0.75rem;
    margin: 0 0.2rem;
    border-color: var(--dr-border);
}

.dr-pagination .page-item.active .page-link {
    background: var(--dr-primary);
    border-color: var(--dr-primary);
}

.dr-inline-metadata {
    display: grid;
    gap: 0.75rem;
}

.dr-inline-metadata > div,
.dr-definition-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #edf2f7;
}

.dr-inline-metadata span,
.dr-definition-list span {
    color: var(--dr-text-secondary);
}

.dr-definition-list {
    display: grid;
}

.dr-subtitle {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

.dr-stack-list {
    display: grid;
    gap: 0.75rem;
}

.dr-stack-list__item {
    padding: 1rem;
    border: 1px solid var(--dr-border);
    border-radius: 1rem;
    background: #fbfcfe;
}

.dr-stack-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.dr-stepper {
    display: grid;
    grid-template-columns: repeat(10, minmax(140px, 1fr));
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.dr-step {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 140px;
    padding: 0.9rem;
    border: 1px solid var(--dr-border);
    border-radius: 1rem;
    background: #f1f5f9;
    color: var(--dr-text-secondary);
    text-decoration: none;
}

.dr-step:hover,
.dr-step:focus {
    color: var(--dr-text-primary);
    text-decoration: none;
}

.dr-step--current {
    border-color: var(--dr-primary);
    background: #eaf1ff;
    color: var(--dr-primary);
}

.dr-step--completed {
    border-color: rgba(15, 167, 122, 0.24);
    background: #e8f8f3;
    color: var(--dr-success);
}

.dr-step__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
}

.dr-step--completed .dr-step__index::before {
    content: "✓";
}

.dr-step--completed .dr-step__index {
    font-size: 0;
}

.dr-step__title {
    font-size: 0.9rem;
    font-weight: 700;
}

.dr-wizard-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dr-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dr-form-grid--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dr-form-group--full {
    grid-column: 1 / -1;
}

.dr-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
}

.dr-collection {
    display: grid;
    gap: 1rem;
}

.dr-collection__item {
    padding: 1rem;
    border: 1px solid var(--dr-border);
    border-radius: 1rem;
    background: #fbfcfe;
}

.dr-review-list {
    display: grid;
    gap: 1rem;
}

.dr-review-list ul {
    margin: 0;
    padding-right: 1.2rem;
}

.dr-submit-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.dr-attachment-upload {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px dashed var(--dr-border);
    border-radius: 1rem;
    background: #f8fbff;
}

.dr-attachment-upload__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.dr-attachment-upload__actions {
    display: flex;
    justify-content: flex-end;
}

.dr-file-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--dr-input-border);
    border-radius: 0.75rem;
    background: #fff;
}

@media (max-width: 1199.98px) {
    .dr-grid--stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dr-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .dr-navbar {
        gap: 0.75rem;
    }

    .dr-navbar__brand,
    .dr-navbar__account {
        min-width: 0;
    }

    .dr-navbar__toggle {
        display: inline-flex;
    }

    .dr-content-shell {
        grid-template-columns: 1fr;
    }

    .dr-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        width: min(84vw, 320px);
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        border-right: 0;
        transform: translateX(100%);
        transition: transform 220ms ease;
        overflow-y: auto;
        padding-top: 6.5rem;
    }

    .dr-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1030;
        border: 0;
        background: rgba(6, 26, 58, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
    }

    .dr-sidebar-open {
        overflow: hidden;
    }

    .dr-sidebar-open .dr-sidebar {
        transform: translateX(0);
    }

    .dr-sidebar-open .dr-sidebar-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .dr-grid--content,
    .dr-grid--stats {
        grid-template-columns: 1fr;
    }

    .dr-form-grid,
    .dr-form-grid--wide {
        grid-template-columns: 1fr;
    }

    .dr-attachment-upload__grid {
        grid-template-columns: 1fr;
    }

    .dr-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dr-navbar,
    .dr-content-shell {
        padding: 1rem;
    }

    .dr-navbar {
        align-items: flex-start;
    }

    .dr-navbar__brand {
        gap: 0.6rem;
    }

    .dr-navbar__account {
        gap: 0.55rem;
    }

    .dr-navbar__name {
        font-size: 0.95rem;
    }

    .dr-navbar__caption {
        font-size: 0.85rem;
    }

    .dr-sidebar {
        width: calc(100vw - 1rem);
        padding-top: 5.75rem;
    }

    .dr-page-header,
    .dr-filter-actions,
    .dr-stack-list__header {
        flex-direction: column;
        align-items: stretch;
    }

    .dr-filter-grid {
        grid-template-columns: 1fr;
    }

    .dr-inline-metadata > div,
    .dr-definition-list > div {
        flex-direction: column;
        align-items: flex-start;
    }

    .dr-login {
        min-height: calc(100vh - 88px);
        padding: 1.5rem 0.25rem 2rem;
    }

    .dr-login__stack,
    .dr-login__panel {
        width: 100%;
    }

    .dr-login__panel {
        padding: 1.5rem 1.25rem;
        border-radius: 1.2rem;
    }

    .dr-login__panel .dr-page-title {
        font-size: 1.7rem;
    }

    .dr-login__brand {
        width: auto;
        max-width: 100%;
        padding: 0.85rem 1rem;
    }

    .dr-login__brand-logo {
        width: min(100%, 16rem);
    }
}
