:root {
    --ucci-blue: #1f7ab8;
    --ucci-blue-dark: #186494;
    --ucci-btn: #2390c7;
    --ucci-btn-hover: #1c7bb0;
    --status-ok: #2ea44f;
    --status-bad: #c0392b;
    --text: #222;
    --muted: #4a4a4a;
    --card-shadow: 0 4px 18px rgba(17, 38, 56, 0.10);
    --footer-h: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
}

body.eservices {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    color: var(--text);
    background-color: #eef1f4;
    background-image: url('pattern.svg');
    background-size: 140px 140px;
    background-repeat: repeat;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.es-top {
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px 10px;
    gap: 20px;
}

.es-top .vision {
    height: 86px;
    width: auto;
    display: block;
    background: transparent;
}

.es-top .portal-logo {
    height: 78px;
    width: auto;
    display: block;
    background: transparent;
}

.es-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 6px 16px;
    border-radius: 4px;
    background: #1f7ab8;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 2px 8px rgba(31, 122, 184, 0.25);
}

.es-lang:hover { background: #186494; }

.es-main {
    flex: 1;
    width: min(980px, calc(100% - 32px));
    margin: 8px auto 40px;
}

.es-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    padding: 26px 34px 32px;
}
.es-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    row-gap: 20px;
    padding: 6px 8px 12px;
}

.es-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e6e6;
}

.es-card-head h1 {
    font-family: 'Noto Kufi Arabic', 'Tajawal', Tahoma, sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0;
    line-height: 1.35;
}

.es-card-head h1::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--ucci-blue);
    border-radius: 1px;
    display: inline-block;
}

html[dir="ltr"] .es-card-head h1::before,
html.es-ltr .es-card-head h1::before,
html.translated-rtl .es-card-head h1::before,
html.translated-ltr .es-card-head h1::before {
    order: -1;
}

html[dir="ltr"],
html[dir="ltr"] body.eservices,
html.es-ltr,
html.es-ltr body.eservices,
html.translated-rtl,
html.translated-rtl body.eservices,
html.translated-ltr,
html.translated-ltr body.eservices {
    direction: ltr !important;
}

html[dir="ltr"] body.eservices,
html[dir="ltr"] .es-card-head h1,
html.es-ltr body.eservices,
html.es-ltr .es-card-head h1,
html.translated-rtl body.eservices,
html.translated-ltr body.eservices {
    font-family: 'Segoe UI', Tahoma, Arial, 'Tajawal', sans-serif;
}

html[dir="ltr"] .es-intro,
html[dir="ltr"] .es-grid,
html[dir="ltr"] .es-operated,
html.es-ltr .es-intro,
html.es-ltr .es-grid,
html.es-ltr .es-operated,
html.translated-rtl .es-intro,
html.translated-rtl .es-grid,
html.translated-rtl .es-operated,
html.translated-ltr .es-intro,
html.translated-ltr .es-grid,
html.translated-ltr .es-operated {
    text-align: left;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    color: #fff;
    background: var(--ucci-btn);
    border-radius: 4px;
    padding: 8px 22px;
    font-size: 0.95rem;
    min-width: 96px;
    transition: background .15s;
}

.btn:hover { background: var(--ucci-btn-hover); }

.btn-back {
    min-width: 88px;
    padding: 7px 18px;
}

.es-intro {
    margin: 18px 4px 22px;
    font-size: 0.95rem;
    line-height: 1.9;
    color: #222;
}

.es-field {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-height: 1.6em;
    flex-wrap: wrap;
}

.es-field .lbl {
    font-weight: 800;
    color: #111;
    white-space: nowrap;
}

.es-field .val {
    font-weight: 400;
    color: #222;
    word-break: break-word;
}

.es-field .val.status-ok { color: var(--status-ok); font-weight: 700; }
.es-field .val.status-bad { color: var(--status-bad); font-weight: 700; }

.es-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.es-actions .btn {
    min-width: 140px;
    padding: 9px 28px;
}

.es-search {
    max-width: 520px;
    margin: 10px auto 0;
}

.es-search label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.es-search input[type="text"] {
    width: 100%;
    border: 1px solid #cfd6dc;
    border-radius: 4px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 1rem;
    background: #fbfcfd;
}

.es-search input[type="text"]:focus {
    outline: none;
    border-color: var(--ucci-blue);
}

.es-alert {
    background: #fdecea;
    color: #a32020;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.es-alert[hidden] { display: none !important; }

.es-footer {
    margin-top: auto;
    background: var(--ucci-blue);
    color: #fff;
    min-height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 36px;
    direction: ltr;
}

.es-social {
    display: flex;
    gap: 8px;
    align-items: center;
}

.es-social a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: #fff;
}

.es-support {
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    flex: 1;
}

.es-operated {
    text-align: right;
    font-size: 0.75rem;
    line-height: 1.4;
    min-width: 120px;
}

.es-operated strong { display: block; font-size: 0.8rem; }

.chat-fab {
    position: fixed;
    bottom: 92px;
    right: 22px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--ucci-btn);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 6px 16px rgba(31, 122, 184, 0.4);
    z-index: 20;
}

@media (max-width: 820px) {
    .es-top { padding: 12px 14px 8px; flex-wrap: wrap; }
    .es-top .vision { height: 64px; }
    .es-top .portal-logo { height: 56px; }
    .es-grid { grid-template-columns: 1fr; row-gap: 14px; }
    .es-card { padding: 16px; }
    .es-footer { flex-direction: column; text-align: center; padding: 14px; }
    .es-operated { text-align: center; }
    .chat-fab { right: 14px; bottom: 14px; }
}
