/*
 | ShowData Entry – Results design
 |
 | Brings the entry pages in line with the ShowData Results portal: black
 | header bar with the white Riesenbeck logo, white rounded content card on a
 | light grey page, dark fir green as primary colour, pill buttons and inputs,
 | light zebra rows, Public Sans.
 |
 | Loaded after style.css and only overrides the look – every class, id and
 | data attribute the scripts rely on stays as it is.
 */

/* ---- Fonts (self hosted, same files as Results) ---- */
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-200-normal.woff2') format('woff2'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-300-normal.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-600-normal.woff2') format('woff2'); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-800-normal.woff2') format('woff2'); font-weight: 800 900; font-style: normal; font-display: swap; }

/* ---- Design tokens (Results: resources/css/app.css) ---- */
:root {
    --sd-primary: #004139;
    --sd-primary-dark: #00302a;
    --sd-primary-soft: rgba(0, 65, 57, 0.1);
    --sd-accent: #bc1c3d;
    --sd-accent-soft: rgba(188, 28, 61, 0.08);
    --sd-live: #f8203e;

    --sd-page: #ededed;
    --sd-surface: #ffffff;
    --sd-surface-alt: #f8f8f8;
    --sd-muted: #ececec;
    --sd-band: #e3e3e3;
    --sd-panel-dark: #333333;

    --sd-ink: #000000;
    --sd-ink-soft: #707070;
    --sd-ink-faint: #a6a6a6;
    --sd-line: rgba(0, 0, 0, 0.1);
    --sd-line-soft: rgba(0, 0, 0, 0.05);

    --sd-done: #22a05a;
    --sd-running: #f5c518;

    --sd-radius-card: 20px;
    --sd-radius-tab: 16px;
    --sd-radius-box: 12px;
}

/* ---- Base ---- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif !important;
    color: var(--sd-ink) !important;
    background: var(--sd-page);
}

h1, h2, h3, h4, h5, h6, p, li, a { color: var(--sd-ink); }

input[type=checkbox], input[type=radio] { accent-color: var(--sd-primary); }

.spinner-border { color: var(--sd-primary); }
.main-content > .heading { color: var(--sd-ink-soft); font-weight: 300; padding: 40px 0; }

/* ---- Page frame ---- */
body:not(.loggedin-wrap) .wrapper {
    max-width: 1460px;
    min-height: 0;
    margin: 0 auto;
}

body:not(.loggedin-wrap) .main-content.container,
header .header.container { max-width: none; }

@media (min-width: 576px) {
    body:not(.loggedin-wrap) .wrapper { padding: 40px 16px; }
}

/* Black header bar (class links, start request) */
header .header.container {
    width: auto;
    margin: 0;
    background: var(--sd-ink);
    padding: 15px 10px !important;
}

@media (min-width: 576px) {
    header .header.container { padding: 22px 50px 26px !important; }
    body:not(.loggedin-wrap) header .header.container { border-radius: var(--sd-radius-card) var(--sd-radius-card) 0 0; }
}

.header-left figure { margin: 0; }

.header-left img {
    height: 56px;
    width: auto;
    max-width: 100%;
}

.header-right h1,
.header-show h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 200;
    line-height: 1.25;
}

.header .custom-menu-box { vertical-align: middle; }

.header .toggle-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    padding: 0;
}

.header .toggle-btn:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

@media (max-width: 767px) {
    .header-left img { height: 40px; }
    .header-right h1 { font-size: 18px; margin-top: 12px; }
}

/* White content card */
.main-content {
    background: var(--sd-surface);
    margin-top: 0;
    padding: 12px 10px 10px;
}

@media (min-width: 576px) {
    .main-content { padding: 40px 50px 32px; }
    body:not(.loggedin-wrap) .main-content { border-radius: 0 0 var(--sd-radius-card) var(--sd-radius-card); }
    body:not(.loggedin-wrap) header:empty + main .main-content { border-radius: var(--sd-radius-card); }
}

/* Logged-in area: black sidebar left, card right */
.loggedin-wrap { background: var(--sd-page); }

@media (min-width: 768px) {
    .loggedin-wrap main { padding: 40px 32px; min-width: 0; }
    .loggedin-wrap .main-content { border-radius: var(--sd-radius-card); }
}

@media (max-width: 767px) {
    .loggedin-wrap main { padding: 0; }
}

header > .sidelayout,
#sidebar { background: var(--sd-ink); }

#sidebar .logo { padding: 30px 30px 26px; }

#sidebar .logo img {
    width: auto;
    height: 44px;
    max-width: 100%;
}

#sidebar ul li a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s, color 0.2s;
}

