/* FIBRAIN Support Portal - shared client layout */

html {
    min-height: 100%;
    background:
        radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.58), transparent 24%),
        linear-gradient(112deg, #e2f4ff 0%, #76bee9 18%, #2878ae 34%, #0b3158 51%, #071a33 66%, #041225 100%);
    background-attachment: fixed;
}

/* Authenticated customer profile */
body.fibrain-client-profile #content {
    padding-top: 26px;
    padding-bottom: 34px;
}

.fibrain-client-profile-page {
    width: min(100%, 1060px);
    margin: 0 auto;
}

.fibrain-client-profile-heading {
    margin-bottom: 18px;
    padding: 24px 28px;
    border: 1px solid #cbdbe8;
    border-left: 4px solid #2f9fd8;
    border-radius: 12px;
    background: linear-gradient(110deg, #fff 0%, #f4f9fc 100%);
}

.fibrain-client-profile-heading > span {
    display: block;
    margin-bottom: 6px;
    color: #1688c7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.fibrain-client-profile-heading h1 {
    margin: 0;
    color: #10233f;
    font-size: 25px;
    line-height: 32px;
}

.fibrain-client-profile-heading p {
    margin: 7px 0 0;
    color: #60758e;
    font-size: 13px;
    line-height: 21px;
}

.fibrain-client-profile-card {
    overflow: hidden;
    padding: 18px 22px 24px;
    border: 1px solid #cfdeea;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(12, 49, 82, .08);
}

.fibrain-client-profile-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

.fibrain-client-profile-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e3ebf2;
    color: #40566e;
    font-size: 13px;
    line-height: 20px;
    vertical-align: middle;
}

.fibrain-client-profile-table td:first-child:not([colspan]) {
    width: 230px !important;
    color: #10233f;
    font-weight: 700;
}

.fibrain-client-profile-table tr:nth-child(even) > td:not([colspan]) {
    background: #f8fbfd;
}

.fibrain-client-profile-table input[type="text"],
.fibrain-client-profile-table input[type="email"],
.fibrain-client-profile-table input[type="password"],
.fibrain-client-profile-table input[type="tel"],
.fibrain-client-profile-table select,
.fibrain-client-profile-table textarea {
    min-height: 40px;
    max-width: 100%;
    padding: 8px 11px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #eef4f8;
    color: #10233f;
    box-sizing: border-box;
    box-shadow: none;
}

.fibrain-client-profile-table input[type="text"],
.fibrain-client-profile-table input[type="email"],
.fibrain-client-profile-table input[type="password"],
.fibrain-client-profile-table textarea {
    width: min(100%, 600px);
}

.fibrain-client-profile-table input:focus,
.fibrain-client-profile-table select:focus,
.fibrain-client-profile-table textarea:focus {
    border-color: #248fd0;
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(36, 143, 208, .13);
}

.fibrain-client-profile-table button.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 126px;
    min-height: 40px;
    margin-left: 8px;
    padding: 8px 15px;
    border: 1px solid #0b5e91;
    border-radius: 8px;
    background: #218dcc;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-shadow: none;
    box-shadow: 0 6px 14px rgba(25, 120, 180, .18);
    cursor: pointer;
    vertical-align: middle;
}

.fibrain-client-profile-table button.action-button i {
    color: #ffffff;
    font-size: 13px;
}

.fibrain-client-profile-table button.action-button:hover,
.fibrain-client-profile-table button.action-button:focus {
    border-color: #084d77;
    background: #126da5;
    color: #ffffff !important;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(36, 143, 208, .15);
}

.fibrain-client-profile-section {
    margin: 14px -10px 2px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #205985;
}

.fibrain-client-profile-section h3 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    line-height: 21px;
}

.fibrain-client-profile-table .error {
    color: #ae3038;
    font-size: 11px;
    font-weight: 700;
}

.fibrain-client-profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 22px 0 0;
}

.fibrain-client-profile-actions input {
    min-width: 104px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

body.fibrain-client-profile input.fibrain-client-profile-primary {
    border: 1px solid #0b5e91;
    background: #218dcc;
    color: #fff;
    box-shadow: 0 7px 16px rgba(25, 120, 180, .2);
}

body.fibrain-client-profile input.fibrain-client-profile-primary:hover {
    background: #126da5;
}

body.fibrain-client-profile input.fibrain-client-profile-secondary {
    border: 1px solid #c7d8e6;
    background: #fff;
    color: #334b65;
}

body.fibrain-client-profile input.fibrain-client-profile-secondary:hover {
    border-color: #8da8bd;
    background: #eef4f8;
    color: #10233f;
}

@media (max-width: 700px) {
    .fibrain-client-profile-heading,
    .fibrain-client-profile-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fibrain-client-profile-table,
    .fibrain-client-profile-table tbody,
    .fibrain-client-profile-table tr,
    .fibrain-client-profile-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .fibrain-client-profile-table td:first-child:not([colspan]) {
        padding-bottom: 3px;
        border-bottom: 0;
        background: #fff;
    }

    .fibrain-client-profile-table td:nth-child(2) {
        padding-top: 3px;
    }

    .fibrain-client-profile-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.58), transparent 24%),
        linear-gradient(112deg, #e2f4ff 0%, #76bee9 18%, #2878ae 34%, #0b3158 51%, #071a33 66%, #041225 100%);
    background-attachment: fixed;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/*
 * Keep one consistent, wider workspace across all client-facing pages.
 * The original osTicket theme limits #container to 840px.
 */
#container {
    width: min(1280px, calc(100% - 32px));
    max-width: 1280px;
    min-width: 0;
    margin: 28px auto 18px;
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 72px rgba(2, 16, 34, 0.34);
    box-sizing: border-box;
}

#content {
    min-width: 0;
    box-sizing: border-box;
}

.main-content {
    width: 90%;
    max-width: none;
}

#footer {
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 2px rgba(2, 16, 34, 0.45);
}

#footer a {
    color: #fff;
}

#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    height: 84px;
}

#header .fibrain-client-account {
    flex: 1 1 auto;
    min-width: 0;
}

#header .fibrain-client-account p {
    width: auto;
}

#header .fibrain-client-branding {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    height: 100%;
}

#header .fibrain-client-branding #logo {
    display: flex;
    align-items: center;
    height: 100%;
}

#header .fibrain-client-branding img,
#header .fibrain-client-branding #logo img {
    display: block;
    width: auto;
    height: 46px;
    max-width: none;
    max-height: 46px;
    vertical-align: middle;
}

/* Landing page: retain osTicket actions while presenting them in the portal style. */
body.fibrain-client-home #content {
    margin: 0;
    padding: 28px 28px 34px;
    border-radius: 0 0 18px 18px;
    background: #f4f8fb;
}

body.fibrain-client-home #nav {
    height: auto;
    min-height: 48px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    background: #082847;
    box-shadow: none;
    box-sizing: border-box;
}

body.fibrain-client-home #nav li a {
    position: relative;
    height: 48px;
    margin: 0 4px;
    padding: 0 16px 0 42px;
    border-radius: 8px;
    background-image: none !important;
    color: #dbe7f5;
    font-weight: 600;
    line-height: 48px;
}

body.fibrain-client-home #nav li a::before {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 18px;
    color: #81cff5;
    font-family: FontAwesome;
    font-size: 15px;
    font-weight: normal;
    line-height: 18px;
    text-align: center;
    transform: translateY(-50%);
}

body.fibrain-client-home #nav li a.home::before {
    content: "\f015";
}

body.fibrain-client-home #nav li a.new::before {
    content: "\f067";
}

body.fibrain-client-home #nav li a.status::before {
    content: "\f002";
}

body.fibrain-client-home #nav li a.tickets::before {
    content: "\f0ae";
}

body.fibrain-client-home #nav li a.kb::before {
    content: "\f02d";
}

body.fibrain-client-home #nav li a.active,
body.fibrain-client-home #nav li a:hover {
    background-color: #167fc7;
    color: #fff;
}

body.fibrain-client-home #nav li a.active::before,
body.fibrain-client-home #nav li a:hover::before {
    color: #fff;
}

body.fibrain-client-home #landing_page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    grid-template-areas: "main sidebar" "featured featured";
    gap: 24px;
    align-items: start;
}

body.fibrain-client-home #landing_page > .main-content {
    grid-area: main;
    width: auto;
    min-width: 0;
}

body.fibrain-client-home #landing_page > .sidebar {
    grid-area: sidebar;
    width: auto;
    margin: 0;
}

body.fibrain-client-home #landing_page > .clear {
    display: none;
}

body.fibrain-client-home #landing_page > div:last-child {
    grid-area: featured;
    min-width: 0;
}

body.fibrain-client-home #landing_page .search-form {
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid #d5e1eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(8, 40, 71, 0.06);
}

body.fibrain-client-home #landing_page .search-form form {
    display: flex;
    gap: 8px;
}

