/* ===========================================================================
   Neptune Support — client portal skin for osTicket 1.18.4
   Loaded LAST in <head>, after css/select2.min.css. See theme/README.md.

   Palette and type are the Neptune corporate brand, same tokens the public
   site at neptune.ly serves. Colour values are not inventions; the two "-ink"
   variants are derived, and the derivation is stated where they are declared.
   ========================================================================= */

/* ---------- fonts (self-hosted; the same four files neptune.ly serves) ----
   Not loaded from neptune.ly: that origin sends
   Cross-Origin-Resource-Policy: same-origin and no Access-Control-Allow-Origin,
   so a cross-origin @font-face fetch from support.neptune.ly is blocked.      */
@font-face{font-family:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;
  src:url(fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;
  src:url(fonts/nunito-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Beiruti';font-style:normal;font-weight:200 900;font-display:swap;
  src:url(fonts/beiruti-arabic.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}
@font-face{font-family:'Beiruti';font-style:normal;font-weight:200 900;font-display:swap;
  src:url(fonts/beiruti-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- tokens ---------- */
:root{
  --npt-navy:#07315F;
  --npt-navy-deep:#05264A;
  --npt-coral:#EB4E4D;
  --npt-teal:#00A8AE;
  --npt-sky:#3BC1EE;
  --npt-slate:#3A4F54;

  /* Coral and teal at brand value fail WCAG AA as TEXT on white (3.67:1 and
     2.91:1). These two are the same hues darkened to clear 4.5:1, and exist
     only for coloured text. Fills and rules keep the brand values above. */
  --npt-coral-ink:#C43A39;   /* 5.23:1 on white */
  --npt-teal-ink:#00797E;    /* 5.27:1 on white */

  --npt-page:#F5F7F9;
  --npt-card:#FFFFFF;
  --npt-sunken:#EFF2F6;
  --npt-line:#DFE4EA;
  --npt-line-soft:#EBEFF3;
  --npt-ink:#16233A;
  --npt-ink-muted:#3A4F54;
  --npt-ink-faint:#6B7A85;

  --npt-r-panel:10px;
  --npt-r-field:8px;
  --npt-r-pill:999px;

  --npt-latin:'Nunito',system-ui,-apple-system,'Segoe UI',sans-serif;
  --npt-arabic:'Beiruti','Nunito',system-ui,sans-serif;
  --npt-mono:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace;
  --npt-font:var(--npt-latin);
}

/* Arabic pack sets dir="rtl" class="rtl" on <html>. Arabic is never tracked:
   letter-spacing on Arabic breaks the joins. */
html[dir="rtl"]{--npt-font:var(--npt-arabic)}
html[dir="rtl"] body,html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3,
html[dir="rtl"] h4,html[dir="rtl"] .button,html[dir="rtl"] #nav li a{letter-spacing:0}
html[dir="rtl"] body{line-height:1.8}

/* ---------- page shell ---------- */
body{
  background:var(--npt-page);
  font-family:var(--npt-font);
  font-size:15px;line-height:1.6;color:var(--npt-ink);
  -webkit-font-smoothing:antialiased;
}
#container{
  width:auto;max-width:1040px;
  margin-inline:auto;padding-inline:20px;
  background:none;box-shadow:none;border:0;
}
#content{
  background:var(--npt-card);
  border:1px solid var(--npt-line);
  border-radius:var(--npt-r-panel);
  padding:28px 30px;margin-block:18px 26px;margin-inline:0;
  min-height:0;
}
h1,h2,h3,h4{font-family:var(--npt-font);color:var(--npt-ink);text-wrap:balance}
h1{font-size:25px;font-weight:800;letter-spacing:-.015em;line-height:1.2;margin:0 0 6px}
h2{font-size:19px;font-weight:800;letter-spacing:-.01em;margin:26px 0 10px}
h3{font-size:16px;font-weight:700;margin:20px 0 8px}
a{color:var(--npt-navy);text-decoration:none}
a:hover{text-decoration:underline}

/* ---------- masthead ---------- */
#header{
  height:auto;min-height:74px;
  display:flex;align-items:center;gap:20px;
  padding-block:14px;padding-inline:0;margin:0;
  border-block-end:1px solid var(--npt-line);
  background:none;
}
/* The logo is emitted AFTER the user menu, and theme.css put it first by
   floating it. Floats do not apply to flex items, so order does it instead —
   and order is direction-aware, which the float was not. */
#header #logo{
  order:-1;float:none;margin:0;padding:0;height:auto;
  display:inline-flex;align-items:center;
}
#header #logo img{max-height:34px;max-width:300px;height:34px;width:auto;display:block}
/* The client logo without an upload or an admin login. logo.php answers
   302 → assets/default/images/logo.png (the stock "SUPPORT CENTER" wordmark)
   whenever no client logo has been selected under Settings → Company, and
   none has. The lockup already sits beside this sheet, so swap the bitmap
   from here — the same fix the staff sheet uses for scp/logo.php. `content`
   on a replaced element keeps the box and the alt text. Once C1 selects the
   logo in the admin panel, logo.php serves it and this rule is harmless. */
#header #logo img{content:url("neptune-logo.png")}
#header .valign-helper{display:none}
#header .pull-right.flush-right{
  float:none;margin-inline-start:auto;text-align:end;
  display:flex;align-items:center;gap:16px;
}
#header p{width:auto;margin:0;padding:0;font-size:13.5px;color:var(--npt-ink-muted)}
#header a{color:var(--npt-ink-muted);font-weight:600}
#header a:hover{color:var(--npt-navy)}