#sidebar ul li a > span { color: inherit; }

#sidebar ul li a:hover,
#sidebar ul li a:focus { color: #ffffff; background: rgba(255, 255, 255, 0.06); }

#sidebar ul li.active > a { background: var(--sd-primary); color: #ffffff; }

#sidebar ul.components .list-group { border-radius: 0; }

#sidebar ul.components .list-group .list-group-item {
    padding: 0;
    border: 0;
}

#sidebar ul.components .list-group .list-group-item a {
    padding: 9px 30px 9px 58px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.side-footer {
    background: var(--sd-ink);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

.side-footer .btn { color: #ffffff; }
.side-footer .btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }

.main-content .header-show {
    background: var(--sd-ink);
    border-radius: var(--sd-radius-box);
    padding: 10px;
}

/* ---- Headings ---- */
.main-content h4 { font-size: 22px; font-weight: 600; }

/* Section label – Results "tour" row: green bar + green title */
h3.large-title,
h3.title,
.main-content h2.border-bottom,
.main-content h4.border-bottom {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 32px 0 20px;
    padding: 0 0 12px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--sd-primary);
    border-bottom: 1px solid var(--sd-line) !important;
}

h3.large-title::before,
h3.title::before,
.main-content h2.border-bottom::before,
.main-content h4.border-bottom::before {
    content: "";
    flex-shrink: 0;
    width: 5px;
    height: 28px;
    background: var(--sd-primary);
}

.main-content h2.border-bottom { margin-top: 8px; }

#info h6 { font-size: 14px; font-weight: 600; color: var(--sd-ink-soft); }
#info a { color: var(--sd-primary); }

/* Page title bar (Riders, Invoices, Data, Change Password) – Results search head */
.overview-heading { margin-bottom: 24px; }

.overview-heading h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sd-primary);
    color: #ffffff;
    border-radius: var(--sd-radius-box);
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 600;
}