body.fibrain-client-home #landing_page .search-form .search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #f3f7fa;
    box-sizing: border-box;
}

body.fibrain-client-home #landing_page .search-form .button {
    width: auto;
    min-width: 108px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid #0b4e7c;
    border-radius: 8px;
    background: #167fc7;
    box-shadow: none;
    font-size: 14px;
    text-shadow: none;
}

body.fibrain-client-home #landing_page .thread-body {
    overflow: hidden;
    padding: 0;
    border: 1px solid #d5e1eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 40, 71, 0.08);
    color: #172b3f;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

body.fibrain-client-home #landing_page .thread-body .fibrain-landing-content {
    padding-bottom: 46px;
}

body.fibrain-client-home #landing_page .thread-body .fibrain-landing-content > :last-child {
    margin-bottom: 0 !important;
}

body.fibrain-client-home .fibrain-register-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

body.fibrain-client-home .fibrain-register-cta .fibrain-register-copy {
    flex: 1 1 auto;
    min-width: 0;
}

body.fibrain-client-home .thread-body .fibrain-register-cta .fibrain-register-button,
body.fibrain-client-home .thread-body .fibrain-register-cta .fibrain-register-button:visited {
    display: inline-block;
    width: auto;
    min-width: 148px;
    flex: 0 0 auto;
    padding: 11px 18px;
    border: 1px solid #0b4e7c;
    border-radius: 8px;
    background: #167fc7;
    box-shadow: 0 7px 16px rgba(8, 40, 71, 0.16);
    color: #fff;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    box-sizing: border-box;
}

body.fibrain-client-home .thread-body .fibrain-register-cta .fibrain-register-button:hover,
body.fibrain-client-home .thread-body .fibrain-register-cta .fibrain-register-button:focus {
    border-color: #061d35;
    background: #0b4e7c;
    color: #fff;
    text-decoration: none;
}

body.fibrain-client-authenticated .fibrain-register-cta {
    display: none;
}

body.fibrain-client-home #landing_page .front-page-button {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 276px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 18px 20px;
    border: 1px solid rgba(129, 207, 245, 0.42);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(35, 139, 210, 0.38), transparent 46%),
        linear-gradient(150deg, #0c3c68 0%, #082847 68%, #061d35 100%);
    box-shadow: 0 16px 34px rgba(8, 40, 71, 0.22);
    box-sizing: border-box;
    text-align: center;
}

body.fibrain-client-home #landing_page .front-page-button::before {
    content: none;
}

body.fibrain-client-home #landing_page .front-page-button::after {
    content: "";
    position: absolute;
    top: -42px;
    right: -44px;
    width: 132px;
    height: 132px;
    border: 1px solid rgba(185, 232, 255, 0.18);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(185, 232, 255, 0.04);
    pointer-events: none;
}

body.fibrain-client-home #landing_page .front-page-button p {
    width: 100%;
    margin: 0;
}

body.fibrain-client-home #landing_page .front-page-button p + p {
    margin-top: 10px;
}

body.fibrain-client-home #landing_page .front-page-button .button {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 216px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 15px;
    border: 1px solid #51b6eb;
    border-radius: 9px;
    background: linear-gradient(135deg, #2a9ade 0%, #167fc7 100%);
    box-shadow: 0 8px 18px rgba(2, 16, 34, 0.24);
    box-sizing: border-box;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
    text-shadow: none;
    transition: border-color 0.18s ease, background 0.18s ease,
        box-shadow 0.18s ease, transform 0.18s ease;
    margin-right: auto;
    margin-left: auto;
}

body.fibrain-client-home #landing_page .fibrain-sidebar-heading {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    align-items: center;
    flex-direction: column;
    margin-bottom: 20px;
    color: #fff;
}

body.fibrain-client-home #landing_page .fibrain-sidebar-eyebrow {
    margin-bottom: 7px;
    color: #81cff5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 16px;
}

body.fibrain-client-home #landing_page .fibrain-sidebar-heading strong {
    font-size: 21px;
    line-height: 27px;
}

body.fibrain-client-home #landing_page .fibrain-sidebar-description {
    max-width: 220px;
    margin-top: 8px;
    color: #d7e8f5;
    font-size: 12px;
    line-height: 18px;
}

body.fibrain-client-home #landing_page .front-page-button .button i {
    display: inline-block;
    margin-right: 8px;
    font-size: 13px;
}

body.fibrain-client-home #landing_page .front-page-button .green.button {
    border-color: #51b6eb;
    background: linear-gradient(135deg, #2a9ade 0%, #167fc7 100%);
    color: #fff;
}

body.fibrain-client-home #landing_page .front-page-button .button:hover,
body.fibrain-client-home #landing_page .front-page-button .button:focus {
    border-color: #9ddfff;
    background: linear-gradient(135deg, #38a9e8 0%, #238bd2 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

body.fibrain-client-home #landing_page .fibrain-account-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

body.fibrain-client-home #landing_page .fibrain-account-actions .button {
    display: flex;
    width: 100%;
    max-width: 216px;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 17px;
}

body.fibrain-client-home #landing_page .fibrain-account-actions .fibrain-login-action {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    box-shadow: none;
}

body.fibrain-client-home #landing_page .fibrain-account-actions .fibrain-create-account-action {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 7px 16px rgba(2, 16, 34, 0.18);
    color: #0b4e7c;
}

body.fibrain-client-home #landing_page .fibrain-account-actions .button:hover,
body.fibrain-client-home #landing_page .fibrain-account-actions .button:focus {
    border-color: #fff;
    background: #fff;
    color: #082847;
}

body.fibrain-client-home #landing_page .fibrain-sidebar-resources {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

body.fibrain-client-home #landing_page .fibrain-resource-card {
    position: relative;
    overflow: hidden;
    padding: 18px 16px 16px;
    border: 1px solid #b9d9ec;
    border-radius: 14px;
    background: linear-gradient(145deg, #f8fcff 0%, #eaf5fb 100%);
    box-shadow: 0 9px 24px rgba(8, 40, 71, 0.1);
    color: #173b63;
    box-sizing: border-box;
    text-align: center;
}

body.fibrain-client-home #landing_page .fibrain-resource-card::after {
    position: absolute;
    top: -36px;
    right: -34px;
    width: 94px;
    height: 94px;
    border: 1px solid rgba(22, 127, 199, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

body.fibrain-client-home #landing_page .fibrain-resource-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #d9eef9;
    color: #167fc7;
    font-size: 17px;
}

body.fibrain-client-home #landing_page .fibrain-resource-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #167fc7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    line-height: 14px;
}

body.fibrain-client-home #landing_page .fibrain-resource-card strong {
    display: block;
    color: #082847;
    font-size: 17px;
    line-height: 22px;
}

body.fibrain-client-home #landing_page .fibrain-resource-card p {
    min-height: 54px;
    margin: 8px 0 14px;
    color: #52677a;
    font-size: 12px;
    line-height: 18px;
}

body.fibrain-client-home #landing_page .fibrain-resource-link,
body.fibrain-client-home #landing_page .fibrain-resource-link:visited {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #167fc7;
    border-radius: 8px;
    background: #167fc7;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.18s ease, border-color 0.18s ease,
        box-shadow 0.18s ease, transform 0.18s ease;
}

body.fibrain-client-home #landing_page .fibrain-resource-link:hover,
body.fibrain-client-home #landing_page .fibrain-resource-link:focus {
    border-color: #082847;
    background: #0b4e7c;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 7px 16px rgba(8, 40, 71, 0.16);
    transform: translateY(-1px);
}

body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio {
    border-color: #d7d7d7;
    background:
        linear-gradient(90deg, #e51e2a 0 34%, #2a2929 34% 68%, #e51e2a 68% 100%) top / 100% 4px no-repeat,
        linear-gradient(145deg, #fff 0%, #f4f4f4 100%);
}

body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio::after {
    border-color: rgba(229, 30, 42, 0.12);
}

body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio .fibrain-resource-icon {
    background: #f9e7e9;
    color: #d71920;
}

body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio .fibrain-resource-eyebrow {
    color: #d71920;
}

body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio .fibrain-resource-link,
body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio .fibrain-resource-link:visited {
    border-color: #2a2929;
    background: #2a2929;
}

body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio .fibrain-resource-link:hover,
body.fibrain-client-home #landing_page .fibrain-resource-card.fibrain-portfolio .fibrain-resource-link:focus {
    border-color: #d71920;
    background: #d71920;
}

body.fibrain-client-home #landing_page .sidebar .content {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #d5e1eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(8, 40, 71, 0.06);
    color: #52677a;
}

body.fibrain-client-home #landing_page .sidebar section .header {
    margin-bottom: 8px;
    color: #082847;
    font-size: 14px;
}

body.fibrain-client-home #landing_page .sidebar section div:not(.header) {
    padding: 7px 0;
    border-top: 1px solid #e5edf3;
}