/* ---------- primary nav ---------- */
#nav,ul#nav{
  display:flex;flex-wrap:wrap;gap:4px;
  margin:0;padding:10px 0 0;border:0;background:none;list-style:none;
  height:auto;box-shadow:none;white-space:normal;
}
#nav li{float:none;margin:0;background:none;border:0}
#nav li a{
  display:inline-block;padding:8px 15px;border-radius:var(--npt-r-pill);
  background:none;border:0;height:auto;line-height:1.4;
  font-size:14.5px;font-weight:700;color:var(--npt-ink-muted);
  /* theme.css gives each nav key its own background sprite */
  background-image:none;text-indent:0;
}
/* theme.css addresses each nav key by its OWN class — #nav li a.new, #nav li a.status — which
   outranks the #nav li a rule above, so the sprite survived it. And because that rule also drops
   theme.css's no-repeat, the surviving icon tiled the whole pill. Observed live on
   support.neptune.ly, not predicted. Equal specificity, and this sheet loads last, so it wins. */
#nav li a[class]{background-image:none}
#nav li a:hover{background:var(--npt-sunken);color:var(--npt-ink);text-decoration:none}
#nav li a.active{background:var(--npt-navy);color:#fff}

/* ---------- landing: flex, so RTL mirrors without a single flipped rule ---- */
#landing_page{display:flex;flex-wrap:wrap;gap:26px;align-items:flex-start}
#landing_page .main-content{width:auto;flex:1 1 420px;min-width:0;float:none;margin:0}
/* The sidebar is emitted before the main content and floated right. order:2
   restores that visually and mirrors correctly under dir="rtl". */
#landing_page .sidebar,.sidebar.pull-right{float:none;width:auto;flex:0 1 260px;margin:0}
#landing_page .sidebar{order:2}
.sidebar{margin-inline:0}
.sidebar .content{
  padding:0;border:0;background:none;
}
.row{display:flex;flex-wrap:wrap;gap:26px}
.span8{width:auto;flex:1 1 420px;min-width:0;float:none}
.span4{width:auto;flex:0 1 260px;float:none}

.front-page-button{margin:0 0 20px;float:none}
.front-page-button p{margin:0 0 10px}

/* ---------- buttons ----------
   One primary action per screen. osTicket ships blue + green side by side,
   which gives two competing primaries; navy fill / navy outline gives the
   hierarchy back. White on coral is 3.67:1, so coral never carries a label. */
