/* ==========================================================================
   Clario — Thomson Reuters approved brand typeface
   Self-hosted web fonts. Place the licensed binaries in css/fonts/clario/
   (create the folder; the font files are not committed to source control).
   Falls back to Segoe UI / system fonts until the licensed files are present,
   so nothing breaks if they are missing.
   ========================================================================== */
@font-face {
    font-family: 'Clario';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/clario/Clario-Light.woff2') format('woff2'),
         url('fonts/clario/Clario-Light.woff') format('woff');
}
@font-face {
    font-family: 'Clario';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/clario/Clario-Regular.woff2') format('woff2'),
         url('fonts/clario/Clario-Regular.woff') format('woff');
}
@font-face {
    font-family: 'Clario';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/clario/Clario-Bold.woff2') format('woff2'),
         url('fonts/clario/Clario-Bold.woff') format('woff');
}
@font-face {
    font-family: 'Clario';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/clario/Clario-Bold.woff2') format('woff2'),
         url('fonts/clario/Clario-Bold.woff') format('woff');
}

:root {
    /* TR Orange — official brand accent (HEX #D64000 / RGB 214,64,0 / PMS 2349C) */
    --brand-orange: #d64000;
    --brand-orange-strong: #b83700;
    --brand-orange-rgb: 214, 64, 0;
    /* Lightened TR Orange for text on the dark hero, where the base brand
       orange cannot reach the WCAG AA contrast minimum. */
    --brand-orange-on-dark: #ff6a2b;

    /* TR Graphite — official brand dark neutral (HEX #212223 / RGB 33,34,35 / PMS Black 3C) */
    --tr-graphite: #212223;
    --tr-graphite-hover: #34373a;

    /* TR brand typeface (Clario) with graceful system fallbacks */
    --font-family-base: 'Clario', 'Segoe UI', 'Segoe UI Web', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --sidebar-bg: var(--tr-graphite);
    --sidebar-bg-hover: var(--tr-graphite-hover);
    --sidebar-bg-active: var(--tr-graphite-hover);
    --sidebar-text: #d4d4d4;
    --sidebar-text-active: #ffffff;
    --sidebar-divider: rgba(255, 255, 255, .1);
    --sidebar-icon-active: #f85c1a;

    --topbar-bg: #ffffff;
    --content-bg: #f4f4f4;
    --border-color: #e5e5e5;

    --text-dark: var(--tr-graphite);
    --text-muted: #6b6b6b;

    --card-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, .12);

    --sidebar-width: 260px;
    --sidebar-width-collapsed: 64px;
    --topbar-height: 56px;
}

body {
    padding-top: 0;
    font-family: var(--font-family-base);
}

/* Form controls don't inherit font-family in all browsers */
input,
select,
textarea,
button {
    font-family: var(--font-family-base);
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    overflow: hidden;
    transition: width .2s ease;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--content-bg);
    transition: margin-left .2s ease;
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    min-height: var(--topbar-height);
}

.admin-logo {
    height: 32px;
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
}

.admin-logo-text {
    flex: 1 1 auto;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
}

.admin-sidebar-toggle {
    flex: 0 0 auto;
    background: none;
    border: 0;
    padding: 4px;
    color: var(--sidebar-text);
    cursor: pointer;
    line-height: 0;
}

.admin-sidebar-toggle:hover {
    color: #ffffff;
}

.admin-sidebar-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 18px;
    color: var(--sidebar-text);
    font-size: 15px;
    text-decoration: none;
    border-left: 3px solid transparent;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus {
    background-color: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
}

.admin-nav-link.active {
    background-color: var(--sidebar-bg-active);
    color: var(--sidebar-text-active);
    border-left-color: var(--brand-orange);
}

.admin-nav-link svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.admin-nav-link.active svg {
    fill: var(--sidebar-icon-active);
}