body.fibrain-client-home #landing_page .sidebar a {
    color: #167fc7;
}

body.fibrain-client-home #header .fibrain-client-account {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 5px 7px 5px 12px;
    border: 1px solid #d5e1eb;
    border-radius: 11px;
    background: #f5f9fc;
    box-shadow: 0 4px 12px rgba(8, 40, 71, 0.05);
    box-sizing: border-box;
    color: #52677a;
}

body.fibrain-client-home #header .fibrain-client-account::before {
    content: "\f007";
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e4f2fa;
    color: #167fc7;
    font-family: FontAwesome;
    font-size: 14px;
}

body.fibrain-client-home #header .fibrain-client-account p {
    float: none;
    margin: 0;
    padding: 0;
    color: #52677a;
    line-height: 28px;
    text-align: left;
}

body.fibrain-client-home #header .fibrain-client-account p:first-child {
    white-space: nowrap;
}

body.fibrain-client-home #header .fibrain-client-account p:last-child {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding-left: 11px;
    border-left: 1px solid #d5e1eb;
}

body.fibrain-client-home #header .fibrain-client-account a:not(.flag) {
    color: #167fc7;
    font-weight: 600;
}

body.fibrain-client-home #header .fibrain-client-account a.flag {
    display: inline-block;
    width: 16px;
    height: 11px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    opacity: 1;
}

body.fibrain-client-home #header .fibrain-client-account a.flag:hover {
    filter: brightness(1.08);
}

/* Authenticated customer workspace: keep the header identical on every page. */
body.fibrain-client-workspace #header .fibrain-client-account {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 5px 7px 5px 12px;
    border: 1px solid #d5e1eb;
    border-radius: 11px;
    background: #f5f9fc;
    box-shadow: 0 4px 12px rgba(8, 40, 71, 0.05);
    box-sizing: border-box;
    color: #52677a;
}

body.fibrain-client-workspace #header .fibrain-client-account::before {
    content: "\f007";
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e4f2fa;
    color: #167fc7;
    font-family: FontAwesome;
    font-size: 14px;
}

body.fibrain-client-workspace #header .fibrain-client-account p {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    color: #52677a;
    line-height: 28px;
    text-align: left;
}

body.fibrain-client-workspace #header .fibrain-client-account p:first-child {
    white-space: nowrap;
}

body.fibrain-client-workspace #header .fibrain-client-account p:last-child {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding-left: 11px;
    border-left: 1px solid #d5e1eb;
}

body.fibrain-client-workspace #header .fibrain-client-account a:not(.flag) {
    color: #167fc7;
    font-weight: 600;
}

body.fibrain-client-workspace #header .fibrain-client-account a.flag {
    display: inline-block;
    width: 16px;
    height: 11px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    opacity: 1;
}

body.fibrain-client-workspace #nav {
    height: auto;
    min-height: 48px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    background: #082847;
    box-shadow: none;
    box-sizing: border-box;
}

body.fibrain-client-workspace #nav li a {
    position: relative;
    height: 48px;
    margin: 0 4px;
    padding: 0 16px 0 42px;
    border-radius: 8px;
    background-image: none !important;
    color: #dbe7f5;
    font-weight: 600;
    line-height: 48px;
}

body.fibrain-client-workspace #nav li a::before {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 18px;
    color: #81cff5;
    font-family: FontAwesome;
    font-size: 15px;
    font-weight: normal;
    line-height: 18px;
    text-align: center;
    transform: translateY(-50%);
}

body.fibrain-client-workspace #nav li a.home::before { content: "\f015"; }
body.fibrain-client-workspace #nav li a.new::before { content: "\f067"; }
body.fibrain-client-workspace #nav li a.status::before { content: "\f002"; }
body.fibrain-client-workspace #nav li a.tickets::before { content: "\f0ae"; }
body.fibrain-client-workspace #nav li a.kb::before { content: "\f02d"; }

body.fibrain-client-workspace #nav li a.active,
body.fibrain-client-workspace #nav li a:hover {
    background-color: #167fc7;
    color: #fff;
}

body.fibrain-client-workspace #nav li a.active::before,
body.fibrain-client-workspace #nav li a:hover::before {
    color: #fff;
}

/* Shared post-login page surface. */
body.fibrain-client-workspace:not(.fibrain-client-home) #content {
    min-height: 480px;
    margin: 0;
    padding: 28px;
    border-radius: 0 0 18px 18px;
    background: #f4f8fb;
}

body.fibrain-client-workspace:not(.fibrain-client-home) #content > h1 {
    margin: 0 0 8px;
    color: #082847;
    font-size: 26px;
    line-height: 34px;
}

body.fibrain-client-workspace:not(.fibrain-client-home) #content > p {
    color: #52677a;
    font-size: 14px;
    line-height: 22px;
}

body.fibrain-client-workspace input[type="text"],
body.fibrain-client-workspace input[type="email"],
body.fibrain-client-workspace input[type="password"],
body.fibrain-client-workspace select,
body.fibrain-client-workspace textarea {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #edf3f8;
    color: #172b3f;
    box-sizing: border-box;
}

body.fibrain-client-workspace input[type="submit"],
body.fibrain-client-workspace input[type="button"],
body.fibrain-client-workspace button,
body.fibrain-client-workspace .button {
    min-height: 40px;
    padding: 9px 17px;
    border: 1px solid #0b4e7c;
    border-radius: 8px;
    background: #167fc7;
    box-shadow: 0 6px 14px rgba(8, 40, 71, 0.14);
    color: #fff;
    font-weight: 600;
    text-shadow: none;
}

body.fibrain-client-workspace input[type="reset"] {
    min-height: 40px;
    padding: 9px 17px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #fff;
    color: #334b65;
}

/* Ticket list. */
body.fibrain-client-tickets .search.well {
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid #d5e1eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(8, 40, 71, 0.06);
}

body.fibrain-client-tickets #ticketSearchForm {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.fibrain-client-tickets #ticketSearchForm > input[type="text"] {
    flex: 1 1 auto;
    width: auto;
}

body.fibrain-client-tickets #ticketSearchForm .pull-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}

body.fibrain-client-tickets h1 {
    display: flex;
    min-height: 44px;
    margin: 0 0 12px !important;
    padding: 10px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #d5e1eb;
    border-radius: 11px;
    background: #fff;
    box-sizing: border-box;
}

body.fibrain-client-tickets h1 > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #082847;
}

body.fibrain-client-tickets h1 .states {
    display: flex;
    float: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

body.fibrain-client-tickets h1 .states a {
    display: inline-flex;
    min-height: 36px;
    padding: 7px 12px;
    align-items: center;
    gap: 7px;
    border: 1px solid #cbdce8;
    border-radius: 9px;
    background: #f7fafc;
    color: #35536d;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
}

body.fibrain-client-tickets h1 .states a:hover,
body.fibrain-client-tickets h1 .states a:focus {
    border-color: #86bfe2;
    background: #eef7fc;
    color: #0b4e7c;
}

body.fibrain-client-tickets h1 .states a.active {
    border-color: #afd5eb;
    background: linear-gradient(135deg, #eaf6fc 0%, #d9edf8 100%);
    color: #0b4e7c;
    box-shadow: 0 4px 12px rgba(18, 103, 157, 0.12);
}

body.fibrain-client-tickets .fibrain-ticket-legend {
    display: flex;
    margin: 0 0 12px;
    padding: 11px 14px;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 0;
    border: 1px solid #0b355d;
    border-radius: 10px;
    background: linear-gradient(135deg, #174f7f 0%, #103f6a 52%, #0a2f53 100%);
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    line-height: 18px;
    box-shadow: 0 6px 16px rgba(7, 35, 64, 0.18);
    overflow: hidden;
}

body.fibrain-client-tickets .fibrain-ticket-legend-title,
body.fibrain-client-tickets .fibrain-ticket-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.fibrain-client-tickets .fibrain-ticket-legend-title {
    margin-right: 4px;
    padding: 3px 14px 3px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.34);
    background: transparent;
    color: #ffffff;
    font-weight: 800;
    box-sizing: border-box;
}

body.fibrain-client-tickets .fibrain-ticket-legend-item {
    min-height: 24px;
    padding: 3px 10px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
}

body.fibrain-client-tickets .fibrain-ticket-legend-answer {
    color: #ffffff;
    font-weight: 800;
}

body.fibrain-client-tickets .fibrain-ticket-legend-regular {
    color: #d7ebfa;
    font-weight: 400;
}

body.fibrain-client-tickets .fibrain-ticket-legend-item .icon-group {
    color: #bfe7ff;
}

.fibrain-client-table-scroll {
    overflow-x: auto;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #cbdce8;
}

body.fibrain-client-tickets #ticketTable {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

body.fibrain-client-tickets #ticketTable .fibrain-ticket-number {
    width: 11%;
    white-space: nowrap;
}

body.fibrain-client-tickets #ticketTable .fibrain-ticket-subject {
    width: 51%;
}

