/* ============================================================
   Light Source Communications — Portal Theme
   Dark navy / fiber-tech design
   ============================================================ */

:root {
    --bg:          #0b1628;
    --bg-card:     #0f1e38;
    --bg-surface:  rgba(255,255,255,0.04);
    --border:      rgba(255,255,255,0.08);
    --border-2:    rgba(59,130,246,0.35);
    --blue:        #2563eb;
    --blue-light:  #3b82f6;
    --blue-glow:   rgba(37,99,235,0.35);
    --cyan:        #06b6d4;
    --cyan-glow:   rgba(6,182,212,0.2);
    --green:       #10b981;
    --green-glow:  rgba(16,185,129,0.3);
    --text:        #f1f5f9;
    --text-mid:    #94a3b8;
    --text-dim:    #475569;
    --error:       #ef4444;
    --warn:        #f59e0b;
    --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --r:           12px;
    --r-sm:        8px;
    --ease:        all 0.2s cubic-bezier(0.4,0,0.2,1);
    --shadow:      0 8px 32px rgba(0,0,0,0.4);
}

/* ─── BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; overflow-y: scroll; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font) !important;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text) !important;
    background-color: var(--bg) !important;
    background-image:
        radial-gradient(ellipse at 10% 30%, rgba(37,99,235,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 10%, rgba(6,182,212,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(16,185,129,0.06) 0%, transparent 50%) !important;
    background-attachment: fixed !important;
    -webkit-font-smoothing: antialiased;
}

/* Subtle grid — fiber network topology */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(6,182,212,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6,182,212,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body, input, select, textarea {
    font-family: var(--font) !important;
}

/* ─── CONTAINER ─────────────────────────────────────────────── */
#container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    position: relative;
    z-index: 1;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
#header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 64px !important;
    padding: 0 40px !important;
    background: rgba(11,22,40,0.98) !important;
    border-bottom: 1px solid var(--border) !important;
    position: sticky !important;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.3;
}

/* Logo */
#logo, a#logo {
    display: inline-flex !important;
    align-items: center;
    float: none !important;
    flex-shrink: 0;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

#header #logo img {
    max-height: 44px !important;
    max-width: 240px !important;
    width: auto;
    height: auto;
    vertical-align: middle;
}

.valign-helper { display: none !important; }

/* Nav — now inside #header */
#nav {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
    height: 100% !important;
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    white-space: nowrap;
}

#nav li {
    display: inline-flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#nav li a {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
    line-height: 1 !important;
    padding: 0 16px !important;
    color: var(--text-mid) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px;
    border-radius: var(--r-sm) !important;
    -webkit-border-radius: var(--r-sm) !important;
    -moz-border-radius: var(--r-sm) !important;
    background: none !important;
    background-image: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    text-decoration: none !important;
    transition: var(--ease) !important;
}

#nav li a:hover {
    color: var(--text) !important;
    background: rgba(255,255,255,0.06) !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

#nav li a.active {
    color: var(--text) !important;
    background: rgba(37,99,235,0.12) !important;
    border-bottom: none !important;
}

/* Header user area */
#header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-username {
    color: var(--text-mid);
    font-size: 13px;
    font-weight: 500;
}

.header-link {
    color: var(--text-mid) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    transition: var(--ease);
}

.header-link:hover {
    color: var(--text) !important;
    border-bottom: none !important;
}

.btn-header-action {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--blue) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: var(--r-sm) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    transition: var(--ease);
    white-space: nowrap;
}

.btn-header-action:hover {
    background: var(--blue-light) !important;
    color: #fff !important;
    border-bottom: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--blue-glow);
}

/* ─── CONTENT ────────────────────────────────────────────────── */
#content {
    padding: 48px 40px !important;
    margin: 0 !important;
    min-height: 60vh !important;
    height: auto !important;
}

/* ─── HOMEPAGE: hide nav links (logo + Sign In only) ─────────── */
.page-home #nav { display: none !important; }

/* ─── LANDING PAGE ───────────────────────────────────────────── */

#ls-hero {
    max-width: 760px;
    margin-bottom: 56px;
    padding-top: 16px;
}

.ls-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blue-light);
    margin: 0 0 18px;
    display: block;
}

.ls-hero-title {
    font-size: 64px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -1.5px;
    color: var(--text) !important;
    margin: 0 0 20px !important;
}

.ls-hero-sub {
    font-size: 17px !important;
    color: var(--text-mid) !important;
    line-height: 1.7;
    margin: 0 !important;
}

/* Cards grid */
#ls-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 56px;
}

.ls-card {
    display: block !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-top: 3px solid transparent !important;
    border-radius: var(--r) !important;
    -webkit-border-radius: var(--r) !important;
    -moz-border-radius: var(--r) !important;
    padding: 36px 28px !important;
    text-decoration: none !important;
    border-bottom: 1px solid var(--border) !important;
    margin-bottom: 0 !important;
    transition: var(--ease) !important;
    cursor: pointer;
}