.button,.button:visited,input[type=submit],input[type=button],input[type=reset],.btn{
  display:inline-block;box-sizing:border-box;
  padding:11px 22px;border-radius:var(--npt-r-pill);border:1.5px solid transparent;
  font-family:var(--npt-font);font-size:15px;font-weight:800;line-height:1.3;
  text-align:center;cursor:pointer;
  background:var(--npt-navy);color:#fff;
  background-image:none;box-shadow:none;text-shadow:none;
  transition:background 140ms ease,border-color 140ms ease,color 140ms ease;
}
.button:hover,input[type=submit]:hover,.btn:hover{background:var(--npt-navy-deep);color:#fff;text-decoration:none}
.blue.button,.blue.button:visited{background:var(--npt-navy);color:#fff;border-color:var(--npt-navy)}
.green.button,.green.button:visited{background:var(--npt-card);color:var(--npt-navy);border-color:var(--npt-navy)}
.green.button:hover{background:var(--npt-sunken);color:var(--npt-navy)}
input[type=reset]{background:none;border-color:var(--npt-line);color:var(--npt-ink-muted)}
input[type=reset]:hover{background:var(--npt-sunken);color:var(--npt-ink)}
.action-button{
  padding:6px 13px;border-radius:var(--npt-r-pill);border:1px solid var(--npt-line);
  background:var(--npt-card);color:var(--npt-ink-muted);font-size:13px;font-weight:700;
}
.action-button:hover{border-color:var(--npt-navy);color:var(--npt-navy);text-decoration:none}

/* ---------- forms ---------- */
input[type=text],input[type=email],input[type=password],input[type=number],
input[type=tel],input[type=url],input[type=search],select,textarea{
  box-sizing:border-box;max-width:100%;
  padding:10px 12px;border:1.5px solid var(--npt-line);border-radius:var(--npt-r-field);
  background:var(--npt-card);color:var(--npt-ink);
  font-family:var(--npt-font);font-size:15px;line-height:1.5;
  transition:border-color 140ms ease,box-shadow 140ms ease;
}
input:hover,select:hover,textarea:hover{border-color:#C8D0DA}
/* Sky is 2.09:1 on white — too weak to BE the indicator. Navy carries it;
   sky is the halo that makes it visible against a navy field border. */
:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--npt-navy);outline-offset:2px;
  box-shadow:0 0 0 4px rgba(59,193,238,.35);border-radius:var(--npt-r-field);
}
label,.form-header b,.form-header h3{font-weight:700;color:var(--npt-ink)}
.form-header{
  margin:0 0 6px;padding:0 0 6px;
  border-block-end:1px solid var(--npt-line-soft);
}
.faded{color:var(--npt-ink-faint)}
em[style*="gray"]{color:var(--npt-ink-faint)!important} /* beats an inline style attribute */
.error,font.error,.required .error{color:var(--npt-coral-ink)}
#ticketForm>table,#clientLogin table{width:100%;max-width:100%;border-collapse:collapse}
#ticketForm>table td,#clientLogin table td{padding-block:8px;vertical-align:top;border:0}
#ticketForm>table td:first-child{width:230px;padding-inline-end:16px;font-weight:600}
.buttons{margin-block:22px 0;display:flex;gap:10px;flex-wrap:wrap}
.login-box{
  background:var(--npt-card);border:1px solid var(--npt-line);
  border-radius:var(--npt-r-panel);padding:24px;box-shadow:none;
}
.captchaRow td{padding-block:10px}
#captcha{max-width:160px}

/* ===========================================================================
   THE GATE — sign in, check status, password reset

   These three are the only screens a bank employee sees before they are
   anybody, and they are the ones osTicket leaves as a bare form on a grey
   card. One treatment across all three: a navy counter carrying the screen's
   own heading, the form on the paper beside it. Asymmetric on purpose — the
   heading column is narrower than the form column, because the form is the
   work and the heading is the label on the counter.

   The hook is :has(), not a body class, because osTicket emits no per-page
   class and adding one is a core edit. A browser without :has() ignores every
   rule in this section and gets the plain stacked form, which still works.

   Nothing here is decoration for its own sake: the heading and the line under
   it are the page's own content (on login.php they come from the editable
   `banner-client` Site Page), and the 40px coral rule is the one accent this
   brand allows itself — it carries no text, which is why it is allowed to be
   coral at all.
   ========================================================================= */
#content:has(> form#clientLogin){
  display:grid;
  grid-template-columns:minmax(0,4fr) minmax(0,6fr);
  /* auto 1fr, not two autos: the heading takes what it needs and the line
     under it absorbs the rest, so the navy reaches the bottom of the card and
     the copy stays under the heading instead of being pushed to the floor. */
  grid-template-rows:auto 1fr;
  padding:0;overflow:hidden;
  border-color:var(--npt-line);
}
/* The navy column. h1 and p are separate children, so each paints its own
   navy and they butt into one continuous field — gap stays 0 for that. */