body.fibrain-client-tickets #ticketTable .fibrain-ticket-date {
    width: 14%;
    white-space: nowrap;
}

body.fibrain-client-tickets #ticketTable .fibrain-ticket-status {
    width: 10%;
    white-space: nowrap;
}

body.fibrain-client-tickets #ticketTable .fibrain-ticket-department {
    width: 14%;
}

body.fibrain-client-tickets #ticketTable .fibrain-ticket-subject .truncate {
    max-width: none !important;
}

body.fibrain-client-tickets #ticketTable caption {
    padding: 12px 14px;
    border: 0;
    background: #eaf2f8;
    color: #334b65;
    font-weight: 700;
    text-align: left;
}

body.fibrain-client-tickets #ticketTable thead th {
    padding: 11px 14px;
    border: 1px solid #3d6f98;
    background: #205985;
    color: #fff;
}
body.fibrain-client-tickets #ticketTable thead th a { color: #fff; }
body.fibrain-client-tickets #ticketTable tbody td {
    padding: 10px 14px;
    border: 1px solid #d6e2eb;
    color: #334b65;
}
body.fibrain-client-tickets #ticketTable tbody tr:nth-child(even) td { background: #edf3f8; }
body.fibrain-client-tickets #ticketTable tbody tr:hover td { background: #e2f1fa; }

/* New ticket form. */
body.fibrain-client-ticket-open #ticketForm {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid #d5e1eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 40, 71, 0.08);
}
body.fibrain-client-ticket-open #ticketForm > table { width: 100%; }
body.fibrain-client-ticket-open #ticketForm td { padding: 7px 10px; }
body.fibrain-client-ticket-open #ticketForm td:first-child:not([colspan]) {
    width: 220px;
    color: #334b65;
    font-weight: 600;
}
body.fibrain-client-ticket-open #ticketForm .form-header {
    padding: 11px 14px;
    border-radius: 8px;
    background: #205985;
    color: #fff;
}
body.fibrain-client-ticket-open #ticketForm .form-header h3 {
    margin: 0;
    color: inherit;
    font-size: 15px;
    line-height: 22px;
}

body.fibrain-client-ticket-open #ticketForm .section-break {
    margin: 8px 0 2px;
    padding: 16px 18px !important;
    border: 1px solid #c7ddec;
    border-left: 4px solid #238bd2;
    border-radius: 10px;
    background: #eef7fc;
    box-shadow: 0 5px 16px rgba(8, 40, 71, 0.05);
    color: #334b65;
}

body.fibrain-client-ticket-open #ticketForm .section-break h3 {
    margin: 0 0 8px;
    color: #0b4e7c;
    font-size: 15px;
    line-height: 22px;
}

body.fibrain-client-ticket-open #ticketForm .section-break em,
body.fibrain-client-ticket-open #ticketForm .section-break p,
body.fibrain-client-ticket-open #ticketForm .section-break span,
body.fibrain-client-ticket-open #ticketForm .section-break li,
body.fibrain-client-ticket-open #ticketForm .section-break strong {
    color: #334b65 !important;
    font-style: normal;
    line-height: 1.55;
}

body.fibrain-client-ticket-open #ticketForm .section-break ul,
body.fibrain-client-ticket-open #ticketForm .section-break ol {
    margin: 8px 0 0;
    padding-left: 21px;
}

/* The first dynamic form contains the customer-facing ticket instructions. */
body.fibrain-client-ticket-open #dynamic-form > tr:first-child .form-header {
    margin: 8px 0 2px !important;
    padding: 16px 18px;
    border: 1px solid #c7ddec;
    border-left: 4px solid #238bd2;
    border-radius: 10px;
    background: #eef7fc;
    box-shadow: 0 5px 16px rgba(8, 40, 71, 0.05);
    color: #334b65;
}

body.fibrain-client-ticket-open #dynamic-form > tr:first-child .form-header h3 {
    margin: 0 0 8px;
    color: #0b4e7c;
}

body.fibrain-client-ticket-open #dynamic-form > tr:first-child .form-header > div,
body.fibrain-client-ticket-open #dynamic-form > tr:first-child .form-header > div * {
    color: #334b65 !important;
    font-style: normal;
    line-height: 1.55;
}

body.fibrain-client-ticket-open #dynamic-form > tr:first-child .form-header ul,
body.fibrain-client-ticket-open #dynamic-form > tr:first-child .form-header ol {
    margin: 8px 0 0;
    padding-left: 21px;
}

body.fibrain-client-ticket-open #ticketForm hr {
    height: 0;
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #dbe5ed;
    background: transparent;
}

body.fibrain-client-ticket-open #ticketForm label {
    color: #21384e;
    font-weight: 600;
}

body.fibrain-client-ticket-open #ticketForm input[type="text"],
body.fibrain-client-ticket-open #ticketForm input[type="email"],
body.fibrain-client-ticket-open #ticketForm select,
body.fibrain-client-ticket-open #ticketForm textarea,
body.fibrain-client-ticket-open #ticketForm .redactor-box {
    display: block;
    width: min(100%, 900px);
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
}

body.fibrain-client-ticket-open #ticketForm .filedrop {
    width: 100%;
    max-width: 900px;
    margin-right: auto;
    margin-left: auto;
    border-color: #c7d8e6;
    border-radius: 8px;
    background: #f7fafc;
    box-sizing: border-box;
}
body.fibrain-client-ticket-open #topicId {
    display: block;
    width: min(100%, 520px);
    margin-right: auto;
    margin-left: auto;
}
body.fibrain-client-ticket-open #ticketForm .buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 18px 0 0;
}

body.fibrain-client-ticket-open #ticketForm .buttons input[type="submit"] {
    border-color: #0b4e7c;
    background: #167fc7;
    color: #fff !important;
    text-shadow: none;
}

body.fibrain-client-ticket-open #ticketForm .buttons input[type="submit"]:hover,
body.fibrain-client-ticket-open #ticketForm .buttons input[type="submit"]:focus {
    border-color: #061d35;
    background: #0b4e7c;
    color: #fff !important;
}

body.fibrain-client-ticket-open #ticketForm .buttons input[type="reset"],
body.fibrain-client-ticket-open #ticketForm .buttons input[name="cancel"] {
    border-color: #c7d8e6;
    background: #fff;
    box-shadow: none;
    color: #334b65 !important;
    text-shadow: none;
}

body.fibrain-client-ticket-open #ticketForm .buttons input[type="reset"]:hover,
body.fibrain-client-ticket-open #ticketForm .buttons input[type="reset"]:focus,
body.fibrain-client-ticket-open #ticketForm .buttons input[name="cancel"]:hover,
body.fibrain-client-ticket-open #ticketForm .buttons input[name="cancel"]:focus {
    border-color: #8da8bd;
    background: #edf3f8;
    color: #10233f !important;
}