.ls-card:hover {
    border-color: var(--border-2) !important;
    border-top-color: var(--blue-light) !important;
    border-bottom-color: var(--border-2) !important;
    background: rgba(15,30,56,1) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(59,130,246,0.12);
    -webkit-box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.ls-card--primary {
    border-top-color: var(--blue) !important;
}

.ls-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(37,99,235,0.12);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--blue-light);
    transition: var(--ease);
}

.ls-card:hover .ls-card-icon {
    background: rgba(37,99,235,0.22);
    border-color: rgba(37,99,235,0.45);
    color: #fff;
}

.ls-card h3 {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    margin: 0 0 8px !important;
    line-height: 1.3;
}

.ls-card p {
    font-size: 13.5px !important;
    color: var(--text-mid) !important;
    margin: 0 !important;
    line-height: 1.6;
}

/* Contact strip */
#ls-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 24px;
    padding: 20px 32px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 56px;
}

.ls-noc-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    white-space: nowrap;
}

.ls-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--green-glow);
    animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.ls-contact-row {
    display: flex;
    align-items: center;
    gap: 48px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.ls-contact-divider { display: none; }

.ls-contact-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.ls-contact-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}

.ls-contact-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    transition: var(--ease);
    white-space: nowrap;
}

.ls-contact-value:hover {
    color: var(--blue-light) !important;
    border-bottom: none !important;
}

/* KB section */
#ls-kb { margin-top: 16px; }
#ls-kb h2 { font-size: 18px !important; font-weight: 600 !important; color: var(--text) !important; margin: 0 0 20px !important; }

.ls-kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ls-kb-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
}

.ls-kb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.ls-kb-article { margin-bottom: 10px; }

.ls-kb-article a {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-mid) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    display: block;
    margin-bottom: 0 !important;
    transition: var(--ease);
}

.ls-kb-article a:hover { color: var(--blue-light) !important; }

.ls-kb-article p {
    font-size: 12px !important;
    color: var(--text-dim) !important;
    margin: 2px 0 0 !important;
    line-height: 1.5;
}

/* ─── TYPOGRAPHY (global) ────────────────────────────────────── */
/* Not inside a message body: that is the sender's own HTML on white (see
   TICKET VIEW below), with its own colours and sizes */
h1:not(.thread-body *) { color: var(--cyan) !important; font-size: 24px !important; font-weight: 600 !important; margin: 0 0 10px !important; }
h2:not(.thread-body *) { color: var(--text) !important; font-size: 18px !important; font-weight: 600; }
h3:not(.thread-body *) { color: var(--text) !important; font-size: 15px !important; font-weight: 500; }

p:not(.thread-body *) { color: var(--text-mid); line-height: 1.65; margin: 0 0 12px; }

a, .link {
    color: var(--blue-light) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    transition: var(--ease);
}

a:hover, .link:hover {
    color: var(--text) !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

hr {
    border: 0 !important;
    border-top: 1px solid var(--border) !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

/* ─── FORM INPUTS ────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"] {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    color: var(--text) !important;
    padding: 10px 14px !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    outline: none !important;
    transition: var(--ease) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus {
    border-color: var(--blue-light) !important;
    background: rgba(37,99,235,0.06) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2) !important;
}

textarea {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    color: var(--text) !important;
    padding: 10px 14px !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    outline: none !important;
    resize: vertical;
    transition: var(--ease) !important;
}

textarea:focus {
    border-color: var(--blue-light) !important;
    background: rgba(37,99,235,0.06) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2) !important;
}

select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    color: var(--text) !important;
    padding: 9px 14px !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    outline: none !important;
    cursor: pointer;
    transition: var(--ease) !important;
}

select:focus {
    border-color: var(--blue-light) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2) !important;
}

select option { background: #0f1e38; color: var(--text); }

label { color: var(--text-mid); font-size: 13px; font-weight: 500; cursor: pointer; }
label.required, span.required { color: var(--text) !important; font-weight: 600 !important; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.button, .button:visited,
.blue.button, .blue.button:visited {
    display: inline-block !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 12px 20px !important;
    border-radius: var(--r-sm) !important;
    -webkit-border-radius: var(--r-sm) !important;
    border: none !important;
    text-align: center !important;
    cursor: pointer !important;
    text-shadow: none !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    max-width: 100% !important;
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px var(--blue-glow) !important;
    transition: var(--ease) !important;
}

.button:hover, .blue.button:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb) !important;
    box-shadow: 0 6px 20px rgba(37,99,235,0.5) !important;
    transform: translateY(-1px);
    color: #fff !important;
    border-bottom: none !important;
}

.button:active { top: 0 !important; }

.green.button, .green.button:visited {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px var(--green-glow) !important;
}

.green.button:hover {
    background: linear-gradient(135deg, #047857, #059669) !important;
    box-shadow: 0 6px 20px rgba(16,185,129,0.45) !important;
    transform: translateY(-1px);
    color: #fff !important;
    border-bottom: none !important;
}

input[type="submit"] {
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    color: #fff !important;
    font-family: var(--font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: var(--r-sm) !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px var(--blue-glow) !important;
    transition: var(--ease) !important;
    -webkit-appearance: none;
}

input[type="submit"]:hover {
    box-shadow: 0 6px 20px rgba(37,99,235,0.5) !important;
    transform: translateY(-1px);
}

input[type="reset"], input[type="button"] {
    background: rgba(255,255,255,0.05) !important;
    color: var(--text-mid) !important;
    font-family: var(--font) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 24px !important;
    border-radius: var(--r-sm) !important;
    border: 1px solid var(--border) !important;
    cursor: pointer !important;
    transition: var(--ease) !important;
}

input[type="reset"]:hover, input[type="button"]:hover {
    background: rgba(255,255,255,0.09) !important;
    color: var(--text) !important;
}

input.btn {
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    color: #fff !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 11px 28px !important;
    border-radius: var(--r-sm) !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px var(--blue-glow) !important;
    transition: var(--ease) !important;
}

input.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.5) !important;
}

.buttons {
    padding: 20px 0 4px !important;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* ─── LOGIN PAGE ─────────────────────────────────────────────── */
#clientLogin {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r) !important;
    -webkit-border-radius: var(--r) !important;
    box-shadow: var(--shadow) !important;
    padding: 32px !important;
    margin-top: 24px !important;
    background-image: none !important;
    max-width: 620px;
    display: block !important;
}

.login-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
    width: 100%;
}

