/* Wind login — standalone fallback (works without Vite rebuild on server) */

.wind-login-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background-color: #ffffff;
    font-family: 'Almarai', ui-sans-serif, system-ui, sans-serif;
}

.wind-login-lang-form {
    position: absolute;
    top: 1rem;
    z-index: 20;
    margin: 0;
}

.wind-login-lang-form--ar {
    left: 1rem;
    right: auto;
}

.wind-login-lang-form--en {
    right: 1rem;
    left: auto;
}

.wind-login-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    border: 1px solid rgba(197, 212, 206, 0.8);
    background-color: #ffffff;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4a5c55;
    box-shadow: 0 1px 2px rgba(11, 29, 22, 0.06);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.wind-login-lang:hover {
    border-color: rgba(11, 29, 22, 0.3);
    color: #0b1d16;
}

.wind-login-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.wind-login-form {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    margin: 19.5px auto 0;
    padding: 48.75px;
    border: 0;
    border-radius: 1rem;
    background-color: #f5f7f6;
    box-shadow: 0 4px 24px rgba(11, 29, 22, 0.06);
}

@media (max-width: 519px) {
    .wind-login-form {
        padding: clamp(1.25rem, 6vw, 48.75px);
    }
}

.wind-login-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.wind-login-input-wrap {
    position: relative;
}

.wind-login-field-label {
    display: block;
    position: static;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0b1d16;
    pointer-events: auto;
    transform: none;
}

.wind-login-input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(197, 212, 206, 0.7);
    background-color: #ffffff;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #0b1d16;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wind-login-input:focus {
    border-color: #0b1d16;
    box-shadow: 0 0 0 2px rgba(11, 29, 22, 0.1);
}

.wind-login-input.pe-10 {
    padding-inline-end: 2.5rem;
}

.wind-login-submit {
    margin-top: 0.25rem;
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 9999px;
    background-color: #0b1d16;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s;
}

.wind-login-submit-icon {
    font-size: 1.125rem;
    line-height: 1;
}

.wind-login-submit-icon--flip {
    transform: scaleX(-1);
}

.wind-login-submit:hover {
    background-color: #1f4d3a;
}

.wind-login-footer {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    text-align: center;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.375;
    color: rgba(74, 92, 85, 0.9);
}

.wind-login-page-footer,
.wind-app-page-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(197, 212, 206, 0.3);
    background-color: #f5f7f6;
    padding: 1rem 1rem;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(74, 92, 85, 0.9);
}

/* Institution PNG icon — works when Vite build is missing on server */
.wind-filter-icon-wrap {
    pointer-events: none;
    position: absolute;
    inset-inline-start: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.wind-institution-icon {
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.wind-institution-icon--sidebar { width: 20px; height: 20px; }
.wind-institution-icon--filter { width: 16px; height: 16px; }
.wind-institution-icon--table { width: 18px; height: 18px; }
.wind-institution-icon--section { width: 20px; height: 20px; }
.wind-institution-icon--hero { width: 22px; height: 22px; }
.wind-institution-icon--modal { width: 36px; height: 36px; }
.wind-institution-icon--empty { width: 36px; height: 36px; margin-inline: auto; margin-bottom: 0.5rem; opacity: 0.6; }

/* Dashboard toolbar filters — fallback when Vite build is missing */
.wind-toolbar-filters {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .wind-toolbar-filters {
        margin-inline-start: auto;
        max-width: 42rem;
        flex: 1 1 0%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }
}

.wind-filter-field {
    position: relative;
    width: 100%;
    min-width: 0;
}

@media (min-width: 1024px) {
    .wind-filter-field {
        width: auto;
        min-width: 11.5rem;
        max-width: 14rem;
    }
}

.wind-filter-icon {
    pointer-events: none;
    position: absolute;
    inset-inline-start: 0.75rem;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    color: #4a5c55;
}

.wind-filter-field .wind-filter-icon,
.wind-filter-field .wind-filter-icon-wrap {
    display: none;
}

.wind-filter-select {
    height: 2.75rem;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 0.75rem;
    border: 1px solid rgba(197, 212, 206, 0.6);
    background-color: #fff;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    padding-left: 0.75rem;
    padding-right: 2.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0b1d16;
    box-shadow: 0 1px 2px rgba(11, 29, 22, 0.05);
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%230B1D16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
    background-position: right 0.85rem center;
    text-align: left;
    text-align-last: left;
}

.wind-filter-select::-ms-expand {
    display: none;
}

html[dir='rtl'] .wind-filter-select,
.wind-filter-select[dir='rtl'] {
    padding-left: 2.25rem;
    padding-right: 0.75rem;
    background-position: left 0.85rem center;
    text-align: right;
    text-align-last: right;
}

html[dir='ltr'] .wind-filter-select,
.wind-filter-select[dir='ltr'] {
    padding-left: 0.75rem;
    padding-right: 2.25rem;
    background-position: right 0.85rem center;
    text-align: left;
    text-align-last: left;
}

.wind-filter-select-no-end-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%230B1D16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    padding-right: 2.25rem;
}

.wind-filter-select:focus {
    border-color: #0b1d16;
    box-shadow: 0 0 0 2px rgba(11, 29, 22, 0.1);
}

.wind-filter-search {
    position: relative;
    min-width: 0;
    flex: 1 1 0%;
}

.wind-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(197, 212, 206, 0.7);
    background-color: #fff;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #0b1d16;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wind-input::placeholder {
    color: rgba(74, 92, 85, 0.6);
}