#content:has(> form#clientLogin) > h1,
#content:has(> form#clientLogin) > p:first-of-type{
  grid-column:1;
  background:var(--npt-navy);color:#fff;margin:0;
  padding-inline:32px;
}
#content:has(> form#clientLogin) > h1{
  grid-row:1;
  padding-block:44px 0;font-size:30px;line-height:1.15;font-weight:800;
  letter-spacing:-.02em;
}
/* The rule sits above the heading, inline-start edge, and mirrors in Arabic
   because it is a border-block-end on a ::before, not a positioned box. */
#content:has(> form#clientLogin) > h1::before{
  content:"";display:block;
  width:40px;height:3px;background:var(--npt-coral);
  margin-block-end:18px;
}
#content:has(> form#clientLogin) > p:first-of-type{
  grid-row:2;
  padding-block:14px 44px;font-size:15px;line-height:1.65;
  color:rgba(255,255,255,.74);
}
#content:has(> form#clientLogin) > p:first-of-type strong,
#content:has(> form#clientLogin) > h1 small{color:#fff}

/* The form column. No card here — #content is already the card, and a bordered
   box inside a bordered box is the stock osTicket look this replaces. */
/* theme.css:686-694 makes the form itself a grey inset card with a padlock
   sprite washed into its background. All of it goes: #content is the card. */
#content:has(> form#clientLogin) > form#clientLogin{
  grid-column:2;grid-row:1/-1;
  margin:0;padding:44px 34px;
  background:var(--npt-card);border:0;border-radius:0;box-shadow:none;
  align-self:stretch;
}
#content:has(> form#clientLogin) > br{display:none}
/* theme.css:928 gives .login-box width:40% and display:table-cell, and
   theme.css:602-610 re-declares every input inside #clientLogin at
   (1,0,2) — width:auto, border:1px solid #aaa, background:#fff. That last
   one is why the stock Sign In button renders as a white box with white
   text. Everything below is scoped `#clientLogin div …` to sit at the same
   weight and win on order. */
#clientLogin .login-box{
  width:100%;background:none;border:0;border-radius:0;padding:0;
  box-shadow:none;
  display:flex;flex-direction:column;gap:14px;
}
#clientLogin .login-box > div{margin:0}
#clientLogin div label{
  display:block;margin-block-end:5px;
  font-size:13px;font-weight:700;color:var(--npt-ink-muted);
}
#clientLogin div input[type=text],
#clientLogin div input[type=password],
#clientLogin div input[type=email]{
  width:100%;font-size:16px;margin:0;  /* theme.css:723 adds margin-bottom:15px */
  border:1.5px solid var(--npt-line);border-radius:var(--npt-r-field);
  padding:11px 13px;background:var(--npt-card);color:var(--npt-ink);
}
#clientLogin .login-box > p{margin:8px 0 0}
#clientLogin div input[type=submit],#clientLogin div .btn{
  width:100%;padding:12px 22px;
  background:var(--npt-navy);color:#fff;border:1.5px solid var(--npt-navy);
  border-radius:var(--npt-r-pill);
  font-family:var(--npt-font);font-size:15.5px;font-weight:800;
}
#clientLogin div input[type=submit]:hover,#clientLogin div .btn:hover{
  background:var(--npt-navy-deep);border-color:var(--npt-navy-deep);
}
#clientLogin > div[style*="table-row"]{display:block}
/* pwreset.php wraps its form in a 50%-wide inline-block */
#clientLogin > div[style*="width:50%"]{width:100%!important;display:block!important}
#clientLogin .instructions{
  display:block!important;  /* theme.css:698 makes it a table-cell */
  margin:22px 0 0;padding:18px 0 0!important;
  border-block-start:1px solid var(--npt-line-soft);
  font-size:13.5px;color:var(--npt-ink-faint);
}
/* theme.css:712 paints every <strong> inside the form as an 11px red error,
   which is right on login.php (it holds $errors['login']) and wrong on
   pwreset.php, where the same tag holds the instruction. */