.overview-heading h1 i { color: #ffffff; }

.overview-heading:has(+ .table) { margin-bottom: 0; }
.overview-heading:has(+ .table) h1 { border-radius: var(--sd-radius-box) var(--sd-radius-box) 0 0; }

span.sub-title { color: var(--sd-ink-soft); font-weight: 300; }

/* ---- Rider switcher / dropdowns ---- */
.btn-secondary,
.btn-secondary:focus {
    background: var(--sd-panel-dark);
    border-color: var(--sd-panel-dark);
    color: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:active,
.show > .btn-secondary.dropdown-toggle {
    background: var(--sd-ink);
    border-color: var(--sd-ink);
    color: #ffffff;
}

.dropdown-menu { border: 0; border-radius: var(--sd-radius-box); padding: 6px; }
.dropdown-menu-dark { background: var(--sd-panel-dark); }
.dropdown-item { border-radius: 8px; padding: 8px 14px; }
.dropdown-menu-dark .dropdown-item { color: #ffffff; }
.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus,
.dropdown-menu-dark .dropdown-item.active { background: var(--sd-primary); color: #ffffff; }

/* ---- Tabs: one continuous strip, Results competition nav ---- */
.main-content .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    border: 0;
    margin-top: 8px;
}

.main-content .nav-tabs::-webkit-scrollbar { display: none; }

.main-content .nav-tabs .nav-item { flex: 1 0 auto; }

.main-content .nav-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--sd-muted);
    color: var(--sd-ink);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.main-content .nav-tabs .nav-item:first-child .nav-link { border-top-left-radius: var(--sd-radius-tab); }
.main-content .nav-tabs .nav-item:last-child .nav-link { border-top-right-radius: var(--sd-radius-tab); }

.main-content .nav-tabs .nav-link:hover,
.main-content .nav-tabs .nav-link:focus {
    background: var(--sd-band);
    color: var(--sd-ink);
    border: 0;
}

.main-content .nav-tabs .nav-link.active {
    background: var(--sd-primary);
    color: #ffffff;
    border: 0;
}

@media (min-width: 768px) {
    .main-content .nav-tabs .nav-link { padding: 10px 20px; }
}

@media (max-width: 767px) {
    .main-content .nav-tabs .nav-link { flex-direction: column; font-size: 13px; gap: 2px; }
}

.tab-content > .tab-pane { padding-top: 20px; }

/* ---- Lists / tables ---- */
.content-table,
.content-table.main-screen {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.table {
    color: var(--sd-ink);
    border-color: var(--sd-line-soft);
    --bs-table-striped-bg: var(--sd-surface-alt);
    --bs-table-hover-bg: var(--sd-surface-alt);
}

.table > :not(:first-child) { border-top: 0; }
.table > :not(:last-child) > :last-child > * { border-bottom-color: var(--sd-line); }

.content-table table.table { border: 0; }

.content-table thead th,
.table > thead > tr > th {
    background: transparent;
    color: var(--sd-ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.content-table tr:nth-child(even) { background: var(--sd-surface-alt); }

.content-table tr td,
.content-table tr td:first-child,
.content-table tr td:nth-child(2) { font-size: 15px; }

.content-table tr td:first-child { font-weight: 600; }

.content-table tr td,
.table-striped > :not(caption) > * > * { border-bottom-color: var(--sd-line-soft); }

.btn-manage-entry { white-space: nowrap; }

/* Date bar above the classes of a day – Results day bar */
.content-table tr.group-head { background: var(--sd-primary); color: #ffffff; }

.content-table tr.group-head td {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .content-table table.table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .content-table thead th { padding: 10px 20px; white-space: nowrap; }
    .content-table tr td { padding: 14px 20px; }

    .content-table tr.group-head { background: transparent; }

    /* Transparent top border = gap between days; the elliptic radius keeps
       the visible (padding-box) corner at 12px despite the 24px border. */
    .content-table tr.group-head td {
        background: var(--sd-primary) padding-box;
        border-top: 24px solid transparent;
        border-bottom: 0;
        border-radius: 12px 12px 0 0 / 36px 36px 0 0;
        padding: 10px 20px;
        font-size: 18px;
    }

    .content-table tbody tr.group-head:first-child td {
        border-top-width: 0;
        border-radius: 12px 12px 0 0;
    }
}

.table-striped > tbody > tr:nth-of-type(odd) { --bs-table-accent-bg: transparent; }
.table-striped > tbody > tr:nth-of-type(even) { --bs-table-accent-bg: var(--sd-surface-alt); }

.table-striped > :not(caption) > * > * {
    padding: 12px 16px;
    border-bottom-color: var(--sd-line-soft);
    vertical-align: middle;
}

td.class_name strong { font-size: 16px; font-weight: 600; }

.entry-until { font-size: 13px; font-weight: 300; color: var(--sd-ink-soft); }
.entry-until .timer { font-weight: 600; color: var(--sd-accent); }
.entry-note { font-size: 13px; color: var(--sd-ink-soft); }

/* Horse chips on a class */
td.class_name span.ow-horse-name {
    background: var(--sd-muted);
    color: var(--sd-ink);
    border-radius: 999px;
    padding: 3px 12px;
    margin: 4px 4px 0 0;
    font-size: 12px;
}

td.class_name span.ow-horse-name.starting {
    background: var(--sd-primary);
    color: #ffffff;
    font-weight: 600;
}

td.class_name span.ow-horse-name.starting_requested {
    background: var(--sd-band);
    color: var(--sd-ink-soft);
}

td.class_name span.ow-horse-name.notstarting_requested {
    background: var(--sd-accent-soft);
    color: var(--sd-accent);
    font-weight: 600;
}

.status-online,
.status-del-requested,
.status-start-requested {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

.status-online { background: var(--sd-primary); }
.status-del-requested,
.status-start-requested { background: var(--sd-ink-soft); }

.errormsg { color: var(--sd-accent); font-size: 13px; }
div.mb-3.errormsg { font-size: 15px; font-weight: 600; }

/* ---- Buttons: pills ---- */
.btn {
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 18px;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.btn:focus,
.btn:active:focus { box-shadow: 0 0 0 3px var(--sd-primary-soft) !important; }

.btn-sm { font-size: 12px; padding: 4px 12px; }
.btn-lg { font-size: 16px; padding: 12px 32px; }

.btn.btn-green,
.btn.btn-startlist,
.btn-success,
.btn-primary,
.btn-success:focus,
.btn-primary:focus {
    background: var(--sd-primary);
    border: 1px solid var(--sd-primary);
    color: #ffffff;
    border-radius: 999px;
    font-weight: 600;
}

.btn.btn-green:hover,
.btn.btn-startlist:hover,
.btn-success:hover,
.btn-success:active,
.btn-primary:hover,
.btn-primary:active {
    background: var(--sd-primary-dark) !important;
    border: 1px solid var(--sd-primary-dark) !important;
    color: #ffffff;
}

.btn.btn-red,
.btn.btn-red:focus {
    background: var(--sd-live);
    border: 1px solid var(--sd-live);
    color: #ffffff;
    border-radius: 999px;
    font-weight: 600;
}

.btn.btn-red:hover { background: #d81733; border-color: #d81733; color: #ffffff; }

.btn-danger,
.btn-danger:focus {
    background: var(--sd-accent);
    border-color: var(--sd-accent);
    color: #ffffff;
}

.btn-danger:hover,
.btn-danger:active { background: #a3172f; border-color: #a3172f; color: #ffffff; }

/* Outline pill – Results "outline" button */
.btn.btn-resultlist,
.btn.btn-gray.clear,
.btn-warning,
.btn-warning:focus,
.guest-form button.btn.btn-primary.el-switch-btn {
    background: transparent;
    border: 1px solid var(--sd-ink);
    color: var(--sd-ink) !important;
    border-radius: 999px;
    font-weight: 600;
}

.btn.btn-resultlist:hover,
.btn.btn-gray.clear:hover,
.btn-warning:hover,
.btn-warning:active,
.guest-form button.btn.btn-primary.el-switch-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid var(--sd-ink) !important;
    color: var(--sd-ink) !important;
}

.btn.btn-gray {
    background: var(--sd-panel-dark);
    border-color: var(--sd-panel-dark);
    border-radius: 999px;
}

.btn.btn-gray:hover { background: var(--sd-ink); border-color: var(--sd-ink); }

.btn.btn-yellow { background: var(--sd-running); border-color: var(--sd-running); border-radius: 999px; }
.btn.btn-yellow:hover { background: #e2b300; border-color: #e2b300; }

/* Slot counter in the horse modal */
td.modal-top .btn.btn-green {
    background: var(--sd-primary-soft);
    border: 0;
    color: var(--sd-primary);
    font-weight: 700;
    padding: 2px 10px;
}

/* ---- Forms ---- */
.web-form-body,
.form-body {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}

.web-form-body form { background: transparent; padding: 0; }

.spacer-top-bottem { padding: 8px 0 16px; }
.spacer-bottem { padding-bottom: 16px; }
.web-form-button { padding: 8px 0 0; }

.col-form-label,
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--sd-ink);
}

.form-control,
.custom-input input.form-control,
.guest-form input.form-control {
    min-height: 44px;
    border: 1px solid var(--sd-line) !important;
    border-radius: 999px;
    background-color: var(--sd-surface-alt);
    padding: 10px 20px;
    font-size: 16px;
    color: var(--sd-ink);
}

.form-control:focus,
.custom-input input.form-control:focus,
.guest-form input.form-control:focus {
    background-color: var(--sd-surface);
    border-color: var(--sd-primary) !important;
    box-shadow: 0 0 0 3px var(--sd-primary-soft);
    color: var(--sd-ink);
    outline: 0;
}

input.form-control.read_only,
.custom-input input.form-control.read_only {
    background-color: var(--sd-muted);
    color: var(--sd-ink-soft);
}

.was-validated .custom-input input.form-control:invalid,
.custom-input input.form-control.is-invalid,
.was-validated .form-control:invalid,
.form-control.is-invalid { border-color: var(--sd-accent) !important; }

.was-validated .custom-input input.form-control:valid,
.was-validated .form-control:valid { border-color: var(--sd-done) !important; }

.was-validated .maneg-icon .form-control:invalid,
.was-validated .maneg-icon .form-control:valid { border-color: var(--sd-line) !important; }

.invalid-feedback { color: var(--sd-accent); padding-left: 20px; }
.valid-feedback { color: var(--sd-done); padding-left: 20px; }

.form-select {
    min-height: 40px;
    border: 1px solid var(--sd-line);
    border-radius: 999px;
    background-color: var(--sd-surface-alt);
    padding: 7px 40px 7px 18px;
    color: var(--sd-ink);
}

.form-select:focus { border-color: var(--sd-primary); box-shadow: 0 0 0 3px var(--sd-primary-soft); }

.modal-table tbody tr td.col-btn .horse_order { min-height: 36px; }

/* Custom checkbox (start request) */
.form-group label:before {
    border: 2px solid var(--sd-primary);
    border-radius: 6px;
    background-color: var(--sd-surface);
    box-shadow: none;
}

.form-group input:checked + label:before { background-color: var(--sd-primary); }
.form-group input:checked + label:after { border-color: #ffffff; }

.fs-7 { font-size: 13px; color: var(--sd-ink-soft); line-height: 20px; }
.fs-7 a { color: var(--sd-primary); }

.sr-form-message { padding: 40px 0; }
.sr-form-message h4 { color: var(--sd-primary); line-height: 1.4; }

/* Select2 country picker */
.select2,
.custom-input .select2 { border-bottom: 0 !important; }

.select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1px solid var(--sd-line) !important;
    border-radius: 999px;
    background-color: var(--sd-surface-alt);
    padding: 0 20px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--sd-primary) !important;
    background-color: var(--sd-surface);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 0;
    color: var(--sd-ink);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 14px;
}

.select2-dropdown {
    border: 1px solid var(--sd-line);
    border-radius: var(--sd-radius-box);
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--sd-line);
    border-radius: 999px;
    padding: 6px 14px;
}

.select2-results__option { color: var(--sd-ink); }

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--sd-primary);
    color: #ffffff;
}

/* ---- Modal ---- */
.modal-content {
    border: 0;
    border-radius: var(--sd-radius-card);
    overflow: hidden;
}

.modal-header {
    background: var(--sd-ink);
    border: 0;
    padding: 18px 30px;
}

.modal-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: 0.8;
}

.modal-header .btn-close:hover { opacity: 1; }

.modal-body { padding: 24px 30px 30px; }

.addition-info {
    font-size: 13px;
    line-height: 20px;
    color: var(--sd-ink-soft);
    padding: 8px 0;
}

.addition-info-main {
    background: var(--sd-primary);
    color: #ffffff;
    border-radius: var(--sd-radius-box);
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

td.modal-top { font-size: 15px; }

.content-table thead.second-head th {
    background: var(--sd-band);
    color: var(--sd-ink);
    font-size: 14px;
}

@media (max-width: 575px) {
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 16px 10px; }
}

@media (max-width: 499px) {
    body .modal-header .btn-close { border: 0; }
}

/* ---- Alerts & toasts ---- */
.alert {
    border: 0;
    border-radius: var(--sd-radius-box);
    padding: 16px 20px;
}

.alert-danger { background: var(--sd-accent-soft); color: var(--sd-accent); }
.alert-danger a { color: var(--sd-accent); font-weight: 600; }
.alert-success { background: var(--sd-primary-soft); color: var(--sd-primary); }

#toast-container > div {
    border-radius: var(--sd-radius-box);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

#toast-container > :hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
#toast-container > .toast { background-color: var(--sd-panel-dark); }
#toast-container > .toast-success { background-color: var(--sd-primary); }
#toast-container > .toast-error { background-color: var(--sd-accent); }
#toast-container > .toast-info { background-color: var(--sd-panel-dark); }

/* ---- Login / forgot / reset password ---- */
.guest-wrap { background-color: var(--sd-page); }

.guest-wrap .main-content,
.main-content:has(> .guest-page) {
    background: transparent;
    padding: 0;
}

.guest-page {
    background: transparent;
    height: auto;
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

.guest-form {
    max-width: 440px;
    background: var(--sd-surface);
    border-radius: var(--sd-radius-card);
    box-shadow: none;
    overflow: hidden;
    padding: 40px;
}

.guest-form .header-left {
    display: block;
    width: auto;
    margin: -40px -40px 32px;
    padding: 28px 24px;
    background: var(--sd-ink);
}

.guest-form .header-left img { height: 48px; margin: 0 auto; }

.guest-form h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--sd-ink);
    text-transform: none;
    margin-bottom: 24px;
}

.guest-form label.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--sd-ink);
}