.login-box > div { display: flex; flex-direction: column; gap: 5px; }

#clientLogin input[type=text],
#clientLogin input[type=password] {
    width: 100% !important;
    max-width: 420px !important;
    margin-bottom: 0 !important;
}

#clientLogin strong { color: var(--error) !important; font-size: 12px !important; display: block !important; margin-bottom: 6px; }
#clientLogin p { color: var(--text-mid); font-size: 13px; }
#clientLogin b { color: var(--text) !important; }

/* ─── TICKET FORM ────────────────────────────────────────────── */
#ticketForm {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 28px;
    max-width: 860px;
}

#ticketForm > table { width: 100% !important; table-layout: auto !important; }

#ticketForm > table td {
    padding: 9px 12px 9px 0 !important;
    vertical-align: top;
    color: var(--text-mid);
    font-size: 13px;
    width: auto !important;
}

#ticketForm > table td + td { color: var(--text); width: auto !important; }

#ticketForm select { min-width: 280px; }

#ticketForm td textarea, #ticketForm div textarea {
    width: 100% !important;
    max-width: 560px !important;
    min-height: 130px;
}

.form-header b {
    color: var(--cyan) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

#ticketForm .error input { border-color: var(--error) !important; }
#ticketForm .error label { color: var(--error) !important; }
.error { color: var(--error) !important; }

/* ─── TICKET TABLE ───────────────────────────────────────────── */
#ticketTable {
    width: 100%;
    border: 1px solid var(--border) !important;
    border-left: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--r);
    overflow: hidden;
}

#ticketTable th {
    background: rgba(37,99,235,0.08) !important;
    color: var(--text-mid) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    padding: 13px 16px !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: left;
}

#ticketTable td {
    padding: 13px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
    color: var(--text-mid) !important;
    font-size: 13px !important;
    vertical-align: middle !important;
}

#ticketTable tr:last-child td { border-bottom: none !important; }
#ticketTable tr:hover td { background: rgba(255,255,255,0.02) !important; }
#ticketTable a { color: var(--text) !important; font-weight: 500; border-bottom: none !important; }
#ticketTable a:hover { color: var(--blue-light) !important; }

/* ─── ALERTS ─────────────────────────────────────────────────── */
#msg_notice, .notice_bar {
    background: rgba(16,185,129,0.08) !important;
    border: 1px solid rgba(16,185,129,0.25) !important;
    border-radius: var(--r-sm) !important;
    color: var(--green) !important;
    padding: 12px 16px !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    background-image: none !important;
}

#msg_warning, .warning-banner, .warning_bar {
    background: rgba(245,158,11,0.08) !important;
    border: 1px solid rgba(245,158,11,0.25) !important;
    border-radius: var(--r-sm) !important;
    color: var(--warn) !important;
    padding: 12px 16px !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    background-image: none !important;
}

#msg_error, .error_bar {
    background: rgba(239,68,68,0.08) !important;
    border: 1px solid rgba(239,68,68,0.25) !important;
    border-radius: var(--r-sm) !important;
    color: var(--error) !important;
    padding: 12px 16px !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    background-image: none !important;
}

.error_bar, .warning_bar, .notice_bar { margin: 0 !important; margin-bottom: 10px !important; }

/* ─── THREAD / TICKET VIEW ───────────────────────────────────── */
.thread-entry, .thread-event {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r) !important;
    padding: 20px !important;
    margin-bottom: 14px !important;
}

#reply {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r) !important;
    padding: 24px !important;
    margin-top: 8px !important;
}

#reply h2 {
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
    font-size: 15px !important;
}

#reply textarea { width: 100% !important; max-width: 640px !important; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
#footer {
    background: rgba(11,22,40,0.98) !important;
    border-top: 1px solid var(--border) !important;
    padding: 20px 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    color: var(--text-dim) !important;
    margin-top: 0 !important;
    text-align: left !important;
}

#footer p { color: var(--text-dim) !important; margin: 0 !important; font-size: 12px !important; }