.wind-input:focus {
    border-color: #0b1d16;
    box-shadow: 0 0 0 2px rgba(11, 29, 22, 0.1);
}

.wind-search-input {
    width: 100%;
    height: 2.75rem;
    min-height: 2.75rem;
    padding-block: 0.625rem;
    padding-inline-start: 2.5rem;
    padding-inline-end: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.wind-filter-search > .material-symbols-outlined {
    inset-inline-start: 0.75rem;
    inset-inline-end: auto;
    left: auto;
    right: auto;
}

.wind-search-input::-webkit-search-decoration,
.wind-search-input::-webkit-search-cancel-button,
.wind-search-input::-webkit-search-results-button,
.wind-search-input::-webkit-search-results-decoration {
    display: none;
}

.wind-per-page-select {
    height: 2.75rem;
    min-width: 5.25rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 0.5rem;
    border: 1px solid rgba(197, 212, 206, 0.6);
    background-color: #fff;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #4a5c55;
    text-align: left;
    text-align-last: left;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%234a5c55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
    background-position: right 0.65rem center;
}

.wind-per-page-select::-ms-expand {
    display: none;
}

html[dir='rtl'] .wind-per-page-select,
.wind-per-page-select[dir='rtl'] {
    padding-left: 2rem;
    padding-right: 0.75rem;
    background-position: left 0.65rem center;
    text-align: right;
    text-align-last: right;
}

.wind-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    padding-left: 1rem;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%230B1D16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
    background-position: right 0.85rem center;
}

.wind-select::-ms-expand {
    display: none;
}

.wind-multi-select-toggle.wind-select {
    background-image: none;
}

.wind-select[dir='rtl'],
html[dir='rtl'] .wind-select:not(.wind-multi-select-toggle),
[dir='rtl'] .wind-select:not(.wind-multi-select-toggle) {
    background-position: left 0.85rem center;
    padding-left: 2.75rem;
    padding-right: 1rem;
}

/* Page header search (employees) — same box as institutions toolbar search */
.wind-page-header-search {
    width: 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .wind-page-header-search {
        width: auto;
        min-width: 20rem;
    }
}

.wind-page-header-search .wind-filter-search {
    width: 100%;
    min-width: 0;
    flex: none;
}

@media (min-width: 640px) {
    .wind-page-header-search .wind-filter-search {
        min-width: 20rem;
    }
}

@media (min-width: 1024px) {
    .wind-page-header-search .wind-filter-search {
        min-width: 20rem;
    }
}

