/* E-Mirsal II — modern responsive workspace */
body.emirsal-full-width-page .grid-container,
body.emirsal-full-width-page .site-content,
body.emirsal-full-width-page .content-area,
body.emirsal-full-width-page .site-main,
body.emirsal-full-width-page .inside-article,
body.emirsal-full-width-page .entry-content,
body.emirsal-full-width-page .wp-block-post-content {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.emirsal-full-width-page .entry-header { display: none !important; }
body.emirsal-full-width-page .inside-article { padding: 0 !important; }
body.emirsal-full-width-page .site-content { padding: 18px 0 36px !important; }

.emirsal-app {
  --emirsal-navy: #082e63;
  --emirsal-blue: #0866e8;
  --emirsal-line: #d9e5f4;
  --emirsal-muted: #61748f;
  width: min(1600px, calc(100vw - 40px)) !important;
  max-width: 1600px !important;
  margin: 18px auto 30px !important;
  padding: 0 !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  overflow: hidden;
  color: #142943;
  background: #f4f8fd;
  border: 1px solid #d9e4f1;
  border-radius: 18px;
  box-shadow: 0 14px 42px rgba(12, 46, 91, .12);
  font: 14px/1.45 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}
.emirsal-app *, .emirsal-app *::before, .emirsal-app *::after { box-sizing: border-box; }
.emirsal-hero {
  display: flex; align-items: center; gap: 18px; min-height: 142px; padding: 24px 30px;
  color: #fff; background: linear-gradient(110deg, #06285b 0%, #0754a9 46%, #2c82df 100%);
  position: relative; isolation: isolate; overflow: hidden;
}
.emirsal-hero::after { content: ""; position: absolute; z-index: -1; width: 480px; height: 480px; right: -80px; top: -260px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.035), 0 0 0 75px rgba(255,255,255,.035), 0 0 0 120px rgba(255,255,255,.025); }
.emirsal-brand-mark { flex: 0 0 64px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #1d9bff, #0751d8); box-shadow: 0 9px 22px rgba(0,0,0,.18); font-size: 38px; font-weight: 800; }
.emirsal-brand-copy { min-width: 0; }
.emirsal-hero-title { font-size: clamp(26px, 3vw, 38px); line-height: 1.05; font-weight: 800; letter-spacing: -.035em; }
.emirsal-hero-subtitle { font-size: clamp(17px, 2vw, 23px); font-weight: 550; margin-top: 4px; }
.emirsal-hero .emirsal-eyebrow { margin-top: 9px; color: #d8eaff; font-size: 11px; letter-spacing: .06em; font-weight: 700; }
.emirsal-hero .emirsal-eyebrow a { color: inherit; text-decoration: none; }
.emirsal-hero .emirsal-eyebrow a:hover { color: #fff; text-decoration: underline; }
.emirsal-hero-badge { display: flex; align-items: center; gap: 11px; margin-left: auto; padding: 13px 17px; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; background: rgba(255,255,255,.94); color: #17365c; box-shadow: 0 7px 22px rgba(0,0,0,.12); white-space: nowrap; }
.emirsal-uae-dot { font-size: 25px; }
.emirsal-hero-badge strong, .emirsal-hero-badge small { display: block; }
.emirsal-hero-badge strong { font-size: 13px; }
.emirsal-hero-badge small { color: #61748f; margin-top: 2px; font-size: 11px; }
.emirsal-badge-divider { width: 1px; height: 34px; background: #cbd8e7; margin: 0 4px; }
.emirsal-badge-note { font-size: 12px; font-weight: 650; }
.emirsal-panel { margin: 16px 18px; border: 1px solid #dbe6f3; border-radius: 14px; background: #fff; box-shadow: 0 5px 20px rgba(28, 67, 112, .045); overflow: hidden; }
.emirsal-panel-heading { display: flex; align-items: center; gap: 13px; padding: 16px 22px; border-bottom: 1px solid #e5edf7; background: linear-gradient(180deg, #fff, #f7faff); min-width: 0; }
.emirsal-panel-icon { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #1479ff, #0751d4); color: white; font-size: 26px; font-weight: 700; }
.emirsal-panel-icon.purple { background: linear-gradient(145deg, #9757f6, #6230cf); }
.emirsal-panel-heading h2 { margin: 0; color: #102e59; font-size: 21px; font-weight: 750; line-height: 1.2; }
.emirsal-panel-heading p { margin: 4px 0 0; color: var(--emirsal-muted); font-size: 13px; }
.emirsal-status-pill { margin-left: auto; padding: 9px 13px; border-radius: 9px; background: #eaf9ef; border: 1px solid #c6eed2; color: #18743a; font-size: 12px; font-weight: 700; white-space: nowrap; }
.emirsal-panel-body { padding: 18px 22px 20px; }
.emirsal-message { display: none; margin: 0 0 15px; padding: 11px 14px; border: 1px solid #c6eed2; border-radius: 9px; background: #eaf9ef; color: #18743a; font-size: 13px; }
.emirsal-message.is-visible { display: block; }
.emirsal-message.is-error { background: #fff0f0; color: #a31e2b; border-color: #ffcaca; }
.emirsal-fieldset { min-width: 0; margin: 0; padding: 20px 17px 18px; border: 1px solid #dbe5f2; border-radius: 12px; background: #fff; }
.emirsal-fieldset legend { padding: 0 8px; color: #123563; font-size: 16px; font-weight: 750; }
.emirsal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px 16px; }
.emirsal-grid label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #243e60; font-size: 12px; font-weight: 700; }
.emirsal-app input, .emirsal-app select { display: block; width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px; border: 1px solid #cbd9eb; border-radius: 8px; background: #fff; color: #162b47; font: 400 13px/1.25 inherit; box-shadow: inset 0 1px 2px rgba(12, 39, 75, .025); }
.emirsal-app input:focus, .emirsal-app select:focus { outline: 3px solid rgba(16, 112, 239, .14); border-color: #4b9aff; }
.emirsal-app input[readonly], .emirsal-app .emirsal-readonly { background: #edf2f8; color: #5b6d83; }
.emirsal-optional { margin-top: 18px; padding: 0; border: 0; }
.emirsal-optional summary { list-style: none; cursor: pointer; padding: 12px 15px; border-radius: 9px; color: #0758c8; background: #eaf2ff; font-weight: 750; font-size: 13px; }
.emirsal-optional summary::-webkit-details-marker { display: none; }
.emirsal-optional summary::before { content: "⚙  "; }
.emirsal-optional[open] summary { margin-bottom: 15px; }
.emirsal-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.emirsal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.emirsal-app button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 11px 16px; border: 1px solid #075bd1; border-radius: 9px; background: linear-gradient(180deg, #0c70f3, #0755c9); color: #fff; font: 650 13px/1.15 system-ui, sans-serif; cursor: pointer; box-shadow: 0 3px 7px rgba(6, 80, 181, .12); transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.emirsal-app button:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 5px 12px rgba(6, 80, 181, .17); }
.emirsal-app button:disabled { opacity: .58; cursor: wait; transform: none; }
.emirsal-app button.secondary { background: #fff; color: #075bd1; border-color: #80b3ff; box-shadow: none; }
.emirsal-app button.success { background: linear-gradient(180deg, #159b58, #087a42); border-color: #087a42; }
.emirsal-app button.danger { background: linear-gradient(180deg, #e52c3b, #c51e30); border-color: #c51e30; }
.emirsal-items-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: min(450px, 50%); }
.emirsal-items-tools input { min-width: 180px; }
.emirsal-items-tools button { white-space: nowrap; padding: 10px 12px; }
.emirsal-items-tools input[type="search"] { flex: 1 1 260px; }
.emirsal-table-wrap { width: 100%; max-width: 100%; overflow: auto; border: 1px solid #dbe6f3; border-radius: 10px; }
.emirsal-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; margin: 0; background: #fff; }
.emirsal-table th { position: sticky; top: 0; z-index: 1; background: #e5f1ff; color: #153b6b; font-size: 11px; white-space: nowrap; text-align: left; padding: 12px 9px; border-bottom: 1px solid #cddff4; }
.emirsal-table td { padding: 5px; border-bottom: 1px solid #edf2f8; }
.emirsal-table tbody tr:nth-child(even) { background: #f9fbfe; }
.emirsal-table tbody tr:hover { background: #f0f7ff; }
.emirsal-table td input { min-width: 78px; min-height: 37px; padding: 7px 8px; font-size: 12px; border-radius: 7px; }
.emirsal-table td:nth-child(1) input { min-width: 42px; width: 46px; text-align: center; }
.emirsal-table td:nth-child(2) input { min-width: 190px; }
.emirsal-table td:nth-child(3) input { min-width: 120px; }
.emirsal-table td:nth-child(10) input { min-width: 140px; }
.emirsal-table .emirsal-invalid { border-color: #e34b55 !important; background: #fff0f1 !important; color: #a61b1b !important; }
.emirsal-help { margin: 10px 0 0; color: #647b98; font-size: 12px; }
.emirsal-output { margin-bottom: 18px; }
.emirsal-output .emirsal-panel-body { padding-top: 14px; }
.emirsal-output pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; background: #f5f8fc; border: 1px solid #e0e9f4; border-radius: 9px; padding: 13px; min-height: 42px; color: #39516e; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.emirsal-notice { padding: 14px; border: 1px solid #e0b6b6; background: #fff5f5; border-radius: 8px; }
@media (max-width: 1100px) {
  .emirsal-hero { flex-wrap: wrap; }
  .emirsal-hero-badge { margin-left: 82px; }
  .emirsal-grid, .emirsal-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emirsal-items-tools { min-width: 100%; margin: 12px 0 0; }
  .emirsal-panel-heading { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  body.emirsal-full-width-page .site-content { padding: 8px 0 20px !important; }
  .emirsal-app { width: calc(100vw - 16px) !important; margin: 8px auto 18px !important; border-radius: 12px; }
  .emirsal-hero { padding: 19px 15px; gap: 12px; }
  .emirsal-brand-mark { width: 48px; height: 48px; flex-basis: 48px; border-radius: 12px; font-size: 30px; }
  .emirsal-hero-badge { margin-left: 0; padding: 10px 12px; white-space: normal; }
  .emirsal-badge-note, .emirsal-badge-divider { display: none; }
  .emirsal-panel { margin: 10px; border-radius: 11px; }
  .emirsal-panel-heading { padding: 13px; gap: 10px; }
  .emirsal-panel-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 22px; }
  .emirsal-panel-heading h2 { font-size: 18px; }
  .emirsal-status-pill { margin-left: 0; }
  .emirsal-panel-body { padding: 13px; }
  .emirsal-grid, .emirsal-grid-four { grid-template-columns: 1fr; gap: 12px; }
  .emirsal-fieldset { padding: 14px 11px; }
  .emirsal-actions button { flex: 1 1 calc(50% - 8px); padding: 10px; }
  .emirsal-items-tools { flex-direction: column; align-items: stretch; }
  .emirsal-items-tools input { min-width: 0; }
}

/* Free registration and branded login pages */
.emirsal-auth-card{max-width:520px;margin:36px auto;padding:32px;background:#fff;border:1px solid #dbe3ee;border-radius:18px;box-shadow:0 16px 44px rgba(20,45,80,.10);color:#172b4d;font-family:inherit}
.emirsal-auth-card h2{margin:8px 0 8px;font-size:27px;line-height:1.2;color:#142b4d}.emirsal-auth-card p{color:#5a6b82;line-height:1.55}.emirsal-auth-brand{font-weight:800;letter-spacing:2px;color:#1466c3;font-size:13px}.emirsal-auth-form{display:grid;gap:15px;margin-top:22px}.emirsal-auth-form label{display:grid;gap:7px;font-weight:600;color:#243a58}.emirsal-auth-form input:not([type=checkbox]){box-sizing:border-box;width:100%;padding:12px 13px;border:1px solid #cbd6e4;border-radius:9px;background:#fff;color:#172b4d;font:inherit}.emirsal-auth-form input:focus{outline:2px solid #8abaff;border-color:#2879d8}.emirsal-auth-button{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border:0;border-radius:9px;background:#1268c4;color:#fff!important;text-decoration:none!important;font-weight:700;cursor:pointer}.emirsal-auth-button:hover{background:#0c4f98;color:#fff}.emirsal-auth-secondary{background:#eaf2fc;color:#1559a0!important}.emirsal-auth-remember{display:flex!important;grid-template-columns:auto 1fr;align-items:center;gap:8px!important;font-weight:400!important}.emirsal-auth-foot{margin-top:20px}.emirsal-auth-card small{display:block;margin-top:20px;color:#718096;text-align:center}.emirsal-auth-message{padding:11px 13px;border-radius:8px;margin:14px 0}.emirsal-auth-message.error{background:#fff0f0;color:#a22121}.emirsal-auth-message.success{background:#ecfdf3;color:#176b3a}.emirsal-auth-link{border:0;background:transparent;color:#145eaa;text-decoration:underline;cursor:pointer;margin-top:12px}


/* v1.5.0: responsive auth forms and branded home screen */
.emirsal-auth-card, .emirsal-home-hero {
  width: min(760px, calc(100% - 32px)); margin: 28px auto; padding: clamp(22px, 4vw, 42px);
  background: #fff; color: #142943; border: 1px solid #dce6f2; border-radius: 20px;
  box-shadow: 0 18px 55px rgba(10, 45, 91, .10); box-sizing: border-box;
}
.emirsal-auth-card * , .emirsal-home-hero * { box-sizing: border-box; }
.emirsal-auth-brand, .emirsal-home-kicker { color: #1769d2; font-size: 12px; font-weight: 800; letter-spacing: .12em; margin-bottom: 12px; }
.emirsal-auth-card h2, .emirsal-home-hero h1 { color: #102e59; font-size: clamp(27px, 4vw, 38px); line-height: 1.15; margin: 0 0 12px; font-weight: 800; }
.emirsal-auth-card > p, .emirsal-home-lead { color: #5c6f87; line-height: 1.65; margin: 0 0 22px; }
.emirsal-auth-form { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; width: 100% !important; margin: 22px 0 12px !important; }
.emirsal-auth-form label { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 7px !important; width: 100% !important; min-width: 0 !important; color: #243e60; font-size: 13px; font-weight: 700; }
.emirsal-auth-form input:not([type="checkbox"]) { display: block !important; width: 100% !important; max-width: 100% !important; min-height: 46px !important; padding: 11px 13px !important; margin: 0 !important; border: 1px solid #cbd9eb !important; border-radius: 9px !important; background: #fff !important; box-shadow: none !important; font-size: 15px !important; }
.emirsal-auth-form .emirsal-remember { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 9px !important; }
.emirsal-auth-form .emirsal-remember input { width: 17px !important; min-height: 17px !important; }
.emirsal-auth-button { display: inline-flex !important; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px !important; border: 0 !important; border-radius: 9px !important; background: #1267d9 !important; color: #fff !important; font-weight: 750 !important; text-decoration: none !important; cursor: pointer; }
.emirsal-auth-button:hover { background: #084da9 !important; color: #fff !important; }
.emirsal-auth-secondary { background: #eaf2ff !important; color: #1559b7 !important; }
.emirsal-auth-secondary:hover { background: #d8e8ff !important; color: #0c438e !important; }
.emirsal-auth-foot { margin: 18px 0 16px !important; color: #5c6f87; }
.emirsal-auth-card small, .emirsal-home-credit { display: block; margin-top: 25px; color: #65758a; font-size: 12px; }
.emirsal-auth-message { padding: 12px 14px; margin: 14px 0; border-radius: 9px; background: #fff1f1; color: #a3212d; border: 1px solid #ffd0d0; }
.emirsal-auth-message.success { background: #edf9f0; color: #176c35; border-color: #c6e9ce; }
.emirsal-home-hero { width: min(1080px, calc(100% - 32px)); margin-top: 38px; padding: clamp(28px, 5vw, 60px); background: radial-gradient(circle at 90% 10%, #e0efff 0, transparent 34%), linear-gradient(135deg, #fff 0%, #f5f9ff 100%); }
.emirsal-home-hero h1 { max-width: 760px; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.035em; }
.emirsal-home-lead { max-width: 690px; font-size: 17px; }
.emirsal-home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 34px; }
.emirsal-home-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.emirsal-home-features > div { padding: 18px; border: 1px solid #dce7f5; border-radius: 13px; background: rgba(255,255,255,.8); }
.emirsal-home-features strong, .emirsal-home-features span { display: block; }
.emirsal-home-features strong { color: #173b69; margin-bottom: 7px; }
.emirsal-home-features span { color: #63758b; font-size: 13px; line-height: 1.5; }
@media (max-width: 640px) {
  .emirsal-auth-card, .emirsal-home-hero { width: calc(100% - 24px); margin: 14px auto; padding: 22px; border-radius: 14px; }
  .emirsal-home-features { grid-template-columns: 1fr; }
  .emirsal-home-actions { flex-direction: column; }
  .emirsal-home-actions .emirsal-auth-button { width: 100%; }
}

/* v1.5.3: separate destructive action to the far right */
.emirsal-actions [data-action="clear"] { margin-left: auto; }
@media (max-width: 760px) {
  .emirsal-actions [data-action="clear"] { margin-left: 0; }
}