.admin-nav-label {
    flex: 1 1 auto;
    overflow: hidden;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 16px 14px;
    border-top: 1px solid var(--sidebar-divider);
    color: #97a0a6;
    font-size: 11px;
    font-weight: 300;
    white-space: nowrap;
}

.admin-sidebar-footer a {
    color: #97a0a6;
    text-decoration: none;
}

.admin-sidebar-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    height: var(--topbar-height);
    padding: 0 24px;
    background-color: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-username {
    color: var(--text-dark);
    font-size: 15px;
}

.admin-logout {
    display: inline-flex;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    position: relative;
}

.admin-logout:hover {
    color: var(--brand-orange);
}

.admin-logout svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.admin-cookie-banner {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 14px 24px;
    background-color: var(--brand-orange-strong);
    color: #ffffff;
    border: 0;
    border-radius: 0;
}

.admin-cookie-banner .accept-policy {
    flex: 0 0 auto;
    background: none;
    border: 0;
    padding: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    opacity: 1;
    text-shadow: none;
    cursor: pointer;
}

.admin-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 24px 28px 80px;
}

.admin-main--fixed {
    height: 100vh;
    overflow: hidden;
}

.admin-main--fixed .admin-content {
    overflow: hidden;
}

.admin-content .page-title h1 {
    margin: 0 0 20px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

.admin-content .cm-section-heading {
    line-height: 1.2;
    margin-bottom: 0;
}

.admin-content hr {
    margin-top: 10px;
    margin-bottom: 12px;
}

.welcome-card {
    margin-bottom: 36px;
    padding: 24px 28px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-orange);
    border-radius: 6px;
    box-shadow: var(--card-shadow);
}

.welcome-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.welcome-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

.welcome-card .version-message {
    margin-top: 12px;
    font-size: 14px;
}

.quicklinks-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.quicklink-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: box-shadow .15s ease, transform .15s ease;
}

.quicklink-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.quicklink-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.quicklink-icon {
    margin-bottom: 14px;
    color: var(--brand-orange);
    line-height: 0;
}

.quicklink-icon svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
}

.quicklink-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.admin-shell.sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-width-collapsed);
}

.admin-shell.sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-width-collapsed);
}

.admin-shell.sidebar-collapsed .admin-logo-text,
.admin-shell.sidebar-collapsed .admin-sidebar-footer {
    display: none;
}

/* The sidebar ships collapsed, and display:none would strip these labels from
   the accessibility tree - leaving every nav link with no accessible name
   (WCAG 2.4.4 / 4.1.2). Hide them visually but keep them exposed. */
.admin-shell.sidebar-collapsed .admin-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.admin-shell.sidebar-collapsed .admin-sidebar-header {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
}

.admin-shell.sidebar-collapsed .admin-logo {
    height: 28px;
    max-width: 36px;
}

.admin-shell.sidebar-collapsed .admin-nav-link {
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
}

.table-responsive {
    overflow: auto;
    max-height: calc(100vh - 330px);
}

.cm-subscriptions-page .table-responsive {
    max-height: calc(100vh - 265px);
    min-height: 240px;
}

.table-responsive::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: #c4c4c4;
    border-radius: 6px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

.table-responsive::-webkit-scrollbar-track {
    background-color: transparent;
}

.table-responsive .cm-table {
    --bs-table-bg: #fff;
    margin-bottom: 0;
    border: 0;
    background-color: #fff;
}

.table-responsive .cm-table.table-bordered > :not(caption) > * {
    border-width: 0;
}

.table-responsive .cm-table.table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px 0;
    border-color: #ececec;
}

.table-responsive .cm-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #fff !important;
    border-top: 0 !important;
    border-bottom: 2px solid #e2e2e2 !important;
    padding: 14px 16px !important;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.table-responsive .cm-table tbody td {
    padding: 9px 16px !important;
    vertical-align: middle;
    line-height: 1.4;
    color: var(--text-dark);
    white-space: normal;
    overflow-wrap: break-word;
}

