:root {
    --theme-radius-xl: 1rem;
    --theme-radius-2xl: 1.5rem;
    --theme-shadow-soft: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.08);
    --theme-shadow-strong: 0 1rem 2.5rem rgba(15, 23, 42, 0.12);
}

html,
body {
    font-family: 'Vazirmatn', 'IRANSansX', sans-serif;
}

.app-divider {
    margin: 0.625rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.app-main-shell {
    min-width: 0;
    overflow-x: hidden;
}

.dropdown-chevron-sm {
    font-size: 0.7rem;
}

.form-direction-ltr,
.text-ltr,
.text-ltr-right {
    direction: ltr;
    text-align: right;
}

.form-direction-ltr-left {
    direction: ltr;
    text-align: left;
}

.rtl-pagination {
    direction: ltr;
}

.ui-max-w-800 {
    max-width: 800px;
}

.ui-max-w-1000 {
    max-width: 1000px;
}

.ui-width-45 {
    width: 45px;
}

.ui-width-60 {
    width: 60px;
}

.ui-width-180 {
    width: 180px;
}

.ui-width-250 {
    width: 250px;
}

.ui-width-300 {
    width: 300px;
}

.inline-form {
    display: inline;
}

.text-xs-muted {
    font-size: 0.7rem;
}

.icon-xs {
    font-size: 0.5rem;
}

.icon-sm {
    font-size: 0.7rem;
}

.icon-2xl {
    font-size: 2rem;
}

.icon-4xl {
    font-size: 4rem;
}

.link-subtle {
    font-size: 12px;
    color: #94a3b8;
}

.link-reset {
    text-decoration: none;
}

.auth-lockout-icon {
    font-size: 48px;
    color: var(--error);
    margin-bottom: 20px;
}

.auth-success-banner {
    background-color: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-right: 4px solid #22c55e;
}

.btn-loading-disabled {
    opacity: 0.7;
    pointer-events: none;
}

.icon-circle-lg {
    width: 4rem;
    height: 4rem;
}

.icon-circle-md {
    width: 2.5rem;
    height: 2.5rem;
}

.validation-summary-spacing {
    margin-bottom: 15px;
}

.validation-message-centered {
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.auth-centered {
    text-align: center;
}

.otp-spaced-input {
    letter-spacing: 8px;
}

.iban-prefix {
    width: 45px;
    justify-content: center;
}

.iban-value {
    font-family: Consolas, monospace;
    letter-spacing: 2px;
}

.emergency-alert-box {
    line-height: 1.8rem;
    font-size: 0.95rem;
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.emergency-alert-divider {
    border-top: 1px solid #ffecb5;
}

.contract-main-badge {
    font-size: 0.65rem;
}

.bulk-renewal-row-disabled {
    background-color: #f8f9fa;
    opacity: 0.8;
}

.bulk-renewal-row-disabled td {
    color: #6c757d;
}

.bulk-renewal-row-disabled .employee-selector {
    cursor: not-allowed;
}

.otp-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
    direction: ltr;
    margin: 30px 0;
}

.otp-input-unit {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s ease-in-out;
    outline: none;
    color: #4f46e5;
}

.otp-input-unit:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.otp-input-unit::-webkit-inner-spin-button,
.otp-input-unit::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.timer-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 15px;
}

#countdown {
    color: #4f46e5;
    font-weight: 700;
}

.resend-btn {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

.profile-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-header {
    background-color: #f8f9fa;
    padding: 2rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    font-size: 3rem;
    line-height: 120px;
    background-color: #17a2b8;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.detail-label {
    color: #6c757d;
    font-weight: 500;
}

.dashboard-stat-card,
.dashboard-widget-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: var(--theme-shadow-soft);
}

.dashboard-stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.recent-employee-item + .recent-employee-item {
    border-top: 1px solid #eef2f7;
}

.recent-employee-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

.rtl-form-page {
    direction: rtl;
    text-align: right;
}

.rtl-form-page .form-group label,
.rtl-form-page .form-label,
.rtl-form-page .control-label,
.rtl-form-page .form-text {
    text-align: right;
}

.rtl-form-page .form-text {
    display: block;
}