/* Employee / branch forms — fallback without Vite */
.wind-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(197, 212, 206, 0.4);
    background-color: rgba(245, 248, 246, 0.6);
    padding: 1.25rem;
}

.wind-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(197, 212, 206, 0.3);
    padding-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0b1d16;
}

.wind-form-control {
    min-height: 2.75rem;
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.wind-multi-select-toggle {
    min-height: 2.75rem;
}

.wind-multi-select-toggle[aria-expanded='true'] [data-wind-multi-select-chevron] {
    transform: rotate(180deg);
}

.wind-multi-select [data-wind-multi-select-chevron] {
    transition: transform 0.15s ease;
}

.wind-card {
    border-radius: 1rem;
    border: 1px solid rgba(197, 212, 206, 0.6);
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(11, 29, 22, 0.06);
}

.wind-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    color: #fff;
    box-shadow: 0 1px 3px rgba(11, 29, 22, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.wind-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(11, 29, 22, 0.18);
}

.wind-stat-card--completed { background-color: #2d6a4f; }
.wind-stat-card--current { background-color: #1e5a8a; }
.wind-stat-card--overdue { background-color: #ba1a1a; }
.wind-stat-card--employees { background-color: #0b1d16; }
.wind-stat-card--done { background-color: #1a3d32; }

.wind-stat-card__icon {
    display: flex;
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.wind-stat-card__label {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.85);
}

.wind-stat-card__value {
    margin-top: 0.125rem;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.wind-stat-card__hint {
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.75);
}

.wind-stat-card__badge {
    flex-shrink: 0;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    font-size: 0.5625rem;
    font-weight: 700;
    color: #fff;
}

.wind-stat-card__progress {
    margin-top: 0.375rem;
    height: 0.375rem;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.25);
}

.wind-stat-card__progress-bar {
    height: 100%;
    border-radius: 9999px;
    background-color: #fff;
    transition: width 0.5s ease;
}

.wind-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background-color: #0b1d16;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    transition: background-color 0.15s ease;
}

.wind-btn-primary:hover {
    background-color: #1a3d32;
}

.wind-btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.wind-filter-search .wind-search-input.wind-input {
    height: 2.75rem;
    min-height: 2.75rem;
    padding-block: 0.625rem;
    padding-inline-start: 2.5rem;
    padding-inline-end: 1rem;
    line-height: 1.5;
}

.wind-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.wind-status-pill > span:first-child:not(:only-child) {
    display: none;
}

.wind-status-pill-active,
.wind-status-pill-success {
    border: 1px solid rgba(45, 106, 79, 0.2);
    background-color: rgba(184, 217, 200, 0.4);
    color: #2d6a4f;
}

.wind-status-pill-suspended,
.wind-status-pill-danger {
    border: 1px solid rgba(186, 26, 26, 0.2);
    background-color: #ffdad6;
    color: #ba1a1a;
}

.wind-status-pill-warning {
    border: 1px solid rgba(201, 162, 39, 0.35);
    background-color: #fff3cd;
    color: #856404;
}

.wind-status-pill-leave {
    border: 1px solid rgba(212, 136, 15, 0.3);
    background-color: #ffe8cc;
    color: #9a4d00;
}

.wind-status-pill-progress {
    border: 1px solid rgba(31, 77, 58, 0.25);
    background-color: #cfe8e2;
    color: #0b4f44;
}

.wind-status-pill-muted {
    border: 1px solid rgba(197, 212, 206, 0.5);
    background-color: #eef0ef;
    color: #4a5c55;
}

.wind-reports-filters {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.wind-reports-filters .wind-filter-field {
    width: 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .wind-reports-filters .wind-filter-field {
        width: auto;
        min-width: 10.5rem;
        max-width: 14rem;
    }
}

.wind-reports-filters input[type='date'].wind-filter-select {
    background-image: none;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.wind-reports-status-pill {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
}

.wind-field-error {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    color: #ba1a1a;
}

.wind-login-input-error {
    border-color: #ba1a1a !important;
    box-shadow: 0 0 0 2px rgba(186, 26, 26, 0.15);
}