.table-responsive .cm-table tbody td.cm-ellipsis,
.table-responsive .cm-table tbody td.cm-nowrap {
    white-space: nowrap;
    overflow-wrap: normal;
}

.table-responsive .cm-table tbody tr:hover > td {
    background-color: #f3f4f6 !important;
}

td.cm-subscription-id {
    font-family: ui-monospace, "Cascadia Code", "Consolas", "Courier New", monospace;
    color: #0f766e !important;
}

.table-responsive .cm-table tbody td.cm-config-value {
    max-width: 320px;
    white-space: normal;
    word-break: break-word;
}

/* Help page */
.help-welcome-card {
    margin-bottom: 36px;
    padding: 36px 28px;
    text-align: center;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-orange);
    border-radius: 6px;
    box-shadow: var(--card-shadow);
}

.help-welcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 50%;
    background-color: rgba(var(--brand-orange-rgb), .12);
    color: var(--brand-orange);
}

.help-welcome-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.help-welcome-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.help-welcome-card p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 15px;
}

.help-section-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.help-faq {
    margin-bottom: 36px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.help-faq .accordion-item {
    margin-bottom: 0;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.help-faq .accordion-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.help-faq .accordion-button {
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    background-color: #ffffff;
    box-shadow: none;
}

.help-faq .accordion-button:not(.collapsed) {
    color: var(--text-dark);
    background-color: #ffffff;
    box-shadow: none;
}

.help-faq .accordion-button:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.help-faq .accordion-button:focus-visible,
.help-faq .accordion-button:hover {
    box-shadow: inset 3px 0 0 #ff6b35;
    background-color: rgba(255, 107, 53, 0.05);
    outline: none;
}

.help-faq .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b6b6b'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
}

.help-faq .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ff6b35'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
}

.help-faq .accordion-body {
    padding: 0 20px 18px;
    color: var(--text-muted);
    font-size: 15px;
}

.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.help-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 26px;
    background-color: #f7f7f7;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

a.help-card:hover {
    background-color: #ffffff;
    border-color: var(--brand-orange);
    box-shadow: var(--card-shadow);
    text-decoration: none;
}

.help-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: rgba(var(--brand-orange-rgb), .16);
    color: var(--brand-orange);
}

.help-card-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.help-card-text h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.help-card-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Underlined and darkened: inside a paragraph this link needs 4.5:1 against the
   card background and a non-colour cue to distinguish it from the body text
   (WCAG 1.4.3 / 1.4.1). --brand-orange only reaches 4.26:1 here. */
.help-card-text a {
    color: var(--brand-orange-strong);
    text-decoration: underline;
}

.help-card-text a:hover {
    text-decoration: underline;
}

/* Logout confirmation modal */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background-color: rgba(0, 0, 0, .4);
}

.logout-modal-overlay[hidden] {
    display: none;
}

.logout-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 28px;
    background-color: #ffffff;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}

.logout-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    padding: 0;
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.logout-modal-close:hover {
    color: var(--text-dark);
}

.logout-modal h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.logout-modal p {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 15px;
}

.logout-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.logout-cancel {
    padding: 8px 18px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
}

.logout-cancel:hover {
    background-color: #f5f5f5;
}

.logout-confirm {
    padding: 8px 18px;
    background-color: var(--brand-orange-strong);
    border: 1px solid var(--brand-orange-strong);
    border-radius: 6px;
    color: #ffffff !important;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.logout-confirm:hover {
    background-color: transparent;
    border-color: var(--brand-orange);
    color: var(--brand-orange) !important;
    text-decoration: none;
}

/* Alert dialog */
.alert-modal {
    text-align: center;
}

.alert-modal-icon {
    margin: 0 auto 16px;
    width: 52px;
    height: 52px;
    color: #cc2200;
}

.alert-modal-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.alert-modal-actions {
    display: flex;
    justify-content: center;
}

.alert-modal-ok {
    padding: 8px 32px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--tr-graphite);
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
}