.rtl-definition-list dt {
    float: right;
    clear: right;
    margin-left: 20px;
    width: auto;
    text-align: right;
    font-weight: 700;
}

.rtl-definition-list dd {
    margin-right: 180px;
}

.detail-list dd {
    margin-bottom: 0.5rem;
}

.detail-list dt {
    color: #007bff;
}

.detail-page {
    background: #f9fafb;
    border-radius: var(--theme-radius-2xl);
    padding: 1rem;
}

.detail-page-card {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #f3f4f6;
    border-radius: var(--theme-radius-2xl);
    box-shadow: var(--theme-shadow-strong);
}

.detail-page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.detail-page-header-main {
    display: flex;
    align-items: center;
}

.detail-page-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    font-weight: 700;
    margin-left: 1rem;
    border: 2px solid;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.detail-page-avatar--indigo {
    background: #e0e7ff;
    color: #4f46e5;
    border-color: #a5b4fc;
}

.detail-page-avatar--sky {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
}

.detail-page-title {
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin: 0;
}

.detail-page-subtitle {
    margin: 0.25rem 0 0;
    font-size: 1.125rem;
    font-weight: 500;
}

.text-accent-indigo {
    color: #4f46e5;
}

.text-accent-sky {
    color: #0284c7;
}

.detail-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.detail-tab-button {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    margin-left: 0.75rem;
    margin-bottom: -1px;
    text-align: center;
    background: transparent;
}

.detail-tab-button:hover {
    color: #1e40af;
}

.detail-tab-button.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
    background-color: #fff;
}

.detail-tab-button--sky:hover {
    color: #0369a1;
}

.detail-tab-button--sky.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
}

.detail-tab-content {
    transition: opacity 0.3s ease-in-out;
    min-height: 250px;
    padding-top: 1rem;
}

.detail-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.detail-panel-title--indigo {
    color: #4338ca;
}

.detail-panel-title--sky {
    color: #0369a1;
}

.detail-panel-title--teal {
    color: #0f766e;
}

.detail-panel-title--purple {
    color: #7e22ce;
}

.detail-panel {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid;
}

.detail-panel--indigo {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.detail-panel--blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.detail-panel--purple {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.detail-panel--white {
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem 3rem;
    font-size: 1rem;
}

.detail-grid--three-up {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.detail-grid--four-up {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.detail-grid--single {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.detail-grid-item-span-full {
    grid-column: 1 / -1;
}

.detail-data-item {
    border-right: 4px solid #a5b4fc;
    padding-right: 1rem;
}

.detail-data-item--sky {
    border-right-color: #7dd3fc;
}

.detail-data-item--blue {
    border-right-color: #60a5fa;
}

.detail-data-item--purple {
    border-right-color: #c084fc;
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.detail-empty-state {
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    text-align: center;
}

.detail-empty-state p {
    margin: 0;
    color: #6b7280;
    font-style: italic;
}

.detail-stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.detail-stat-badge--teal {
    background: #ccfbf1;
    color: #115e59;
}

.detail-stat-badge--purple {
    background: #f3e8ff;
    color: #6b21a8;
}

.detail-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.detail-action-button:hover {
    transform: translateY(-1px);
}

.detail-action-button--primary {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(79, 70, 229, 0.2);
}

.detail-action-button--primary:hover {
    background: #4338ca;
    color: #fff;
}

.detail-action-button--secondary {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.08);
}

.detail-action-button--secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.detail-action-button-row {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.local-alert {
    position: fixed;
    inset-inline-start: 1.5rem;
    top: 1.5rem;
    z-index: 2000;
    min-width: 280px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    box-shadow: var(--theme-shadow-strong);
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.local-alert--success {
    border-color: #86efac;
    background: #f0fdf4;
}

.local-alert--warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.local-alert__title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.local-alert__actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.local-alert__button {
    border: 0;
    border-radius: 0.75rem;
    background: #0d6efd;
    color: #fff;
    padding: 0.5rem 1rem;
}

@media (min-width: 576px) {
    .detail-page-header {
        flex-direction: row;
        align-items: center;
    }

    .detail-grid--three-up {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid--four-up {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .detail-grid--three-up {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-grid--four-up {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