/* Knowledge base: readable category list with persistent navigation. */
body.fibrain-client-kb .fibrain-client-kb-page > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 20px;
}
body.fibrain-client-kb .fibrain-client-kb-page .span8,
body.fibrain-client-kb .fibrain-client-kb-page .span4 {
    float: none;
    width: auto;
    margin: 0;
}
body.fibrain-client-kb #kb {
    display: block;
    margin: 14px 0 0;
    padding: 0;
}
body.fibrain-client-kb #kb > li {
    position: relative;
    min-width: 0;
    margin: 0 0 12px;
    padding: 16px 18px;
    border: 1px solid #d5e1eb;
    border-left: 3px solid #238bd2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(8, 40, 71, 0.045);
    box-sizing: border-box;
}
body.fibrain-client-kb #kb > li > div { margin-left: 0 !important; }
body.fibrain-client-kb .kb-category-icon {
    position: absolute;
    top: 15px;
    left: 17px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e4f2fb;
}
body.fibrain-client-kb .kb-category-icon::before {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 14px;
    height: 12px;
    border: 2px solid #167fc7;
    border-radius: 2px;
    box-sizing: border-box;
    content: "";
}
body.fibrain-client-kb .kb-category-icon::after {
    position: absolute;
    top: 5px;
    left: 8px;
    width: 7px;
    height: 4px;
    border-radius: 2px 2px 0 0;
    background: #167fc7;
    content: "";
}
body.fibrain-client-kb .kb-category-content { padding-left: 40px; }
body.fibrain-client-kb #kb h4 { margin: 0 0 7px; font-size: 16px; line-height: 22px; }
body.fibrain-client-kb #kb h4 a { color: #0b4e7c; text-decoration: none; }
body.fibrain-client-kb #kb h4 a:hover { color: #167fc7; text-decoration: underline; }
body.fibrain-client-kb .kb-intro {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    padding: 24px 26px;
    border: 1px solid rgba(129, 207, 245, 0.42);
    border-radius: 12px;
    background:
        radial-gradient(circle at 92% 0, rgba(35, 139, 210, 0.32), transparent 38%),
        linear-gradient(135deg, #0c3c68 0%, #082847 70%, #061d35 100%);
    box-shadow: 0 10px 24px rgba(8, 40, 71, 0.16);
    color: #dbeaf5;
    text-align: center;
}
body.fibrain-client-kb .kb-intro strong {
    color: #fff;
    font-size: 21px;
    line-height: 28px;
}
body.fibrain-client-kb .kb-intro-label {
    color: #81cff5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
body.fibrain-client-kb .kb-category-description { margin: 5px 0 9px !important; line-height: 20px; }
body.fibrain-client-kb .kb-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 8px 0 10px;
    padding: 9px 11px;
    border-radius: 7px;
    background: #f4f8fb;
}
body.fibrain-client-kb .kb-subcategories > div { display: inline-flex; align-items: center; gap: 5px; }
body.fibrain-client-kb .kb-subcategory-icon {
    display: inline-block;
    width: 11px;
    height: 9px;
    border: 1px solid #4f86ab;
    border-radius: 2px;
    background: #fff;
    box-sizing: border-box;
}
body.fibrain-client-kb .popular-faq {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 6px 4px;
    border-top: 1px solid #e4ebf1;
    background: transparent !important;
    line-height: 19px;
}
body.fibrain-client-kb .popular-faq:first-of-type { margin-top: 6px; }
body.fibrain-client-kb .popular-faq a { color: #205985; text-decoration: none; }
body.fibrain-client-kb .popular-faq a:hover { color: #167fc7; text-decoration: underline; }
body.fibrain-client-kb .kb-article-icon {
    position: relative;
    flex: 0 0 16px;
    width: 14px;
    height: 16px;
    margin-top: 1px;
    border: 1px solid #8da8bd;
    border-radius: 2px;
    background: #fff;
    box-sizing: border-box;
}
body.fibrain-client-kb .kb-article-icon::after {
    position: absolute;
    right: 2px;
    bottom: 3px;
    left: 3px;
    height: 1px;
    background: #8da8bd;
    box-shadow: 0 -3px 0 #8da8bd;
    content: "";
}
body.fibrain-client-kb .sidebar {
    position: sticky;
    top: 14px;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid #d5e1eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(8, 40, 71, 0.07);
    box-sizing: border-box;
}
body.fibrain-client-kb .span4 { align-self: stretch; }
body.fibrain-client-kb .kb-sidebar-title {
    margin: 0 0 9px;
    color: #082847;
    font-size: 16px;
    font-weight: 700;
}
body.fibrain-client-kb .kb-category-nav { display: flex; flex-direction: column; gap: 3px; }
body.fibrain-client-kb .kb-category-nav a {
    display: flex;
    justify-content: space-between;
    gap: 9px;
    padding: 8px 9px;
    border-radius: 7px;
    color: #334b65;
    font-size: 12px;
    line-height: 17px;
    text-decoration: none;
}
body.fibrain-client-kb .kb-category-nav a:hover,
body.fibrain-client-kb .kb-category-nav a:focus { background: #eaf4fb; color: #0b4e7c; }
body.fibrain-client-kb .kb-category-nav small {
    flex: 0 0 auto;
    color: #167fc7;
    font-weight: 700;
}
body.fibrain-client-kb .kb-back-to-top {
    display: block;
    margin: 11px 0 13px;
    padding: 9px;
    border: 1px solid #c7d8e6;
    border-radius: 7px;
    background: #f7fafc;
    color: #0b4e7c;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
body.fibrain-client-kb .kb-back-to-top:hover { border-color: #8db9d8; background: #eaf4fb; }
body.fibrain-client-kb .sidebar .searchbar { padding-top: 12px; border-top: 1px solid #e0e8ef; }
body.fibrain-client-kb .sidebar .searchbar select { width: 100% !important; }
body.fibrain-client-kb #faq,
body.fibrain-client-kb .faq-content {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #d5e1eb;
    border-radius: 12px;
    background: #fff;
}
body.fibrain-client-kb .faq-content .article-title { color: #082847; font-size: 22px; font-weight: 700; }

/* Individual ticket: retain osTicket actions while improving hierarchy. */
body.fibrain-client-ticket-view #content > h1,
body.fibrain-client-ticket-view #content > h2 {
    padding: 12px 15px;
    border: 1px solid #d5e1eb;
    border-radius: 11px;
    background: #fff;
    color: #082847;
}
body.fibrain-client-ticket-view #content table {
    max-width: 100%;
}

body.fibrain-client-ticket-view #ticketInfo {
    width: 100%;
    padding: 14px;
    border: 1px solid #d5e1eb;
    border-radius: 14px;
    border-collapse: separate;
    background: #fff;
    box-shadow: 0 8px 24px rgba(8, 40, 71, 0.07);
    box-sizing: border-box;
}

body.fibrain-client-ticket-view #ticketInfo h1 {
    margin: 0 0 10px;
    padding: 2px 0 12px;
    border-bottom: 1px solid #d5e1eb;
    color: #082847;
    font-size: 24px;
}

body.fibrain-client-ticket-view #ticketInfo h1 small {
    color: #6c7f99;
    font-size: 14px;
}

body.fibrain-client-ticket-view #ticketInfo .action-button {
    display: inline-block;
    min-height: 36px;
    margin-left: 7px;
    padding: 7px 13px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #fff;
    color: #0b4e7c;
    font-size: 13px;
    line-height: 20px;
    box-sizing: border-box;
}

body.fibrain-client-ticket-view #ticketInfo > tbody > tr > td {
    padding: 7px;
    vertical-align: top;
}

body.fibrain-client-ticket-view #ticketInfo .infoTable,
body.fibrain-client-ticket-view #ticketInfo .custom-data {
    overflow: hidden;
    border: 1px solid #d5e1eb;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
}

body.fibrain-client-ticket-view #ticketInfo .infoTable .headline,
body.fibrain-client-ticket-view #ticketInfo .custom-data .headline {
    padding: 10px 12px;
    border: 0;
    background: #205985;
    color: #fff;
    font-weight: 700;
}

body.fibrain-client-ticket-view #ticketInfo .infoTable th,
body.fibrain-client-ticket-view #ticketInfo .custom-data th {
    width: 155px;
    padding: 9px 11px;
    border-bottom: 1px solid #d6e2eb;
    background: #eaf2f8;
    color: #334b65;
    text-align: left;
    white-space: nowrap;
}

body.fibrain-client-ticket-view #ticketInfo .infoTable td,
body.fibrain-client-ticket-view #ticketInfo .custom-data td {
    padding: 9px 11px;
    border-bottom: 1px solid #d6e2eb;
    background: #fff;
    color: #334b65;
}

body.fibrain-client-ticket-view #ticketThread {
    margin-top: 18px;
}

body.fibrain-client-ticket-view .thread-entry {
    margin-bottom: 14px;
    border-radius: 11px;
    box-shadow: 0 5px 16px rgba(8, 40, 71, 0.05);
}

body.fibrain-client-ticket-view .thread-entry .header {
    padding: 8px 12px;
    border-width: 1px;
    font-size: 13px;
    line-height: 1.4;
}

/* Customer messages use the same green palette as the agent view. */
body.fibrain-client-ticket-view .thread-entry.message .header {
    border-color: #1D4738;
    background: #1D4738;
    color: #ffffff;
}

body.fibrain-client-ticket-view .thread-entry.message .header .faded,
body.fibrain-client-ticket-view .thread-entry.message .header a,
body.fibrain-client-ticket-view .thread-entry.message .header time {
    color: #ffffff !important;
}

body.fibrain-client-ticket-view .thread-entry.avatar.message .header::before {
    border-right-color: #1D4738;
}

body.fibrain-client-ticket-view .thread-entry.avatar.message .header::after {
    border-right-color: #1D4738;
}

/* Public answers from the support team use the same blue palette as the agent view. */
body.fibrain-client-ticket-view .thread-entry.response .header {
    border-color: #173B63;
    background: #173B63;
    color: #ffffff;
}

body.fibrain-client-ticket-view .thread-entry.response .header .faded,
body.fibrain-client-ticket-view .thread-entry.response .header a,
body.fibrain-client-ticket-view .thread-entry.response .header time {
    color: #ffffff !important;
}

body.fibrain-client-ticket-view .thread-entry.avatar.response .header::before {
    border-left-color: #173B63;
}

body.fibrain-client-ticket-view .thread-entry.avatar.response .header::after {
    border-left-color: #173B63;
}

body.fibrain-client-ticket-view .thread-entry.message .thread-body,
body.fibrain-client-ticket-view .thread-entry.message .attachments {
    border-color: #1D4738;
    background: #EAF5EF;
}