.alert-modal-ok:hover,
.alert-modal-ok:focus {
    background-color: var(--tr-graphite-hover);
    color: #ffffff;
    outline: none;
}

.confirm-modal-icon { margin: 0 auto 16px; width: 48px; height: 48px; color: #d97706; }
.confirm-modal-icon svg { width: 100%; height: 100%; fill: currentColor; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 12px; }
.confirm-modal-confirm { padding: 8px 18px; font-size: 14px; font-weight: 600; background-color: #cc2200; border: 0; border-radius: 4px; color: #ffffff; cursor: pointer; }
.confirm-modal-confirm:hover, .confirm-modal-confirm:focus { background-color: #a81b00; outline: none; }

/* --------------------------------------------------------------------------
   Child screens: AJAX modals (Activity Log, Edit dialogs, etc.)
   -------------------------------------------------------------------------- */
.modal-content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
    text-align: left;
}

.modal-header {
    align-items: center;
    padding: 18px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-header h4 {
    margin: 0;
}

.modal-header .cm-section-heading {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    border: 0;
}

.modal-body {
    padding: 24px;
}

/* Summary panel (e.g. the Plan / Subscription details strip) */
.modal-body .card-header,
.modal-body > .card {
    margin-bottom: 20px;
    padding: 16px 20px;
    background-color: #f7f7f7;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.modal-body dl.row {
    margin-bottom: 0;
}

.modal-body dl.row dt {
    color: var(--text-muted);
    font-weight: 600;
}

.modal-body dl.row dd {
    margin-bottom: 0;
    color: var(--text-dark);
}

/* Activity Log summary strip */
.activity-log-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 40px;
    margin-bottom: 20px;
    padding: 12px 20px;
    background-color: #f7f8f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.activity-log-summary-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: var(--text-dark);
    margin-right: 8px;
}

.activity-log-summary-sep {
    display: none;
}

.activity-log-time {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 13px;
}

/* Tables inside modals - borderless, themed (matches the list pages) */
.modal-body .cm-table {
    margin-bottom: 0;
    border: 0;
    background-color: #ffffff;
}

.modal-body .cm-table.table-bordered > :not(caption) > * {
    border-width: 0;
}

.modal-body .cm-table.table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px 0;
    border-color: #ececec;
}

.modal-body .cm-table thead th {
    padding: 12px 14px !important;
    background-color: #ffffff !important;
    border-top: 0 !important;
    border-bottom: 2px solid #e2e2e2 !important;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.modal-body .cm-table tbody td {
    padding: 12px 14px !important;
    vertical-align: middle;
    color: var(--text-dark);
    white-space: normal;
    word-break: break-word;
}

.modal-body .cm-table tbody tr:hover > td {
    background-color: #f3f4f6 !important;
}

/* Modal form fields - orange focus to match the rest of the app */
.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
}

/* Primary action button inside modals (e.g. Change Plan) */
.modal-body .cm-button-default {
    margin: 8px 0 0;
    padding: 8px 18px;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--tr-graphite);
    border-color: var(--tr-graphite);
    color: #ffffff !important;
    border-radius: 6px;
}

.modal-body .cm-button-default:hover,
.modal-body .cm-button-default:focus {
    padding: 8px 18px;
    font-size: 14px;
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
    color: #ffffff !important;
}

.filter-box input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-dark);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.filter-box input[type="text"]:hover {
    border-color: var(--brand-orange);
}

.filter-box input[type="text"]:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
    outline: none;
}

.filter-box input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0 4px 0 0;
    border: 1px solid #b9b9b9;
    border-radius: 3px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.filter-box input[type="checkbox"]:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.filter-box input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cm-button {
    background-color: var(--tr-graphite);
    border-color: var(--tr-graphite);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 4px;
    transition: background-color .15s ease, border-color .15s ease;
}

.cm-button:hover,
.cm-button:focus {
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
    color: #fff !important;
}