#footer a, #footer #poweredBy {
    color: var(--text-dim) !important;
    font-size: 12px !important;
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    text-indent: 0 !important;
    display: inline !important;
    transition: var(--ease);
}

#footer a:hover, #footer #poweredBy:hover { color: var(--text-mid) !important; }

/* ─── SELECT2 DARK ───────────────────────────────────────────── */
.select2-container--default .select2-selection--single {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    height: 40px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text) !important;
    line-height: 40px !important;
    padding-left: 14px !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px !important; }

.select2-dropdown {
    background: #0c1a2e !important;
    border: 1px solid var(--border-2) !important;
    border-radius: var(--r-sm) !important;
    box-shadow: var(--shadow) !important;
}

.select2-results__option {
    color: var(--text-mid) !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-family: var(--font) !important;
}

.select2-results__option[aria-selected=true] { background: rgba(37,99,235,0.08) !important; }
.select2-results__option--highlighted[aria-selected] { background: rgba(37,99,235,0.18) !important; color: var(--text) !important; }

.select2-search--dropdown .select2-search__field {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
}

/* ─── PAGINATION ─────────────────────────────────────────────── */
#pagination { margin: 20px 0 40px !important; }
#pagination li { list-style: none !important; }

#pagination li a {
    display: block; float: left;
    color: var(--text-mid) !important;
    background: var(--bg-card) !important;
    border-radius: var(--r-sm) !important;
    padding: 6px 12px !important;
    margin-right: 4px !important;
    font-size: 13px !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    transition: var(--ease) !important;
}

#pagination li a:hover { color: var(--blue-light) !important; background: rgba(37,99,235,0.1) !important; border-bottom: none !important; }

#pagination .active {
    color: var(--blue-light) !important;
    background: rgba(37,99,235,0.12) !important;
    float: left; padding: 6px 12px; margin-right: 4px;
    border-radius: var(--r-sm); font-weight: 700 !important; font-size: 13px !important;
}

#pagination .previousOff, #pagination .nextOff {
    color: var(--text-dim) !important; float: left; padding: 6px 8px; font-size: 13px !important;
}

/* ─── LOADING ────────────────────────────────────────────────── */
#overlay { background: rgba(11,22,40,0.75) !important; backdrop-filter: blur(6px); }

#loading {
    background: rgba(15,30,56,0.98) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(12px);
    background-image: none !important;
}

#loading h4 { color: var(--cyan) !important; margin: 3px 0 0 !important; }
#loading p { color: var(--text-mid) !important; }

/* ─── MISC ───────────────────────────────────────────────────── */
.clear { clear: both; height: 1px; visibility: hidden; }
.hidden { display: none !important; }
.faded { color: var(--text-dim) !important; }

.warning {
    background: rgba(245,158,11,0.08) !important;
    color: var(--warn);
    border-radius: var(--r-sm);
    padding: 6px 10px;
    font-style: italic;
}

.warning strong { color: var(--error) !important; font-style: normal; text-transform: uppercase; }

/* Hide old layout elements on all pages */
.sidebar, #landing_page .sidebar { display: none !important; }
#landing_page { display: block !important; }
.main-content { width: 100% !important; }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(37,99,235,0.4); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    #content { padding: 32px 24px !important; }

    #header {
        padding: 0 24px !important;
        height: auto !important;
        min-height: 64px;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    #nav { flex-wrap: wrap; gap: 0; }
    #nav li a { padding: 0 12px !important; font-size: 13px !important; }
    #ls-cards { grid-template-columns: 1fr; }
    #ls-contact { flex-direction: column; align-items: flex-start; gap: 16px; }
    .ls-contact-row { gap: 24px; }
    .ls-hero-title { font-size: 40px !important; }

    #footer {
        flex-direction: column;
        gap: 6px;
        text-align: center !important;
        padding: 16px 24px !important;
    }
}

@media (max-width: 600px) {
    #header { padding: 12px 16px !important; }
    #content { padding: 24px 16px !important; }
    .ls-hero-title { font-size: 32px !important; }
    .ls-contact-row { flex-direction: column; gap: 12px; }
    .ls-contact-divider { display: none; }
    #clientLogin { padding: 20px !important; }
    #ticketForm { padding: 16px !important; }

    #ticketForm td textarea, #ticketForm div textarea {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Wordmark when no portal logo is uploaded (osTicket's default logo is dark text) */
#header #logo .tos-portal-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f1f5f9;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
}
#header #logo .tos-portal-mark img {
    width: 30px;
    height: 30px;
    max-height: none;
    border: 0;
    border-radius: 8px;
}

/* ─── TICKET VIEW: info boxes and message headers ───────────────
   osTicket's own stylesheet paints these white / light blue, under the
   theme's light text: the text could not be read. Message bodies stay
   white (e-mails are written for a white page) with dark text, and the
   sender's own colours (e.g. a red "MAJOR" box) are kept. */