#clientLogin div[style*="width:50%"] > strong{
  font-size:13.5px;color:var(--npt-ink-muted);margin-block-end:10px;
}
/* The right-hand cell of the sign-in form. Once registration is closed its
   only remaining content is "I'm an agent — sign in here"
   (include/client/login.inc.php:57-60), which advertises the staff panel to
   every bank employee who lands here. The whole cell goes.
   An external auth backend would render in this same cell — drop this rule
   if one is ever added. */
#clientLogin div[style*="table-cell"]{display:none!important}
/* "If this is your first time contacting us ... open a new ticket" survives
   `clients_only` (login.inc.php:68, accesslink.inc.php:55) and, once login is
   required, links to a page that bounces straight back here. */
#content:has(> form#clientLogin) > p:has(> a[href="open.php"]){display:none}

/* ---------- ticket list ---------- */
.search.well{
  background:var(--npt-sunken);border:1px solid var(--npt-line-soft);
  border-radius:var(--npt-r-panel);padding:16px 18px;box-shadow:none;
}
.states{display:flex;gap:6px;flex-wrap:wrap;float:none;margin-inline-start:auto}
.states a.state{
  padding:6px 14px;border-radius:var(--npt-r-pill);
  border:1px solid var(--npt-line);background:var(--npt-card);
  font-size:13.5px;font-weight:700;color:var(--npt-ink-muted);
}
.states a.state:hover{border-color:var(--npt-navy);color:var(--npt-navy);text-decoration:none}
.states a.state.active{background:var(--npt-navy);border-color:var(--npt-navy);color:#fff}
#ticketTable{width:100%;border-collapse:collapse;border:0;background:none}
#ticketTable caption{
  text-align:start;padding:0 0 10px;background:none;border:0;
  color:var(--npt-ink-faint);font-size:13.5px;font-weight:600;
}
#ticketTable thead th{
  height:auto;line-height:1.4;
  padding:10px 12px;text-align:start;background:var(--npt-sunken);border:0;
  border-block-end:1px solid var(--npt-line);
  font-size:12.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;
  color:var(--npt-ink-muted);
}
#ticketTable thead th a{color:var(--npt-ink-muted)}
html[dir="rtl"] #ticketTable thead th{letter-spacing:0;text-transform:none}
#ticketTable tbody td{padding:12px;border:0;border-block-end:1px solid var(--npt-line-soft);vertical-align:top}
#ticketTable tbody tr:hover td{background:var(--npt-sunken)}

/* ---------- ticket detail ---------- */
/* The rule belongs on the table, not the h1: the h1 sits in a content-sized
   <td> beside the action buttons, so a border on it stops mid-page. */