.cm-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    padding: 0;
    border-radius: 4px;
    font-size: 18px;
    color: var(--text-dark) !important;
    text-decoration: none;
}

.cm-link-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.cm-link-button:hover {
    color: var(--brand-orange) !important;
}

.cm-link-button:focus,
.cm-link-button[aria-expanded="true"] {
    background-color: var(--brand-orange);
    color: #ffffff !important;
}

.cm-dropdown-option:hover,
.cm-dropdown-option:focus,
.cm-dropdown-option:active {
    background-color: var(--brand-orange) !important;
    color: #ffffff !important;
}

.btn.delete {
    background-color: #d81b2a;
    border-color: #d81b2a;
    color: #ffffff;
}

.btn.delete:hover,
.btn.delete:focus {
    background-color: #cf1f2e;
    border-color: #cf1f2e;
    color: #ffffff;
}

#btnAdd,
#btnSave {
    padding: 8px 18px;
    font-size: 14px;
    background-color: var(--tr-graphite);
    border-color: var(--tr-graphite);
    color: #ffffff;
    border-radius: 4px;
}

#btnSave {
    margin-top: 16px;
}

#btnAdd:hover,
#btnSave:hover,
#btnAdd:focus,
#btnSave:focus {
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
    color: #ffffff;
}

#btnAdd:disabled,
#btnAdd[disabled] {
    background-color: #e5e5e5;
    border-color: #e5e5e5;
    color: #575e67;
    cursor: not-allowed;
}

#txtUserEmail {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    min-width: 280px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

#txtUserEmail:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
    outline: none;
}

#txtUserEmail.is-invalid {
    border-color: #dc3545;
}

#txtUserEmail.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .2);
}

.cm-field-error {
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
    min-height: 16px;
}

/* --------------------------------------------------------------------------
   Plans: Edit detail (Parameters / Events tabs)
   -------------------------------------------------------------------------- */
.plan-details {
    text-align: left;
}

.plan-details .card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    overflow: hidden;
}

.plan-details .card-header {
    padding: 18px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.plan-details .card-header dl.row {
    margin: 0;
    align-items: center;
}

.plan-details .card-header dt {
    color: var(--text-muted);
    font-weight: 700;
}

.plan-details .card-header dd {
    margin: 0;
    color: var(--text-dark);
}

/* Back link */
.plan-details .plan-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.plan-details .plan-back-link:hover,
.plan-details .plan-back-link:focus {
    color: var(--brand-orange);
}

/* Tabs */
.plan-details .nav-tabs {
    gap: 6px;
    margin: 0;
    padding: 16px 24px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
}

.plan-details .nav-tabs .nav-link {
    margin-bottom: -1px;
    padding: 9px 22px;
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    background-color: #f5f5f5;
    color: var(--text-muted);
    font-weight: 600;
}

.plan-details .nav-tabs .nav-link:hover {
    border-color: var(--border-color);
    color: var(--brand-orange);
}

.plan-details .nav-tabs .nav-link.active {
    background-color: var(--tr-graphite);
    border-color: var(--tr-graphite);
    color: #ffffff;
}

.plan-details .tab-content {
    padding: 24px;
}

/* Events table column sizing - keep Event Name / Active / Copy To Customer
   compact so the email fields get the room they need */
.plan-details .plan-events-table {
    table-layout: fixed;
}

.plan-details .plan-events-table th:nth-child(1),
.plan-details .plan-events-table td:nth-child(1) {
    width: 150px;
}

.plan-details .plan-events-table th:nth-child(2),
.plan-details .plan-events-table td:nth-child(2) {
    width: 70px;
}

.plan-details .plan-events-table th:nth-child(3),
.plan-details .plan-events-table td:nth-child(3) {
    width: 120px;
}

.plan-details .cm-table {
    margin-bottom: 0;
}

.plan-details .cm-table thead th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--text-dark);
}

/* Themed checkboxes */
.plan-details input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid #b9b9b9;
    border-radius: 3px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.plan-details input[type="checkbox"]:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.plan-details input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Email text fields */
