html, body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    font-size: 14px;
}

/* Prevent background scroll when the mobile nav drawer is open */
body.nav-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    html, body {
        font-size: 15px;
    }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42N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 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ========== Cards ========== */
.card {
    border-radius: .75rem;
}

.card.shadow-sm:hover {
    box-shadow: 0 .25rem 1rem rgba(0,0,0,.12) !important;
    transition: box-shadow .2s ease;
}

/* ========== Buttons ========== */
.btn {
    border-radius: .5rem;
}

/* ========== Page header ========== */
.page-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.page-header h4 {
    margin-bottom: 0;
    font-weight: 600;
}

/* ========== Button groups mobile ========== */
.btn-group-rtl {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ========== Notifications ========== */
.notification-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    pointer-events: none;
}

.notification-topright { top: 1rem; right: 1rem; }
.notification-topleft { top: 1rem; left: 1rem; }
.notification-topcenter { top: 1rem; left: 50%; transform: translateX(-50%); }
.notification-bottomright { bottom: 1rem; right: 1rem; }
.notification-bottomleft { bottom: 1rem; left: 1rem; }
.notification-bottomcenter { bottom: 1rem; left: 50%; transform: translateX(-50%); }

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-radius: .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    pointer-events: all;
    animation: slideIn .25s ease;
    font-family: Tahoma, Arial, sans-serif;
    font-size: .9rem;
    min-width: 280px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.notification-success  { background: #d4edda; border-right: 4px solid #28a745; color: #155724; }
.notification-error    { background: #f8d7da; border-right: 4px solid #dc3545; color: #721c24; }
.notification-warning  { background: #fff3cd; border-right: 4px solid #ffc107; color: #856404; }
.notification-information { background: #d1ecf1; border-right: 4px solid #17a2b8; color: #0c5460; }

.notification-content  { display: flex; align-items: center; gap: .5rem; }
.notification-icon     { font-size: 1.1rem; }
.notification-close    { background: none; border: none; cursor: pointer; font-size: .9rem; opacity: .6; padding: 0 .25rem; }
.notification-close:hover { opacity: 1; }

/* ========== PersianDatePicker ========== */
.persian-datepicker {
    position: relative;
    direction: rtl;
}

.persian-datepicker-input {
    position: relative;
    cursor: pointer;
}

.persian-datepicker-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.persian-datepicker-popup {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    z-index: 1000;
    min-width: 300px;
    padding: 1rem;
    direction: rtl;
}

.datepicker-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999;
}

.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
    font-weight: bold;
}

.datepicker-title {
    font-size: 1rem;
}

.datepicker-weekdays,
.datepicker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.weekday {
    font-size: .75rem;
    color: #6c757d;
    padding: .25rem 0;
    font-weight: bold;
}

.datepicker-cell {
    padding: .35rem .25rem;
    border-radius: .3rem;
    cursor: pointer;
    font-size: .85rem;
    transition: background .15s;
}

.datepicker-cell:hover { background: #e9ecef; }
.datepicker-cell.today { background: #e3f2fd; font-weight: bold; color: #1b6ec2; }
.datepicker-cell.selected { background: #1b6ec2; color: white; }
.datepicker-cell.other-month { color: #adb5bd; }

.datepicker-nav-link {
    cursor: pointer;
    border-radius: .25rem;
    padding: .1rem .3rem;
    transition: background .15s;
}

.datepicker-nav-link:hover { background: #e9ecef; }

.datepicker-months-grid,
.datepicker-years-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: .25rem;
}

.datepicker-month-cell,
.datepicker-year-cell {
    padding: .5rem .25rem;
    border-radius: .3rem;
    cursor: pointer;
    font-size: .85rem;
    text-align: center;
    transition: background .15s;
}

.datepicker-month-cell:hover,
.datepicker-year-cell:hover { background: #e9ecef; }

.datepicker-month-cell.today,
.datepicker-year-cell.today { background: #e3f2fd; font-weight: bold; color: #1b6ec2; }

.datepicker-month-cell.selected,
.datepicker-year-cell.selected { background: #1b6ec2; color: white; }