body.fibrain-client-ticket-view .thread-entry.response .thread-body,
body.fibrain-client-ticket-view .thread-entry.response .attachments {
    border-color: #173B63;
    background: #EAF3FB;
}

body.fibrain-client-ticket-view #reply {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #c7d8e6;
    border-left: 4px solid #238bd2;
    border-radius: 12px;
    background: #eef6fb;
    box-shadow: 0 8px 22px rgba(8, 40, 71, 0.07);
}

body.fibrain-client-ticket-view #reply h2 {
    margin: -20px -20px 16px;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    background: #205985;
    color: #fff;
    font-size: 18px;
}

body.fibrain-client-ticket-view #reply textarea,
body.fibrain-client-ticket-view #reply .redactor-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 800px) {
    body.fibrain-client-workspace #header .fibrain-client-account {
        width: 100%;
        flex-wrap: wrap;
    }
    body.fibrain-client-workspace #header .fibrain-client-account p:first-child {
        flex: 1 1 auto;
        white-space: normal;
    }
    body.fibrain-client-workspace #nav {
        overflow-x: auto;
        white-space: nowrap;
    }
    body.fibrain-client-workspace:not(.fibrain-client-home) #content { padding: 18px 12px; }
    body.fibrain-client-tickets #ticketSearchForm { align-items: stretch; flex-direction: column; }
    body.fibrain-client-tickets #ticketSearchForm .pull-right { width: 100%; margin-left: 0; }
    body.fibrain-client-ticket-open #ticketForm td:first-child:not([colspan]) { width: 150px; }
    body.fibrain-client-kb .fibrain-client-kb-page > .row { grid-template-columns: 1fr; }
    body.fibrain-client-kb .sidebar { position: static; }
    body.fibrain-client-ticket-view #ticketInfo > tbody > tr > td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }
}

body.fibrain-client-home #landing_page .featured-category.front-page {
    display: inline-block;
    width: calc(50% - 12px);
    margin: 0 20px 20px 0;
    padding: 18px;
    border: 1px solid #d5e1eb;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
    vertical-align: top;
}

body.fibrain-client-home #landing_page .featured-category.front-page:nth-of-type(even) {
    margin-right: 0;
}

@media (max-width: 900px) {
    #header {
        gap: 18px;
    }

    #header .fibrain-client-branding {
        gap: 16px;
    }

    #header .fibrain-client-branding img,
    #header .fibrain-client-branding #logo img {
        height: 34px;
        max-height: 34px;
    }

    #container {
        width: calc(100% - 20px);
    }

    body.fibrain-client-home #landing_page {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "main" "featured";
    }

    body.fibrain-client-home #landing_page > .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    body.fibrain-client-home #landing_page .fibrain-sidebar-resources {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-column: 1 / -1;
        gap: 12px;
        margin-top: 0;
    }

    body.fibrain-client-home #landing_page .sidebar .content {
        margin-top: 0;
    }

    body.fibrain-client-home #landing_page .front-page-button {
        min-height: 0;
    }
}

@media (max-width: 680px) {
    #header {
        flex-wrap: wrap-reverse;
        gap: 4px 12px;
        height: auto;
        min-height: 76px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    #header .fibrain-client-account {
        flex-basis: 100%;
    }

    #header .fibrain-client-branding {
        margin-left: auto;
    }

    #header .fibrain-client-branding img,
    #header .fibrain-client-branding #logo img {
        height: 28px;
        max-height: 28px;
    }

    #container {
        width: calc(100% - 12px);
    }

    #content {
        margin-right: 12px;
        margin-left: 12px;
    }

    body.fibrain-client-home #content {
        margin: 0;
        padding: 16px 12px 24px;
    }

    body.fibrain-client-home #nav {
        overflow-x: auto;
        white-space: nowrap;
    }

    body.fibrain-client-home #nav li a {
        padding-right: 12px;
        padding-left: 38px;
    }

    body.fibrain-client-home #nav li a::before {
        left: 13px;
    }

    body.fibrain-client-home #landing_page {
        gap: 16px;
    }

    body.fibrain-client-home #landing_page > .sidebar {
        display: block;
    }

    body.fibrain-client-home #landing_page .fibrain-sidebar-resources {
        display: flex;
        margin-top: 12px;
    }

    body.fibrain-client-home #landing_page .fibrain-resource-card p {
        min-height: 0;
    }

    body.fibrain-client-home #landing_page .sidebar .content {
        margin-top: 12px;
    }

    body.fibrain-client-home #landing_page .search-form form {
        display: block;
    }

    body.fibrain-client-home #landing_page .search-form .search,
    body.fibrain-client-home #landing_page .search-form .button {
        width: 100%;
    }

    body.fibrain-client-home #landing_page .search-form .button {
        margin-top: 8px;
    }

    body.fibrain-client-home #landing_page .featured-category.front-page {
        width: 100%;
        margin-right: 0;
    }

    body.fibrain-client-home #header .fibrain-client-account {
        width: 100%;
        flex-wrap: wrap;
    }

    body.fibrain-client-home #header .fibrain-client-account p:first-child {
        flex: 1 1 auto;
        white-space: normal;
    }

    body.fibrain-client-home .fibrain-register-cta {
        align-items: stretch;
        flex-direction: column;
    }

    body.fibrain-client-home .thread-body .fibrain-register-cta .fibrain-register-button {
        width: 100%;
    }
}

/* Customer sign-in and registration: staff-login structure with a gold accent. */
body.fibrain-client-access #container {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px;
    margin-top: 48px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.fibrain-client-login #container {
    width: min(920px, calc(100% - 32px));
    max-width: 920px;
    min-height: 100vh;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

body.fibrain-client-login #content {
    width: 100%;
}

body.fibrain-client-access #header,
body.fibrain-client-access #nav,
body.fibrain-client-access #container > .clear,
body.fibrain-client-access #footer {
    display: none;
}

body.fibrain-client-access #content {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.fibrain-client-access #container > .error_bar,
body.fibrain-client-access #container > .warning_bar,
body.fibrain-client-access #container > .notice_bar,
body.fibrain-client-access #content > #msg_error,
body.fibrain-client-access #content > #msg_notice,
body.fibrain-client-access #content > #msg_warning,
body.fibrain-client-access #content > #msg_info {
    position: relative;
    width: 100%;
    max-width: 880px;
    min-height: 44px;
    margin: 0 auto 14px;
    padding: 11px 16px 11px 46px;
    height: auto;
    border-width: 1px;
    border-style: solid;
    border-radius: 9px;
    background-image: none;
    color: #334b65;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    box-sizing: border-box;
    flex: 0 0 auto;
}

body.fibrain-client-access #container > .error_bar::before,
body.fibrain-client-access #container > .warning_bar::before,
body.fibrain-client-access #container > .notice_bar::before,
body.fibrain-client-access #content > #msg_error::before,
body.fibrain-client-access #content > #msg_notice::before,
body.fibrain-client-access #content > #msg_warning::before,
body.fibrain-client-access #content > #msg_info::before {
    position: absolute;
    top: 50%;
    left: 15px;
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
}

body.fibrain-client-access #container > .error_bar,
body.fibrain-client-access #content > #msg_error {
    border-color: #e5a9ad;
    background-color: #fff1f2;
    color: #8d2930;
}

body.fibrain-client-access #container > .error_bar::before,
body.fibrain-client-access #content > #msg_error::before {
    content: "!";
    background: #c94750;
}

body.fibrain-client-access #container > .warning_bar,
body.fibrain-client-access #content > #msg_warning {
    border-color: #dfbd62;
    background-color: #fff9e8;
    color: #6d5113;
}

body.fibrain-client-access #container > .warning_bar::before,
body.fibrain-client-access #content > #msg_warning::before {
    content: "!";
    background: #c79720;
}

body.fibrain-client-access #container > .notice_bar,
body.fibrain-client-access #content > #msg_notice {
    border-color: #9bcfb0;
    background-color: #edf9f1;
    color: #24633d;
}

body.fibrain-client-access #container > .notice_bar::before,
body.fibrain-client-access #content > #msg_notice::before {
    content: "\2713";
    background: #3b9560;
}

body.fibrain-client-access #content > #msg_info {
    border-color: #acd2e9;
    background-color: #eef8fd;
    color: #225d80;
}

body.fibrain-client-access #content > #msg_info::before {
    content: "i";
    background: #3188bb;
}

.fibrain-client-access-shell {
    width: 100%;
    margin: 0;
    padding: 0;
}

.fibrain-client-access-card {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    overflow: hidden;
    width: 100%;
    border: 2px solid #d4aa45;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 72px rgba(2, 16, 34, 0.38);
    box-sizing: border-box;
}

.fibrain-client-login-card {
    grid-template-columns: 340px minmax(0, 1fr);
    min-height: 520px;
}