.guest-form button.btn.btn-primary,
.guest-form a.btn.btn-primary {
    width: 100%;
    margin: 12px auto 0;
    padding: 11px 28px;
    border-radius: 999px;
    box-shadow: none;
    font-size: 15px;
    text-transform: none;
}

.guest-form button.btn.btn-primary:not(.el-switch-btn),
.guest-form a.btn.btn-primary {
    background: var(--sd-primary);
    border: 1px solid var(--sd-primary);
    color: #ffffff;
}

@media (max-width: 575px) {
    .guest-form { padding: 32px 20px; }
    .guest-form .header-left { margin: -32px -20px 28px; }
}

/* ---- Mobile fine-tuning ---- */
@media (max-width: 767px) {
    .header .col-md-6:first-child { position: relative; }
    .header .header-left { width: 100%; }
    .header-left img { margin: 0 auto; }
    .header .custom-menu-box { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: auto; }

    /* Five tabs share the width instead of scrolling off screen */
    .main-content .nav-tabs .nav-item { flex: 1 1 0; min-width: 0; }
    .main-content .nav-tabs .nav-link { padding: 8px 4px; }

    /* Button sits under the class as a pill instead of overflowing the card */
    td.buttn .btn-manage-entry { width: auto; min-width: 160px; }

    /* Icon-above-label buttons in the rider overview */
    .btn.btn-gray.clear.btn-tab,
    .modal-table .btn { border-radius: var(--sd-radius-box); }

    .table .form-control { padding: 8px 14px; }
    .table .form-select { min-width: 76px; padding: 7px 32px 7px 14px; background-position: right 10px center; }
}