#ticketInfo{
  width:100%;border-collapse:collapse;
  padding-block-end:12px;margin-block-end:16px;
  border-block-end:1px solid var(--npt-line);
}
#ticketInfo h1{border:0;padding-block-end:0;margin-block-end:0}
#ticketInfo h1 small{font-size:.8em;color:var(--npt-ink-muted);font-weight:700}
.infoTable,.custom-data{
  width:100%;border-collapse:collapse;
  background:var(--npt-card);border:1px solid var(--npt-line-soft);
  border-radius:var(--npt-r-panel);overflow:hidden;
}
.infoTable td,.custom-data td,.infoTable th{
  padding:10px 14px;border:0;border-block-end:1px solid var(--npt-line-soft);
  background:var(--npt-card);text-align:start;
}
.infoTable tr:last-child td,.custom-data tr:last-child td{border-block-end:0}
.infoTable td.headline,.custom-data td.headline{
  background:var(--npt-sunken);
  font-size:12.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;
  color:var(--npt-ink-muted);white-space:nowrap;
}
html[dir="rtl"] .infoTable td.headline,html[dir="rtl"] .custom-data td.headline{letter-spacing:0;text-transform:none}

/* ---------- thread ----------
   theme.css draws speech-bubble tails with ::before/::after and has no RTL
   rule for them, so in Arabic the tail points away from its author. Replaced
   with a border-inline-start rule, which is correct in both directions and
   reads as a bank record rather than a chat app. */
.thread-entry{
  position:relative;background:var(--npt-card);
  border:1px solid var(--npt-line);border-radius:var(--npt-r-panel);
  border-inline-start:4px solid var(--npt-line);
  margin-block:0 16px;padding:0;box-shadow:none;
}
.thread-entry::before,.thread-entry::after{display:none}
.thread-entry.message{border-inline-start-color:var(--npt-coral)}
.thread-entry.response{border-inline-start-color:var(--npt-navy)}
/* theme.css tints these with .thread-entry.message .header (0,0,3), so the
   override has to match that weight, not .thread-entry > .header. */
.thread-entry.message>.header,.thread-entry.response>.header{
  background:var(--npt-sunken);border:0;border-block-end:1px solid var(--npt-line-soft);
  border-radius:0;padding:10px 16px;
  font-size:13.5px;color:var(--npt-ink-muted);
}
.thread-entry>.header b{color:var(--npt-ink);font-weight:800}
.thread-entry .thread-body{padding:16px;background:none;border:0}
/* Every one of these is a left/right-hardcoded decoration that has no RTL
   counterpart in theme.css: an absolutely positioned connector rail, a
   negative left margin, a white knock-out behind the icon. In Arabic they
   land on the wrong side of the thread. Removed rather than mirrored. */
#ticketThread::before{display:none}
.thread-event{
  padding:8px 16px;margin:0;margin-inline-start:0;border:0;
  font-size:13.5px;color:var(--npt-ink-faint);
}
.thread-event .type-icon{
  margin:0;margin-inline-end:8px;position:static;
  background:none;border:0;border-radius:0;padding:0;
}
.thread-event .type-icon::after{display:none}
.thread-event .description{
  margin:0;padding:0;width:auto;display:inline;
}
.attachments{
  border-block-start:1px solid var(--npt-line-soft);
  padding:10px 16px;margin:0;position:static;top:auto;border-radius:0;
}
.attachment-info{padding-block:3px}
.label.label-bare{
  background:none;border:1px solid var(--npt-line);border-radius:var(--npt-r-pill);
  padding:1px 8px;font-size:11.5px;font-weight:700;color:var(--npt-ink-faint);text-shadow:none;
}
#reply{
  margin:28px 0 0;padding:22px 0 0;background:none;border:0;
  border-block-start:1px solid var(--npt-line);
}
#reply h2{border:0;padding:0;margin:0 0 12px}
#reply>table{width:100%}
/* theme.css pins the reply box to a 628px pixel width, !important */
#reply textarea{width:100%!important;min-height:150px}

/* ===========================================================================
   BIDIRECTIONAL TEXT
   A ticket here is Arabic prose carrying Latin IBANs, error codes and stack
   traces. That mix, not the mirroring, is where RTL layouts actually break.

   Libya writes Western digits 0-9, never ٠-٩, in Arabic too. Nothing below
   touches digit shaping and nothing added later should: no font-feature-settings
   for numeral forms, no Eastern-Arabic "fix". The digits are already correct.
   ========================================================================= */