.fibrain-client-access-brand {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 38px 32px 32px;
    border-right: 4px solid #d4aa45;
    background:
        radial-gradient(circle at 100% 100%, rgba(35, 139, 210, 0.25), transparent 38%),
        linear-gradient(150deg, #071a33 0%, #0b3158 100%);
    color: #fff;
    box-sizing: border-box;
}

.fibrain-client-access-brand::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(212, 170, 69, 0.24);
    border-radius: 50%;
    pointer-events: none;
}

.fibrain-client-access-logos {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #fff;
}

.fibrain-client-access-logos img {
    display: block;
    width: auto;
    height: 31px;
    max-width: 58%;
    object-fit: contain;
}

.fibrain-client-access-logos img:last-child {
    max-width: 36%;
}

.fibrain-client-access-brand-copy {
    position: relative;
    z-index: 1;
    margin-top: 50px;
}

.fibrain-client-access-brand-copy > span,
.fibrain-client-access-heading > span {
    display: block;
    color: #d4aa45;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.7px;
    line-height: 17px;
    text-transform: uppercase;
}

.fibrain-client-access-brand-copy h1 {
    margin: 14px 0 10px;
    color: #fff;
    font-size: 34px;
    font-weight: 750;
    line-height: 40px;
}

.fibrain-client-access-brand-copy p {
    margin: 0;
    color: #dbe7f5;
    font-size: 14px;
    line-height: 22px;
}

.fibrain-client-access-features {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 11px;
    margin-top: auto;
    padding-top: 36px;
}

.fibrain-client-access-features > div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eef6fc;
    font-size: 12px;
    line-height: 17px;
}

.fibrain-client-access-features i {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 170, 69, 0.55);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #f0cc70;
}

.fibrain-client-access-home {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 0 16px;
    border: 1px solid rgba(212, 170, 69, .72);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color .18s ease, border-color .18s ease,
        color .18s ease, box-shadow .18s ease;
}

.fibrain-client-access-home:hover,
.fibrain-client-access-home:focus {
    border-color: #d4aa45;
    background: #d4aa45;
    color: #071a33 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
    outline: none;
}

.fibrain-client-access-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: #fff;
}

.fibrain-client-access-panel-inner {
    width: 100%;
    max-width: 660px;
    margin: auto;
    padding: 42px 46px 32px;
    box-sizing: border-box;
}

.fibrain-client-login-card .fibrain-client-access-panel-inner {
    max-width: 540px;
    padding: 34px 42px 26px;
}

.fibrain-client-access-heading h2 {
    margin: 10px 0 6px;
    color: #10233f;
    font-size: 30px;
    line-height: 37px;
}

.fibrain-client-access-heading p {
    margin: 0;
    color: #6c7f99;
    font-size: 14px;
    line-height: 22px;
}

.fibrain-client-access-message {
    margin-top: 20px;
    padding: 11px 14px;
    border: 1px solid #efb7b7;
    border-radius: 8px;
    background: #fff3f3;
    color: #b22f2f;
    font-size: 13px;
    line-height: 19px;
    text-align: center;
}

.fibrain-client-access-banner {
    margin-top: 18px;
    padding: 11px 14px;
    border-left: 3px solid #d4aa45;
    border-radius: 0 8px 8px 0;
    background: #fbf8ef;
    color: #52677a;
    font-size: 12px;
    line-height: 18px;
}

.fibrain-client-access-banner p {
    margin: 0;
}

.fibrain-client-access-form {
    margin-top: 22px;
}

/* Remove the legacy osTicket lock background and fixed login form sizing. */
body.fibrain-client-login #clientLogin {
    display: block;
    width: 100%;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    box-sizing: border-box;
}

.fibrain-client-access-form > label {
    display: block;
    margin: 0 0 6px;
    color: #10233f;
    font-size: 13px;
    font-weight: 700;
}

.fibrain-client-access-field {
    position: relative;
    margin-bottom: 15px;
}

.fibrain-client-access-field > i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #748aa5;
    transform: translateY(-50%);
}

.fibrain-client-access-field input {
    width: 100% !important;
    max-width: none;
    height: 44px;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #f1f5f9;
    color: #10233f;
    box-shadow: none;
    box-sizing: border-box;
    font-family: inherit;
}

.fibrain-client-access-field input:focus,
.fibrain-client-register-form input:focus,
.fibrain-client-register-form select:focus,
.fibrain-client-register-form textarea:focus {
    border-color: #d4aa45;
    box-shadow: 0 0 0 3px rgba(212, 170, 69, 0.18);
    outline: 0;
}

.fibrain-client-login-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
}

.fibrain-client-login-actions > span:empty {
    display: none;
}

.fibrain-client-login-captcha {
    margin-top: 4px;
    padding: 12px;
    border: 1px solid #d5e1eb;
    border-radius: 9px;
    background: #f4f8fb;
}

.fibrain-client-login-captcha > label {
    display: block;
    margin-bottom: 7px;
    color: #10233f;
    font-size: 12px;
    font-weight: 700;
}

.fibrain-client-login-captcha-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.fibrain-client-login-captcha-row img {
    display: block;
    width: 112px;
    height: 40px;
    border: 0;
    object-fit: contain;
}

body.fibrain-client-login #clientLogin .fibrain-client-login-captcha-row input {
    width: 100% !important;
    height: 40px;
    margin: 0 !important;
    padding: 8px 11px !important;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #edf3f8;
    color: #10233f;
    box-shadow: none;
    box-sizing: border-box;
}

body.fibrain-client-login #clientLogin .fibrain-client-login-captcha-row input:focus {
    border-color: #d4aa45;
    box-shadow: 0 0 0 3px rgba(212, 170, 69, 0.18);
    outline: 0;
}

.fibrain-client-login-captcha small,
.fibrain-client-login-captcha-error {
    display: block;
    margin-top: 6px;
    color: #6c7f99;
    font-size: 11px;
    line-height: 16px;
}

.fibrain-client-login-captcha-error {
    color: #b22f2f;
    font-weight: 650;
}

.fibrain-client-login-actions > a,
.fibrain-client-access-secondary a {
    color: #167fc7;
    font-weight: 650;
}

.fibrain-client-primary-button,
body.fibrain-client-access input.fibrain-client-primary-button {
    display: inline-flex;
    width: auto;
    min-width: 138px;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid #0b4e7c;
    border-radius: 8px;
    background: #167fc7;
    box-shadow: 0 8px 18px rgba(11, 78, 124, 0.2);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-shadow: none;
    box-sizing: border-box;
    cursor: pointer;
}

.fibrain-client-primary-button:hover,
body.fibrain-client-access input.fibrain-client-primary-button:hover {
    border-color: #061d35;
    background: #0b4e7c;
    color: #fff;
}

.fibrain-client-access-external {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #d9e4ed;
}

.fibrain-client-access-secondary {
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid #d9e4ed;
    border-radius: 10px;
    background: #f7fafc;
    color: #52677a;
    font-size: 13px;
    line-height: 20px;
}

.fibrain-client-access-secondary p {
    margin: 0;
}

.fibrain-client-access-secondary p + p,
.fibrain-client-access-secondary small + p {
    margin-top: 10px;
}

.fibrain-client-access-secondary small {
    display: block;
    margin-top: 5px;
    color: #6c7f99;
}

.fibrain-client-access-footer {
    margin-top: auto;
    padding: 16px 28px;
    border-top: 1px solid #d9e4ed;
    background: #f7f9fb;
    color: #7b8da4;
    font-size: 11px;
    line-height: 17px;
    text-align: center;
}

/* Customer password recovery flow. */
body.fibrain-client-pwreset .fibrain-client-login-card {
    min-height: 540px;
}

body.fibrain-client-pwreset .fibrain-client-access-panel-inner {
    max-width: 550px;
}

.fibrain-client-reset-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
    text-align: center;
}

.fibrain-client-reset-actions > a:not(.fibrain-client-primary-button) {
    color: #167fc7;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.fibrain-client-reset-actions > a:not(.fibrain-client-primary-button):hover {
    color: #0b4e7c;
    text-decoration: underline;
}

.fibrain-client-reset-confirmation {
    text-align: center;
}

.fibrain-client-reset-status-icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    margin: 18px auto 2px;
    border: 1px solid #b9d9ea;
    border-radius: 50%;
    background: #eef7fc;
    color: #167fc7;
    font-size: 21px;
}

.fibrain-client-reset-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 13px 15px;
    border: 1px solid #d9e4ed;
    border-radius: 9px;
    background: #f7fafc;
    color: #52677a;
    font-size: 12px;
    line-height: 19px;
}

.fibrain-client-reset-notice i {
    margin-top: 2px;
    color: #167fc7;
}

.fibrain-client-reset-preserved-fields {
    display: none !important;
}

.fibrain-client-reset-password-form > label {
    display: block;
    margin: 0 0 6px;
    color: #10233f;
    font-size: 13px;
    font-weight: 700;
}

