/* Aspaa equestrian identity: warm limestone, dark tack leather and brushed brass. */
:root {
    --mainColor: #76502f;
    --mainColorLighter: #76502f99;
    --mainColorLighterA: #76502f35;
    --filterMainColor: sepia(55%) saturate(430%) hue-rotate(350deg) brightness(82%);
    --border: 1px solid #e8dece;
    --borderField: 1px solid #d8c9b2;
    --borderRadius: 12px;
    --borderRadiusButton: 10px;
    --eq-ink: #28231d;
    --eq-forest: #263b32;
    --eq-leather: #76502f;
    --eq-brass: #c1a06a;
    --eq-brass-light: #e3cfaa;
    --eq-paper: #fbf8f1;
    --eq-paper-deep: #f2ebdf;
    --eq-muted: #746e63;
    --eq-line: #e8dece;
    --eq-shadow: 0 18px 50px rgba(57, 43, 25, .08), 0 2px 9px rgba(57, 43, 25, .04);
}

html { scroll-behavior: smooth; }
body {
    color: var(--eq-ink);
    background: radial-gradient(ellipse at 8% 8%, rgba(224, 206, 171, .22), transparent 31%),
                linear-gradient(145deg, #fbf9f4 0%, #f5f1e9 58%, #f2eee6 100%);
}

button, input[type=button], input[type=submit], a, .main .small nav li > span {
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--eq-leather); transition: color .22s ease, background-color .22s ease; }
a:hover { color: #a2743e; }
:focus-visible { outline: 3px solid rgba(193, 160, 106, .72); outline-offset: 3px; }

/* A quiet brass crest and a dark riding-saddle header frame the workspace. */
body:has(.main) header {
    color: #f8f3e9;
    background: linear-gradient(105deg, #202e28, #2b4035 58%, #33473b);
    border: 0;
    border-bottom: 1px solid rgba(218, 189, 137, .45);
    box-shadow: 0 8px 28px rgba(31, 38, 32, .16);
    isolation: isolate;
}
body:has(.main) header::before {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d6bc8c 22%, #9f8050 50%, #d6bc8c 78%, transparent);
    opacity: .85;
}
body:has(.main) header::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 4.5%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translateY(-50%);
    opacity: .2;
    background: url("../Icons/EquestrianSeal.svg") center / contain no-repeat;
    pointer-events: none;
}
body:has(.main) header .small { background: rgba(12, 21, 17, .16); border: 0; }
body:has(.main) header .big { gap: 18px; }
body:has(.main) header .big .companyName,
body:has(.main) header .small .compName { color: #f5eddd; }
body:has(.main) header .big .companyName { letter-spacing: .01em; }
body:has(.main) header .big > div { color: #dfc99f !important; }
body:has(.main) header .menuIcon { filter: brightness(0) saturate(100%) invert(87%) sepia(18%) saturate(482%) hue-rotate(354deg) brightness(95%); }
body:has(.main) .notification,
body:has(.main) .notification.hasNotification {
    width: 42px;
    height: 42px;
    background: linear-gradient(145deg, #c6aa78, #9f7d4a);
    box-shadow: 0 5px 15px rgba(11, 19, 14, .3);
}
body:has(.main) .notificationBorder { border-color: rgba(230, 208, 164, .66); box-shadow: none; }
body:has(.main) .notification #_spNotificationNumber { background: #9c4439; }

/* The stable and mobile navigation share the same warm, crafted treatment. */
.main .small {
    background: linear-gradient(180deg, #f9f6ef, #f4efe5 84%, #eee5d5);
    border-color: #e3d7c4;
    box-shadow: 8px 0 26px rgba(49, 39, 25, .055);
    scrollbar-color: #c3aa7d transparent;
}
.main .small .profile {
    margin: 4px 10px 13px;
    padding: 20px 12px 16px;
    border: 1px solid rgba(222, 204, 170, .75);
    border-radius: 18px;
    background: radial-gradient(circle at 50% 0, rgba(220, 193, 142, .24), transparent 56%), #fffdf9;
    box-shadow: 0 9px 24px rgba(67, 48, 25, .065);
}
.main .small .profile img {
    border: 5px solid #e8dcc5;
    background: linear-gradient(145deg, #e8dcc5, #f9f4e9);
    box-shadow: inset 0 0 0 1px #fff;
}
.main .small .fullName { color: var(--eq-forest); margin-top: 8px; }
.main .small nav { border-top: 1px solid #e8dece; padding: 12px 10px 16px; }
.main .small nav ul > li { margin: 3px 0; }
.main .small nav li > :not(.subMenu) {
    border-radius: 10px;
    color: #514a3f;
    padding: 10px 9px;
    transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.main .small nav li > span:not(.active):not(.pin):hover,
.main .small nav li > a:hover {
    color: var(--eq-forest);
    background: rgba(221, 207, 180, .36);
    transform: translateX(-2px);
}
.main .small nav span.active,
.main .small nav li > span.pin {
    color: #fff8ec !important;
    background: linear-gradient(110deg, #76502f, #956b40);
    border-radius: 10px 10px 5px 5px;
    box-shadow: 0 5px 13px rgba(91, 59, 31, .18);
}
.main .small nav ul.subMenu {
    background: rgba(227, 216, 196, .34);
    border-radius: 5px 5px 11px 11px;
}
.main .small nav ul.subMenu li > a { color: #60594f; }
.main .small nav ul.subMenu li > a:hover { color: #654324; background: rgba(255, 255, 255, .68); }
.main .small nav ul.subMenu li::before { background: #b89a68; width: 5px; height: 5px; }
.main .small .contact { background: linear-gradient(105deg, #25382f, #344b3e); color: #f4ead7; }

/* Page canvas, cards, dashboard counts and data entry controls. */
.main .big { position: relative; }
.main .big .module {
    position: relative;
    border: 1px solid rgba(224, 214, 197, .92);
    border-radius: 21px;
    background: rgba(255, 253, 249, .96);
    box-shadow: var(--eq-shadow);
    animation: aspaa-arrive .55s cubic-bezier(.2, .72, .25, 1) both;
}
.main .big .module h4 {
    color: var(--eq-forest);
    border: 0;
    padding: 3px 0 14px;
    margin-bottom: 17px;
    position: relative;
}
.main .big .module h4::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(210px, 45%);
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9ad7b 62%, #856641);
}
.boxItem {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
    margin: 13px 0 20px;
    border: 1px solid #e8dece;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(242, 235, 222, .68), rgba(255, 253, 249, .92) 68%);
    box-shadow: 0 8px 25px rgba(64, 47, 27, .045);
}
.boxItem > b {
    color: var(--eq-forest);
    font-size: 16px;
    margin: 0 0 2px;
    padding: 0 2px 10px;
    border-bottom: 1px solid #e9dfce;
}
.boxItem .item {
    width: auto;
    min-height: 152px;
    margin: 0;
    padding: 17px;
    border: 1px solid rgba(228, 219, 204, .8);
    border-radius: 15px;
    background: linear-gradient(160deg, #fff, #fcfaf6);
    box-shadow: 0 5px 17px rgba(47, 40, 30, .045);
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
    animation: aspaa-arrive .5s both;
}
.boxItem .item:nth-of-type(2) { animation-delay: .04s; }
.boxItem .item:nth-of-type(3) { animation-delay: .08s; }
.boxItem .item:nth-of-type(4) { animation-delay: .12s; }
.boxItem .item:nth-of-type(5) { animation-delay: .16s; }
.boxItem .item:nth-of-type(6) { animation-delay: .2s; }
.boxItem .item:nth-of-type(7) { animation-delay: .24s; }
.boxItem .item:hover {
    transform: translateY(-4px);
    border-color: #d1b987;
    box-shadow: 0 13px 27px rgba(77, 57, 31, .1);
}
.boxItem .item img {
    width: 38px;
    height: 38px;
    padding: 7px;
    margin-bottom: 11px;
    border: 1px solid #eee4d1;
    border-radius: 12px;
    background: linear-gradient(145deg, #f6f0e4, #fffdf9);
    object-fit: contain;
}
.boxItem .item .title { color: #6b6255; line-height: 1.8; }
.boxItem .item > span,
.boxItem .item > label {
    color: var(--eq-forest);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.5;
}
.boxItem .item small { color: #8a806f; }
.boxItem.enterExitHorses .item { min-height: 122px; }
.boxItem .link { margin-right: auto; align-self: center; }

.form fieldset, fieldset, .filter {
    border: 1px solid #e6dac6;
    border-radius: 15px;
    background: #fffdf9;
    box-shadow: 0 5px 18px rgba(57, 43, 25, .035);
}
.form fieldset legend, .form .factor legend { color: var(--eq-leather); padding: 0 9px; }
.form .factor { background: #f7f2e9; border-color: #e2d4bc; border-radius: 13px; }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=time], input[type=file], textarea,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: #d9cab3;
    border-radius: 10px;
    background-color: #fffefa;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input[type=text]:hover, input[type=password]:hover, input[type=number]:hover, input[type=tel]:hover, input[type=time]:hover, textarea:hover {
    border-color: #baa071;
}
input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, input[type=tel]:focus, input[type=time]:focus, textarea:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #a27e4e !important;
    box-shadow: 0 0 0 3px rgba(193, 160, 106, .17);
    background: #fff;
}
.buttons input, .buttons button, .buttons a, .buttonInline a, .inlineButton a, input[type=button], input[type=submit] {
    border: 1px solid rgba(210, 183, 135, .45);
    border-radius: 10px;
    background: linear-gradient(115deg, #725033, #89613b 60%, #735031);
    box-shadow: 0 5px 13px rgba(92, 61, 33, .13);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.buttons input:hover, .buttons button:hover, .buttons a:hover, .buttonInline a:hover, .inlineButton a:hover, input[type=button]:hover, input[type=submit]:hover {
    color: white;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(92, 61, 33, .2);
}
input.cancelBtn { background: linear-gradient(110deg, #93473e, #ad5d4e); }
input.dengerBtn { background: linear-gradient(110deg, #a96b36, #c0894e); }

.main .big table.dataTable,
.main .big table:not(.dataTable, .ui-datepicker-calendar) {
    border-color: #e8dece;
    border-radius: 12px;
}
.dataTables_wrapper, .dt-container { color: #595247; }
table.dataTable thead th, table.dataTable thead td,
.main .big table:not(.dataTable, .ui-datepicker-calendar) th {
    color: #f8f1e4;
    background: linear-gradient(110deg, #304338, #3a5042);
    border-color: rgba(224, 207, 175, .22) !important;
}
table.dataTable tbody tr:nth-child(even), .main .big table:not(.dataTable, .ui-datepicker-calendar) tr:nth-child(even) { background-color: #faf7f0; }
table.dataTable tbody tr:hover, .main .big table:not(.dataTable, .ui-datepicker-calendar) tr:hover { background-color: #f3eddf; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dt-paging .dt-paging-button.current { border-color: #b69a69 !important; background: #eee4d0 !important; }
.result { border-radius: 13px; }
.info .infoText, .infoText, .infoPageText, .modalDialog > div {
    border: 1px solid #e5d8c1;
    border-radius: 15px;
    background: #fffdf8;
    box-shadow: 0 20px 55px rgba(40, 31, 20, .18);
}
footer { background: rgba(255, 253, 248, .85); border-top: 1px solid #e9dfce; }

/* Login and contract pages get a distinct stable-inspired welcome. */
body:has(.login) { min-height: 100vh; background: radial-gradient(ellipse at 10% 5%, #e9ddc7 0, transparent 38%), #f7f3ea; }
.login .image {
    position: relative;
    isolation: isolate;
    background: radial-gradient(ellipse at 69% 42%, rgba(199, 166, 106, .26), transparent 33%),
                linear-gradient(145deg, #1c2c25, #293d32 55%, #34473a) !important;
    border: 1px solid rgba(205, 180, 135, .55);
    box-shadow: 0 28px 70px rgba(38, 47, 38, .2);
}
.login .image::before {
    content: "";
    position: absolute;
    inset: 18px;
    z-index: -1;
    border: 1px solid rgba(219, 193, 147, .48);
    border-radius: 23px;
    background: url("../Icons/EquestrianSeal.svg") 14% 50% / min(43%, 300px) auto no-repeat,
                radial-gradient(ellipse at 73% 83%, rgba(201, 175, 126, .12), transparent 30%);
    mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
}
.login .image img {
    position: relative;
    z-index: 1;
    filter: brightness(0) invert(1);
    opacity: .93;
    animation: aspaa-horse-arrive 1.1s cubic-bezier(.2, .72, .25, 1) both;
}
.login .form {
    border: 1px solid #e8dcc6;
    background: linear-gradient(145deg, #fffefa, #f8f3e9);
    box-shadow: 0 22px 58px rgba(53, 39, 23, .15);
}
.login .form h4 { color: var(--eq-forest); }
.login .form .appName { color: #8c7657; }
.login input[type=text], .login input[type=password] { border-color: #cfc0a8; }
.login input[type=submit] {
    border: 1px solid #92764c;
    background: linear-gradient(110deg, #263b32, #3b5344);
    box-shadow: 0 9px 20px rgba(38, 59, 50, .19);
}
.login .form .loginSignature { border-top: 1px solid #e9dfce; padding-top: 14px; }
.login .form .loginSignature a { color: #685d4d; }

.contract { color: var(--eq-ink); }
.contract header, .contract .contractForm, .contract footer {
    border: 1px solid #e7dcc8;
    border-radius: 20px;
    background: rgba(255, 253, 248, .96);
    box-shadow: var(--eq-shadow);
}
.contract header {
    color: #f6efdf;
    border-color: rgba(214, 188, 140, .62);
    background: linear-gradient(105deg, #21342a, #34483a);
}
.contract .contractForm { padding: clamp(18px, 3vw, 32px); }
.contractForm h4 { color: var(--eq-forest); font-size: 22px !important; }
.Plan {
    border: 1px solid #e5d8c1;
    border-radius: 15px;
    background: linear-gradient(140deg, #fffefa, #f7f1e6);
    box-shadow: 0 7px 20px rgba(56, 42, 25, .065);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.Plan:hover { transform: translateY(-3px); border-color: #c8ad7c; box-shadow: 0 13px 28px rgba(56, 42, 25, .12); }
.cost { background: linear-gradient(140deg, #25382f, #344b3e); box-shadow: 0 8px 20px rgba(38, 59, 50, .15); }
.cost .newPrice {
    color: #e2c58f !important;
    text-shadow: 0 0 20px rgba(226, 197, 143, .18);
    animation: equestrian-price-glow 5s ease-in-out infinite !important;
}
.finalPrice { color: #426850; border-color: #99b59d; }

#_pnlPaymentBack { display: block; width: min(92%, 680px); margin: 12vh auto; padding: clamp(22px, 5vw, 44px); border: 1px solid #e5d8c1; border-radius: 22px; background: #fffdf8; box-shadow: var(--eq-shadow); line-height: 2.2; }
#_pnlPaymentBack h4 { color: var(--eq-forest); }
#_pnlPaymentBack > div { padding: 8px 0; border-bottom: 1px solid #eee5d6; }

@keyframes aspaa-arrive {
    from { opacity: 0; transform: translateY(11px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes aspaa-horse-arrive {
    from { opacity: 0; transform: translateX(18px) scale(.97); }
    to { opacity: .93; transform: translateX(0) scale(1); }
}
@keyframes equestrian-price-glow {
    0%, 100% { transform: scale(1); text-shadow: 0 0 14px rgba(226, 197, 143, .12); }
    50% { transform: scale(1.018); text-shadow: 0 0 24px rgba(226, 197, 143, .32); }
}

@media (min-width: 768px) {
    .boxItem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .boxItem > b, .boxItem > .link { grid-column: 1 / -1; }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .boxItem.enterExitHorses > b { grid-column: 1 / -1; }
    .boxItem.enterExitHorses .item { width: auto; }
}
@media (min-width: 1280px) {
    .boxItem { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    body:has(.main) header::after { left: 20%; width: 43px; height: 43px; }
    body:has(.main) header .big { gap: 8px; }
    .main .big .module { border-radius: 16px; box-shadow: 0 10px 28px rgba(57, 43, 25, .075); }
    .boxItem { padding: 12px; gap: 9px; border-radius: 15px; }
    .boxItem .item { min-height: 138px; padding: 12px; }
    .login .image::before { background-position: 50% 50%; }
    .contract { width: 94%; }
}
@media (max-width: 420px) {
    .boxItem { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .boxItem > b, .boxItem > .link { grid-column: 1 / -1; }
    .boxItem.enterExitHorses { grid-template-columns: 1fr; }
    .boxItem.enterExitHorses > b { grid-column: 1; }
    .boxItem.enterExitHorses .item { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Clearer visual hierarchy pass: use color and spacing instead of nested outlines. */
body:has(.main) {
    background: #eae3d6;
}
body:has(.main) header {
    background: linear-gradient(105deg, #1d2d25, #2b4135 58%, #385043);
    box-shadow: 0 7px 20px rgba(25, 37, 29, .22);
}
.main .small {
    background: linear-gradient(180deg, #293e33, #22352c);
    border: 0;
    box-shadow: 6px 0 22px rgba(20, 31, 24, .16);
    color: #f2ebdd;
}
.main .small .profile {
    border: 0;
    background: linear-gradient(145deg, #3b5545, #2d4438);
    box-shadow: 0 12px 26px rgba(12, 22, 16, .2);
}
.main .small .profile img {
    border: 3px solid #c6a976;
    background: #f0e5cf;
}
.main .small .fullName,
.main .small .profile > span:not(.OperatorImg) { color: #f5ecda; }
.main .small nav { border-top: 1px solid rgba(225, 207, 170, .18); }
.main .small nav li > :not(.subMenu) { color: #e9e2d4; }
.main .small nav li > span:not(.active):not(.pin):hover,
.main .small nav li > a:hover { color: #fff9ec; background: rgba(239, 222, 188, .12); }
.main .small nav span.active,
.main .small nav li > span.pin {
    color: #252f27 !important;
    background: linear-gradient(110deg, #d8bd88, #c7a66e);
    box-shadow: 0 7px 16px rgba(10, 18, 13, .22);
}
.main .small nav li > span.active img,
.main .small nav li > span.pin img { filter: none; }
.main .small nav ul.subMenu { background: rgba(7, 17, 11, .18); }
.main .small nav ul.subMenu li > a { color: #e7decc; }
.main .small nav ul.subMenu li > a:hover { color: #fff8e9; background: rgba(255, 255, 255, .1); }
.main .small nav ul.subMenu li::before { background: #c9ad7a; }
.main .small .contact { background: #1d2e25; }
.main .big { padding-top: 24px; }
.main .big .module {
    border: 0;
    border-radius: 19px;
    background: #f7f1e6;
    box-shadow: 0 10px 26px rgba(71, 53, 30, .09);
    padding: 20px;
    animation: none;
}
.main .big .module h4 {
    color: #263a30;
    font-size: 21px;
    padding-bottom: 9px;
    margin-bottom: 18px;
}
.main .big .module h4::after {
    width: 66px;
    height: 3px;
    border-radius: 4px;
    background: #b7945e;
}
.boxItem {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 17px;
    margin: 0 0 19px;
    border: 0;
    border-radius: 17px;
    background: #ded3c0;
    box-shadow: 0 9px 22px rgba(71, 53, 30, .09);
}
.boxItem > b {
    grid-column: 1 / -1;
    color: #2e4437;
    padding: 0 2px 11px;
    margin-bottom: 1px;
    border: 0;
    border-bottom: 1px solid rgba(102, 79, 47, .16);
    font-size: 15px;
}
.boxItem .item,
.boxItem.enterExitHorses .item {
    position: relative;
    width: auto;
    height: 138px;
    min-height: 0;
    margin: 0;
    padding: 13px 14px;
    overflow: hidden;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(150deg, #f8f3e9, #eee4d2);
    box-shadow: 0 5px 13px rgba(63, 48, 29, .09);
    animation: none;
    transition: transform .22s ease, background-color .22s ease, box-shadow .22s ease;
}
.boxItem .item::before {
    content: "";
    position: absolute;
    right: 14px;
    top: 13px;
    width: 26px;
    height: 3px;
    border-radius: 3px;
    background: #ad8954;
    opacity: .88;
}
.boxItem .item:hover {
    transform: translateY(-3px);
    border: 0;
    background: #fffaf0;
    box-shadow: 0 11px 20px rgba(63, 48, 29, .15);
}
.boxItem .item img {
    width: 28px;
    height: 28px;
    padding: 5px;
    margin: 1px 0 7px;
    border: 0;
    border-radius: 10px;
    background: #e3d5bc;
}
.boxItem .item .title {
    color: #655b4b;
    font-size: 12px;
    line-height: 1.55;
}
.boxItem .item > span,
.boxItem .item > label {
    color: #263b30;
    font-size: 23px;
    line-height: 1.25;
}
.boxItem .item small { color: #71634e; }
.boxItem .link { grid-column: 1 / -1; }
.boxItem:first-child {
    background: linear-gradient(118deg, #283e32 0%, #344b3b 74%, #3d5441 100%);
    box-shadow: 0 13px 28px rgba(30, 47, 35, .2);
}
.boxItem:first-child::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 9px;
    bottom: -31px;
    width: 190px;
    height: 220px;
    background: url("../Icons/EquestrianSeal.svg") center / contain no-repeat;
    opacity: .12;
    pointer-events: none;
}
.boxItem:first-child > b {
    color: #f4ead6;
    border-color: rgba(238, 219, 183, .24);
}
.boxItem:first-child .item {
    background: linear-gradient(150deg, #f5eedf, #e8dcc5);
}
.boxItem:first-child .item:hover { background: #fffaf0; }
.form fieldset, fieldset, .filter {
    border: 0;
    border-radius: 14px;
    background: #f0eadd;
    box-shadow: none;
}
.form .factor { background: #e9e0d1; border: 0; }
.contract header, .contract .contractForm, .contract footer {
    border: 0;
    box-shadow: 0 14px 36px rgba(57, 43, 25, .1);
}
.Plan { border: 0; background: #f2ebde; box-shadow: 0 7px 18px rgba(56, 42, 25, .08); }
.Plan:hover { border: 0; }

@media (min-width: 768px) {
    .boxItem { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .boxItem { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .main .big { padding: 18px 12px 12px; }
    .main .big .module { padding: 14px; border-radius: 15px; }
    .boxItem { gap: 8px; padding: 13px; margin-bottom: 14px; }
    .boxItem .item,
    .boxItem.enterExitHorses .item { height: 138px; padding: 12px; }
}
@media (max-width: 420px) {
    .boxItem { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep the open table toolbar and its column menu above the table header. */
.main .big .module .dt-container .top.open {
    position: relative;
    z-index: 2004;
}

/* Shared, compact DataTables styling. */
.main .big .module .dataTables_wrapper {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    color: #4d5048;
    font-size: 12px;
}
.main .big .module .dataTables_wrapper .dt-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.main .big .module .dataTables_wrapper .dt-buttons .dt-button {
    margin: 0;
    padding: 7px 11px;
    border: 1px solid #dfd3bd !important;
    border-radius: 9px !important;
    background: #f3ecdf !important;
    box-shadow: none !important;
    color: #35473a !important;
    font-size: 12px;
    line-height: 1.5;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.main .big .module .dataTables_wrapper .dt-buttons .dt-button:hover:not(.disabled) {
    border-color: #c6ad82 !important;
    background: #e9dfcd !important;
    color: #263b2f !important;
    transform: translateY(-1px);
}
.main .big .module .dataTables_wrapper table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid #e4dfd4;
    border-spacing: 0;
    border-radius: 12px;
    background: #fffefa;
    overflow: hidden;
}
.main .big .module .dataTables_wrapper table.dataTable thead th,
.main .big .module .dataTables_wrapper table.dataTable thead td {
    padding: 12px 11px;
    border: 0;
    border-bottom: 1px solid #4b5e4f;
    background: #31473a;
    color: #fbf5e9;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.main .big .module .dataTables_wrapper table.dataTable thead th:first-child {
    width: 1%;
    min-width: 42px;
    max-width: 68px;
    padding-right: 8px;
    padding-left: 8px;
    border-top-right-radius: 11px;
    text-align: center;
}
.main .big .module .dataTables_wrapper table.dataTable thead th:last-child {
    border-top-left-radius: 11px;
}
.main .big .module .dataTables_wrapper table.dataTable tbody td {
    padding: 10px 11px;
    border: 0;
    border-bottom: 1px solid #ece8df;
    background: #fffefa;
    color: #4b4c45;
    line-height: 1.7;
    vertical-align: middle;
}
.main .big .module .dataTables_wrapper table.dataTable tbody tr:nth-child(even) td {
    background: #f7f5ef;
}
.main .big .module .dataTables_wrapper table.dataTable tbody tr:hover td {
    background: #f0eadf;
}
.main .big .module .dataTables_wrapper table.dataTable tbody td:first-child {
    width: 1%;
    min-width: 42px;
    max-width: 68px;
    padding-right: 8px;
    padding-left: 8px;
    color: #647064;
    text-align: center;
    white-space: nowrap;
}
.main .big .module .dataTables_wrapper table.dataTable tbody tr:last-child td {
    border-bottom: 0;
}
.main .big .module .dataTables_wrapper table.dataTable tbody td.dataTables_empty {
    padding: 16px;
    color: #77746d;
    text-align: center;
}
.main .big .module .dataTables_wrapper .dataTables_length,
.main .big .module .dataTables_wrapper .dataTables_info {
    color: #77746d;
    font-size: 11px;
}
.main .big .module .dataTables_wrapper .dataTables_length select {
    min-width: 58px;
    margin: 0 5px;
    padding: 5px 8px;
    border: 1px solid #ddd5c8;
    border-radius: 8px;
    background: #fffefa;
    color: #454a43;
}
.main .big .module .dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 32px;
    margin: 0 2px;
    padding: 5px 9px;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #596255 !important;
    line-height: 1.4;
}
.main .big .module .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
    border-color: #e3dacb !important;
    background: #f1ecdf !important;
    color: #31473a !important;
}
.main .big .module .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    border-color: #31473a !important;
    background: #31473a !important;
    color: #fff9ed !important;
}
.main .big .module .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #b4b0a7 !important;
}
.main .big .module .dataTables_wrapper .dataTables_scroll,
.main .big .module .dataTables_wrapper .dataTables_scrollBody {
    max-width: 100%;
}
@media (max-width: 767px) {
    .main .big .module .dataTables_wrapper table.dataTable thead th,
    .main .big .module .dataTables_wrapper table.dataTable tbody td { padding: 8px 7px; }
    .main .big .module .dataTables_wrapper .dt-buttons .dt-button { padding: 6px 8px; }
}

/* Current DataTables markup uses .dt-container and .dt-paging. */
.main .big .module .dt-container .top {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
    padding: 0 0 12px !important;
}
.main .big .module .dt-container .top.open .dt-search {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100% !important;
    text-align: right;
}
.main .big .module .dt-container .dt-search input {
    width: min(260px, 70%);
    margin: 0;
}
.main .big .module .dt-container {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    color: #4d5048;
    font-size: 12px;
}
.main .big .module .dt-container .dt-buttons {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    max-width: 100%;
    margin-bottom: 0;
}
.main .big .module .dt-container .dt-buttons > button.dt-button {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    height: 37px;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 1px solid #dfd3bd !important;
    border-radius: 9px !important;
    background: #f3ecdf !important;
    box-shadow: none !important;
    color: #35473a !important;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.main .big .module .dt-container .dt-buttons > button.dt-button:hover:not(.disabled) {
    border-color: #c6ad82 !important;
    background: #e9dfcd !important;
    color: #263b2f !important;
    transform: translateY(-1px);
}
.main .big .module .dt-container .dt-buttons > button.dt-button img {
    width: 20px;
    height: 20px;
    margin: 0;
    object-fit: contain;
}
.main .big .module .dt-container .dt-buttons button.filterMng {
    order: -1;
}
.main .big .module .dt-container .dt-buttons > button.dt-button .text {
    display: inline !important;
}
.main .big .module .dt-container table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid #e4dfd4;
    border-spacing: 0;
    border-radius: 12px;
    background: #fffefa;
    overflow: hidden;
}
.main .big .module .dt-container table.dataTable thead th,
.main .big .module .dt-container table.dataTable thead td {
    padding: 12px 11px;
    border: 0;
    border-bottom: 1px solid #4b5e4f;
    background: #31473a;
    color: #fbf5e9;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.main .big .module .dt-container table.dataTable thead th:first-child {
    width: 1% !important;
    min-width: 42px;
    max-width: 64px;
    padding-right: 8px;
    padding-left: 8px;
    border-top-right-radius: 11px;
    text-align: center;
}
.main .big .module .dt-container table.dataTable thead th:last-child {
    border-top-left-radius: 11px;
}
.main .big .module .dt-container table.dataTable tbody td {
    padding: 10px 11px;
    border: 0;
    border-bottom: 1px solid #ece8df;
    background: #fffefa;
    color: #4b4c45;
    line-height: 1.7;
    vertical-align: middle;
}
.main .big .module .dt-container table.dataTable tbody tr:nth-child(even) td {
    background: #f7f5ef;
}
.main .big .module .dt-container table.dataTable tbody tr:hover td {
    background: #f0eadf;
}
.main .big .module .dt-container table.dataTable tbody td:first-child {
    width: 1% !important;
    min-width: 42px;
    max-width: 64px;
    padding-right: 8px;
    padding-left: 8px;
    color: #647064;
    text-align: center;
    white-space: nowrap;
}
.main .big .module .dt-container table.dataTable tbody tr:last-child td {
    border-bottom: 0;
}
.main .big .module .dt-container table.dataTable tbody td.dt-empty,
.main .big .module .dt-container table.dataTable tbody td.dataTables_empty {
    padding: 16px;
    color: #77746d;
    text-align: center;
}
.main .big .module .dt-container .dt-length,
.main .big .module .dt-container .dt-info {
    color: #77746d;
    font-size: 11px;
}
.main .big .module .dt-container .dt-length select {
    min-width: 58px;
    margin: 0 5px;
    padding: 5px 8px;
    border: 1px solid #ddd5c8;
    border-radius: 8px;
    background: #fffefa;
    color: #454a43;
}
.main .big .module .dt-container .dt-paging .dt-paging-button {
    min-width: 32px;
    margin: 0 2px;
    padding: 5px 9px;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #596255 !important;
    line-height: 1.4;
}
.main .big .module .dt-container .dt-paging .dt-paging-button:hover:not(.disabled) {
    border-color: #e3dacb !important;
    background: #f1ecdf !important;
    color: #31473a !important;
}
.main .big .module .dt-container .dt-paging .dt-paging-button.current {
    border-color: #31473a !important;
    background: #31473a !important;
    color: #fff9ed !important;
}
.main .big .module .dt-container .dt-paging .dt-paging-button.disabled {
    color: #b4b0a7 !important;
}
.main .big .module .dt-container .dt-scroll,
.main .big .module .dt-container .dt-scroll-body {
    max-width: 100%;
}
@media (max-width: 767px) {
    .main .big .module .dt-container table.dataTable thead th,
    .main .big .module .dt-container table.dataTable tbody td { padding: 8px 7px; }
    .main .big .module .dt-container .dt-buttons > button.dt-button { padding: 6px 8px !important; }
}

/* Anchor page help to the same surface as its form. */
.main .big .pageModule { position: relative; min-width: 0; }
.main .big .pageModule .infoPageImage {
    top: 16px;
    right: 16px;
    left: auto;
    width: 28px;
    height: 28px;
    object-fit: contain;
    z-index: 1;
    cursor: pointer;
}
.main .big .pageModule:has(.infoPageImage) .module h4:first-of-type {
    padding-right: 44px;
}
.main .big .pageModule .wholeSpace { z-index: 2005; }
.main .big .pageModule .infoPageText { z-index: 2006; }

/* Forms get one clear work surface; their controls stay on that same surface. */
.main .big .module:has(.form),
.main .big .module:has(.filter),
.main .big .module:has(.labelsForm) {
    padding: 22px;
    border-radius: 17px;
    background: #faf9f5;
    box-shadow: 0 9px 25px rgba(44, 39, 31, .1);
}
.main .big .module:has(.form) .form,
.main .big .module:has(.filter) .filter,
.main .big .module:has(.labelsForm) .labelsForm,
.form fieldset,
fieldset,
.filter {
    border: 0;
    background: transparent;
    box-shadow: none;
}
@media (max-width: 767px) {
    .main .big .module:has(.form),
    .main .big .module:has(.filter),
    .main .big .module:has(.labelsForm) { padding: 14px; }
}

/* Final cleanup after review on the live local dashboard. */
body:has(.main),
.main .small,
.main .big {
    background: #efede7 !important;
    background-image: none !important;
}
body:has(.main) header {
    background: #283c31;
    box-shadow: none;
}
body:has(.main) header::after { content: none; }
.main .small {
    border: 0;
    box-shadow: none;
    color: #44483f;
}
.main .small .profile {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d9d6ce;
    box-shadow: none;
}
.main .small .OperatorImg,
.main .small .OperatorImg a {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    overflow: hidden;
    border-radius: 10px;
}
.main .small .OperatorImg a::before,
.main .small .OperatorImg a::after {
    content: none !important;
    display: none !important;
    background-image: none !important;
}
.main .small .profile .OperatorImg img {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    object-fit: cover;
}
.main .small nav { border: 0; background: transparent; }
.main .small nav span.active,
.main .small nav li > span.pin {
    color: #fff !important;
    background: #526957;
    box-shadow: none;
}
.main .small .contact { background: transparent; color: #55574f; }
.main .big .module {
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.boxItem {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 22px;
    padding: 0;
    margin: 8px 0 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.boxItem > b {
    position: relative;
    grid-column: 1 / -1;
    padding: 0 0 8px;
    margin: 0 0 2px;
    border: 0;
    color: #343e35;
    font-size: 14px;
}
.boxItem > b::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 27px;
    height: 2px;
    border-radius: 2px;
    background: #ad9063;
}
.boxItem .item,
.boxItem.enterExitHorses .item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    width: auto;
    height: auto;
    min-height: 58px;
    margin: 0;
    padding: 10px 7px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
    transition: color .18s ease, background-color .18s ease;
}
.boxItem .item::before { content: none; }
.boxItem .item:hover {
    transform: none;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .4);
    box-shadow: none;
}
.boxItem .item .title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    color: #5f6059;
    font-size: 12px;
    line-height: 1.55;
    display: block;
    overflow: visible;
}
.boxItem .item > span,
.boxItem .item > label {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    color: #314638;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.boxItem .item small {
    grid-column: 1 / -1;
    grid-row: 2;
    color: #77746c;
    font-size: 10px;
    line-height: 1.4;
}
.boxItem:first-child,
.boxItem:first-child .item,
.boxItem:first-child .item:hover {
    background: transparent;
    box-shadow: none;
}
.boxItem:first-child::after { content: none; }
.boxItem:first-child > b { color: #343e35; }
.boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.boxItem.enterExitHorses > b { grid-column: 1 / -1; }
@media (min-width: 768px) {
    .boxItem { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .boxItem { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .main .big .module { padding: 7px; }
    .boxItem { gap: 7px 12px; }
    .boxItem .item,
    .boxItem.enterExitHorses .item { min-height: 54px; padding: 8px 4px; column-gap: 7px; }
}
@media (max-width: 420px) {
    .boxItem { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Unified, restrained layout for the dashboard and menu profile. */
body:has(.main),
body:has(.login),
.contract {
    background: #efede7 !important;
}
body:has(.main) header,
.contract header {
    background: #283c31;
}
.main .small {
    background: #efede7;
    border: 0;
    border-left: 1px solid #d9d5ca;
    box-shadow: none;
    color: #343b35;
}
.main .small .profile {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 54px;
    margin: 3px 9px 15px;
    padding: 8px 3px 13px;
    text-align: right;
    border: 0;
    border-bottom: 1px solid #d9d5ca;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.main .small .OperatorImg {
    display: block;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
}
.main .small .OperatorImg a {
    display: block;
    width: 46px;
    height: 46px;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}
.main .small .OperatorImg a::before,
.main .small .OperatorImg a::after {
    content: none;
    display: none;
    background: none;
}
.main .small .profile .OperatorImg img {
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ddd8ce;
    box-shadow: none;
    object-fit: cover;
}
.main .small .profileDetails {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    color: #77736a;
    text-align: right;
    overflow: hidden;
}
.main .small .profileDetails > * {
    display: block;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.main .small .profile .fullName { color: #2e4034; font-weight: 700; }
.main .small .profile .otherText,
.main .small .profileDetails > span:not(.fullName) { color: #77736a; font-size: 12px; }
.main .small nav { padding: 8px 10px; border: 0; }
.main .small nav li > :not(.subMenu) { color: #494a43; }
.main .small nav li > span:not(.active):not(.pin):hover,
.main .small nav li > a:hover { color: #263b30; background: #e5e0d5; transform: none; }
.main .small nav span.active,
.main .small nav li > span.pin {
    color: #fff !important;
    background: #526957;
    box-shadow: none;
}
.main .small nav ul.subMenu { background: transparent; }
.main .small nav ul.subMenu li > a { color: #625f57; }
.main .small nav ul.subMenu li > a:hover { color: #283c31; background: #e5e0d5; }
.main .small nav span.active img,
.main .small nav li > span.pin img { filter: brightness(0) invert(1); }
.main .small .contact { background: #e5e0d5; color: #4b514a; }
.main .big { background: transparent; }
.main .big .module {
    padding: 16px;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
}
.main .big .module h4 { color: #303d33; }
.boxItem {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 9px 0 20px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}
.boxItem > b {
    grid-column: 1 / -1;
    padding: 0 1px 7px;
    margin: 0 0 2px;
    border: 0;
    color: #414a40;
    font-size: 14px;
}
.boxItem .item,
.boxItem.enterExitHorses .item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: center;
    column-gap: 10px;
    width: auto;
    height: 92px;
    min-height: 0;
    padding: 11px 13px;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #faf9f5;
    box-shadow: 0 3px 10px rgba(40, 37, 30, .08);
    animation: none;
}
.boxItem .item::before { content: none; }
.boxItem .item:hover {
    transform: translateY(-2px);
    background: #faf9f5;
    box-shadow: 0 7px 15px rgba(40, 37, 30, .12);
}
.boxItem .item img {
    display: block;
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 27px;
    height: 27px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    filter: none;
    opacity: 1;
    object-fit: contain;
}
.boxItem .item .title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    min-width: 0;
    color: #68665e;
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.boxItem .item > span,
.boxItem .item > label {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    color: #2e4637;
    font-size: 20px;
    line-height: 1.2;
}
.boxItem .item small {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    color: #77736a;
    font-size: 10px;
    line-height: 1.25;
}
.boxItem .item:has(small) { grid-template-rows: 1fr auto auto; }
.boxItem .item:has(small) small { grid-row: 2; }
.boxItem .item:has(small) > span,
.boxItem .item:has(small) > label { grid-row: 3; }
.boxItem:first-child,
.boxItem:first-child .item { background: transparent; box-shadow: none; }
.boxItem:first-child .item { background: #faf9f5; box-shadow: 0 3px 10px rgba(40, 37, 30, .08); }
.boxItem:first-child .item:hover { background: #faf9f5; }
.boxItem:first-child::after { content: none; }
.boxItem:first-child > b { color: #414a40; }
.boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.boxItem.enterExitHorses > b { grid-column: 1 / -1; }
.login .image { background: #283c31 !important; box-shadow: none; }
.login .image::before { content: none; }
.login .form { background: #faf9f5; box-shadow: 0 12px 35px rgba(48, 43, 33, .12); }
.contract .contractForm { background: #faf9f5; }
.contract header { background: #283c31; }

@media (min-width: 768px) {
    .boxItem { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .boxItem { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .main .big .module { padding: 10px; }
    .main .small .profile { margin: 3px 7px 12px; }
    .boxItem { gap: 8px; }
    .boxItem .item,
    .boxItem.enterExitHorses .item { height: 88px; padding: 9px; column-gap: 7px; }
    .boxItem .item img { width: 24px; height: 24px; }
}
@media (max-width: 420px) {
    .boxItem { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .boxItem.enterExitHorses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
