/* Access Portal – page-specific overrides on top of the Balady CDN styles.
   Colours: only those already used by the Balady template
   (#1b8354 #166a45 #b42318 #161616 #384250 #d2d6db #f3f4f6 #f3fcf6 #b8eacb #14573a, white). */

@font-face {
    font-family: IMBPlexSansArabic;
    font-style: normal;
    font-weight: 400;
    src: url("../assets/fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
}
@font-face {
    font-family: IMBPlexSansArabic;
    font-style: normal;
    font-weight: 600;
    src: url("../assets/fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
}
@font-face {
    font-family: IMBPlexSansArabic;
    font-style: normal;
    font-weight: 700;
    src: url("../assets/fonts/IBMPlexSansArabic-Bold.ttf") format("truetype");
}

/* ------------------------------------------------------------ header (from the template) */
header.site-header .navbar > .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}
header.site-header .navbar-brand {
    display: flex !important;
    align-items: center;
    margin: 0;
}
header.site-header .navbar-brand img { height: 52px; width: auto; }
header.site-header .navbar-nav {
    margin: 0 !important;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}
.header-tools {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin-inline-start: auto;
    white-space: nowrap;
}
.header-tools a,
.header-tools .access-actor,
.access-link-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #161616;
    font-weight: 500;
}
.access-inline-form { display: inline; margin: 0; }
.access-link-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.access-link-button:hover { color: #1b8354; }

/* ------------------------------------------------------------ page title + sheet */
.page-top-fixed .page-title-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.page-top-fixed .title-heading,
.page-top-fixed .title-heading h1,
.title-heading h1 { color: #161616 !important; }
.page-top-fixed .title-heading h1 {
    font-size: 1.75rem;
    line-height: 1.4;
    margin: .25rem 0 0;
}
.page-top-fixed .page-options-btns {
    display: flex;
    gap: .5rem;
    justify-content: flex-start;
    margin: .75rem 0 .25rem;
}
.access-subtitle { color: #384250; margin: .25rem 0 0; font-size: .95rem; }
.sheet { padding: 2rem 0 4rem; }

label.req > span:not(.select2):before {
    content: "*";
    color: #b42318;
    margin-inline-end: .35rem;
}
.inputRequiredError { border-color: #b42318 !important; }

/* ------------------------------------------------------------ tables (from requests.html) */
.requests { background: #fff; border: 1px solid #d2d6db; border-radius: 12px; overflow-x: auto; }
.requests table { width: 100%; margin: 0; border-collapse: collapse; }
.requests th {
    background: #f3f4f6;
    color: #384250;
    font-weight: 600;
    border-top: 0;
    white-space: nowrap;
}
.requests td, .requests th { padding: 14px 16px; vertical-align: middle; text-align: start; }
.requests tbody tr + tr td { border-top: 1px solid #f3f4f6; }
.requests td.access-actions, .requests th:last-child { text-align: center; white-space: nowrap; }
.access-actions { display: table-cell; }
.access-actions form { display: inline; margin: 0; }
.access-empty { text-align: center !important; color: #384250; padding: 2rem 16px !important; }

.status {
    display: inline-block;
    background: #f3f4f6;
    color: #384250;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    white-space: nowrap;
}
.status.done { background: #f3fcf6; color: #166a45; border: 1px solid #b8eacb; }
.status.reject { background: #f3f4f6; color: #b42318; }

.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d2d6db;
    border-radius: 8px;
    background: #fff;
    color: #161616;
    cursor: pointer;
    padding: 0;
    margin-inline: 2px;
}
.row-action:hover { background: #f3f4f6; color: #161616; }
.row-action svg { width: 20px; height: 20px; }
.row-action.access-danger { color: #b42318; }

.access-code {
    color: #384250;
    font-size: .8rem;
    font-family: Consolas, "Courier New", monospace;
    margin-inline-start: .25rem;
}
.access-diff { max-width: 380px; font-size: .8rem; color: #384250; word-break: break-word; }
.access-note { color: #b42318; margin-top: .25rem; }

/* ------------------------------------------------------------ filters, pager, forms */
.access-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .75rem 1rem;
    margin-bottom: 1.5rem;
}
.access-filters .form-group { margin-bottom: 0; min-width: 180px; }
.access-filters .access-filter-grow { flex: 1 1 260px; }
.access-filters .btn { height: 48px; min-width: 96px; }

.access-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
}
.access-pager-links { display: flex; gap: .5rem; }

.access-form-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.btn-default { background: #fff; border: 1px solid #d2d6db; color: #161616; }
.btn-default:hover { background: #f3f4f6; color: #161616; }

footer.footer a { color: #fff; }

/* ------------------------------------------------------------ login (based on login.html) */
body.access-login {
    margin: 0;
    min-height: 100vh;
    font-family: IMBPlexSansArabic, "Segoe UI", Tahoma, sans-serif;
    color: #161616;
    background: #14573a;
}
.access-login .login-container-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url("../assets/hero.png") center center / cover no-repeat;
}
.access-login .center-h {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 100vh;
}
.access-login .login-wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px;
}
.access-login .login-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.access-login .description-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 420px;
    flex: 1;
}
.access-login .desc-cont-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3rem;
    width: 100%;
}
.access-login .logo-w { height: 80px; width: auto; }
.access-login .login-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 560px;
}
.access-login .login-content h3 {
    margin: 0;
    color: #fff;
    font-size: 50px;
    font-weight: 600;
    line-height: 72px;
    letter-spacing: -1.2px;
}
.access-login .login-content p {
    margin: 0;
    color: #fff;
    font-size: 20px;
    line-height: 30px;
}
.access-login .copy-right {
    color: #b8eacb;
    font-size: 13.5px;
    line-height: 140%;
    margin-top: 2.5rem;
}
.access-login .center-container {
    width: 526px;
    min-width: 526px;
    min-height: 430px;
    padding: 3.5rem 3rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.access-login .form-title h4 {
    margin: 0 0 2rem;
    color: #161616;
    font-size: 30px;
    font-weight: 700;
    line-height: 38px;
    text-align: center;
}
.access-login .access-submit {
    width: 100%;
    height: 48px;
    background: #1b8354;
    border-color: #1b8354;
    color: #fff;
    font-weight: 600;
}
.access-login .access-submit:hover { background: #166a45; border-color: #166a45; }
.access-login-hint { color: #384250; font-size: 14px; margin: 1rem 0 0; text-align: center; }
.access-otp { letter-spacing: .5rem; text-align: center; font-size: 1.25rem; }
.access-resend {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}
.access-resend a, .access-resend .access-link-button { color: #1b8354; font-weight: 600; }

@media (max-width: 991px) {
    .access-login .login-container { flex-direction: column; align-items: center; }
    .access-login .description-container { min-height: 0; align-items: center; }
    .access-login .desc-cont-top, .access-login .login-content { align-items: center; text-align: center; }
    .access-login .center-container { width: 100%; min-width: 0; }
    .access-login .copy-right { text-align: center; }
    header.site-header .navbar-nav { flex-wrap: wrap; gap: .75rem; }
}
@media (max-width: 576px) {
    .access-login .login-container-bg { display: none; }
    body.access-login { background: #f3fcf6; }
    .access-login .logo-w { filter: invert(1); }
    .access-login .login-content h3, .access-login .login-content p, .access-login .copy-right { color: #161616; }
    .access-login .login-content h3 { font-size: 30px; line-height: 1.4; }
    .access-login .login-content p { font-size: 16px; line-height: 1.6; }
    .access-login .center-container { box-shadow: none; padding: 1.5rem 1rem 2rem; }
}

/* Demo environment banner: always visible above everything, never mistaken for production. */
.access-demo-banner { position: relative; z-index: 1050; background: #fff6e8; color: #6a3d00; border-bottom: 1px solid #f1c27d; padding: 6px 16px; text-align: center; font-size: .875rem; font-weight: 600; }