.plan-details .cm-table input[type="text"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-dark);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.plan-details .cm-table input[type="text"]:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
    outline: none;
}

/* Footer action row */
.plan-details .plan-detail-actions {
    margin-top: 20px;
    text-align: right;
}

.plan-details .plan-detail-actions .cm-button-default {
    margin: 0;
    padding: 8px 18px;
    font-size: 14px;
    background-color: var(--tr-graphite);
    border-color: var(--tr-graphite);
    color: #ffffff !important;
    border-radius: 6px;
}

.plan-details .plan-detail-actions .cm-button-default:hover,
.plan-details .plan-detail-actions .cm-button-default:focus {
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
}

/* Empty state */
.plan-details .cm-empty {
    padding: 48px 20px;
    text-align: center;
}

.plan-details .cm-empty-icon {
    font-size: 30px;
    margin-bottom: 12px;
    color: #c9c9c9;
}

.plan-details .cm-empty-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.plan-details .cm-empty-text {
    margin: 0 auto;
    max-width: 460px;
    font-size: 14px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Collapsed sidebar: hover tooltip showing the nav destination
   (rendered on <body> so it isn't clipped by the sidebar's overflow)
   -------------------------------------------------------------------------- */
.admin-nav-tooltip {
    position: fixed;
    transform: translateY(-50%);
    padding: 6px 10px;
    background-color: var(--tr-graphite);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    z-index: 2000;
    pointer-events: none;
}

.admin-nav-tooltip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left: 0;
    border-right-color: var(--tr-graphite);
}

/* --------------------------------------------------------------------------
   Offers: Edit detail (attribute configuration table)
   -------------------------------------------------------------------------- */
.offer-details {
    text-align: left;
}