/* unicode-bidi:plaintext IS the dir="auto" algorithm: the first strong
   character in each paragraph sets that paragraph's direction. osTicket emits
   no dir attribute on user content, and CSS cannot add one — this is the only
   way an Arabic reply and an English reply can sit in one thread, each right. */
.thread-body,
.thread-entry .thread-body p,
#ticketTable td .link,
#ticketTable td .truncate,
.thread-entry .header .title,
.article-teaser,
textarea,
input[type=text],input[type=email],input[type=search]{
  unicode-bidi:plaintext;
}
.thread-body,.thread-entry .thread-body p{text-align:start}

/* thread.css pins message bodies to Helvetica 14px !important, and pins it
   again on every heading inside one at a higher specificity. Both would drop
   Arabic onto a fallback face mid-thread. */
.thread-body,.thread-body h1,.thread-body h2,.thread-body h3,
.thread-body h4,.thread-body h5,.thread-body h6{
  font-family:var(--npt-font)!important;
}
.thread-body{font-size:15px!important;line-height:1.7;color:var(--npt-ink)}

/* Latin technical runs inside an Arabic paragraph. isolate, never
   bidi-override: override forces glyph order and mangles real mixed text. */
code,kbd,samp,tt,pre,.thread-body code,.thread-body pre{
  direction:ltr;unicode-bidi:isolate;
  font-family:var(--npt-mono);font-size:.92em;
}
code,kbd,samp,tt{
  background:var(--npt-sunken);border:1px solid var(--npt-line-soft);
  border-radius:4px;padding:1px 5px;color:var(--npt-ink);
}
pre,.thread-body pre{
  display:block;text-align:left;white-space:pre;overflow-x:auto;
  background:var(--npt-sunken);border:1px solid var(--npt-line-soft);
  border-radius:var(--npt-r-field);padding:12px 14px;margin-block:10px;
  line-height:1.5;
}
/* A plain-TEXT email arrives with its WHOLE body wrapped in one <pre>, which
   thread.css:409 deliberately renders as prose. That pre is a message, not a
   code block — forcing it LTR would turn every plain-text Arabic email
   left-to-right, and white-space:pre would give each one a scrollbar. */
.thread-body>div>pre:first-child{
  direction:inherit;unicode-bidi:plaintext;text-align:start;
  font-family:var(--npt-font);white-space:pre-wrap;overflow-wrap:anywhere;
  background:none;border:0;border-radius:0;padding:0;margin-block:0;
  font-size:inherit;line-height:1.7;
}
/* A bare URL or a long unbroken reference must not push the panel wide. */
.thread-body a,.thread-body{overflow-wrap:anywhere}

/* Reference strings that are ALWAYS left-to-right whatever surrounds them:
   ticket numbers, timestamps, file sizes. isolate keeps a trailing Arabic
   full stop from jumping to the head of the line. */
#ticketTable tbody td:first-child,
#ticketInfo h1 small,
time,.filesize{
  direction:ltr;unicode-bidi:isolate;
}
#ticketTable tbody td:first-child,#ticketInfo h1 small{
  font-variant-numeric:tabular-nums;font-weight:700;
}
html[dir="rtl"] #ticketTable tbody td:first-child,
html[dir="rtl"] time,html[dir="rtl"] .filesize{text-align:right}

/* Font Awesome 3 glyphs are directional arrows in places; leave the rest. */
html[dir="rtl"] .icon-flip-horizontal{transform:scaleX(-1)}