table.infoTable {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
}
table.infoTable td, table.infoTable th {
    background: transparent !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
table.infoTable th { color: var(--text-mid) !important; font-weight: 500 !important; }
table.infoTable td.headline {
    color: var(--cyan) !important;
    font-weight: 600 !important;
    border-bottom: 1px solid var(--border) !important;
}
.thread-entry .header {
    background: rgba(37,99,235,0.18) !important;
    border-color: var(--border-2) !important;
    color: var(--text) !important;
}
.thread-entry .header b, .thread-entry .header a { color: var(--text) !important; }
.thread-entry .header time, .thread-entry .header .title { color: var(--text-mid) !important; }
/* Messages on dark navy with light text, like the rest of the page. Boxes
   an e-mail colours itself (e.g. a red "MAJOR" box) keep their colours */
.thread-entry .thread-body {
    color: #d5dde8 !important;            /* soft light blue-grey, calmer than white */
    background: #13284a !important;
    border-color: var(--border-2) !important;
    border-radius: 0 0 var(--r-sm) var(--r-sm) !important;
}
.thread-entry .thread-body a:not([style*="color"]) { color: #7cb3ff !important; }
.thread-entry .thread-body :is(table, td, th) { border-color: rgba(148,163,184,0.45); }
/* Table header rows, in a soft steel blue with soft light text (easy on
   the eyes, clearly a header). css/thread.css paints <th> rows light grey
   (#f0f0f0, with !important); these selectors are more specific, so they win */
.thread-entry .thread-body table tr > th,
.thread-entry .thread-body table thead > tr > th,
.thread-entry .thread-body table thead > tr > td {
    background-color: #24456f !important;
    color: #e3ecf7 !important;
    font-weight: 600;
    border-bottom: 1px solid rgba(147,180,222,0.45) !important;
}
/* Rows and cells an e-mail paints light itself (white, light grey: e.g. an
   alarm table whose header row is #f0f0f0) would hide the light text: same
   soft steel blue. Strong colours an e-mail sets (a red "MAJOR" box, amber,
   green) are not in this list and keep their colours */
.thread-entry .thread-body table :is(
    [style*="background:#fff" i],
    [style*="background: #fff" i],
    [style*="background-color:#fff" i],
    [style*="background-color: #fff" i],
    [style*="background:#eee" i],
    [style*="background: #eee" i],
    [style*="background-color:#eee" i],
    [style*="background-color: #eee" i],
    [style*="background:#ddd" i],
    [style*="background: #ddd" i],
    [style*="background-color:#ddd" i],
    [style*="background-color: #ddd" i],
    [style*="background:#f0f0f0" i],
    [style*="background: #f0f0f0" i],
    [style*="background-color:#f0f0f0" i],
    [style*="background-color: #f0f0f0" i],
    [style*="background:#efefef" i],
    [style*="background: #efefef" i],
    [style*="background-color:#efefef" i],
    [style*="background-color: #efefef" i],
    [style*="background:#f2f2f2" i],
    [style*="background: #f2f2f2" i],
    [style*="background-color:#f2f2f2" i],
    [style*="background-color: #f2f2f2" i],
    [style*="background:#f3f3f3" i],
    [style*="background: #f3f3f3" i],
    [style*="background-color:#f3f3f3" i],
    [style*="background-color: #f3f3f3" i],
    [style*="background:#f4f4f4" i],
    [style*="background: #f4f4f4" i],
    [style*="background-color:#f4f4f4" i],
    [style*="background-color: #f4f4f4" i],
    [style*="background:#f5f5f5" i],
    [style*="background: #f5f5f5" i],
    [style*="background-color:#f5f5f5" i],
    [style*="background-color: #f5f5f5" i],
    [style*="background:#f6f6f6" i],
    [style*="background: #f6f6f6" i],
    [style*="background-color:#f6f6f6" i],
    [style*="background-color: #f6f6f6" i],
    [style*="background:#f7f7f7" i],
    [style*="background: #f7f7f7" i],
    [style*="background-color:#f7f7f7" i],
    [style*="background-color: #f7f7f7" i],
    [style*="background:#f8f8f8" i],
    [style*="background: #f8f8f8" i],
    [style*="background-color:#f8f8f8" i],
    [style*="background-color: #f8f8f8" i],
    [style*="background:#f9f9f9" i],
    [style*="background: #f9f9f9" i],
    [style*="background-color:#f9f9f9" i],
    [style*="background-color: #f9f9f9" i],
    [style*="background:#fafafa" i],
    [style*="background: #fafafa" i],
    [style*="background-color:#fafafa" i],
    [style*="background-color: #fafafa" i],
    [style*="background:#fcfcfc" i],
    [style*="background: #fcfcfc" i],
    [style*="background-color:#fcfcfc" i],
    [style*="background-color: #fcfcfc" i],
    [style*="background:#ececec" i],
    [style*="background: #ececec" i],
    [style*="background-color:#ececec" i],
    [style*="background-color: #ececec" i],
    [style*="background:#e8e8e8" i],
    [style*="background: #e8e8e8" i],
    [style*="background-color:#e8e8e8" i],
    [style*="background-color: #e8e8e8" i],
    [style*="background:#e6e6e6" i],
    [style*="background: #e6e6e6" i],
    [style*="background-color:#e6e6e6" i],
    [style*="background-color: #e6e6e6" i],
    [style*="background:#e5e5e5" i],
    [style*="background: #e5e5e5" i],
    [style*="background-color:#e5e5e5" i],
    [style*="background-color: #e5e5e5" i],
    [style*="background:#e0e0e0" i],
    [style*="background: #e0e0e0" i],
    [style*="background-color:#e0e0e0" i],
    [style*="background-color: #e0e0e0" i],
    [style*="background:#d9d9d9" i],
    [style*="background: #d9d9d9" i],
    [style*="background-color:#d9d9d9" i],
    [style*="background-color: #d9d9d9" i],
    [style*="background:#d3d3d3" i],
    [style*="background: #d3d3d3" i],
    [style*="background-color:#d3d3d3" i],
    [style*="background-color: #d3d3d3" i],
    [style*="background:white" i],
    [style*="background: white" i],
    [style*="background-color:white" i],
    [style*="background-color: white" i],
    [style*="background:lightgray" i],
    [style*="background: lightgray" i],
    [style*="background-color:lightgray" i],
    [style*="background-color: lightgray" i],
    [style*="background:lightgrey" i],
    [style*="background: lightgrey" i],
    [style*="background-color:lightgrey" i],
    [style*="background-color: lightgrey" i],
    [style*="background:whitesmoke" i],
    [style*="background: whitesmoke" i],
    [style*="background-color:whitesmoke" i],
    [style*="background-color: whitesmoke" i],
    [style*="background:gainsboro" i],
    [style*="background: gainsboro" i],
    [style*="background-color:gainsboro" i],
    [style*="background-color: gainsboro" i],
    [style*="background:rgb(255, 255, 255)" i],
    [style*="background: rgb(255, 255, 255)" i],
    [style*="background-color:rgb(255, 255, 255)" i],
    [style*="background-color: rgb(255, 255, 255)" i],
    [style*="background:rgb(255,255,255)" i],
    [style*="background: rgb(255,255,255)" i],
    [style*="background-color:rgb(255,255,255)" i],
    [style*="background-color: rgb(255,255,255)" i],
    [style*="background:rgb(240, 240, 240)" i],
    [style*="background: rgb(240, 240, 240)" i],
    [style*="background-color:rgb(240, 240, 240)" i],
    [style*="background-color: rgb(240, 240, 240)" i],
    [style*="background:rgb(240,240,240)" i],
    [style*="background: rgb(240,240,240)" i],
    [style*="background-color:rgb(240,240,240)" i],
    [style*="background-color: rgb(240,240,240)" i],
    [style*="background:rgb(245, 245, 245)" i],
    [style*="background: rgb(245, 245, 245)" i],
    [style*="background-color:rgb(245, 245, 245)" i],
    [style*="background-color: rgb(245, 245, 245)" i],
    [style*="background:rgb(245,245,245)" i],
    [style*="background: rgb(245,245,245)" i],
    [style*="background-color:rgb(245,245,245)" i],
    [style*="background-color: rgb(245,245,245)" i],
    [bgcolor="#fff" i],
    [bgcolor="#eee" i],
    [bgcolor="#ddd" i],
    [bgcolor="#f0f0f0" i],
    [bgcolor="#efefef" i],
    [bgcolor="#f2f2f2" i],
    [bgcolor="#f3f3f3" i],
    [bgcolor="#f4f4f4" i],
    [bgcolor="#f5f5f5" i],
    [bgcolor="#f6f6f6" i],
    [bgcolor="#f7f7f7" i],
    [bgcolor="#f8f8f8" i],
    [bgcolor="#f9f9f9" i],
    [bgcolor="#fafafa" i],
    [bgcolor="#fcfcfc" i],
    [bgcolor="#ececec" i],
    [bgcolor="#e8e8e8" i],
    [bgcolor="#e6e6e6" i],
    [bgcolor="#e5e5e5" i],
    [bgcolor="#e0e0e0" i],
    [bgcolor="#d9d9d9" i],
    [bgcolor="#d3d3d3" i],
    [bgcolor="white" i],
    [bgcolor="lightgray" i],
    [bgcolor="lightgrey" i],
    [bgcolor="whitesmoke" i],
    [bgcolor="gainsboro" i]) {
    background-color: #24456f !important;
    color: #e3ecf7 !important;
}
.thread-entry .thread-body table tr > th *,
.thread-entry .thread-body table thead > tr > :is(th, td) *,
.thread-entry .thread-body table :is(
    [style*="background:#fff" i],
    [style*="background: #fff" i],
    [style*="background-color:#fff" i],
    [style*="background-color: #fff" i],
    [style*="background:#eee" i],
    [style*="background: #eee" i],
    [style*="background-color:#eee" i],
    [style*="background-color: #eee" i],
    [style*="background:#ddd" i],
    [style*="background: #ddd" i],
    [style*="background-color:#ddd" i],
    [style*="background-color: #ddd" i],
    [style*="background:#f0f0f0" i],
    [style*="background: #f0f0f0" i],
    [style*="background-color:#f0f0f0" i],
    [style*="background-color: #f0f0f0" i],
    [style*="background:#efefef" i],
    [style*="background: #efefef" i],
    [style*="background-color:#efefef" i],
    [style*="background-color: #efefef" i],
    [style*="background:#f2f2f2" i],
    [style*="background: #f2f2f2" i],
    [style*="background-color:#f2f2f2" i],
    [style*="background-color: #f2f2f2" i],
    [style*="background:#f3f3f3" i],
    [style*="background: #f3f3f3" i],
    [style*="background-color:#f3f3f3" i],
    [style*="background-color: #f3f3f3" i],
    [style*="background:#f4f4f4" i],
    [style*="background: #f4f4f4" i],
    [style*="background-color:#f4f4f4" i],
    [style*="background-color: #f4f4f4" i],
    [style*="background:#f5f5f5" i],
    [style*="background: #f5f5f5" i],
    [style*="background-color:#f5f5f5" i],
    [style*="background-color: #f5f5f5" i],
    [style*="background:#f6f6f6" i],
    [style*="background: #f6f6f6" i],
    [style*="background-color:#f6f6f6" i],
    [style*="background-color: #f6f6f6" i],
    [style*="background:#f7f7f7" i],
    [style*="background: #f7f7f7" i],
    [style*="background-color:#f7f7f7" i],
    [style*="background-color: #f7f7f7" i],
    [style*="background:#f8f8f8" i],
    [style*="background: #f8f8f8" i],
    [style*="background-color:#f8f8f8" i],
    [style*="background-color: #f8f8f8" i],
    [style*="background:#f9f9f9" i],
    [style*="background: #f9f9f9" i],
    [style*="background-color:#f9f9f9" i],
    [style*="background-color: #f9f9f9" i],
    [style*="background:#fafafa" i],
    [style*="background: #fafafa" i],
    [style*="background-color:#fafafa" i],
    [style*="background-color: #fafafa" i],
    [style*="background:#fcfcfc" i],
    [style*="background: #fcfcfc" i],
    [style*="background-color:#fcfcfc" i],
    [style*="background-color: #fcfcfc" i],
    [style*="background:#ececec" i],
    [style*="background: #ececec" i],
    [style*="background-color:#ececec" i],
    [style*="background-color: #ececec" i],
    [style*="background:#e8e8e8" i],
    [style*="background: #e8e8e8" i],
    [style*="background-color:#e8e8e8" i],
    [style*="background-color: #e8e8e8" i],
    [style*="background:#e6e6e6" i],
    [style*="background: #e6e6e6" i],
    [style*="background-color:#e6e6e6" i],
    [style*="background-color: #e6e6e6" i],
    [style*="background:#e5e5e5" i],
    [style*="background: #e5e5e5" i],
    [style*="background-color:#e5e5e5" i],
    [style*="background-color: #e5e5e5" i],
    [style*="background:#e0e0e0" i],
    [style*="background: #e0e0e0" i],
    [style*="background-color:#e0e0e0" i],
    [style*="background-color: #e0e0e0" i],
    [style*="background:#d9d9d9" i],
    [style*="background: #d9d9d9" i],
    [style*="background-color:#d9d9d9" i],
    [style*="background-color: #d9d9d9" i],
    [style*="background:#d3d3d3" i],
    [style*="background: #d3d3d3" i],
    [style*="background-color:#d3d3d3" i],
    [style*="background-color: #d3d3d3" i],
    [style*="background:white" i],
    [style*="background: white" i],
    [style*="background-color:white" i],
    [style*="background-color: white" i],
    [style*="background:lightgray" i],
    [style*="background: lightgray" i],
    [style*="background-color:lightgray" i],
    [style*="background-color: lightgray" i],
    [style*="background:lightgrey" i],
    [style*="background: lightgrey" i],
    [style*="background-color:lightgrey" i],
    [style*="background-color: lightgrey" i],
    [style*="background:whitesmoke" i],
    [style*="background: whitesmoke" i],
    [style*="background-color:whitesmoke" i],
    [style*="background-color: whitesmoke" i],
    [style*="background:gainsboro" i],
    [style*="background: gainsboro" i],
    [style*="background-color:gainsboro" i],
    [style*="background-color: gainsboro" i],
    [style*="background:rgb(255, 255, 255)" i],
    [style*="background: rgb(255, 255, 255)" i],
    [style*="background-color:rgb(255, 255, 255)" i],
    [style*="background-color: rgb(255, 255, 255)" i],
    [style*="background:rgb(255,255,255)" i],
    [style*="background: rgb(255,255,255)" i],
    [style*="background-color:rgb(255,255,255)" i],
    [style*="background-color: rgb(255,255,255)" i],
    [style*="background:rgb(240, 240, 240)" i],
    [style*="background: rgb(240, 240, 240)" i],
    [style*="background-color:rgb(240, 240, 240)" i],
    [style*="background-color: rgb(240, 240, 240)" i],
    [style*="background:rgb(240,240,240)" i],
    [style*="background: rgb(240,240,240)" i],
    [style*="background-color:rgb(240,240,240)" i],
    [style*="background-color: rgb(240,240,240)" i],
    [style*="background:rgb(245, 245, 245)" i],
    [style*="background: rgb(245, 245, 245)" i],
    [style*="background-color:rgb(245, 245, 245)" i],
    [style*="background-color: rgb(245, 245, 245)" i],
    [style*="background:rgb(245,245,245)" i],
    [style*="background: rgb(245,245,245)" i],
    [style*="background-color:rgb(245,245,245)" i],
    [style*="background-color: rgb(245,245,245)" i],
    [bgcolor="#fff" i],
    [bgcolor="#eee" i],
    [bgcolor="#ddd" i],
    [bgcolor="#f0f0f0" i],
    [bgcolor="#efefef" i],
    [bgcolor="#f2f2f2" i],
    [bgcolor="#f3f3f3" i],
    [bgcolor="#f4f4f4" i],
    [bgcolor="#f5f5f5" i],
    [bgcolor="#f6f6f6" i],
    [bgcolor="#f7f7f7" i],
    [bgcolor="#f8f8f8" i],
    [bgcolor="#f9f9f9" i],
    [bgcolor="#fafafa" i],
    [bgcolor="#fcfcfc" i],
    [bgcolor="#ececec" i],
    [bgcolor="#e8e8e8" i],
    [bgcolor="#e6e6e6" i],
    [bgcolor="#e5e5e5" i],
    [bgcolor="#e0e0e0" i],
    [bgcolor="#d9d9d9" i],
    [bgcolor="#d3d3d3" i],
    [bgcolor="white" i],
    [bgcolor="lightgray" i],
    [bgcolor="lightgrey" i],
    [bgcolor="whitesmoke" i],
    [bgcolor="gainsboro" i]) * {
    color: inherit !important;
}
/* Tables nested inside a message table (e-mail signatures and newsletters are
   built from them): css/thread.css paints them white (".thread-body table table"),
   which left a white box with the e-mail's dark text on it. Let the navy message
   background show through and use the soft light message text inside; links
   keep the link colour. Cells an e-mail colours strongly (a red box) keep their fill */
.thread-entry .thread-body table table { background-color: transparent !important; }
.thread-entry .thread-body table table :not(a):not(img):not(svg):not(svg *) { color: #d5dde8 !important; }
.thread-entry .thread-body table table a, .thread-entry .thread-body table table a * { color: #7cb3ff !important; }
/* osTicket's white lines above and below each message */
.thread-entry.avatar::before, .thread-entry.avatar::after { border-color: transparent !important; }
.thread-entry .thread-body :is(h1, h2, h3, h4, h5, h6) { color: inherit; }

/* Text an e-mail colours black or near-black itself (Outlook wraps the whole
   message in style="color:rgb(0, 0, 0)", e.g. LSC replies from Pete Nielsen),
   and Outlook's default navy, vanish on the dark message background: use the
   light message text instead. Text on a background the e-mail sets itself (a
   yellow highlight, a red box) and other colours (red, amber, green) keep theirs */
.thread-entry .thread-body :is(
    [style*="color:black" i],
    [style*="color: black" i],
    [style*="color:windowtext" i],
    [style*="color: windowtext" i],
    [style*="color:#000000" i],
    [style*="color: #000000" i],
    [style*="color:rgb(0, 0, 0)" i],
    [style*="color: rgb(0, 0, 0)" i],
    [style*="color:rgb(0,0,0)" i],
    [style*="color: rgb(0,0,0)" i],
    [style*="color:#212121" i],
    [style*="color: #212121" i],
    [style*="color:rgb(33, 33, 33)" i],
    [style*="color: rgb(33, 33, 33)" i],
    [style*="color:#222222" i],
    [style*="color: #222222" i],
    [style*="color:rgb(34, 34, 34)" i],
    [style*="color: rgb(34, 34, 34)" i],
    [style*="color:#201f1e" i],
    [style*="color: #201f1e" i],
    [style*="color:rgb(32, 31, 30)" i],
    [style*="color: rgb(32, 31, 30)" i],
    [style*="color:#242424" i],
    [style*="color: #242424" i],
    [style*="color:rgb(36, 36, 36)" i],
    [style*="color: rgb(36, 36, 36)" i],
    [style*="color:#1f1f1f" i],
    [style*="color: #1f1f1f" i],
    [style*="color:rgb(31, 31, 31)" i],
    [style*="color: rgb(31, 31, 31)" i],
    [style*="color:#333333" i],
    [style*="color: #333333" i],
    [style*="color:rgb(51, 51, 51)" i],
    [style*="color: rgb(51, 51, 51)" i],
    [style*="color:#1f497d" i],
    [style*="color: #1f497d" i],
    [style*="color:rgb(31, 73, 125)" i],
    [style*="color: rgb(31, 73, 125)" i],
    [style*="color:#002060" i],
    [style*="color: #002060" i],
    [style*="color:rgb(0, 32, 96)" i],
    [style*="color: rgb(0, 32, 96)" i],
    [style*="color:#000;" i],
    [style*="color: #000;" i],
    [style$="color:#000" i],
    [style$="color: #000" i],
    font[color="#000000" i],
    font[color="#000" i],
    font[color="black" i],
    font[color="windowtext" i],
    font[color="#1f497d" i],
    font[color="#002060" i]):not([style*="background" i]):not([style*="background" i] *):not([bgcolor]):not([bgcolor] *) { color: #d5dde8 !important; }