.offer-details-subtitle {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.offer-details .plan-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.offer-details .plan-back-link:hover,
.offer-details .plan-back-link:focus {
    color: var(--brand-orange);
}

.offer-details .card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.offer-details .card-header {
    padding: 18px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0;
}

.offer-details .card-header dl.row {
    margin: 0;
    align-items: center;
}

.offer-details .card-header dt {
    color: var(--text-muted);
    font-weight: 700;
}

.offer-details .card-header dd {
    margin: 0;
    color: var(--text-dark);
}

/* Hidden row-source tables used by the add/clone JS */
.offer-row-template {
    display: none;
}

/* Attribute table scrolls horizontally; no list-page height cap here */
.offer-details .table-responsive {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
}

.offer-details .offer-attributes-table {
    margin-bottom: 0;
    min-width: 1100px;
}

.offer-details .offer-attributes-table thead th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.offer-details .offer-attributes-table td {
    vertical-align: middle;
}

.offer-details .offer-attributes-table input[type="text"],
.offer-details .offer-attributes-table select {
    width: 100%;
    min-width: 90px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.offer-details .offer-attributes-table input[type="text"]:focus,
.offer-details .offer-attributes-table select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
    outline: none;
}

.offer-details .offer-attributes-table input[type="text"]:disabled {
    background-color: #f1f1f1;
    color: #575e67;
}

/* Themed checkboxes */
.offer-details input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid #b9b9b9;
    border-radius: 3px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.offer-details input[type="checkbox"]:checked {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.offer-details input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Per-row remove button */
.offer-details .btn-remove-row {
    padding: 5px 12px;
    background-color: #d81b2a;
    border: 1px solid #d81b2a;
    color: #ffffff;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}

.offer-details .btn-remove-row:hover,
.offer-details .btn-remove-row:focus {
    background-color: #cf1f2e;
    border-color: #cf1f2e;
}

/* Footer action row */
.offer-details .offer-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.offer-details .offer-detail-actions .cm-button-default,
.offer-details .offer-detail-actions .cm-button-secondary {
    margin: 0;
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

.offer-details .offer-detail-actions .cm-button-default {
    background-color: var(--tr-graphite);
    border: 1px solid var(--tr-graphite);
    color: #ffffff !important;
}

.offer-details .offer-detail-actions .cm-button-default:hover,
.offer-details .offer-detail-actions .cm-button-default:focus {
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
}

.offer-details .offer-detail-actions .cm-button-secondary {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.offer-details .offer-detail-actions .cm-button-secondary:hover,
.offer-details .offer-detail-actions .cm-button-secondary:focus {
    border-color: var(--brand-orange);
    color: var(--brand-orange);
}

/* --------------------------------------------------------------------------
   Application Config: Edit detail
   -------------------------------------------------------------------------- */
.appconfig-details {
    text-align: left;
}

.appconfig-details .plan-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.appconfig-details .plan-back-link:hover,
.appconfig-details .plan-back-link:focus {
    color: var(--brand-orange);
}

.appconfig-details .card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.appconfig-details .card-header {
    padding: 16px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0;
}

.appconfig-details .appconfig-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.appconfig-details .cm-table {
    margin-bottom: 0;
}

.appconfig-details .cm-table thead th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--text-dark);
}

.appconfig-details .cm-table td {
    vertical-align: middle;
}

.appconfig-details .cm-table .form-control {
    font-size: 14px;
}

.appconfig-details .cm-table .form-control:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
}

.appconfig-details .appconfig-actions {
    margin-top: 20px;
    text-align: right;
}

.appconfig-details .appconfig-actions .cm-button-default {
    margin: 0;
    padding: 8px 18px;
    font-size: 14px;
    background-color: var(--tr-graphite);
    border: 1px solid var(--tr-graphite);
    color: #ffffff !important;
    border-radius: 6px;
    cursor: pointer;
}

.appconfig-details .appconfig-actions .cm-button-default:hover,
.appconfig-details .appconfig-actions .cm-button-default:focus {
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
}

/* ==========================================================================
   Customer site additions
   Base component restyles for the existing cm-* markup + the before-login
   sign-in shell. (Shell, cards, tables, help, modals, tooltips are inherited
   verbatim from the admin theme above.)
   ========================================================================== */

/* Section heading (used on Subscriptions / detail pages) */
.cm-section-heading {
    display: inline-block;
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    background: none;
    border: 0;
    text-transform: none;
}

/* Neutral surface panel (empty states, detail blocks) */
.cm-panel-default {
    padding: 24px;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

/* Compact rows in detail panels so buttons stay visible without scrolling */
.cm-panel-default dl.row dt,
.cm-panel-default dl.row dd {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Buttons */
.cm-button-default,
.cm-button-danger,
.cm-button-success,
.cm-button-error {
    display: inline-block;
    margin: 0;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.cm-button-default,
.cm-button-error {
    background-color: var(--tr-graphite);
    border-color: var(--tr-graphite);
    color: #ffffff !important;
}

.cm-button-default:hover,
.cm-button-default:focus,
.cm-button-error:hover,
.cm-button-error:focus {
    background-color: var(--tr-graphite-hover);
    border-color: var(--tr-graphite-hover);
    color: #ffffff !important;
}

.cm-button-danger {
    background-color: #d81b2a;
    border-color: #d81b2a;
    color: #ffffff !important;
}

.cm-button-danger:hover,
.cm-button-danger:focus {
    background-color: #cf1f2e;
    border-color: #cf1f2e;
    color: #ffffff !important;
}

.cm-button-success {
    background-color: #1f7a3d;
    border-color: #1f7a3d;
    color: #ffffff !important;
}

.cm-button-success:hover,
.cm-button-success:focus {
    background-color: #19632f;
    border-color: #19632f;
    color: #ffffff !important;
}

/* Spacing when buttons sit side by side in a right-aligned action row */
.text-end .cm-button-default,
.text-end .cm-button-danger,
.text-end .cm-button-success {
    margin-left: 8px;
}

/* Table head left-aligned to match admin list pages */
.cm-table-head th {
    text-align: left;
}

/* Form fields - orange focus */
.cm-content .form-control:focus,
.cm-panel-default .form-control:focus,
.cm-panel-default input[type="text"]:focus,
.cm-panel-default select:focus,
.w200:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), .2);
    outline: none;
}

/* --------------------------------------------------------------------------
   Before-login: full-page split hero
   -------------------------------------------------------------------------- */
.login-shell {
    min-height: 100vh;
    background-color: #ffffff;
}

.login-hero {
    display: flex;
    min-height: 100vh;
}

/* Left: branded panel */
.login-hero-brand {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    padding: 64px 72px;
    background: linear-gradient(135deg, var(--tr-graphite) 0%, #161718 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.login-hero-brand::after {
    content: "";
    position: absolute;
    right: -140px;
    top: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-orange-rgb), .28), transparent 70%);
}