.fibrain-client-field-error {
    display: block;
    margin-top: 5px;
    color: #b22f2f;
    font-size: 11px;
    font-weight: 650;
    line-height: 16px;
}

/* Client-side loading state used by password recovery and other forms. */
body #overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 20, 40, 0.64);
    opacity: 1 !important;
    backdrop-filter: blur(2px);
    z-index: 4000;
}

body #loading {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    width: min(340px, calc(100vw - 36px));
    height: auto;
    min-height: 0;
    padding: 28px 26px 26px;
    border: 1px solid #b9ccdc;
    border-top: 4px solid #269bd8;
    border-radius: 14px;
    background: #fff;
    color: #10233f;
    box-shadow: 0 24px 70px rgba(2, 16, 34, 0.4);
    text-align: center;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    z-index: 5000;
}

body #loading::before {
    content: "";
    display: block;
    width: 34px;
    height: 34px;
    margin: 0 auto 16px;
    border: 3px solid #dceaf3;
    border-top-color: #167fc7;
    border-radius: 50%;
    animation: fibrain-client-loading-spin 0.75s linear infinite;
}

body #loading h4 {
    margin: 0;
    padding: 0;
    color: #10233f;
    font-size: 17px;
    line-height: 24px;
}

body #loading p {
    margin: 6px 0 0;
    color: #667b91;
    font-size: 12px;
    line-height: 18px;
}

@keyframes fibrain-client-loading-spin {
    to { transform: rotate(360deg); }
}

.fibrain-client-register-notice {
    display: flex;
    gap: 4px;
    margin: 20px 0;
    padding: 13px 15px;
    border: 1px solid #ead59b;
    border-radius: 9px;
    background: #fffaf0;
    color: #52677a;
    font-size: 12px;
    line-height: 19px;
    flex-direction: column;
}

.fibrain-client-register-notice strong {
    color: #805f16;
}

.fibrain-client-register-form,
.fibrain-client-register-table {
    width: 100%;
}

.fibrain-client-register-card .fibrain-client-access-panel-inner {
    max-width: none;
    padding-left: 34px;
    padding-right: 34px;
}

.fibrain-client-register-table {
    border-collapse: separate;
    border-spacing: 0;
}

.fibrain-client-register-form table td {
    padding: 6px 7px;
    color: #334b65;
    font-size: 13px;
    vertical-align: middle;
}

.fibrain-client-register-form table td:first-child {
    width: 145px;
    color: #10233f;
    font-weight: 650;
}

.fibrain-client-register-form input[type="text"],
.fibrain-client-register-form input[type="email"],
.fibrain-client-register-form input[type="password"],
.fibrain-client-register-form input[type="tel"],
.fibrain-client-register-form select,
.fibrain-client-register-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #f1f5f9;
    color: #10233f;
    box-shadow: none;
    box-sizing: border-box;
}

.fibrain-client-register-form input[type="text"],
.fibrain-client-register-form input[type="email"],
.fibrain-client-register-form input[type="tel"],
.fibrain-client-register-form textarea {
    width: 100%;
}

.fibrain-client-register-form input[size="5"],
.fibrain-client-register-form input[size="6"] {
    width: 76px;
}

.fibrain-client-register-form h3 {
    margin: 6px 0 2px;
    color: #10233f;
    font-size: 17px;
}

.fibrain-client-register-form .error {
    display: inline-block;
    margin-top: 4px;
    color: #a72d35;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
}

.fibrain-client-register-form div.error {
    display: block;
}

.fibrain-client-register-form hr {
    height: 0;
    margin: 14px 0 10px;
    border: 0;
    border-top: 1px solid #d9e4ed;
}

.fibrain-client-register-form .fibrain-client-register-captcha-row > td {
    width: auto !important;
    padding: 16px 0 2px !important;
}

.fibrain-client-register-captcha {
    max-width: 460px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid #c9ddeb;
    border-radius: 10px;
    background: #eef5fa;
    box-sizing: border-box;
}

.fibrain-client-register-captcha > label {
    display: block;
    margin: 0 0 9px;
    color: #10233f;
    font-size: 13px;
    font-weight: 700;
}

.fibrain-client-register-captcha-fields {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.fibrain-client-register-captcha-fields img {
    display: block;
    width: 128px;
    height: 40px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    object-fit: contain;
}

.fibrain-client-register-form .fibrain-client-register-captcha-fields input {
    width: 100% !important;
    margin: 0 !important;
}

.fibrain-client-register-captcha small {
    display: block;
    margin-top: 7px;
    color: #667b91;
    font-size: 11px;
    line-height: 16px;
}

body.fibrain-client-registration-result-page #content {
    padding: 34px 30px 52px;
}

.fibrain-client-registration-result {
    max-width: 900px;
    margin: 0 auto;
}

.fibrain-client-registration-result-title {
    margin: 0 0 20px;
    color: #10233f;
    font-size: 22px;
    line-height: 30px;
}

.fibrain-client-registration-result-content {
    color: #52677a;
    line-height: 1.6;
}

/* The page body is stored in the database and can retain obsolete inline
 * button styles. Activation addresses must remain readable as plain links. */
body.fibrain-client-registration-result-page
    .fibrain-client-registration-result-content a[href^="mailto:"] {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #167fc7 !important;
    font: inherit !important;
    font-weight: 700 !important;
    line-height: inherit !important;
    text-decoration: underline !important;
}

body.fibrain-client-registration-result-page
    .fibrain-client-registration-result-content a[href^="mailto:"] * {
    background: transparent !important;
    color: inherit !important;
}

.fibrain-client-register-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid #d7e2ec;
}

body.fibrain-client-register input.fibrain-client-primary-button {
    min-width: 152px;
    color: #ffffff !important;
}

body.fibrain-client-register input.fibrain-client-primary-button:hover,
body.fibrain-client-register input.fibrain-client-primary-button:focus {
    color: #ffffff !important;
}

body.fibrain-client-register input.fibrain-client-secondary-button {
    min-width: 106px;
}

body.fibrain-client-access input.fibrain-client-secondary-button {
    width: auto;
    min-width: 104px;
    height: 42px;
    padding: 10px 18px;
    border: 1px solid #c7d8e6;
    border-radius: 8px;
    background: #fff;
    color: #334b65;
    font-family: inherit;
    font-weight: 650;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}

body.fibrain-client-access input.fibrain-client-secondary-button:hover {
    border-color: #8da8bd;
    background: #eef4f8;
    color: #10233f;
}

@media (max-width: 900px) {
    body.fibrain-client-access #container,
    body.fibrain-client-login #container {
        width: calc(100% - 20px);
        min-height: 0;
        margin-top: 20px;
        display: block;
    }

    .fibrain-client-access-card,
    .fibrain-client-login-card {
        grid-template-columns: 1fr;
    }

    .fibrain-client-access-brand {
        min-height: 300px;
        padding: 28px;
        border-right: 0;
        border-bottom: 4px solid #d4aa45;
    }

    .fibrain-client-access-brand-copy {
        margin-top: 34px;
    }

    .fibrain-client-access-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 32px;
        padding-top: 0;
    }
}

@media (max-width: 620px) {
    body.fibrain-client-access #container,
    body.fibrain-client-login #container {
        width: calc(100% - 12px);
        margin-top: 8px;
    }

    .fibrain-client-access-card {
        border-radius: 14px;
    }

    .fibrain-client-access-brand {
        min-height: 0;
        padding: 22px 20px;
    }

    .fibrain-client-access-logos img {
        height: 26px;
    }

    .fibrain-client-access-brand-copy {
        margin-top: 28px;
    }

    .fibrain-client-access-brand-copy h1 {
        font-size: 29px;
        line-height: 35px;
    }

    .fibrain-client-access-features {
        display: none;
    }

    .fibrain-client-access-panel-inner {
        padding: 30px 20px 24px;
    }

    .fibrain-client-access-heading h2 {
        font-size: 25px;
        line-height: 32px;
    }

    .fibrain-client-login-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .fibrain-client-reset-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fibrain-client-login-captcha-row {
        grid-template-columns: 1fr;
    }

    .fibrain-client-primary-button,
    body.fibrain-client-access input.fibrain-client-primary-button {
        width: 100%;
    }

    .fibrain-client-register-form table,
    .fibrain-client-register-form tbody,
    .fibrain-client-register-form tr,
    .fibrain-client-register-form td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .fibrain-client-register-form table td:first-child {
        padding-bottom: 2px;
    }

    .fibrain-client-register-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fibrain-client-register-captcha-fields {
        grid-template-columns: 1fr;
    }

    .fibrain-client-register-captcha-fields img {
        margin: 0 auto;
    }

    body.fibrain-client-registration-result-page #content {
        padding: 20px 14px 34px;
    }

    body.fibrain-client-access input.fibrain-client-secondary-button {
        width: 100%;
    }
}