/* ---------- system message bars ---------- */
#msg_error,#msg_notice,#msg_warning,#msg_info,
.error_bar,.warning_bar,.notice_bar,.warning-banner{
  border:1px solid var(--npt-line);border-inline-start-width:4px;
  border-radius:var(--npt-r-field);
  /* flat on the accent edge — on a one-line bar the two rounded corners
     otherwise meet and the 4px rule reads as a bracket */
  border-start-start-radius:0;border-end-start-radius:0;
  /* theme.css pins these to height:16px with a sprite in the padding box */
  height:auto;line-height:1.5;
  padding:12px 16px;margin-block:0 18px;
  background:var(--npt-card);color:var(--npt-ink);
  font-weight:600;box-shadow:none;background-image:none;
}
#msg_error,.error_bar{border-inline-start-color:var(--npt-coral);color:var(--npt-coral-ink)}
#msg_warning,.warning_bar,.warning-banner{border-inline-start-color:#B8860B}
#msg_notice,.notice_bar{border-inline-start-color:var(--npt-teal);color:var(--npt-teal-ink)}
#msg_info{border-inline-start-color:var(--npt-navy)}

/* ---------- knowledgebase ---------- */
#kb{list-style:none;margin:0;padding:0}
#kb li{border-block-end:1px solid var(--npt-line-soft);padding-block:14px}
#kb li h4{margin:0 0 4px;font-size:16px}
.article-headline{margin-block:0 14px}
.article-title{font-weight:800;color:var(--npt-ink)}
#breadcrumbs{font-size:13.5px;color:var(--npt-ink-faint);margin-block-end:12px}
.sidebar .content section{margin-block-end:20px}
.sidebar .content .header{
  font-size:12.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;
  color:var(--npt-ink-faint);padding-block-end:8px;margin-block-end:8px;
  border-block-end:1px solid var(--npt-line);
}
html[dir="rtl"] .sidebar .content .header{letter-spacing:0;text-transform:none}
.sidebar .content section div{padding-block:4px}
.search-form{margin-block-end:20px;display:flex;gap:8px;flex-wrap:wrap}
.search-form input.search{flex:1 1 220px;min-width:0}

/* ---------- footer ---------- */
#footer{
  max-width:1040px;margin-inline:auto;padding:18px 20px 34px;
  border:0;background:none;text-align:start;
  display:flex;flex-wrap:wrap;gap:6px 18px;align-items:baseline;
}
#footer p{margin:0;font-size:13px;color:var(--npt-ink-faint)}
/* "Helpdesk software - powered by osTicket", hardcoded at
   include/client/footer.inc.php:6. This removes it from the page without
   touching that file, so an upgrade cannot put it back.
   It is still in the HTML source — CSS cannot delete a node. The core edit
   that does is listed in theme/README.md §D, as an upgrade casualty. */
#footer #poweredBy{display:none}

/* ---------- narrow screens ----------
   theme.css ships no media query and pins #container to 840px, while the
   header already declares width=device-width. Bank staff open these from a
   phone during an incident. */
@media (max-width:760px){
  #container{padding-inline:16px}
  #content{padding:20px 18px;border-radius:var(--npt-r-panel)}
  #header{flex-wrap:wrap;gap:10px}
  #header .pull-right.flush-right{width:100%;margin-inline-start:0;justify-content:flex-start}
  #landing_page,.row{gap:20px}
  #landing_page .sidebar,.sidebar.pull-right,.span4{flex-basis:100%}
  .front-page-button a.button{display:block!important} /* beats the inline style attribute */
  #ticketForm>table,#ticketForm>table tbody,#ticketForm>table tr,#ticketForm>table td{display:block;width:auto}
  #ticketTable thead{display:none}
  #ticketTable tbody tr{display:block;border-block-end:1px solid var(--npt-line);padding-block:6px}
  #ticketTable tbody td{display:block;border:0;padding-block:3px}
  /* the gate stacks: navy counter on top, form under it */
  #content:has(> form#clientLogin){grid-template-columns:minmax(0,1fr)}
  #content:has(> form#clientLogin) > h1,
  #content:has(> form#clientLogin) > p:first-of-type,
  #content:has(> form#clientLogin) > form#clientLogin{grid-column:1;grid-row:auto;padding-inline:22px}
  #content:has(> form#clientLogin) > h1{padding-block:30px 0;font-size:24px}
  #content:has(> form#clientLogin) > p:first-of-type{padding-block:12px 30px}
  #content:has(> form#clientLogin) > form#clientLogin{padding-block:28px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important}
}