.login-hero-brand::before {
    content: "";
    position: absolute;
    left: -120px;
    bottom: -160px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-orange-rgb), .12), transparent 70%);
}

.login-hero-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 540px;
}

.login-hero-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.login-hero-logo {
    height: 36px;
    width: auto;
}

.login-hero-name {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    opacity: .92;
}

.login-hero-title {
    margin: 0 0 18px;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.12;
}

.login-hero-title .accent {
    /* --brand-orange is only 2.67:1 against the orange-tinted glow behind this
       heading, below the 3:1 large-text minimum. Lightened for on-dark use. */
    color: var(--brand-orange-on-dark);
}

.login-hero-sub {
    margin: 0 0 32px;
    font-size: 17px;
    line-height: 1.6;
    color: #c4ccd1;
}

.login-hero-points {
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-hero-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
    color: #e6ebee;
}

.login-hero-point-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(var(--brand-orange-rgb), .18);
    color: var(--brand-orange);
}

.login-hero-point-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Right: sign-in panel */
.login-hero-panel {
    flex: 1 1 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background-color: #ffffff;
}

.login-hero-form {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-hero-form h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    color: var(--text-dark);
}

.login-hero-form p {
    margin: 0 0 30px;
    font-size: 15px;
    color: var(--text-muted);
}

.login-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    background-color: var(--brand-orange);
    border: 1px solid var(--brand-orange);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.login-signin-btn:hover,
.login-signin-btn:focus {
    background-color: transparent;
    border-color: var(--brand-orange);
    color: var(--brand-orange) !important;
}

.login-footer {
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .login-hero {
        flex-direction: column;
        min-height: 100vh;
    }

    .login-hero-brand {
        flex: 0 0 auto;
        padding: 48px 32px;
    }

    .login-hero-title {
        font-size: 30px;
    }

    .login-hero-panel {
        flex: 1 1 auto;
        padding: 40px 28px;
    }
}

/* --------------------------------------------------------------------------
   Error page
   -------------------------------------------------------------------------- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 48px 20px;
}

.error-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
    border-radius: 50%;
    background-color: rgba(var(--brand-orange-rgb), .12);
    color: var(--brand-orange);
}

.error-page-icon svg {
    width: 44px;
    height: 44px;
    fill: currentColor;
}

.error-page-code {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-orange);
}

.error-page h1 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 700;
    color: var(--text-dark);
}

.error-page .error-message {
    max-width: 600px;
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    word-break: normal;
    overflow-wrap: anywhere;
}

.error-page .error-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background-color: var(--brand-orange);
    border: 1px solid var(--brand-orange);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.error-page .error-home-btn:hover,
.error-page .error-home-btn:focus {
    background-color: transparent;
    border-color: var(--brand-orange);
    color: var(--brand-orange) !important;
}

.error-page .error-home-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Logout button tooltip */
.admin-logout::after {
    content: "Logout";
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    padding: 5px 10px;
    background-color: var(--tr-graphite);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .12s ease, transform .12s ease;
    pointer-events: none;
    z-index: 1000;
}

.admin-logout:hover::after,
.admin-logout:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
